Quantcast

Jump to content

» «
Photo

SA Item placement.

7 replies to this topic
DarthGak
  • DarthGak

    Player Hater

  • Members
  • Joined: 21 Jun 2005

#1

Posted 21 June 2005 - 03:13 AM

I am writting a tool to manipulate the maps in SA but I am stuck. I am able to load the IDE,IPL and DFF files. But I cant seem to figure out how the traffic lights and mail boxes and such are placed.

In LC and Vice they were just in the IPL file like everything else. Now they seem to be defined in dynamic.ide but I cant figure out how where the data about their placement is.

A possibly related question; anyone know whats in the NODE*.DAT files?

DG.

RainingAcid
  • RainingAcid

    Hustler

  • Members
  • Joined: 28 Mar 2005

#2

Posted 21 June 2005 - 03:21 AM

So, you are making a Map Editor.

DarthGak
  • DarthGak

    Player Hater

  • Members
  • Joined: 21 Jun 2005

#3

Posted 21 June 2005 - 03:38 AM

QUOTE (RainingAcid @ Jun 21 2005, 03:21)
So, you are making a Map Editor.

At this point I am just making an importer/converter. I may add an map (ipl) editor but I think Ill leave the actual modeling to the other programs.


DarthGak
  • DarthGak

    Player Hater

  • Members
  • Joined: 21 Jun 2005

#4

Posted 21 June 2005 - 05:46 AM Edited by DarthGak, 21 June 2005 - 07:32 AM.

The more I look the more puzzled I get. The item location data must be either in the Nodes*.dat files or in the script files (.scm).

A hex dump of the nodes files doesnt look like it contains item positions. No rational floating point numbers that I can find.

That leaves the script files. Would they really spawn every traffic light and lamppost (etc) in script? And if so how would they position and line them up in the world?

When SA first came out people made maps like this the one below. I assumed they made the map by sucking the locations out of the data files. But I cant find locations for anything in the data.

http://db.gamefaqs.c...a_snapshots.png

steve-m
  • steve-m

  • Feroci
  • Joined: 26 Jul 2002

#5

Posted 21 June 2005 - 06:40 PM

QUOTE (DarthGak @ Jun 21 2005, 07:46)
The item location data must be either in the Nodes*.dat files or in the script files (.scm).

Nope, they are placed via the binary ipl files in the gta3.img. Believe me, I wrote a map viewer. wink.gif

This is the file format:
CODE
4 byte - fourcc, always 'bnry'

4 byte int - number of item instances
4 byte int - number of unknown 1
4 byte int - number of unknown 2
4 byte int - number of unknown 3
4 byte int - number of parked cars
4 byte int - number of unknown 4

4 byte int - offset of item instances (should be 76)
4 byte int - unused size (always 0)
4 byte int - offset of unknown 1
4 byte int - unused size (always 0)
4 byte int - offset of unknown 2
4 byte int - unused size (always 0)
4 byte int - offset of unknown 3
4 byte int - unused size (always 0)
4 byte int - offset of parked cars
4 byte int - unused size (always 0)
4 byte int - offset of unknown 4
4 byte int - unused size (always 0)

followed by the data arrays...

record sizes:
 item instances - 40 bytes
 parked cars    - 48 bytes

record formats:
 item instances - pos (x, y, z); rot quat (x, y, z, w); ObjectID; InteriorID; Flags
 parked cars - pos (x, y, z); rot angle; ObjectID; 7 unknown DWORDs
 (coords are 4b floats; IDs and Flags are 4b DWORDs)

DarthGak
  • DarthGak

    Player Hater

  • Members
  • Joined: 21 Jun 2005

#6

Posted 21 June 2005 - 08:59 PM

Ah! Thanks Steve. Thats just the data I need.

I had overlooked those files because I moved them to sub directory when I unpacked the img.

Looks like there are also some IFP files. Any idea what those are? Animations maybe.

I notice your textures all work. Do you have your own txd import code? I am relying on txd workshop and its batch export doesnt seem to work for me (throws an "progress bar" error on most files).

The_Grudge
  • The_Grudge

    The_Grudge

  • BUSTED!
  • Joined: 08 Jan 2005

#7

Posted 21 June 2005 - 09:07 PM

QUOTE (DarthGak @ Jun 21 2005, 22:59)
Looks like there are also some IFP files. Any idea what those are? Animations maybe.

Animations.

steve-m
  • steve-m

  • Feroci
  • Joined: 26 Jul 2002

#8

Posted 21 June 2005 - 09:24 PM

Those ifp files in the img are for all kinds of animations: cars, weapons, mission script (but not cutscenes) and even animated map objects.

QUOTE (DarthGak @ Jun 21 2005, 22:59)
I notice your textures all work. Do you have your own txd import code?

Of course. But you also need to pay attention to those txdp sections in ide files, which define so-called "txd parents". They extend txd files for specific objects with common textures, so those don't have to be copied to lots of different txds.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users