Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Drug Wars
      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

Adding a new building to SA


bokkers
 Share

Recommended Posts

Hi everyone,

 

I'm trying to add a building to SA. I got my dff and txd nicely set up and added to the gta3.img. Then I made an ide and an ipl file. The ide looks like this:

 

 

3objs19000, vmothers, Vtextures, 299, 0endtobjendpathend2dfxendanimendtxdpend

 

 

and the ipl looks like this:

 

 

inst19000, vmothers, 0, -479.2869, -554.6972, 526.3597, 0, 0, 0.707107, 0.707107, -1endcullendpathendgrgeendenexendpickendcarsendjumpendtcycendauzoendmultend

 

 

Then I added two lines to the gta.dat pointing to those two files, each at the end of the corresponding block. I have two other Mods installed: The Fallen Tree trailer park and the Sprunk factory. Only the trailer park has an ide file so I can assume, there are still free ide slots, right?

 

When I fire up the game with my mod, it crashes during the loading screen, at about 2/3 of stuff loaded. Any ideas what my mistake could be?

 

EDIT:

I also tried removing my extra ide and ipl and adding the two lines to existing map files, with the same effect.

 

Thanks in advance,

bokkers

Edited by bokkers
Link to comment
Share on other sites

Well, there is only -5- available IDE slots in a stock version of GTA SA, anymore and the game crashes because its beyond the hard coded memory limit. I haven't looked at the Fallen Tree Trailer Park, but the fact it has its own IDE file says its probably using up these 5 slots, check it (and also check to make sure its not using the 19000 number range, 19000 is roughly the first clean number slot, but I know Ocram's map mod uses them, and I'm using them in my work).

 

Second you didn't mention anything about a collision file for the building, which is needed. No col and that's pretty much an instant crash when loading. Collision files are kept in the IMG file, unlike Vice City in which they were located in the map folder as a seperate file.

 

If you're looking for more IDE slots, the only way is to start removing objects from the game. So far I've removed the warehouse buildings at Ocean Docks, they can be removed without having an open hole in the game map.

Link to comment
Share on other sites

 

Well, there is only -5- available IDE slots in a stock version of GTA SA, anymore and the game crashes because its beyond the hard coded memory limit.  I haven't looked at the Fallen Tree Trailer Park, but the fact it has its own IDE file says its probably using up these 5 slots, check it (and also check to make sure its not using the 19000 number range, 19000 is roughly the first clean number slot, but I know Ocram's map mod uses them, and I'm using them in my work).

 

Second you didn't mention anything about a collision file for the building, which is needed.  No col and that's pretty much an instant crash when loading.  Collision files are kept in the IMG file, unlike Vice City in which they were located in the map folder as a seperate file.

 

If you're looking for more IDE slots, the only way is to start removing objects from the game.  So far I've removed the warehouse buildings at Ocean Docks, they can be removed without having an open hole in the game map.

Thanks for your answer DeathSquad.

 

So 1 IDE slot = 1 object definition line?

 

I also noted the 19000 range in Ocrams isle and will change object numbers if I ever release the mod. I just took it as Ocrams isle worked fine in-game and I wanted to test how to add a new building to SA (EDIT: deactivating Ocrams isle for that of course).

 

About the collision file: OK, that explains a lot. I haven't created one yet as I thought I could test the building in-game without a col file. Oops. blush.gif Could you point me to a good tool for that? That would be awesome.

 

So, when I have a collision file, I name it after the dff it belongs to and just add it to the gta3.img, right?

 

Cheers,

bokkers

Edited by bokkers
Link to comment
Share on other sites

So you are saying that if we get rid of IDE and IPL lines for Models we can use the ID# from that IDE and IPL line for other objects.

 

Link to comment
Share on other sites

@bokkers: Glad you got it working, and you're correct on "1 ide slot = 1 ide definition", somewhere I started calling them "slots". Obviously you found the programs you needed, I'd recommend Steve-M's CollMaker and Steve-M's CollEditor II for collision work, which is probably what you're using.

 

@NathanHenry: Correct, I will note that you do not have to use the same ID number, just the act of removing it will free up space for additional objects.

 

Remember to backup your map files too, because certain items will cause the game to crash when you remove them. I know you cannot just remove the IDE and IPLs from areas, because I've tried removing the Countryside and other pieces of the map, and when you do so, ker-blamo.

 

 

3622 | rdwarhus        | LAs2       | 3687 | lod_rdwarhus3623 | rdwarhus2       | LAs2  LAe2 | 3709 | lod_rdwarhus23624 | nwwarhus        | LAs2       | 3710 | lod_nwwarhus3707 | rdwarhusmed     | LAs2       | 3708 | lod_rdwarhusmed3689 | rdwarhusbig     | LAs2       | 3690 | rdwarhusbig3755 | las2warhus_las2 | LAs2

 

 

These are so far the items I have removed, which are the buildings around Ocean Docks. Delete the IPLs first from any file they are in (these only appear in LAs2 and LArex) then the IDEs, and you'll get 11 more IDE slots available (16 in total).

Link to comment
Share on other sites

It's actually amazing that somehow I am finding the time to post here but here goes...

 

If SA is anything like Vice, when the IDE objects are all loaded in they will take up one big chunk of memory. That chunk of memory will have a starting address (you can get the ending address by hacking it with IDA and seeing where the big chunk ends) and some addresses right after the starting one that deal with specific IDE objects. The limit is caused by two things: this big chunk not being big enough to hold more than the default IDEs + 5 and/or a variable stating a maximum limit (i.e. cmp eax, 19005 or something to that effect).

 

So how does this get hacked? You have to create the necessary memory at the end of the file by modding the beginning of it to state that more space is created and that you can read and write there (and enable execute there just to be safe). Then you change all the addresses so that the IDE objects are all loaded up in your new chunk of memory. Then you hunt down any maximum limits that were there before and set them equal to what the new maximum limit is based on how much more space you have in the new chunk of memory (which is NOT equal to some random-ass ungodly huge number that will crash your game in about 3 seconds when you start it up). You have to use math and make the new value proportional to the old one.

 

Example: In Vice, the default max IDE limit is 3885. Each IDE object takes up 68 bytes of memory (this is stated right after the IDE limit). Let's say the new chunk of memory starts at 0xA14000 and goes up to 0xAFFE5C; then the difference is equal to 966,236 bytes by hexadecimal subtraction. Divide this by the amount of memory each object takes up and round down; you get 14,209. Subtract 1 more just to be on the safe side and set the limit at 14,208. Test this by adding the max number you could add before, starting the game to make sure it plays, and then adding 1 more, testing it again.

 

N.B. If the game crashes after adding a few more objects, it is likely you ran into another limit, such as the TXD limit.

 

-Andy80586

 

 

 

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.