Quantcast

Jump to content

» «
Photo

San Andreas Save File Companion

91 replies to this topic
Nick007J
  • Nick007J

    Mark Chump

  • Members
  • Joined: 17 Jan 2010
  • Russia

#91

Posted 30 September 2017 - 11:09 AM

Following some analysis, I tried to find a more accurate list of definitions for flags. Here are the results:
0x1 'is object a pickup'
0x2 'is this object an empty pickup'
0x4 'is this object a pickup of type PICKUP_PROPERTY_FOR_SALE'
0x8 'is this object a pickup of type PICKUP_IN_SHOP_OUT_OF_STOCK'
0x10 'is glass broken'
0x20 'glass has been collided with'
0x40 'has been damaged (or exploded)' [looks like parking meters or fire hydrants that have been damaged]
0x80 'is a remap for vehicle'
0x100 'is a lamppost'
0x200 'is targettable'
0x400 'is smashed'
0x800 'is train cross enabled'
0x1000 'has been photographed'
0x2000 'is stealable'
0x4000 'is a moving door'
0x8000 'is this door unlocked'
0x10000 'has a reference in collision store'
0x20000 'is scaled'
0x40000 'is attachable to magnet'
0x80000 'has been hit by a vehicle'
0x100000 //is this object waiting for script brain
0x200000 //does this object have a script brain
0x400000 'is fading'
0x800000 'gets lighting from collision below'
0x1000000 'has attractors disabled'
0x2000000 'is invisible' [e.g. photo pickup objects while not in camera mode]
I am not sure if flag 0x4000000 (and higher) exists, have doubts about flags 0x100000 and 0x200000, and also not sure about naming flag 0x80, but otherwise it should be fairly accurate.
  • OrionSR likes this

OrionSR
  • OrionSR

    Chain Game Development Team

  • Feroci
  • Joined: 23 May 2007
  • None
  • Helpfulness Award [GTA & Modding]

#92

Posted 01 October 2017 - 09:59 PM Edited by OrionSR, 01 October 2017 - 10:28 PM.

Thanks Nick. I'll be updating my object enum with your data shortly.

 

I can find several lists for SA model IDs but I can't find a reference that includes which file to find specific ID numbers, so I made my own. I wouldn't count on R* following it's own convention, but this should help a little. The min and max values listed are usually just the first and last ID listed in the file.

 

  • Min Max IDE
  • 0 299 peds
  • 300 397 default
    • 300 319 cut-scene objects
    • 320 320 airtrain_vlo
    • 321 373 weapons
    • 374 383 temp car components
    • 384 393 clothing models
    • 394 397 hands
  • 400 611 vehicles
  • 615 792 vegepart
  • 800 906 procobj
  • 910 964 propext
  • 966 998 barriers
  • 1000 1193 veh_mods
  • 1207 1325 dynamic
  • 1327 1572 dynamic2
  • 1574 1698 multiobj
  • 1700 2359 props
  • 2360 2882 props2
  • 2885 3135 levelxre
  • 3167 3424 counxref
  • 3430 3554 vegaxref
  • 3555 3783 LAxref
  • 3785 3888 SFxref
  • 3890 3973 levelmap
  • 3975 4239 LAn
  • 4240 4541 seabed
  • 4550 4752 LAn2
  • 4806 5089 LAs
  • 5105 5375 LAs2
  • 5390 5682 LAe
  • 5703 6009 LaWn
  • 6035 6256 LAw
  • 6280 6525 LAw2
  • 6863 7333 VegasN
  • 7415 7973 VegasW
  • 7978 8389 VegasS
  • 8390 9175 vegasE
  • 9205 9478 SFn
  • 9482 9897 SFw
  • 9900 10309 SFe
  • 10315 10743 SFs
  • 10750 11416 SFSe
  • 11420 11681 countryN
  • 12800 13563 countrye
  • 13590 13667 stadint
  • 13672 13890 LAhills
  • 14383 14528 int_LA
  • 14530 14559 int_SF
  • 14560 14643 int_veg
  • 14650 14657 int_cont
  • 14660 14699 gen_int1
  • 14700 14728 gen_int2
  • 14735 14765 gen_intb
  • 14770 14841 gen_int3
  • 14842 14903 gen_int4
  • 15025 15064 savehous
  • 16000 16790 countn3
  • 16700 16708 leveldes
  • 17000 17474 countryW
  • 17500 17978 LAe2
  • 18000 18112 gen_int5
  • 18200 18630 countryS
And for anyone following the puzzlers, with a little help from Nick I was finally able to work out a custom function to manage how SA encodes float coordinates as multiplied by 8 and stored as an int16. The custom function below will read the short and convert it for proper display as a float, and, if a float is entered into the field the function will encode it properly to the save. This typedef has been applied to pickups and cargens; a similar function manages the conversion between binary angular measurement (BAM) used for cargens and standard degree angles.
 
//--------------------------------------------------------------------
//  ShortCoord Function
//  Converts between coordinates stored as shorts*8 and float strings
typedef int16 ShortCoord <read=ShortCoordRead, write=ShortCoordWrite>;
string ShortCoordRead( ShortCoord t )
{   
    // short coord to float
    local float f;
    local string s;
    f = t;
    SPrintf(s, "%.3f",f/8);
    return s ;
}
void ShortCoordWrite( ShortCoord &t, string value )
{
    // float to short coord
    local float f;
    f = Atof( value );
    t = f * 8;
}




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users