Quantcast

Jump to content

» «
Photo

[III/VC] Map File Documentation & Troubleshooting

41 replies to this topic
Opius
  • Opius

    General

  • Feroci
  • Joined: 27 Jun 2002

#1

Posted 13 November 2003 - 07:37 AM Edited by ashdexx, 07 January 2006 - 06:44 AM.

Documentation

.IDEs
Object Definition Files
These give the game information about objects in the game.
Both Vice City and GTA3 use the same format for their IDEs.
CODE
ID #, DFF Name, TXD Name, Unknown, Draw Distance, Render properties

The IDE # is a unique number that the game uses to refer to an object. The highest GTA3 can use is 5000. The highest Vice City can use is 6500.
The DFF name refers to a DFF 3D model in GTA3.IMG.
The TXD name refers a TXD texture dictionary in TXD.IMG (Or GTA3.IMG if your video card supports compressed textures)
The unknown value, is obviously unknown, but is always 1. Leave it at that.
The draw distance is the farthest distance in game units that you can see the object from. There are a few notes on this in 'Misc. Problems' below.
The render properties controls special render properties for the object, like transparency, reflections etc.

Some extra info from ST.MU
The unknown value isn't unknown! It is the number of sub-objects in the dff, e.g. streetlamps have a normal and a damaged model, there are even dff file with 3 objects. And: You have as many distance values as there are objects! Would look like this...
CODE
ID #, DFF Name, TXD Name, Object Count, Draw Distance 1 [, Draw Distance 2, Draw Distance 3], Render properties

For more info on the IDE files and some extended properties for them, see Odie's in-depth guide to them.


.IPLs
Instance Location Files
These tell the game where to place objects in the game world.
Vice City has one more value than GTA3. Make sure you take note of this.
If you want SA-specific IPL info, please read This topic. There are significant differences! -dexx
CODE
ID #, DFF Name, Interior # (VICE ONLY), X-Coord, Y-Coord, Z-Coord, ScaleX, ScaleY, ScaleZ, RotationX, RotationY, RotationZ, RotationR

The IDE # is a unique number that the game uses to refer to an object. The highest GTA3 can use is 5000. The highest Vice City can use is 6500.
The DFF name refers to a DFF 3D model in GTA3.IMG.
The interior number is used in Vice City ONLY, and allows models to be invisible until a mission script command loads their interior, making them visible. For more info, see the Mission Coding forum.
The X,Y, and Z coords all refer to a point in the game world. The center of this object will be placed at this point.
X is east to west.
Y is north to south.
Z is vertical.
For GTA3, the centre of the game world is roughly the middle of the stadium in Staunton Island. The GTA3 game world stretches from roughly -2048 to 2048,

each way. There is no Z limit.
For Vice City, the centre of the game world is roughly the middle of the north Golf Course island. The Vice City game world stretches from roughly -2300 to 1600 on the X axis, and -1900 to 1900 on the Y axis. Again, there is no Z limit.
Scale XYZ doesn't seem to work, so just keep those at 1.
Rotations are a pain in the ass, so just use MooMapper


.COLs
Collision Model Files
These tell the games what parts of a DFF should be solid. You can't create these by hand, so use one of SteveMs tools, depending on what you need done. Both games use the same format of COL files, so there should be no compatibility problems.

.ZON Documentation thanks to ZanderZ
.ZONs
.ZONs contain zone data. Every zone file starts with the word 'zone' and ends with 'end'. In between is the actual data:
CODE
Zone name, type, X1, Y1, Z1, X2, Y2, Z2, island

The first X/Y are the bottomleft coordinates, the second X/Y are the topright coordinates. If there are (most likely) more zones in a file, this data is repeated for each zone.
The island number is only used in GTA3, where 1=Portland, 2=Staunton, 3=Shoreside. In VC this is always 1.
The type can either be 0, 1, 2 or 3. In GTA3, this is always 3, in VC all are used.
I think the types are this:
0: normal zone (navig.zon)
1: zone inside a zone (navig.zon ; occurs only at the Junkyard, which is inside the Airport zone)
2: car/pedestrian zone (info.zon). Tells the game which cartype/pedestrian should drive/walk there
3: load zone (map.zon). Tells the game when a new part of the city should be loaded.

I hope this all makes sense. Feel free to ask me anything about it.



Special Game Files
Some files are specialized, and only used once by the game, so I've got comments for these too.

GTA3.DAT / GTA_VC.DAT
File Loading List
This file can be found in /DATA/ for both games. This tells the game what IDE, COL and IPL files to load.
The file is set out with the IDEs loaded first, then the COLs and the IPLs last.
CODE
IDE DATA\MAPS\generic.IDE

This would load the file 'DATA\MAPS\generic.IDE' as an IDE. Note that the filenames begin from the root folder of GTA3/Vice City.
CODE
COLFILE 0 MODELS\COLL\GENERIC.COL

This would load the file 'MODELS\COLL\GENERIC.COL' as a COL file. Note the '0' there? That tells the game that the COL file should always be loaded. This should not be a problem with Vice City, but in GTA3, the 0 refers to the zone that the COL should be loaded in. Portland is 1, Staunton Island is 2 and

Shoreside Vale is 3.
CODE
IPL DATA\MAPS\COMNtop\COMNtop.IPL

This tells the game to load the file 'DATA\MAPS\COMNtop\COMNtop.IPL' as an IPL.

GTA3.IMG / TXD.IMG
DFF and TXD Directories
Depending on your video card, you may or may not have TXD.IMG.
Normally, you would put your DFFs in GTA3.IMG, and TXDs in TXD.IMG.
However, the best way to do this for both games is to put both DFFs and TXDs in GTA3.IMG, then delete TXD.IMG and TXD.DIR. The next time the game runs it will rebuild TXD.IMG with the new TXDs. This helps cut down on missing textures issues too.
Thanks to Demarest for the above.

Problems

DFF Problems
Not very likely, but it can happen, especially if it is a dynamic object (one that can be damaged, changed etc). Try re-exporting your DFF from your modelling program, making sure you're not trying to put a Vice City DFF into GTA3. Please note that GTA3 DFFs WILL WORK with Vice City.

TXD Problems
These usually won't cause problems, but I still see enough of these to warrent a guide.
If the object is all white, it means that your textures can't be found. Make sure that the IDE (See below) file matches the correct TXD to DFF.
If the object is completely transparent, it means that the TXD is corrupt. This happens most often with TXDGold, but try rebuilding your TXD anyway.

COL Problems
These pop up the most often.
If the game crashes, make sure that your COL file for A SINGLE OBJECT is under 2000 polygons. Also make sure that the DFF and the name INSIDE the COL file is the same.
If your object isn't solid, or is solid in the wrong place, make sure that all axises in your modelling program are reset. Then re-export BOTH the DFFs and X

files. Also make sure that the draw distance in your IDE is under 300.

Misc. Problems
If your game is still crashing, or having problems, try these things.
Make sure your objects draw distance is set to above 0, and under 300.
Make sure your objects coords are where you think they are.
Make sure the interior number is set correctly (Usually 0 (Vice City Only))
Make sure your GTA3.DAT/GTA_VC.DAT has links to ALL your IDE, COL and IPL files.
Make sure you've rebuilt all your IMG files.
Make sure your object limit hasn't gone over. GTA3 can handle only roughly 350 more objects added via IPL files before crashing. Vice City can only handle 222 more, although this can be adjusted with SteveMs Limits Editor


If you're still having problems, THEN post a new topic.

If you have any other common problems with a solution, post them here, and I'll add them to this post, all credit to you.
Thanks punk_rocker.

FAQS
Question - Why whenever I add objcets into my game, will the game display roads going through buildings, and various objects scattered throughout the game?

Answer - When you want to add new objects to the game, they must be defined in their own IPL, IDE and COL file.
-Thanks punkrocker128.

Question - How do I create a new IPL and IDE file?

Moomapper can create both of there with ease, and if you need more information, theres documentation for both up there.

Question - Why does the Tarbrush Cafe or the blown-up building 'float' around Vice City after I install mods?

Don't know smile.gif . It's a side-effect of adding mods. If you use Bartons stripped mission scripts, it doesn't seem to happen.
Bartons Scripts

Copyright Opius, 2003. Please do not copy this, just link to this topic.

punk_rocker128
  • punk_rocker128

    Forum Moderator

  • Members
  • Joined: 30 May 2003

#2

Posted 13 November 2003 - 08:20 AM

Jesus. That is excellent Opius.

This should be pinned. Now I know I say everything should be pinned, but this seriously should.

Im going to use this, when adding new SOLID trees in my game. It would help if it was pinned. It would save people and I the trouble of searching for this thread.

Great work Opius cookie.gif cookie.gif .

PS. you could add next to the words 'copyright'. In my opinion it looks official blush.gif

Opius
  • Opius

    General

  • Feroci
  • Joined: 27 Jun 2002

#3

Posted 13 November 2003 - 08:33 AM

Thanks. Also updated my post with your symbol.

I've contacted illspirit, as I think he's the only admin that visits the modding forums regulary.

ZanderZ
  • ZanderZ

    GTA modder & tool writer

  • Members
  • Joined: 08 Sep 2002

#4

Posted 13 November 2003 - 12:29 PM

Good work Opius, it should definitely be pinned.
Maybe some links to programs that can open/edit them would be nice?

Demarest
  • Demarest

    what could be

  • BUSTED!
  • Joined: 12 Jul 2003

#5

Posted 13 November 2003 - 12:32 PM

This is very necessary. Good work, Opius smile.gif

Just one thing (and I know we run into this all the time). I've ALWAYS read (and seen it fix countless people's issues) that you should always add TXDs to gta3.img as well and then if you have txd.img and txd.dir, delete them and let the game rebuild them. As I think over it, it seems logical as the TXD transfer process is a one way street. I think if that info was disbursed, then there would be fewer issues and more uniform TXD implimentation. What are your thoughts?

BOBECKA
  • BOBECKA

    Player Hater

  • Members
  • Joined: 27 Sep 2003

#6

Posted 13 November 2003 - 12:49 PM

In *.ide not DFFname, here there should be a name in *.col

illspirit
  • illspirit

    lycanthroplasty

  • Moderator
  • Joined: 01 May 1976
  • None

#7

Posted 13 November 2003 - 02:57 PM

Nice one Opius. Now you should edit in some tables to make it look pretty. tounge.gif

91nN3dx0r3d

punk_rocker128
  • punk_rocker128

    Forum Moderator

  • Members
  • Joined: 30 May 2003

#8

Posted 14 November 2003 - 12:37 AM

Congratulations, Opius. smile.gif

Perhaps you should edit your post, and tell people to post FAQ's, along with answers. You could then add them to your post.

Just an idea blush.gif

Demarest
  • Demarest

    what could be

  • BUSTED!
  • Joined: 12 Jul 2003

#9

Posted 14 November 2003 - 12:16 PM

I haven't seen a thread pinned that quickly since REspawn destroyed VC biggrin.gif

punk_rocker128
  • punk_rocker128

    Forum Moderator

  • Members
  • Joined: 30 May 2003

#10

Posted 15 November 2003 - 02:14 AM Edited by punk_rocker128, 15 November 2003 - 02:15 AM.

Hey hey, heres a start.

Question - Why whenever I add objcets into my game, will the game display roads going through buildings, and various objects scattered throughout the game?

Answer - When you want to add new objects to the game, they must be defined in their own IPL, IDE and COL file.

Question - How do I create a new IPL and IDE file?

....

Hey Opius, you've made many map mods, how about you answer this question, and stick it into your first post. I'll send you a PM with other questions you should answer, and attach to your first post. smile.gif

steve-m
  • steve-m

  • Feroci
  • Joined: 26 Jul 2002

#11

Posted 16 November 2003 - 09:54 PM

Good work! user posted image

QUOTE (Opius @ Nov 13 2003, 08:37)
.IDEs
CODE
ID #, DFF Name, TXD Name, Unknown, Draw Distance, Render properties

The unknown value, is obviously unknown, but is always 1. Leave it at that.

The unknown value isn't unknown! tounge.gif It is the number of sub-objects in the dff, e.g. streetlamps have a normal and a damaged model, there are even dff file with 3 objects. And: You have as many distance values as there are objects! Would look like this:
CODE
ID #, DFF Name, TXD Name, Object Count, Draw Distance 1 [, Draw Distance 2, Draw Distance 3], Render properties


QUOTE (Opius @ Nov 13 2003, 08:37)
.IPLs
Rotations are a pain in the ass, so just use MooMapper

Rotations values are quaternions (x, y, z, w), no Euler angles as usual. You need special mathematical routines to convert them. Long time ago I made a tool named RotationCalculator, it can be used for this job. (see steve-m.com)

ZanderZ
  • ZanderZ

    GTA modder & tool writer

  • Members
  • Joined: 08 Sep 2002

#12

Posted 15 December 2003 - 07:25 PM

.ZONs
.ZONs contain zone data. Every zone file starts with the word 'zone' and ends with 'end'. In between is the actual data:
CODE
Zone name, type, X1, Y1, Z1, X2, Y2, Z2, island

The first X/Y are the bottomleft coordinates, the second X/Y are the topright coordinates. If there are (most likely) more zones in a file, this data is repeated for each zone.
The island number is only used in GTA3, where 1=Portland, 2=Staunton, 3=Shoreside. In VC this is always 1.
The type can either be 0, 1, 2 or 3. In GTA3, this is always 3, in VC all are used.
I think the types are this:
0: normal zone (navig.zon)
1: zone inside a zone (navig.zon ; occurs only at the Junkyard, which is inside the Airport zone)
2: car/pedestrian zone (info.zon). Tells the game which cartype/pedestrian should drive/walk there
3: load zone (map.zon). Tells the game when a new part of the city should be loaded.

I hope this all makes sense. Feel free to ask me anything about it.

Demarest
  • Demarest

    what could be

  • BUSTED!
  • Joined: 12 Jul 2003

#13

Posted 16 December 2003 - 12:41 PM

Haven't tinkered with ZONs yet, but wanted to thank you for including this. I've been wondering a great deal. Thank you! Maybe Opius will add this to his original post.

ZanderZ
  • ZanderZ

    GTA modder & tool writer

  • Members
  • Joined: 08 Sep 2002

#14

Posted 16 December 2003 - 02:30 PM

You're welcome smile.gif
However, as you may have read in another thread, it appears not to work sometimes... Or I've done something wrong tounge.gif

JernejL
  • JernejL

    Big Homie

  • Feroci
  • Joined: 11 Mar 2002

#15

Posted 16 December 2003 - 06:21 PM

QUOTE (Demarest @ Dec 16 2003, 13:41)
Haven't tinkered with ZONs yet, but wanted to thank you for including this. I've been wondering a great deal. Thank you! Maybe Opius will add this to his original post.

i was making a editor for em...
people weren't interested into
editing em anymore and so i quit it..

DexX
  • DexX

    Black Hat

  • Feroci
  • Joined: 16 May 2002

#16

Posted 16 December 2003 - 06:25 PM Edited by ashdexx, 16 December 2003 - 06:26 PM.

@ zander good info there, i have edited mine before, but i was doing it kinda blindy (still successful though)

@ Delfi, finish that editor! ppl werent interested before, cause its not that big a deal until you have new, big map segments, many of which are in development as we speak, and im sure the deman will increase!

c'moonnnnn........ill give you a cookie.gif !! biggrin.gif

ZanderZ
  • ZanderZ

    GTA modder & tool writer

  • Members
  • Joined: 08 Sep 2002

#17

Posted 16 December 2003 - 06:42 PM

QUOTE (ashdexx @ Dec 16 2003, 19:25)
@ zander good info there, i have edited mine before, but i was doing it kinda blindy (still successful though)

@ Delfi, finish that editor! ppl werent interested before, cause its not that big a deal until you have new, big map segments, many of which are in development as we speak, and im sure the deman will increase!

c'moonnnnn........ill give you a cookie.gif !! biggrin.gif

Can I get a cookie too? That will encourage me to work on my editor smile.gif It can view zones now, no editing yet but that will follow soon.
And when KCow releases his MooMapper sourcecode, I can add radar-loading (it works now only for unedited radars. I have no idea what's wrong with Spooky's code)

Opius
  • Opius

    General

  • Feroci
  • Joined: 27 Jun 2002

#18

Posted 16 December 2003 - 08:46 PM

Thanks ZanderZ. I'll add that to the topic.

Demarest
  • Demarest

    what could be

  • BUSTED!
  • Joined: 12 Jul 2003

#19

Posted 16 December 2003 - 09:46 PM

@ashdexx: Why don't you give them canned goods instead? devil.gif

JernejL
  • JernejL

    Big Homie

  • Feroci
  • Joined: 11 Mar 2002

#20

Posted 17 December 2003 - 11:33 AM

QUOTE (ZanderZ @ Dec 16 2003, 19:42)
And when KCow releases his MooMapper sourcecode, I can add radar-loading (it works now only for unedited radars. I have no idea what's wrong with Spooky's code)

thats because the img data is realigned to new file name order..

it is EASY to fix, easier than you can imagine.. just load the images one by one and merge em together..

you know kcow won't open-source his editor, but i am working on my own
editor that would use col files instead of dff to show the city, and give ability
for you to click and drag the objects.

ashdexx - cerbera is a robot - your sign? you use msn? add me: delfi 'at' volja 'dot' net

ZanderZ
  • ZanderZ

    GTA modder & tool writer

  • Members
  • Joined: 08 Sep 2002

#21

Posted 17 December 2003 - 03:59 PM

QUOTE (Delfi @ Dec 17 2003, 12:33)
QUOTE (ZanderZ @ Dec 16 2003, 19:42)
And when KCow releases his MooMapper sourcecode, I can add radar-loading (it works now only for unedited radars. I have no idea what's wrong with Spooky's code)

thats because the img data is realigned to new file name order..

it is EASY to fix, easier than you can imagine.. just load the images one by one and merge em together..

you know kcow won't open-source his editor, but i am working on my own
editor that would use col files instead of dff to show the city, and give ability
for you to click and drag the objects.

Demarest: :| No thank you... I don't like what he wants in return tounge.gif
Delfi: I'll look at the code. And yes, KCow will make MooMapper opensource. He said so himself. Around January, he will release a new version with some bugfixes and the source along with it smile.gif
But your editor sounds nice too, any idea when it's finished?

JernejL
  • JernejL

    Big Homie

  • Feroci
  • Joined: 11 Mar 2002

#22

Posted 17 December 2003 - 07:16 PM

QUOTE (ZanderZ @ Dec 17 2003, 16:59)
QUOTE (Delfi @ Dec 17 2003, 12:33)
QUOTE (ZanderZ @ Dec 16 2003, 19:42)
And when KCow releases his MooMapper sourcecode, I can add radar-loading (it works now only for unedited radars. I have no idea what's wrong with Spooky's code)

thats because the img data is realigned to new file name order..

it is EASY to fix, easier than you can imagine.. just load the images one by one and merge em together..

you know kcow won't open-source his editor, but i am working on my own
editor that would use col files instead of dff to show the city, and give ability
for you to click and drag the objects.

Demarest: :| No thank you... I don't like what he wants in return tounge.gif
Delfi: I'll look at the code. And yes, KCow will make MooMapper opensource. He said so himself. Around January, he will release a new version with some bugfixes and the source along with it smile.gif
But your editor sounds nice too, any idea when it's finished?

one day or never..

Opius
  • Opius

    General

  • Feroci
  • Joined: 27 Jun 2002

#23

Posted 17 December 2003 - 08:42 PM

KCow made his map editor for his college course, didn't he? That would explain why he won't/can't open source it. He could have his degree revoked.

ZanderZ
  • ZanderZ

    GTA modder & tool writer

  • Members
  • Joined: 08 Sep 2002

#24

Posted 17 December 2003 - 09:20 PM

Let me quote his post:
QUOTE
Anyway, anyone who has any of my source can distribute it to others who want to help develop stuff. I will release all the code of moo mapper (with one final bug fix release) sometime (prob early jan) after tidying up the code, as dont really have much time at the moment to continue development, but will help where I can.. I never knew a working life could be so time consuming


He said this in this thread:
http://www.gtaforums...&t=117976&st=80

DexX
  • DexX

    Black Hat

  • Feroci
  • Joined: 16 May 2002

#25

Posted 17 December 2003 - 11:13 PM

ok, anyone who makes a .zon editor gets some cookie.gif cookie.gif
but only the person who makes the best one (or the first) get's some soup. chunky soup.

and yea, cerb can be a robot sometimes tounge.gif

delfi, i have you on my msn, but your hardly ever on, or atleast not at the same times as i am. ive talked to you on there before, though...(yes it was you, not the fake)

ZanderZ
  • ZanderZ

    GTA modder & tool writer

  • Members
  • Joined: 08 Sep 2002

#26

Posted 18 December 2003 - 12:19 PM

QUOTE (ashdexx @ Dec 18 2003, 00:13)
ok, anyone who makes a .zon editor gets some cookie.gif cookie.gif
but only the person who makes the best one (or the first) get's some soup. chunky soup.

Better hurry up then tounge.gif
One thing though, I'm using Spooky's code, modified by delfi. What if I'm first, will Spooky and delfi get soup then too? tounge.gif

JernejL
  • JernejL

    Big Homie

  • Feroci
  • Joined: 11 Mar 2002

#27

Posted 19 December 2003 - 11:12 AM

i don't want any cookies!! i need money!

DexX
  • DexX

    Black Hat

  • Feroci
  • Joined: 16 May 2002

#28

Posted 19 December 2003 - 02:48 PM

QUOTE (Delfi @ Dec 19 2003, 05:12)
i don't want any cookies!! i need money!

you and me both. if youd like cash though, set up a paypal account, im sure some of the ppl who use your tools would contribute something. just dont make it so they HAVE to pay for a tool. pretty much anything you can mod with a program, i can edit by hand for free. it would have to be some insanely-leet uber-bad piece of software for it to be pay-only.

offer closed on the soup, i only have cookies left.

JernejL
  • JernejL

    Big Homie

  • Feroci
  • Joined: 11 Mar 2002

#29

Posted 19 December 2003 - 07:45 PM

QUOTE (ashdexx @ Dec 19 2003, 15:48)
QUOTE (Delfi @ Dec 19 2003, 05:12)
i don't want any cookies!! i need money!

you and me both. if youd like cash though, set up a paypal account, im sure some of the ppl who use your tools would contribute something. just dont make it so they HAVE to pay for a tool. pretty much anything you can mod with a program, i can edit by hand for free. it would have to be some insanely-leet uber-bad piece of software for it to be pay-only.

offer closed on the soup, i only have cookies left.

you want to go bet that if i set up a pay-pal account nobody will donate in half year?

blaer
  • blaer

    boo!

  • Members
  • Joined: 04 Nov 2002

#30

Posted 11 March 2004 - 09:25 PM Edited by blaer, 12 March 2004 - 01:29 AM.

think i read through all posts on this board lol
but i cant find this so why not add it..

Q: why is my map totally dark at night even doh i added lights?

A: .....


hope someone knows rolleyes.gif




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users