What's new

Tutorial GTA IV Map Editing Tutorial (Object & Vehicle placement) 2012 Edition

  • Thread starter LOKIOLR
  • Start date
  • Views 53,761
L

LOKIOLR

Enthusiast
Messages
422
Reaction score
197
Hello everyone. After months of feedback and discovery, I have rewritten the entire map editing tutorial. The tools are much better now than they were when I wrote the first one including the brand new LOKI'S MAP MOD IMPORTER for Excel V4.0, created by yours truly, that will allow you to create car spawns as easy as regular map mods.I know a lot of you don't want to read all of it and want to just get to the instructions on how to import your mods. I suggest if that's the case to skip down to IMPORTING MAP MODS WITH THE MAP MOD IMPORTER section and skip the rest. If you do want to read the rest, it goes into detail of how the format is setup and how to use the Simple Native Trainer Object Spawner. There's also a troubleshooting section for some of the common problems you may run into.

Original Map Editing Tutorial thread



THE FINE ART OF MAP EDITING: OBJECT AND VEHICLE PLACEMENT (2012 EDITION)



WHAT YOU’LL NEED TO GET STARTED:

Map editing in GTA4 or EFLC isn't too difficult to do it just takes a lot of planning and testing. Until somebody comes up with or decides to share an easier way of doing this, this will have to work for now. Here are some things you'll need to create these mods:
  • A pc copy of Grand Theft Auto IV or Episodes from Liberty City (it doesn't really matter which since most map mods are interchangeable. Also a PC version can be essential for testing map mods. )
  • Simple Native Trainer (This is used for doing layout work to generate your object/vehicle placement coordinates)
  • OpenIV or SparkIV (for extracting files and rebuilding RPF & IMG files)
  • A version of Microsoft Excel (any version ‘97 – CURRENT)
  • A Jtagged XBOX 360 (optional, but recommended, for testing so you're not blowing through discs)
  • A dump of the Episodes From Liberty City ISO (optional, but it will save you time from constantly having to copy files from the retail disc)
  • Punishment's Negative Hash Converter (used with the GTA IV Placement Tool for calculating any missing negative hash values for the "Object Hash List Negative" table in the Map Mod Importer)
BUILDING MAP MODS WITH THE SIMPLE NATIVE TRAINER

1) Setting up your static objects with the Simple Native Trainer.

With your selected PC version of GTA4 and Simple Native Trainer installed, launch GTA4 and activate the Simple Native Trainer using the hot key (F3). You need to run the game as administrator if running Windows Vista or Windows 7. Using the Object Spawner, layout the map objects you'd like to add.
eflc2012020713133574.jpg


There are many functions of the Simple Native Trainer that you will find useful:

Object Spawning Menu: 60 objects can be spawned using the menu; the objects that are spawned can be customized using trainer.ini (trainerbogt.ini if using the trainer in The Ballad of Gay Tony or trainerlatd.ini if using the trainer in The Lost & The Damned). Further 3841 objects can be spawned by browsing through 8 lists depending on starting letter of the object, or by using the more objects menu. In addition, specific TLAD and TBOGT objects have been added on the more objects menu. Using these object spawn options, you can preview the current selected object by holding the X key. Any object can also be spawned in game, by entering the decimal model hash or the model name in the object menu.

eflc2012020713163322.jpg


Move Last Spawned Object: You will be using this primarily to position and rotate your objects. All of the movement keys, like the trainer menus use the number pad (num pad) on your keyboard. You will need to make sure your number lock is on otherwise your key presses will do nothing.

To move objects:
(num pad 4) and (num pad 6) for left/right
(num pad 8) and (num pad 2) for forward/backward
(num pad 1) and (num pad 3) to raise/lower an object

To rotate objects:
(num pad 7) and (num pad 9) to rotate the object along the Z axis.
(num pad / + num pad 8) and (num pad / + num pad 2) to rotate the object along the X axis.
(num pad / + num pad 4) and (num pad / + num pad 6) to rotate the object along the Y axis.
(num pad / + num pad 1) and (num pad / + num pad 3) to rotate all axis at the same time.

You can also decrease or increase the speed that you move objects by using the Right CTRL (RCTRL) + Left/Right directional keys, and the speed you rotate objects by using the Left/Right directional keys. This is good if you want intricate movements or can ease in arranging objects. Also another (RCTRL+A) will clone the object you’re working with. You will use this all of the time when building maps. Finally the num pad – key will back you out to the Object Spawn Menu.

Delete Last Spawned Object: Removes the last object you place. This is great for fixing mistakes.

eflc2012020713154725.jpg


Edit Specific Object: This menu allows you to move/rotate, delete, and clone objects you have previously placed. You can scroll through all of the objects. The current highlighted object will appear semi-transparent. But do note, some rotated objects will reset back to their starting orientation if you try to rotate them again using this function.

Save All Spawned Objects to objects.ini / Load Objects from objects.ini: This will save all of your spawned objects to an objects.ini file that can be loaded with the load objects menu item. A total of 500 objects can be placed and saved in a single objects.ini file.

eflc2012020713141381.jpg


Spawn Object By Entering Model Hash Or Model Name: This is a useful tool because not all objects that can be spawned are contained within the premade object sets. There are a lot of reasons you would use this. One would be for spawning vehicle objects for creating car spawn positions that can be converted using the Map Mod Importer. I find that GTAMODDING.com has a good list of object names and hashes for your reference. Remember, not all objects are solid, so you'll have to play around a bit until you find objects that work well for you.

eflc2012020713135429.jpg


More Objects Menu: You’ll find the 2nd set of 30 preset objects as well as additional save slots for your objects objects2.ini – objects10.ini. This is also where the list of episode specific items and addition in-game items can be found.

If you aren't feeling creative you can simply download a pre-made object.ini file from one of the many websites hosting them (like http://www.gta4-mods/misc, just make sure they're from one of the recent versions of the Simple Native Trainer. Older versions of the object.ini files were missing the correct rotation data (specifically the W axis values) which results in the objects spawning, but they are all rotated wrong).

If you decide to load a pre-made file make sure you make a backup of any object.ini file that may be in your root directory of your GTA4 installation (for example: C:/Program Files/Rockstar Games/GTA4 or
C:/Program Files (x86)/Rockstar Games/GTA4 for a 64 bit OS). Under the object spawning menu you'd select "Load Objects from objects.ini". This will spawn the objects contained in that file. Check to see if everything looks OK, and make any changes that you want to make, then save the objects to the objects.ini file by selecting the menu item "Save All Spawned Objects to objects.ini".

2) Setting up your new vehicle spawns with the Simple Native Trainer.

Thanks to the latest Map Mod Importer setting up vehicle spawns is now as easy as spawning regular objects. Simply spawn the vehicle using the “Spawn by Entering Model Hash or Model Name” function and press (F10) to spawn by model name, and then enter the vehicle’s name. The vehicle’s name should match what is listed in the vehicles.ide file. Once you have done that you’ll see your vehicle spawn without wheels and will be white in color. Place and rotate as needed (however vehicles are unable to be rotated along the X and Y axis, only Z axis rotations are permitted). These can be save in conjunction with other stationary objects as the Map Mod Importer will recognize the vehicle hash and create the STREAM lines appropriately.

With the Map Mod Importer you can take this:
eflc2012020713111550.jpg


And get this:
eflc2012020713130672.jpg

3) XPL/WPL files: Breaking Down the File Formats.

XPL files or Xenon Placement List (Windows Placement List for WPL) files contain map and object spawning data for GTA IV. They consist of a variety of sections. The two we are going to focus on in this tutorial are SECTION 0 - INST (Item Placement) which is used for stationary map objects, and SECTION 3 - CARS (Stream) which is used for spawning vehicles. In the GTA IV Placement Tool you will see them laid out like the pictures below.

The columns read as follows:

SECTION 0 – ITEM PLACEMENT
  • MODEL – The object name (or hash if you have the program set to display the object hash)
  • POSX, POSY, POSZ – The X,Y,Z coordinates for your object. The GTA IV Placement Tool limits your values to include up to 3 digits past the decimal point. Any additional digits will cause the program to report a “Floating Point Error”.
  • ROTX, ROTY, ROTZ, ROTW – The quaternion 3D rotation set for your objects. For more information on quaternions check out this Wikipedia article.
  • UNKNOWN1 (OBJECT FLAGS) – Toggles different aspects of an object. We will use the value 384 for all of our objects. I may expand on this later on.
  • LOD – Points to a LOD object line within an .XPL file in the XBOX360.rpf. You can learn more on how to use these in your mods in the Advanced Techniques section of the tutorial.
  • UNKNOWN2 (???) – Not yet known. Looks like another flag.
  • UNKNOWN3 (DRAW DISTANCE OVERIDE) – Overrides the default draw distance of an item. Values 1-299 will retain the solidity of solid objects, 300 and greater will make a solid object no longer solid.
SECTION 3 – VEHICLE PLACEMENT (STREAM)



  • X,Y,Z - The X,Y,Z coordinates for your object. The GTA IV Placement Tool limits your values to include up to 3 digits past the decimal point. Any additional digits will cause the program to report a “Floating Point Error”.
  • UNKNOWN4 – UNKNOWN5 (ROTATION) – The vehicle’s rotation stored as a vector. UNKNOWN4 is the sine value of the angle, UNKNOWN5 is the cosine value of the angle.
  • UNKNOWN6 (ANGLE VARIATION???) – I’m not entirely sure what this value represents but increasing it adds a random variation to the angle of rotation. Setting this value to 0 will spawn at the exact angle defined in UNKNOWN4 & UNKNOWN5
  • UNKNOWN7 (CAR HASH) – Defines the vehicle you wish to spawn. Leaving it blank (0) will spawn a random car. The GTA IV Placement Tool doesn’t display this value correctly when loading a stream XPL/WPL file. To check these hash values you will need to use the Placement Editor 1.3 instead.
  • UNKNOWN 8 – UNKNOWN 11 (CAR COLORS) – These define a set color for the vehicle you are spawning. By default, each value is -1 which chooses a random color from the carcols.dat file. To set a specific color a value from 0 – 136 can be entered. These represent colors from the chart below.
carcolors.png
  • UNKNOWN 12 (FLAGS) – These binary flags define various vehicles to spawn or random ambient events. By default I use 1633 for all of my car spawns. Some values can override which cars you define to spawn. For example a value of 4 will always spawn a police cruiser, 8 will always spawn a fire truck, and 32 always spawns an ambulance. These aren’t really worth messing with for map mods.
  • UNKNOWN 13 – UNKNOWN 14 (LOCKED AND ALARM) – I believe these define the percentage that a car will spawn locked and will spawn with an alarm active. However the GTA IV Placement Tool doesn’t import these values correctly. So I’m unable to test if that is accurate. By default they are set to 0 which results in an always locked car with an alarm.
IMPORTING MAP MODS WITH THE MAP MOD IMPORTER

4) Prepping your console map files.


If you don't have a copy of your console version of GTA4 or EFLC dumped to your hard drive then you'll need to use the XBOX Backup Creator to copy and extract the XBOX360.RPF file from the root directory of the game disc since you'll need that file to have access to the map .XPL files. If you are creating car spawns you will need a stream .XPL file which are not located in the XBOX360.rpf. Stream .XPL files can be found in the map .IMG files contained within the folders at XBOX360/DATA/MAPS directory in the ISO. To extract these files using the XBOX Backup Creator, select the Image Tools tab then image browser. From here you can navigate the file tree to find your file. Once you have the XBOX360.RPF file open it in OpenIV. Once you have it open navigate to the DATA/MAPS/ directory. In here you'll see a bunch of folders referencing the real life locations in NYC which correspond to the sections of Liberty City. Pick a file to edit from within those directories and extract it to your PC. It doesn't seem to matter which file you use because your objects will spawn anywhere on the map regardless which file you use. For example, I use the Happiness Island XPL file, nj_liberty.xpl most of my edits so far. Open the extracted XPL file in the GTA IV Placement Tool 2.2. You will need to export the XPL data to a .dat file using the Export to Dat function (CTRL+I). The .dat file created is plain text which will allow you to paste in the additional objects you are adding. For stream XPL files, select the Stream tab and delete all of the lines until the Stream line count at the bottom of the GTA IV Placement Editor reads 0 and the Stream section is empty.

Before you add your modified files back in you will want to take a moment to free up some space in the XBOX360.rpf file. You can do this by deleting some of the files in the HTML directory. These files are use by the game for the in-game PCs that you access in the [email protected] internet cafes and your safe houses. Since you most likely won’t need to access those, they can be deleted. Once you have removed them select “rebuild” under the File menu section to rebuild the RPF file table. This will shrink your file size. Remember, you will need to keep your XBOX360.rpf file size smaller or the same as the original. Any larger and it will cause it to corrupt when you try to import it back into the ISO. If you aren’t comfortable doing that, you can download a preshrunk XBOX360.rpf file in the Additional Downloads Section of this tutorial. For IMG files, be sure that the finished edited file size is the same as or less than the original file size.

5) Using the Map Mod Importer to import your map mods

Begin by opening the Map Mod Importer into Excel. You will see a variety of tabs at the bottom of the document window. Now in a text editor, open your objects.ini file (or whichever .ini file your objects are stored in). Select all of your objects (CTRL+A) and paste into cell A1 (the upper left most cell) in the “Paste Object.ini Contents Here” tab.

mapmodimporter1.jpg


mapmodimporter2.jpg


Select the “Processed File” tab. You should see your object lines as they would appear in the GTA IV Placement Tool. The top of the “Processed File” tab contains your object spawns and the bottom contains your car spawns. If you happen to encounter a line in the object session missing the object’s name and displaying a negative hash instead it means that the negative hash is missing from the negative hash table and you will need to follow the instructions in the Troubleshooting section below to add that in before you can continue on. The map mod importer tool supports 541 of them as of version 4.0 but that isn’t all of them.

There are a few optional tweaks that can be accessed via the “Modification Settings” tab. The first is an offset tweak which will move your entire set of objects by a set XYZ value. This is useful since a similar option in the GTA IV Placement Tool is broken and will corrupt your file if you attempt to use it. It’s great for moving your set of map objects around without having to tweak each object individually.
The second option is a object draw distance override. By default this is set to 0 which will set UNKNOWN3 to -1 which defaults to the regular object draw distance. To maximize your draw distance while keeping your solid objects solid you can change this value to as high as 299. Any higher and the solid objects you spawn will no longer be solid.

If you have any vehicle spawns as part of your object.ini file you will want to scroll down to row 501 in the “Processed File” tab. Here you will see a bunch of drop down boxes for selecting car colors as well as a yellow column for entering values to override the current setup rotation angle (just in case you want to tweak the current vehicle rotation angle).
Once your tweaks have been made you are ready to save your file. While the “Processed File” tab is open, select Save As from the File menu. Using the file type drop down box, select “CSV (comma delimited)” and name your file. You will get two popup warnings which you will need to click YES and OK to.

Now open your saved .CSV file in a text editor (either notepad or notepad++ ). You will see your files resemble the .DAT files created by the GTA IV Placement Tool. Open your exported .DAT file (from section 4 above) or if you do not have one yet create one (Open your .XPL file in the GTA IV Placement Tool, delete the Stream section if using a stream XPL for car spawns and select Export to DAT(CTRL+E))

For Objects:

In your .CSV file you will want to select and highlight the object lines at the top of the file. Copy (CTRL+C) and paste (CTRL+V) those into the .DAT file between the last line of SECTION 0 (all of the objects in the XPL file) and the [ENDSECTION] marker. Don’t worry about the extra characters and commas generated from the excel file. I have set them up to be commented out and ignored by the GTA IV Placement Tool.

For Vehicle spawns:

In your .CSV file you will want to select and highlight the stream lines towards the bottom of the file. You’ll see a marker that says “# STREAM (VEHICLE) PLACEMENT BELOW”. Copy (CTRL+C) and paste (CTRL+V) those into the .DAT file between the [SECTION 3] marker and the [ENDSECTION] marker just below that. As before, don’t worry about the extra characters and commas generated from the excel file. Like the object placement section, I have set them up to be commented out and ignored by the GTA IV Placement Tool.

When your object lines have been inserted into the .DAT file, save them (CTRL+S) and open the GTA IV Placement Tool. Create a new XPL file (CTRL+SHIFT+N) (or CTRL+N if you are creating a WPL file instead) then import the objects from the DAT file (CTRL+I) and save (CTRL+S). Make sure when you select the name of your file that you include the .XPL or .WPL extension in the file name as the GTA IV Placement Tool will not do that automatically. If you encounter a message stating you have a floating point error you will need to run it through the Floating Point Error Correction tool. More information on how to fix that and instructions on using that tool can be found in the Troubleshooting section below. Once you have your modded XPL / WPL file saved you can now import it back into the XBOX360.rpf or map .IMG file using OPEN IV. You will need to make sure OPEN IV is in “edit mode” and then right click on the file you wish to replace and select “replace”. Find your file and select OK. Double check to make sure your XBOX360.rpf file size is the same or smaller as before. Now you can open up the XBOX Backup Creator and using the Image Browser option under the Image Tools tab replace the XBOX360.rpf or map .IMG file in your ISO. From here you can choose to stealth patch and burn your disc.

6) Testing your modded files.

While you could jump right in and import your modded file back into the XBOX360.rpf or your map .IMG file and go burn your disc you run the risk of some objects not ending up how you want them. What I recommend is that you either save your map mod as a .WPL file and import it into the PC version to test or as a .XPL and import it into an ISO rip on a JTAG. That way you are not wasting discs. Here are a few things to look out for:

  • Check your object heights. Some objects spawn lower than what you may have setup in the Simple Native Trainer. While the Map Mod Importer does fix some of these automatically, it doesn’t fix them all. However, if you encounter an object which spawns lower than it should you can add it to the list so that the Map Mod Importer will correct it on future files. Instructions on how to do this are included in the Troubleshooting section below.
  • Make sure you don’t have any major frame rate hits. This sometimes happens when you have too many objects in close proximity to each other. If this happens you may need to split up the objects among a few XPL files or reduce the number of extra objects overall.
  • Test everything. That means if, for example, you spawn ladders; make sure you can use your ladders. I ran into trouble with an 8 object ladder up the side of a sky scraper. It worked well in the Simple Native trainer but on the console game the player would fall off midway down, to his death. Or if you make a floor or ceiling out of garage doors, that it’s not the door that animates open and shut. Make sure everything works well since nobody wants to play on a buggy map.

TROUBLESHOOTING

PROBLEM: When I import my objects into the GTA IV Placement Tool and save I get window popping up saying that I have a “floating point error”.

SOLUTION: You will need to run your GTA IV Placement Tool .DAT file through the Floating Point Error Correction Tool.

HOW TO FIX A FLOATING POINT ERROR WITH THE FLOATING POINT ERROR CORRECTION TOOL

WHAT IT DOES:

This file will fix the over 42,000 values that cause floating point errors in the GTA IV Placement Tool. It checks for errors in files up to 6000 lines long (way longer than you'll ever need it to be). Floating Point Errors are due to an error in the coding for the GTA IV Placement Tool. It fixes floating point error triggering values on the X, Y, and Z axis in the Object Placement section of an XPL file (SECTION 0) by adding 0.001 to the value of the coordinate creating the error. It doesn't look at any other values including vehicle placement coordinates (although I don't believe any of those cause floating point errors).

HOW TO USE IT:

1. If you haven't done it already, export your .XPL to a .DAT file using the "export to dat" function (CTRL-E) in the GTA IV Placement Tool. Find the .DAT file you were trying to import or have exported from the Item Placement Tool and change the file name extension to .CSV (for example mymods.dat would become mymods.csv)

2. Open your newly created .CSV file in excel.

3. Select all cells (click on the box in the upper left had corner where the row and column number/letters converge. CTRL - A doesn't always select the entire file for some reason.), and copy (CTRL - C)

4. In the Floating Point Error Correction Tool excel file (open it if you haven't already), Select (click on) the "Paste .DAT file contents here" tab (in yellow) below then select cell A1 (upper left most cell) and paste (CTRL - V)

5. Your fixed file will display on the Processed File tab (in green). While the Processed File sheet is still showing select SAVE AS from the File menu. This can be accessed be under the File menu in older versions of excel or from the Office button in newer versions of excel (upper left hand corner with the window boxes logo on it).

6. Save the sheet as a CSV (Comma Delimited) (.CSV) by using the "save as type" drop down menu below the file name text box. Name the file whatever you'd like. It may take a minute to save since there are a lot of formulas in this file it has to calculate. Be patient.

7. Select ok / yes for the two pop-up prompts that appear.

8. Open your newly created .CSV file in a text editor. (Notepad or Notepad++ : http://notepad-plus-plus.org/ work well for this. Notepad++ being much faster for larger files.)

9. Using the replace function (CTRL - H) replace ",,,,,,,,,,," (11 commas, without the quotes) with " " (blank, without the quotes). Select “Replace all”.

10. Delete the extra space at the bottom of the file, leaving only one blank row below the last [ENDSECTION] marker. If you do not do this, when you try to import the fixed .DAT file you will get an error.

11. Save and rename the file extension to .DAT

Now you are ready to import the file back into the Item Placement Tool, now without any floating point errors.

PROBLEM: Some of my objects are spawning too low in-game.

SOLUTION: You will need to add a Z axis offset for your object in the Map Mod Importer’s “Z AXIS OFFSET” tab.

HOW TO ADD AN OBJECT HEIGHT FIX TO THE MAP MOD IMPORTER:


First thing you are going to need to do is import your map mods into the PC version of GTA IV or EFLC. To do this import your created .DAT file into the GTA IV Placement Tool like before, but this time create a new .WPL file (CTRL+N) instead of an .XPL . This .WPL file will need to go in one of the directories in the /PC/DATA/MAPS folder. Which folder depends on which file you were using to add your objects. The directory tree will be similar to what you would find in the XBOX360.rpf file. Locate the original unedited .WPL file, and copy your edited .WPL file into that directory. Be sure to back up the original unedited file before your overwrite it. Once you have done that launch GTA IV or EFLC and go to where your spawned objects are. Once you are there load your object.ini file you used to import them with the Map Mod Importer. Using the “Edit Specific Object” object function highlight the object that is spawning at the incorrect height. Be sure to take note which object number it is listed as in the “Edit Specific Object” menu. Select “Move Selected Object” and drop the movement speed to as low as it will go, 0.01 using (RCTRL+A). Now move the object until you see it line up exactly with the same object spawned by the .WPL file. Repeat this for each object that needs fixing. Once you are done save your objects to a different objects.ini file using the “More Objects” menu. Open both objects.ini files in notepad and scroll down until you get to the numbered object that you took note of earlier (be sure to add one to the recorded number since the numbering of the object in the objects.ini file starts with 1, whereas the “Edit Specific Items” menu starts with 0. Once you’ve found the object in both files, subtract the object’s Z axis value from the first object.ini file from that of the Z axis value of the same object in the second objects.ini file. The number you get should be positive if your object was spawning too low. That number is your “Z AXIS OFFSET” for that object. Now open the Map Mod Importer and select the “Z AXIS OFFSET” tab in yellow. You will see two columns of numbers, the first being the object’s hash value, and the second is the offset value. Place your object’s hash value in the next available row below the rest of them in column 1 and the offset you calculated in column 2. Now save your changes to the Map Mod Importer (CTRL-S). You have now added an offset for that object and it will correct itself from now on when you use the Map Mod Importer. You are now ready to import the original objects.ini file using the Map Mod Importer.

PROBLEM: I have an object that appears as a negative hash in the “Processed File” tab in the Map Mod Importer instead of the object name.

SOLUTION: The object hash is missing on the “Object Hash List Negative” and needs to be added.

HOW TO ADD AN OBJECT HASH TO THE “OBJECT HASH LIST NEGATIVE”

Download and install the expanded hashes.ini file for the GTA IV Placement Tool (from the link at the beginning of the tutorial) if it’s not installed already (which it really should be anyways). This can be installed by copying it into the same directory as the GTA IV Placement Tool and overwriting the hashes.ini there. Next download Punishment’s Negative Hash Converter from the link at the beginning of the tutorial as well. Open the Negative Hash Converter and type the negative hash into the text box marked “Negative Hash”. Once that is entered you will see the positive hash appear below it. Open the GTA IV Placement Tool and under the “Options” menu select “Calculate name from the hash”. Click on the “Copy True Hash” button and paste (CTRL+V) the hash into the “Hash (long word)” text box, then click on the “calculate” button. You should see the object name appear below the hash. Open the Map Mod Importer and select the “Object Hash List Negative” tab in yellow. You will see two columns, the first with the negative object hash, and the second with the object name. In the next available row at the bottom of the list paste the object’s negative hash in column 1 and the object name you just calculated into column 2. Repeat these steps for any additional negative hashes you may have. Save your changes to the Map Mod Importer (CTRL+S). You should see that you now have object names appearing where you once had just negative hashes in the “Processed File” tab.

ADVANCED TECHNIQUES (COMING SOON)
Including: Adding 2DFX effects, Setting up mock LOD objects, Spawning interior objects.

TUTORIAL VIDEOS

HOW TO SPAWN VEHICLES USING THE MAP MOD IMPORTER
A 15 minute walk through on how to use the Map Mod Importer.

ABOUT LOKI’S MAP MOD IMPORTER
The Map Mod Importer is a powerful tool that allows you to convert objects and vehicle placements from the Simple Native Trainer to a format that can be imported on to the XBOX 360. It supports almost 29,000 different objects including interiors and vehicles with automatic corrections for height offsets and negative hashes. Vehicle spawns are supported with perfect 360 degree rotation conversion, and custom colors.
New to version 4.0: Car Spawning with rotations

***Special thanks to Punishment for his Negative Hash Value Converter. That program is a lifesaver. A very huge thank you to 3DOOMER on the GTAMODDING.RU forums for pointing me in the right direction for figuring out how the car rotations worked. ***
 
L

LOKIOLR

Enthusiast
Messages
422
Reaction score
197
I've been working on this for the last few months. Still finishing adding some more images. But it's 1AM here so I'm calling it quits for now. I hope you like it. Definitely check out the new Map Mod Importer.
 
D

DONTxMESSxABOUT

Enthusiast
Messages
1,418
Reaction score
256
I've been working on this for the last few months. Still finishing adding some more images. But it's 1AM here so I'm calling it quits for now. I hope you like it. Definitely check out the new Map Mod Importer.
yes looks awesome:smile: im trying this now
 
G

GTAxCHAOS

Enthusiast
Messages
722
Reaction score
37
Looks really nice and easy to do but still will take some time i will try this later + like :smile:
 
E

eXtReMe MoDd3r

Enthusiast
Messages
1,455
Reaction score
81
I've been working on this for the last few months. Still finishing adding some more images. But it's 1AM here so I'm calling it quits for now. I hope you like it. Definitely check out the new Map Mod Importer.
is it the same thing for doing car spanws or no
 
L

LOKIOLR

Enthusiast
Messages
422
Reaction score
197
is it the same thing for doing car spanws or no
To do car spawns you just place car models in the world like you would objects. So you would use the "Spawn by object hash or name" and type in SULTAN for example. The Map Mod Importer looks for the car object hashes and creates the stream likes towards the bottom of the "Processed File" tab. I'm planning on making a video tutorial hopefully soon which should alleviate any confusion.
 
X

Da Accura420

Real Life Mods 2.0
Messages
1,251
Reaction score
325
wow This is a really good tutorial and really nice program keep up the good work as always :biggrin:
 
E

eXtReMe MoDd3r

Enthusiast
Messages
1,455
Reaction score
81
Can you help me on teamviewer please tomorrowx
 
L

LOKIOLR

Enthusiast
Messages
422
Reaction score
197
Added a tutorial video on how to use the Map Mod Importer.
 
L

Lt Mays

Enthusiast
Messages
1,264
Reaction score
101
hey how do you find out the unknows? when you enable coords it only shows the X Y Z
is there a way to get to get these? i want to spawn a Specific car

  • X,Y,Z - The X,Y,Z coordinates for your object. The GTA IV Placement Tool limits your values to include up to 3 digits past the decimal point. Any additional digits will cause the program to report a “Floating Point Error”.
  • UNKNOWN4 – UNKNOWN5 (ROTATION) – The vehicle’s rotation stored as a vector. UNKNOWN4 is the sine value of the angle, UNKNOWN5 is the cosine value of the angle.
  • UNKNOWN6 (ANGLE VARIATION???) – I’m not entirely sure what this value represents but increasing it adds a random variation to the angle of rotation. Setting this value to 0 will spawn at the exact angle defined in UNKNOWN4 & UNKNOWN5
  • UNKNOWN7 (CAR HASH) – Defines the vehicle you wish to spawn. Leaving it blank (0) will spawn a random car. The GTA IV Placement Tool doesn’t display this value correctly when loading a stream XPL/WPL file. To check these hash values you will need to use the Placement Editor 1.3 instead.
  • UNKNOWN 12 (FLAGS) – These binary flags define various vehicles to spawn or random ambient events. By default I use 1633 for all of my car spawns. Some values can override which cars you define to spawn. For example a value of 4 will always spawn a police cruiser, 8 will always spawn a fire truck, and 32 always spawns an ambulance. These aren’t really worth messing with for map mods.
  • UNKNOWN 13 – UNKNOWN 14 (LOCKED AND ALARM) – I believe these define the percentage that a car will spawn locked and will spawn with an alarm active. However the GTA IV Placement Tool doesn’t import these values correctly. So I’m unable to test if that is accurate. By default they are set to 0 which results in an always locked car with an alarm.
 
E

eXtReMe MoDd3r

Enthusiast
Messages
1,455
Reaction score
81
Added a tutorial video on how to use the Map Mod Importer.
Could you help me on teamviewer to do car spawns please? (i have the csv file but i dont know what to do from there)
 
L

LOKIOLR

Enthusiast
Messages
422
Reaction score
197
hey how do you find out the unknows? when you enable coords it only shows the X Y Z
is there a way to get to get these? i want to spawn a Specific car

  • X,Y,Z - The X,Y,Z coordinates for your object. The GTA IV Placement Tool limits your values to include up to 3 digits past the decimal point. Any additional digits will cause the program to report a “Floating Point Error”.
  • UNKNOWN4 – UNKNOWN5 (ROTATION) – The vehicle’s rotation stored as a vector. UNKNOWN4 is the sine value of the angle, UNKNOWN5 is the cosine value of the angle.
  • UNKNOWN6 (ANGLE VARIATION???) – I’m not entirely sure what this value represents but increasing it adds a random variation to the angle of rotation. Setting this value to 0 will spawn at the exact angle defined in UNKNOWN4 & UNKNOWN5
  • UNKNOWN7 (CAR HASH) – Defines the vehicle you wish to spawn. Leaving it blank (0) will spawn a random car. The GTA IV Placement Tool doesn’t display this value correctly when loading a stream XPL/WPL file. To check these hash values you will need to use the Placement Editor 1.3 instead.
  • UNKNOWN 12 (FLAGS) – These binary flags define various vehicles to spawn or random ambient events. By default I use 1633 for all of my car spawns. Some values can override which cars you define to spawn. For example a value of 4 will always spawn a police cruiser, 8 will always spawn a fire truck, and 32 always spawns an ambulance. These aren’t really worth messing with for map mods.
  • UNKNOWN 13 – UNKNOWN 14 (LOCKED AND ALARM) – I believe these define the percentage that a car will spawn locked and will spawn with an alarm active. However the GTA IV Placement Tool doesn’t import these values correctly. So I’m unable to test if that is accurate. By default they are set to 0 which results in an always locked car with an alarm.

You can generate those by using the Simple Native Trainer as shown in the video and Map Mod Importer to import them. If you don't want to use the Simple Native Trainer (in the case that you may not have the PC version or are using the Train Track Editor to get your XYZ coordinates) you can still use the map mod importer to figure out some of those. For Unknown 4 & Unknown 5 just use the Rotation Angle override column to pick your rotation angle. 0/360 is North, 90 is East, 180 is South, and 270 is West. Put the angle you want in one of the rows in that column and copy the values down in the appropriate columns (they're all labeled). For Unknown 6, just leave it as 0, for 12, use 1633, 13&14 0 for both. Unknown 7 is your vehicle's hash which you can look up on one of the many lists of vehicle hashes on these forums.

But really it's much easier to just use the Simple Native Trainer and the Map Mod Importer.
 
L

Lt Mays

Enthusiast
Messages
1,264
Reaction score
101
thanks!! now i can just make my character look forward and get a good idea

OOO DUDE! i didnt notice that it saves all the info for your spawned vehicles! i kept skimming the videos thanks so much
 
L

LOKIOLR

Enthusiast
Messages
422
Reaction score
197
Could you help me on teamviewer to do car spawns please? (i have the csv file but i dont know what to do from there)

Once you have the CSV file you'll need to copy and paste the vehicle lines from the CSV into a DAT file created from the GTA IV Placement Tool. Just load in which stream XPL file you are planning to use into the GTA IV Placement Tool and extract to Dat (CTRL+E). Open that .DAT file in notepad as well as the CSV and copy and paste your vehicle lines from the CSV into the DAT file (make sure to delete any of the original vehicle lines in the stream file/stream DAT file before you save and import.) These vehicle lines are inserted between the [SECTION3] marker and the following [ENDSECTION] marker. Save your changes to the DAT file (CTRL+S). Reopen your GTA IV Placement Tool and create a new XPL file (CTRL+SHIFT+N). Import your DAT file you just made (CTRL+I), and save your changes (CTRL+S). Once your file is saved import it back into the IMG file you originally extracted the unmodified one from.

Check out the video. It walks through all of this.
 
E

eXtReMe MoDd3r

Enthusiast
Messages
1,455
Reaction score
81
Once you have the CSV file you'll need to copy and paste the vehicle lines from the CSV into a DAT file created from the GTA IV Placement Tool. Just load in which stream XPL file you are planning to use into the GTA IV Placement Tool and extract to Dat (CTRL+E). Open that .DAT file in notepad as well as the CSV and copy and paste your vehicle lines from the CSV into the DAT file (make sure to delete any of the original vehicle lines in the stream file/stream DAT file before you save and import.) These vehicle lines are inserted between the [SECTION3] marker and the following [ENDSECTION] marker. Save your changes to the DAT file (CTRL+S). Reopen your GTA IV Placement Tool and create a new XPL file (CTRL+SHIFT+N). Import your DAT file you just made (CTRL+I), and save your changes (CTRL+S). Once your file is saved import it back into the IMG file you originally extracted the unmodified one from.

Check out the video. It walks through all of this.
i dont know how to get it dat file could u help me on teamviewer in about half an hour or so please
 
L

LCBradley3k

Seasoned Member
Mr. Nice Guy Bright Idea
Messages
3,479
Reaction score
951
I have not read into your map importer, but do you really think it's faster than Cathering's Object Conversion Tool?
 
S

SmashOut200HD

Enthusiast
Messages
64
Reaction score
2
Nice map mod importer, makes map editing a breeze
 
G

GTAxCHAOS

Enthusiast
Messages
722
Reaction score
37
I have not read into your map importer, but do you really think it's faster than Cathering's Object Conversion Tool?
Not being funny but that tool doesnt work for my custom map mods so i had to use lokis tut (his previous 1 which was in the sticky):smile:
 
Top Bottom