Jump to content

3DSMAX - 5. Getting your objects in game.


Recommended Posts

This tutorial is about how to get your objects in the game.

Just a reminder on the tools needed:

Text editing - Notepad ++ -> http://notepad-plus-plus.org/download/v6.5.5.html
Image Conversion tools -> http://www.mwgfx.co.uk/graphix.htm
Gimp or some other Paint editing tool. -> http://www.gimp.org/downloads/
Free ID List Generator -> http://www.gtagarage.com/mods/show.php?id=16944

To be able to run the tools below use XP compatibility from right-clicking the tool.
System dlls -> http://www.mwgfx.co.uk/download/mwgfxdll.EXE
ConvIM -> http://www.mwgfx.co.uk/programs/convim.htm
Show -> http://www.mwgfx.co.uk/download/show.zip

Just to make sure you downloaded the textures, here is the link again:


1. Face Mash editing. Getting to know the basic tools and panels, Poly /Vertex Mash editing. Forming better shapes like roofs.
2. VU mapping and texturing. Applying textures to your objects the right way. &. Creating the Collisions with surface maps and TXDs.
5. How to get objects in game.
6. Making Complex objects and mapping.
8. MAP-IO and aligning objects in game.

Getting your objects into the game.

I have been thinking about how to go about showing you how to do this the best way possible and the common questions are how do you find free ID's on a game map. I will show you this first with one of my old mods.

I would also like to explain how are the IDE, IPL and other data file store the model data later and coordinates system. but first, the download link is below - We can have some fun with this map from what we have learned from the first and second tutorial. You can use this mod as a base with the simple map provided.

This was a work in progress mod using imagery from google maps and is pretty much unfinished. but this can be used as an example mod where we can get your objects into the game.

Download the 0.7 version from; http://www.ukscifi.net/gtatools/Dunsfold_beta_0.7.7z

If your starting a total conversion you'll need a map cleaner for either VC or SA these can be found of GTAGarage but I will give you the links below.

http://www.gtagarage.com/mods/show.php?id=9606 Map cleaner for VC. http://www.gtagarage.com/mods/show.php?id=1070 Cleaner for SA.

The engine will use ID's for objects like Peds, Vehicles and Weapons. so depending on the engine the ID range will differ between a range of 0 - 300, leaving ID's 301 to 6200 free without the need for a .Limit Adjuster (Image below) for Vice City, SA it's 0 - 616 ID's used up leaving you a range from 617 - 19999. There is no ID limit adjuster for SA.

http://www.gtagarage.com/mods/download.php?f=23156 -> SOL Limits adjuster.


http://www.ukscifi.net/gtatools/SOL_Limits.zip -> SOL Limits adjuster.


Adding objects to an existing map - Finding free ID's

There are tools for SA engine to find free IDs called 'Free ID List Generator' made by fastman92 however on VC we have to do things the old fashion way by combining all the IDE files in sequential order making one larger IDE file. browse the larger IDE file you'll spot free IDs by the numbers that are missing, so note them down and put #free in between the lines to mark them.

Example layout starting with 'objs' - This stands for object definition.


objs1300, Dunsfold, dunstxd, 1, 300, 01301, Dunsfold01, dunstxd, 1, 300, 01302, Dunsfold02, dunstxd, 1, 300, 01303, Dunsfold03, dunstxd, 1, 300, 0#free1305, Dunsfold04, dunstxd, 1, 300, 01306, Dunsfold05, dunstxd, 1, 300, 01307, Dunsfold06, dunstxd, 1, 300, 01308, Dunsfold07, dunstxd, 1, 300, 01309, Dunsfold08, dunstxd, 1, 300, 0#free1311, Dunsfold09, dunstxd, 1, 300, 01312, Dunsfold10, dunstxd, 1, 300, 01313, Dunsfold11, dunstxd, 1, 300, 01314, Dunsfold12, dunstxd, 1, 300, 01315, Dunsfold13, dunstxd, 1, 300, 01316, Dunsfold14, dunstxd, 1, 300, 01317, Dunsfold15, dunstxd, 1, 300, 01318, Dunsfold16, dunstxd, 1, 300, 01319, Dunsfold17, dunstxd, 1, 300, 0endtobjendpathend2dfxend

You can get more information about 'tobj', 'path' and '2dfx' check out the gtamodding.com wiki site, I'm not going to tell you everything. Learning to mod is finding out this information for yourself.

So looking at the example ID's above you'll notice 2 are missing, 1304 and 1310. These IDs are free to use for your own models.

The original installed Vice City, there will be a lot less ID's. You can not use the same object ID twice as this has to be unique like the model name. You'll find that each object you add will use up ID's with VC so it is possible to raise the ID limit to a max of 32760 IDs with a Limit Adjuster.

IDE format;

ID, DffModelname, TXDtexture, Clumps, Detail Distance, Render Flags (SA doesn't have Clumps) OR(SA)301, mynewhouse01, House01tex, 299, 0 (VC)301, mynewHouse01, House01tex, 1, 299, 0 

The draw distance range is from 0.1 - 299.9 where all objects will remain solid in game. everything higher like 300.1 - 3000 will be non-solid with no collision generated - These entries are classed as LODs objects.

What are LODs?

LOD models are low level of detail versions of the original models in Vice City and GTAIII. These are the buildings in game you see loaded far far away. As you get closer to the LOD models the normal detail model should take it's place.

In Vice City LOD models are designed to have the same name as the original model, say 'Nornalhouse01' except the first three letters of the LOD model are replaced by the letters LOD as an engine Identifier making the model name 'LODnalhouse01'. LOD collisions do not need mesh data. So any LOD collisions you export to Steve M's COL Editor 2 select the LODmodel and right click select delete mesh.

For SA LODs you are best to look this up - http://gtaforums.com/topic/188549-official-myriads-san-andreas-conversion/page-7?do=findComment&comment=3177288 as there is a lot of information to take in.

Note; Do not use short file names for your objects because if you planning on having a LOD counterpart model you will run into problems. however Model (Dff) and Collision (Col) file names can be no longer then 19 characters excluding the .dff or .col extension. If any models / collisions exists with names longer then 19 characters you'll crash the game on either SA or VC engines.

IMG files;

You can make your own custom IMG file called mymods.img, this is where you can to keep your own DFF and TXD files, If you choose to do this then you have to add a path entry to the ./data/default.dat file at the bottom like;

CDIMAGE models/mymods.img

This works for Vice City

The SA engine you have to add;

IMG models/mymods.img

To the gta.dat file at the top but just below the other IMG entries.

You're allowed to have up to 8 img's files including the gta3.img by default, Fastman92 has released a IMG adjuster for SA and VC that can give you a limit of 128 img files. link -> http://www.gtagarage.com/mods/download.php?f=34180

IMG files have their own engine limits of about 1.96Gb total Most GTA tools depending on how these were made have a file limit of about 1.4Gb for IMGTool2 before things get messy and you can lose your data. So if you're planning to make a big map, split it down into sections.

There is another way to build IMG files. When you export your DFF from 3dsmax you should add each entry to the mymods.ide, like the example shown above. once you have finished exporting all the DFFs and built your TXDs there is another tool that can help you called IDE to IMG sorter.

Place all your DFFs and TXDs into one folder called mymodels. Download Fastman92's IMG to IDE Sorter http://www.gtagarage.com/mods/show.php?id=20552 this tool will make the img files for you sorted against the IDE and COL file.

All you need to do here is config the bat script;

IMGbyIDE.exe /build /ideFile "mymods.ide" /sourceDir "mymodels" /destinationArchive "mymods.img" /IMG_version "1"pause

Now run the scripts and this will produce a perfectly built and sorted img file.

Example below.

The Cols;

All the single collisions need to be gathered into one COL file called mymods.col, once all the files have been combined we can check the COLs we have against the mymods.ide file with Steve's COL Editor 2.


We can also do a duplicate check, but for now the Sort by IDE. These options can later become handy if there are issues. we should have equal amount of COLs, DFFs per entry in the mymods.ide file.



Sort by IDE gives me and error report of possible issues with the COLs against IDE entries. for each entry there has to be COL and for every COL a DFF file.

Now these errors can happen with the bugs in 3dsmax scripts upon exporting broken .dffs. I know the map is fine so I can delete these from the IDE but I also check that these files are not in the IMG file or the IPL files. If I found any of these files in the IPL when we have a problem where we need to check and import the missing COLs.

If the IPL file are fine we continue to remove these lines with the errors noted in the above image.

Kam's scripts are known for their bugs so when you export a map you have to make sure that each model is correct, VU mapped. and nothing has changed within the model.

We should have by now the IMG done, COL built, IDE file ready. Next we need to export the IPL file using Map-IO

Now the fun begins.

Open up 3dsmax, Click on the Hammer icon to bring up Kam's scripts towards the bottom MAP-IO. highlight everything in the scene then click on the uddder.jpg udder icon. Not really sure what its called. We will call this the udderbar. :)



Click on [Effect Pivot Only] and below [Center to Object] now we can go back to MAP-IO and click on export IPL. This may give an error saying there is no ID for any given object. I find this strange that it would say this because there isn't a way to map the IDE within Kams scripts with the correct TXDname. IDE files are best done manually with a text editor where you can add each line as you export your models.

Moving on... Click on the white entry box on the bottom left corner to bring up the listener window. (second image below).



Look at the IDE file for the DFF object Map-IO requests. Look back on the Map-IO panel and click on the [+Object Properties bar] image below, click on the object first then Input the new ID in where it shows ID: 1943, Those #free ID's go in there and not! 1943. Put any name in the TXD box pressing [set].

Now try the export IPL again on the highlighted object. if this error comes up again you know what to do.


The IPL file. (inst) more info go here -> http://www.gtamodding.com/index.php?title=Inst

Click on all the objects you want to export using MAP-IO select export IPL. The IPL output data will appear in the listener window where you can cut and paste into a new text file,


3390, NorVCRoundRoad, 0, -1055.62, -2022.77, 4.51743, 1.0, 1.0, 1.0, 0.0, 0.0, -0.325568, 0.9455193391, NorVCNewDocksW, 0, -922.251, -2043.16, 3.82984, 1.0, 1.0, 1.0, 0.0, 0.0, -0.771625, 0.6360783364, NorVCNewDocks, 0, -932.012, -2072.97, 14.4952, 1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 1.03295, NorVCdockbridge01, 0, -876.754, -1615.38, -6.16142, 1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 1.0

You need to add the inst at the top and end at the bottom like this and check the model object name against the IDE file to make sure we have the correct IDs.

inst3295, NorVCdockbridge01, 0, -876.754, -1615.38, -6.16142, 1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 1.03364, NorVCNewDocks, 0, -932.012, -2072.97, 14.4952, 1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 1.03390, NorVCRoundRoad, 0, -1055.62, -2022.77, 4.51743, 1.0, 1.0, 1.0, 0.0, 0.0, -0.325568, 0.9455193391, NorVCNewDocksW, 0, -922.251, -2043.16, 3.82984, 1.0, 1.0, 1.0, 0.0, 0.0, -0.771625, 0.636078endcullendpathend

Save this data to the mymods.ipl file and place /data/maps/mymods/.


Note; It helps to have all your IDE, IPL files sorted in alpha-numeric order like the example above as this can help the engine sort and render the objects faster increasing FPS and also speeds up loading time.


The gta_vc.dat file. (gta.dat for SA) this next step. we will be adding your IDE, COL and IPL entries to the gta_vc.dat
In the IDE section add;

IDE data\maps\mymods\mymods.ide

The next step is the Collision, if your working with SA the col goes in the mymods.img not the gta.dat file, otherwise add the col in the collision section.

COLFILE 0 data\maps\mymods\mymods.col

in the IPL section add;

IPL data\maps\mymods\mymods.ipl

That should be it, start the game and find your model.


Next tutorial ->

Complex objects - Buildings and Land.

Edited by X-Seti


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.