Difference between revisions of "OBDATA.DAT"

From UFOpaedia
Jump to navigation Jump to search
(→‎Structure: Added names so I don't have to keep looking them up)
m (→‎Structure: hmm... let's compactify it)
Line 12: Line 12:
 
== Structure ==
 
== Structure ==
  
<b>0-19:</b> Name of object. Delimited by a null character. Note: These are internal "working" names. They all make sense, but are not the standardized names displayed in the game. Names and IDs (reference lookup numbers, including within OBDATA - see e.g. [26] to [28]):
+
<b>0-19:</b> Name of object. Delimited by a null character. These are internal names... they all make sense, but are not the standardized names displayed in the game. Names and IDs (reference lookup numbers, including within OBDATA - see e.g. [26] to [28]):
   <u>ID</u>  <u>Name</u>
+
   <u>ID</u>  <u>Name</u>                            <u>ID</u>  <u>Name</u>
     0  PISTOL
+
     0  PISTOL                         40  BLASTER LAUNCHER
     1  PISTOL CLIP
+
     1  PISTOL CLIP                     41  BLASTER BOMB
     2  RIFLE
+
     2  RIFLE                           42  SMALL LAUNCHER
     3  RIFLE CLIP
+
     3  RIFLE CLIP                     43  STUN MISSILE
     4  HEAVY CANNON
+
     4  HEAVY CANNON                   44  ALIEN GRENADE
     5  CANNON AP-AMMO
+
     5  CANNON AP-AMMO                 45  ELERIUM-115
     6  CANNON HE-AMMO
+
     6  CANNON HE-AMMO                 46  MIND PROBE
     7  CANNON I-AMMO
+
     7  CANNON I-AMMO                   47  >>UNDEFINED <<
     8  AUTO-CANNON
+
     8  AUTO-CANNON                     48  >> empty <<
     9  AUTO-CANNON AP-AMMO
+
     9  AUTO-CANNON AP-AMMO             49  >> empty <<
   10  AUTO-CANNON HE-AMMO
+
   10  AUTO-CANNON HE-AMMO             50  Sectoid Corpse
   11  AUTO-CANNON I-AMMO
+
   11  AUTO-CANNON I-AMMO             51  Snakeman Corpse
   12  ROCKET LAUNCHER
+
   12  ROCKET LAUNCHER                 52  Ethereal Corpse
   13  SMALL ROCKET
+
   13  SMALL ROCKET                   53  Muton Corpse
   14  LARGE ROCKET
+
   14  LARGE ROCKET                   54  Floater Corpse
   15  INCENDIARY ROCKET
+
   15  INCENDIARY ROCKET               55  Celatid Corpse
   16  LASER PISTOL
+
   16  LASER PISTOL                   56  Silacoid Corpse
   17  LASER GUN
+
   17  LASER GUN                       57  Chryssalid Corpse
   18  HEAVY LASER
+
   18  HEAVY LASER                     58  reaper corpse 1
   19  GRENADE
+
   19  GRENADE                         59  reaper corpse 2
   20  SMOKE GRENADE
+
   20  SMOKE GRENADE                   60  reaper corpse 3
   21  PROXIMITY GRENADE
+
   21  PROXIMITY GRENADE               61  reaper corpse 4
   22  HIGH EXPLOSIVE
+
   22  HIGH EXPLOSIVE                 62  cyber 1
   23  MOTION SCANNER
+
   23  MOTION SCANNER                 63  cyber 2
   24  MEDI-KIT
+
   24  MEDI-KIT                       64  cyber 3
   25  PSI-AMP
+
   25  PSI-AMP                         65  cyber 4
   26  STUN ROD
+
   26  STUN ROD                       66  secto 1
   27  Flare
+
   27  Flare                           67  secto 2
   28  empty
+
   28  empty                           68  secto 3
   29  empty
+
   29  empty                           69  secto 4
   30  empty
+
   30  empty                           70  hover 1
   31  CORPSE
+
   31  CORPSE                         71  hover 2
   32  CORPSE & ARMOUR
+
   32  CORPSE & ARMOUR                 72  hover 3
   33  CORPSE & POWER SUIT
+
   33  CORPSE & POWER SUIT             73  hover 4
   34  Heavy Plasma
+
   34  Heavy Plasma                   74  TANK1
   35  Heavy Plasma Clip
+
   35  Heavy Plasma Clip               75  TANK 2
   36  Plasma Rifle
+
   36  Plasma Rifle                   76  TANK 3
   37  Plasma Rifle Clip
+
   37  Plasma Rifle Clip               77  TANK 4
   38  Plasma Pistol
+
   38  Plasma Pistol                   78  CIVM
   39  Plasma Pistol Clip
+
   39  Plasma Pistol Clip             79  CIVF
  40  BLASTER LAUNCHER
 
  41  BLASTER BOMB
 
  42  SMALL LAUNCHER
 
  43  STUN MISSILE
 
  44  ALIEN GRENADE
 
  45  ELERIUM-115
 
  46  MIND PROBE
 
  47  >>UNDEFINED <<
 
  48  >> empty <<
 
  49  >> empty <<
 
  50  Sectoid Corpse
 
  51  Snakeman Corpse
 
  52  Ethereal Corpse
 
  53  Muton Corpse
 
  54  Floater Corpse
 
  55  Celatid Corpse
 
  56  Silacoid Corpse
 
  57  Chryssalid Corpse
 
  58  reaper corpse 1
 
  59  reaper corpse 2
 
  60  reaper corpse 3
 
  61  reaper corpse 4
 
  62  cyber 1
 
  63  cyber 2
 
  64  cyber 3
 
  65  cyber 4
 
  66  secto 1
 
  67  secto 2
 
  68  secto 3
 
  69  secto 4
 
  70  hover 1
 
  71  hover 2
 
  72  hover 3
 
  73  hover 4
 
  74  TANK1
 
  75  TANK 2
 
  76  TANK 3
 
  77  TANK 4
 
  78  CIVM
 
  79  CIVF
 
  
 
'''20:''' [[BIGOBS.PCK]] reference (pointer to graphic for inventory)
 
'''20:''' [[BIGOBS.PCK]] reference (pointer to graphic for inventory)

Revision as of 23:21, 7 September 2006

General Notes

OBDATA.DAT is found in GEODATA and contains general information on objects found in the game.

There are 80 entries, each of which are 54 bytes long. It is 4,320 bytes long. It's line width is 54.

The order of objects in this file is also equal to their offset OBDATA reference number. For example, the first record (OBDATA 0) is the pistol, second record (OBDATA 1) is pistol clip, etc.

There are 33 entries are for corpses, which includes 4 entries (quarters) for large corpses, including tanks. Otherwise there are 41 "object" entries, and 6 obsolete/unused entries.

Values are presented according to offset (0 to 53) in bold.

Structure

0-19: Name of object. Delimited by a null character. These are internal names... they all make sense, but are not the standardized names displayed in the game. Names and IDs (reference lookup numbers, including within OBDATA - see e.g. [26] to [28]):

  ID   Name                            ID   Name
   0   PISTOL                          40   BLASTER LAUNCHER
   1   PISTOL CLIP                     41   BLASTER BOMB
   2   RIFLE                           42   SMALL LAUNCHER
   3   RIFLE CLIP                      43   STUN MISSILE
   4   HEAVY CANNON                    44   ALIEN GRENADE
   5   CANNON AP-AMMO                  45   ELERIUM-115
   6   CANNON HE-AMMO                  46   MIND PROBE
   7   CANNON I-AMMO                   47   >>UNDEFINED <<
   8   AUTO-CANNON                     48   >> empty <<
   9   AUTO-CANNON AP-AMMO             49   >> empty <<
  10   AUTO-CANNON HE-AMMO             50   Sectoid Corpse
  11   AUTO-CANNON I-AMMO              51   Snakeman Corpse
  12   ROCKET LAUNCHER                 52   Ethereal Corpse
  13   SMALL ROCKET                    53   Muton Corpse
  14   LARGE ROCKET                    54   Floater Corpse
  15   INCENDIARY ROCKET               55   Celatid Corpse
  16   LASER PISTOL                    56   Silacoid Corpse
  17   LASER GUN                       57   Chryssalid Corpse
  18   HEAVY LASER                     58   reaper corpse 1
  19   GRENADE                         59   reaper corpse 2
  20   SMOKE GRENADE                   60   reaper corpse 3
  21   PROXIMITY GRENADE               61   reaper corpse 4
  22   HIGH EXPLOSIVE                  62   cyber 1
  23   MOTION SCANNER                  63   cyber 2
  24   MEDI-KIT                        64   cyber 3
  25   PSI-AMP                         65   cyber 4
  26   STUN ROD                        66   secto 1
  27   Flare                           67   secto 2
  28   empty                           68   secto 3
  29   empty                           69   secto 4
  30   empty                           70   hover 1
  31   CORPSE                          71   hover 2
  32   CORPSE & ARMOUR                 72   hover 3
  33   CORPSE & POWER SUIT             73   hover 4
  34   Heavy Plasma                    74   TANK1
  35   Heavy Plasma Clip               75   TANK 2
  36   Plasma Rifle                    76   TANK 3
  37   Plasma Rifle Clip               77   TANK 4
  38   Plasma Pistol                   78   CIVM
  39   Plasma Pistol Clip              79   CIVF

20: BIGOBS.PCK reference (pointer to graphic for inventory)

21: FLOOROB.PCK reference (pointer to graphic for item on ground)

22: Average Weapon Strength (Same as seen in UFOpaedia)

23: Item Weight? See [43] - could one be thrown weight, and the other inventory weight?

24: Inventory X Size (width)

25: Inventory Y Size (height)

26-28: Look-up within OBDATA for ammo this weapon uses. Up to three types possible; 255 for no (more) ammo. Note that ammo always directly follows its weapon in this file.

29: HANDOB.PCK reference (pointer to graphic for battlescape)

30: Same as 29

31: Ammo Damage Type

  0 AP
  1 IN
  2 HE
  3 Laser
  4 Plasma
  5 Stun
255 Not Ammo

32: Accuracy, Auto

33: Accuracy, Snap

34: Accuracy, Aimed

35: TUs Used, Auto

36: TUs Used, Snap

37: TUs Used, Aimed

38: Primary use: Clip Size (for ammo; see [49]). Secondary use: Melee weapon strength, as follows:

  0 All Corpses/Electroflare/Mind probe
  8 Pistol
 65 Stun Rod
 10 Everything else...

Tertiary use: Timer for "grenade", if Grenade ([44]) is true. Only works if item is ammo ([49]). If it is then e.g. since Blaster has a 1 here (1 bomb per blaster "clip"), it will explode at end of turn 1 (if not being held in inventory).

39: Possibly Melee-related Stat??

  0 All Corpses
  0 Plasma Pistol Clip
  5 Stun Rod
  9 Pistol and Pistol Clip
  8 Everything else...

NKF: Melee damage type?

  0 AP
  1 IN
  2 HE
  3 Laser or Gauss
  4 Plasma or Sonic
  5 Stun
  6 TFTD vibroblade damage (does not appear to be used in UFO)

40: Possibly Melee Accuracy??

  0 All Corpses
  0 Electroflare
  0 Plasma Weapon Clips
100 Everything else...

41: Possibly Melee TU%?

  0 All Corpses
  0 Electroflare
  0 Plasma Weapon Clips
 30 Stun Rod
 50 Everything else...

NKF: TU% when attacking as a melee weapon:

 50 Most objects
 30 Stun rod
 40 TFTD thermal tazer
 15 Vibroblade
 20 Thermal lance
 25 Heavy thermal Lance

So a summary of 39 to 41 looks like this:

  39   40   41   Objects
   0    0    0   All Corpses/Plasma Pistol Clip
   5  100   30   Stun Rod
   8    0    0   Plasma Rifle Clip/Heavy Plasma Clip/Electroflare
   9  100   50   Pistol/Pistol Clip

   8  100   50   Everything else... (34 objects)

42: Explosive strength needed to destroy object

43: Item Weight

44: Grenade Type

1  Grenade, Alien Grenade, High Explosive
2  Proximity Grenade
3  Smoke Grenade

45: Maybe an abandoned bit field, all except the Elerium tick?:

0 All corpses and many human objects, including weapons and ammo
1 All alien weapons and ammo but also several common human ammos and the pistol
4 Elerium

46: Boolean: Is Weapon That Shoots?

47: Boolean: Is Weapon?

48: Boolean: Is Non-Waypoint Weapon?

49: Boolean: Is Ammo?

50: Boolean: Is Two-Handed Weapon?

51: Boolean: Is Blaster Launcher?

52: Boolean: Is Alien?

53: Scoring points (except for Elerium which works per 50 units)