Difference between revisions of "UNITREF.DAT"

From UFOpaedia
Jump to navigation Jump to search
 
(Tacking in BB and NKF's notes for the moment - will unpack when I get some time)
Line 2: Line 2:
  
 
Values are presented according to byte count (0 to 123) followed by the equivalent hex offset (00 to 7B) in <b>bold</b>, followed by the normal (non-hacked) range of values in <i>italics</i>. Most fields can be hacked up to FF, but sometimes it can make for weirdness!
 
Values are presented according to byte count (0 to 123) followed by the equivalent hex offset (00 to 7B) in <b>bold</b>, followed by the normal (non-hacked) range of values in <i>italics</i>. Most fields can be hacked up to FF, but sometimes it can make for weirdness!
 +
 +
''[[User:MikeTheRed|MikeTheRed]]: Until someone can get around to unpacking these, here are Bomb Bloke and NKF's notes on Unitref.Dat. I'll get to them soon, if nobody beats me to it. Hopefully this wiki page will become a great place for sharing findings on Unitref...''
 +
 +
[[UnitrefNotes_BombBloke|Bomb Bloke's notes]]
 +
[[UnitrefNotes_NKF|NKF's notes]]
  
 
== Structure ==
 
== Structure ==

Revision as of 17:33, 23 September 2005

UNITREF.DAT has a row width of 124 bytes. Each byte is unsigned. Some bytes represent bitfields.

Values are presented according to byte count (0 to 123) followed by the equivalent hex offset (00 to 7B) in bold, followed by the normal (non-hacked) range of values in italics. Most fields can be hacked up to FF, but sometimes it can make for weirdness!

MikeTheRed: Until someone can get around to unpacking these, here are Bomb Bloke and NKF's notes on Unitref.Dat. I'll get to them soon, if nobody beats me to it. Hopefully this wiki page will become a great place for sharing findings on Unitref...

Bomb Bloke's notes
NKF's notes

Structure

0 / 00 ():

1 / 01 ():

2 / 02 ():

3 / 03 ():

4 / 04 ():

5 / 05 ():

6 / 06 ():

7 / 07 ():

8 / 08 ():

9 / 09 ():

10 / 0A ():

11 / 0B ():

12 / 0C ():

13 / 0D ():

14 / 0E ():

15 / 0F ():

16 / 10 ():

17 / 11 ():

18 / 12 ():

19 / 13 ():

20 / 14 ():

21 / 15 ():

22 / 16 ():

23 / 17 ():

24 / 18 ():

25 / 19 ():

26 / 1A ():

27 / 1B ():

28 / 1C ():

29 / 1D ():

30 / 1E ():

31 / 1F ():

32 / 20 ():

33 / 21 ():

34 / 22 ():

35 / 23 ():

36 / 24 ():

37 / 25 ():

38 / 26 ():

39 / 27 ():

40 / 28 ():

41 / 29 ():

42 / 2A ():

43 / 2B ():

44 / 2C ():

45 / 2D ():

46 / 2E ():

47 / 2F ():

48 / 30 ():

49 / 31 ():

50 / 32 ():

51 / 33 ():

52 / 34 ():

53 / 35 ():

54 / 36 ():

55 / 37 ():

56 / 38 ():

57 / 39 ():

58 / 3A ():

59 / 3B ():

60 / 3C ():

61 / 3D ():

62 / 3E ():

63 / 3F ():

64 / 40 ():

65 / 41 ():

66 / 42 ():

67 / 43 ():

68 / 44 ():

69 / 45 ():

70 / 46 ():

71 / 47 ():

72 / 48 ():

73 / 49 ():

74 / 4A ():

75 / 4B ():

76 / 4C ():

77 / 4D ():

78 / 4E ():

79 / 4F ():

80 / 50 ():

81 / 51 ():

82 / 52 ():

83 / 53 ():

84 / 54 ():

85 / 55 ():

86-111 / 56-6F (A-Z): Unit's Name.

112 / 70 ():

113 / 71 ():

114 / 72 ():

115 / 73 ():

116 / 74 ():

117 / 75 ():

118 / 76 ():

119 / 77 ():

120 / 78 ():

121 / 79 ():

122 / 7A ():

123 / 7B ():

Notes

Add note here...

For More Information

Add more info here...

Addendum: Hex Workshop Structure Library

The following can be used to make an XCOMUFO.hsl file that will work with Hex Workshop (v4.23) available from www.BPSoft.com. This allows one to overlay a structure while viewing/editing UNITREF.DAT and work in a more organized fashion.

Tip: Set the data view window to 62 bytes wide, and each UNITREF record will take exactly two display lines. (It won't let you set it to higher than 64, unfortunately.)

#include "standard-types.hsl"

// UNITREF.DAT
struct UNITREF_DAT 
{
  UBYTE Unit_Type ;
  UBYTE Paper_Doll ;
  UBYTE Unknown ;
  UBYTE Unknown ;
  UBYTE Unknown ;
  UBYTE Unknown ;
  UBYTE Unknown ;
  UBYTE Unknown ;
  UBYTE Unknown ;
  UBYTE Unknown ;
  UBYTE Facing ;
  UBYTE Unknown ;
  UBYTE TUs_Current ;
  UBYTE HPs_Current ;
  UBYTE Stun ;
  UBYTE EUs_Current ;
  UBYTE React_Current ;
  UBYTE Strength ;
  UBYTE F_Armor_Current ;
  UBYTE L_Armor_Current ;
  UBYTE R_Armor_Current ;
  UBYTE B_Armor_Current ;
  UBYTE U_Armor_Current ;
  UBYTE Firing_Acc ;
  UBYTE Throw_Acc ;
  UBYTE TUs_Max ;
  UBYTE HPs_Max ;
  UBYTE EUs_Max ;
  UBYTE React_Max ;
  UBYTE F_Armor_Max ;
  UBYTE L_Armor_Max ;
  UBYTE R_Armor_Max ;
  UBYTE B_Armor_Max ;
  UBYTE U_Armor_Max ;
  UBYTE Unknown ;
  UBYTE EU_Recharge ;
  UBYTE Unknown ;
  UBYTE Psi_Skill ;
  UBYTE obdata_index ;
  UBYTE VPs ;
  UBYTE soldier_index ;
  UBYTE Unknown ;
  UBYTE Rank ;
  UBYTE Unknown ;
  UBYTE Aggression ;
  UBYTE EU_Usage ;
  UBYTE HWP_Turret ;
  UBYTE Unknown ;
  UBYTE Unknown ;
  UBYTE Stand_Height ;
  UBYTE Crouch_Height ;
  UBYTE Unknown ;
  UBYTE Unknown ;
  UBYTE L_Hand_Item ;
  UBYTE R_Hand_Item ;
  UBYTE Unknown ;
  UBYTE Close_Acc ;
  UBYTE Psi_Strength ;
  UBYTE Morale ;
  UBYTE Bravery ;
  UBYTE Unknown ;
  UBYTE Unknown ;
  UBYTE Scanner_Blip ;
  UBYTE Head_Fatal ;
  UBYTE Torso_Fatal ;
  UBYTE R_Arm_Fatal ;
  UBYTE L_Arm_Fatal ;
  UBYTE R_Leg_Fatal ;
  UBYTE L_Leg_Fatal ;
  UBYTE Unknown ;
  UBYTE Unknown ;
  UBYTE Unknown ;
  UBYTE Unknown ;
  UBYTE Intelligence ;
  UBYTE Unknown ;
  UBYTE Unknown ;
  UBYTE Mission_Count ;
  UBYTE Unknown ;
  USHORT Kills ;
  UBYTE React_Count ;
  UBYTE Shot_Count ;
  UBYTE Rod_Count ;
  UBYTE Throw_Count ;
  UBYTE Psi_Count ;
  UBYTE Panic_Count ;
  CHAR Name[26] ;
  UBYTE Unknown ;
  UBYTE Inventory_Access ;
  UBYTE On_Fire ;
  UBYTE Gender ;
  UBYTE Race ;
  UBYTE Turret_Weapon ;
  UBYTE Turret_Ammo ;
  UBYTE Unknown ;
  UBYTE Bitflags ;
  UBYTE Unknown ;
  UBYTE Unknown ;
  UBYTE Unknown ;
} ;