Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. The Contract
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Announcements

    2. Support

    3. Suggestions

Adapting Mods to AutoID


HzanRsxa2959
 Share

Recommended Posts

You're probably here from the AutoID topic, but if not, then you should probably go there first.

 

Note: The model ID of any entity added using AutoID will frequently change. Any such entity must not be saved with the game. This issue has been resolved in AutoID 2.0.

 

Let's see which entities can be added using AutoID:

  1. Peds (Not saved in the game by default, so it's fine.)
  2. Vehicles (Must not be saved in the garage From 2.0, cars can be freely saved in garages. Saved Car Generators are also manageable, but it is still recommended to make them not save using SET_CAR_GENERATOR_NO_SAVE or this function.)
  3. Objects (Must be a "no save" object. For mapping, use IPL (explained below). For CLEO/SCM (which also requires CLEO), use CREATE_OBJECT_NO_SAVE (opcode 0E01) or the setObjectNoSave function below. For MoonLoader, use the setObjectNoSave function below.)
  4. Pickups (Must not be saved in the game. From 2.0, models any pickups with a missing AutoID model will be replaced with ID 1239. Still recommended: Use SET_SCRIPT_EVENT_SAVE_CONFIRMATION (opcode 0ED1).)
  5. Weapons (Only from 2.0: Will be removed from player as well as gangs if weapon has been removed after saving the game with it installed.)
  6. Fighting Styles (Only from 2.0: Player's fighting style will be set to default if fighting style has been removed after saving the game with it installed.)

 

setObjectNoSave:

Spoiler

CLEO/SCM:


0AB1: cleo_call @setObjectNoSave 1 _hObject [email protected]
:setObjectNoSave
    0A98: [email protected] = object [email protected] struct
    [email protected] += 0x13C
    0A8C: write_memory [email protected] size 1 value 6 virtual_protect 0
0AB2: cleo_return 0

 

MoonLoader:


function setObjectNoSave(object)
	writeMemory(getObjectPointer(object) + 0x13C, 1, 6)
end

 

 

Let's begin. We will add an object to the game using AutoID.

 

Note:

  • Open Limit Adjuster is required or the game will probably crash.
  • The tutorial here will only cover the basics of adding and placing entities, as this tutorial is about adapting entities to AutoID, not adding them to the game.

 

Download and install AutoID. Then run the game once. Look in the game directory and you will see a folder named 'AutoID'.

 

You need an object with a model (dff), textures (txd) and collision (col) (here is a link for convenience). We will use the object from the link. Notice how the object files have a unique name. It is extremely recommended to follow this method; make your object's model, texture and collision files' names as unique as you can! But also remember that model file names have a limit of 23 characters.

 

Note: If there are two steps with the same number, then the below step (marked with '*') is for the manual method (without Mod Loader). Otherwise, the same step is used for both methods.

 

1 Extract the 'autoidtest' folder inside the 'modloader' folder.

1* Add the files 'autoidtest.dff', 'autoidtest.txd', 'autoidtest.col' into game directory\models\gta3.img. I personally use IMG Manager.

2 Inside the 'autoidtest' folder, create a file named 'gta.dat.txt' (you may use any name; just make sure that it is a txt file). Open this file and add this line:

IDE DATA\MAPS\autoidtest\autoidtest.IDE

COLFILE 0 DATA\MAPS\autoidtest\autoidtest.COL

2* Go to game directory\data\. Open 'gta.dat' and add this line:

IDE AutoID\DATA\autoidtest\autoidtest.IDE

3 No step.

3* Go to game directory\AutoID\data\. Create a folder named 'autoidtest'. Go to this folder.

4 Create a file named 'autoidtest.auid' (name does not matter; just make sure to use the extension '.auid'.  Do not use special characters such as [email protected]#$%^&()_+-=,[]{}'` in the beginning of the file name without reason as they are or may be used for special functions. I just used the same name as the model file for convenience and/or consistency.) Open this file.

5 Add the following text:

IDE:
objs
<autoidtest>, autoidtest, autoidtest, 299, 0
end

Do you understand? All the other values remain the same, except for the addition of the section ('IDE:') and the model ID being replaced with '<autoidtest>' (the name of the .auid file). The section tells AutoID to generate an IDE file in the same location as the .auid file. The '<filename>' is replaced with the free model ID assigned to the auid file (explained in the main topic).

Note: '<filename>' can be placed anywhere in the file; it will be replaced with the auid file's ID regardless.

On a default game, the generated IDE file (autoidtest.ide) would look like this:

objs
907, autoidtest, autoidtest, 299, 0
end

This file will then be loaded by the game (what we did in step 2).

Edited by HzanRsxa2959
Link to comment
Share on other sites

6 Launch the game. Once at the main menu, close the game. The IDE file will get generated. Do not modify the IDE file in any way or it will cause crash; AutoID will manage that. This is only required if the auid file did not exist before the game launch.

7 Now, we will spawn the object. Download and install Cheat-Menu LUA 2.2 Portable from the main topic. Launch and load the game. Open the cheat menu (using CTRL+M by default) and go to the 'Game' tab. The from the sub-tabs, go to the 'Object Spawner' tab. There will be a little 'Names' drop-down list below the 'AutoID' text. Click on it and select 'autoidtest'. The model ID currently assigned to autoidtest will be input in the 'Model ID' input box. Check the 'Input player coord' box. Click 'Spawn object'. The object will be spawned.

Images:

Spoiler

3iu5YMi.jpg

PUAKW8a.jpg

8 You have successfully added an object using AutoID!

9 To add a ped, it is the same method as above with two differences:

  • The .auid file name must have an underscore ('_') at the beginning ('_autoidtest'); this means that all uses of the file name must change as well. The underscore tells AutoID to assign a killable model ID to the ped instead of a regular model ID. More explanation here.
  • Instead of the 'objs' section (for objects) in the .auid file, use 'peds' (for peds).

10 For vehicles, use the underscore as well to assign a killable model ID. But use the 'cars' section.

11 For pickups, the process is the same as for adding objects (because pickups are objects).

12 As for the other data files (e.g. pedgrp.dat, object.dat, etc.), they use model names instead of model IDs. So they don't need adapting to AutoID.

13 Also read the note on the second line of the first post.

 

I'm so tired right now. I'll finish this in a few hours.

TODO:

Placing Objects through IPL

Creating and Handling Entities through Scripts

Errors, their Explanations and Fixes

 

Placing Objects through IPL:

14 Take a look at these regular IPL lines here:

inst
2912, dummy, 0, 2486.0164, -1668.9928, 13.3359, 0, 0, 0, 1, -1
end

They place a crate in front of CJ's House in Ganton.

 

Now, take a look at these IPL lines here that are adapted to AutoID:

IPL:
inst
<autoidtest>, dummy, 0, 2486.0164, -1668.9928, 13.3359, 0, 0, 0, 1, -1
end

They place the 'autoidtest' object in front of CJ's House in Ganton.

 

The AutoID lines are written in an .auid file. This .auid file is then read, and an IPL file is generated before the game loads because of the 'IPL:' section at the top (similar to IDE). The IPL file is then loaded by the game.

 

Using the 'autoidtest' object from this tutorial, placing the text above (the second one, adapted to AutoID) in the 'autoidtest.auid' file, a file named 'autoidtest.ipl' will be generated in the same location as the 'autoidtest.auid' file. The contents of the 'autoidtest.ipl' file are as follows:

inst
907, dummy, 0, 2486.0164, -1668.9928, 13.3359, 0, 0, 0, 1, -1
end

 

Do you understand? Once again, we have replaced the model ID with <filename>.

 

Here are the full contents of 'autoidtest.auid':

IDE:
objs
<autoidtest>, autoidtest, autoidtest, 299, 0
end

IPL:
inst
<autoidtest>, dummy, 0, 2486.0164, -1668.9928, 13.3359, 0, 0, 0, 1, -1
end

 

This is it. This is how AutoID works.

It reads .auid files, replaces the <filename> with the free model ID assigned to filename, and generates data files with the appropriate extension (IDE and/or IPL) based on the section defined in the .auid file, in the same location as the .auid file.

 

Launch the game, and wait until you are at the main menu. This will generate the IPL file. Do not modify the IPL file in any way! AutoID will manage that. Close the game.

 

Now, we will load the IPL.

15 Open the 'gta.dat.txt' file.

15* Go to game directory\data. Open 'gta.dat'.

 

16 Add the following line at the bottom:

IPL DATA\MAPS\autoidtest\autoidtest.IPL

This will load the IPL generated by AutoID.

 

Start the game and go to the front of CJ's House in Ganton. You will see the 'autoidtest' object there. You can also spawn more of it using the Object Spawner from Cheat-Menu LUA 2.2 Portable.

 

Ok, so now we know how to spawn our object.

 

But what if another mod wants to use this object in its IPL?

Well, here you go:

17 Create a new folder inside game directory\modloader\. Create a new folder with any name.

17* Go to game directory\AutoID\data.

18 Let's call your current folder 'modfolder'. Create a new folder with any name (We will use 'datafolder'). Go to this folder. Create a new file named 'autoidtest2.auid' (or any name, but use the extension auid).

19 Add a '$' (dollar) in front of the auid file name. E.g. '$autoidtest2.auid'. This will make AutoID not assign any free model ID to the file itself, but it will still behave as an AutoID file.

20 Open the auid file and put these lines:

IPL:
inst
<autoidtest>, dummy, 0, 2486.6753, -1650.7179, 13.4837, 0, 0, 0, 1, -1
end

They put an 'autoidtest' object in the front of OG Loc's House.

 

21 Generate the IPL file as was done previously. (Launch the game, wait until the main, and then close the game.)

22 Now, we have to load the IPL. Go one directory above (to modfolder).

23 Create a 'gta.dat.txt' file (or any txt file, with extension txt). Open it and put this line:

IPL DATA\MAPS\datafolder\$autoidtest2.IPL

23* Go to game directory\data\. Open 'gta.dat' and put this line at the bottom:

IPL AUTOID\DATA\datafolder\$autoidtest2.IPL

 

24 Start the game and go to the front of OG Loc's House. You will see the second 'autoidtest' object there.

Placing objects using IPLs can be done with any object adapted to AutoID. You may be interested in the 1435 objects that SAMP Objects adds.

Edited by HzanRsxa2959
Link to comment
Share on other sites

  • 1 month later...

Installing and Configuring AutoID 2.0

Here is a video tutorial:

 

Installation:

  1. Download and install Silent's ASI Loader.
  2. Download and install CLEO 4.4.0.
  3. Download and install CLEO+.
  4. Download and install MoonLoader.
  5. Download and install Mod Loader (Recommended).
  6. Download and install Mod Loader Support for MoonLoader.
  7. Download and install Load Scripts from Mod Loader (Recommended).
  8. Download and install AutoID 2.0. (Place the 'AutoID' folder in the "modloader" folder if you installed "Load Scripts from Mod Loader" from above, otherwise put the "AutoID.lua" file in the "moonloader" folder and the "AutoID.cs" file in the "cleo" folder of your game directory.)
  9. In case of the following error, try to install MoonLoader inside Mod Loader.

 

Configuration:

Note: This section is about the installation and configuration of fastman92 Limit Adjuster. Although not required, it is still highly recommended to install it because of the new many features AutoID brings (mainly: the ability to add weapons, melee combos and model special features). You can even install it using Mod Loader (inside modloader); the settings here work with that method as well.

1. Download and install fastman92 Limit Adjuster.

2. Go to the fastman92 Limit Adjuster installation directory and open fastman92limitAdjuster_GTASA.ini.

3. Change the default values to these (if the values have already been changed, then you may add to them the values given below):

Spoiler

[MAP LIMITS]
Water map size = 96000
Renderware world map size = 200000
World map size = 96000

[IMG LIMITS]
Increase the IMG archive size limit = 1

[DIRECTORY LIMITS]
Extra objects directory = 55000
Cutscene directory = 51200
Clothes directory = 55000

[CAR STREAMING]
Cargrp cars per group = 63
Accept any ID for car generator = 1

[PED STREAMING]
Pedgrp peds per group = 210

[ID LIMITS]
Count of killable model IDs = 8000

[HANDLING.CFG LIMITS]
Apply handling.cfg patch = 1
Number of standard lines = 2100
Number of bike lines = 130
Number of flying lines = 240
Number of boat lines = 120

[WEAPON LIMITS]
Enable weapon type loader  = 1
Weapon type loader, number of type IDs = 255
Enable melee combo type loader = 1
Max number of melee combos = 255

[ADDONS]
Enable vehicle audio loader = 1

 

3.1 The below settings are required for model special features, but fastman92 Limit Adjuster must be installed outside Mod Loader.

Spoiler

[ID LIMITS]
Apply ID limit patch = 1

[ADDONS]
Enable model special feature loader = 1

 

4. Now, launching the game, you will see these dialog boxes in order:

Spoiler

EwF6iT5.png

svz3ILY.png

TIeVooW.png

fulARgI.png

5. Also, from now on, if you need to edit any of the following files, you will have to do so from the AutoID directory:

fastman92 Limit Adjuster\data\gtasa_weapon_config.dat = game directory\AutoID\data\_fastman92 limit adjuster\gtasa_weapon_config.dat

fastman92 Limit Adjuster\data\gtasa_melee_config.dat = game directory\AutoID\data\_fastman92 limit adjuster\gtasa_melee_config.dat

fastman92 Limit Adjuster\data\model_special_features.dat = game directory\AutoID\data\_fastman92 limit adjuster\model_special_features.dat

Any time you edit any of these files, AutoID will need to re-initialize and you will see this dialog box:

fulARgI.png

This may also happen if you install new mods adapted to AutoID that add new weapons, melee combos or model special features.

Edited by HzanRsxa2959
Link to comment
Share on other sites

How to install AutoID 2.1 and above:

Spoiler

 

 

Tutorial on how to adapt mods will be available soon.

Edited by HzanRsxa2959
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
 Share

  • 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.