File Identifiers

Formats identifiers in Fallout

The paper described identifiers FRM- file formats (FRM ID or FID), a prototype identifier (Prototype ID or PID), the script identifier (SID or Script ID), and the sound effects identifier (Sound Code ID) for Fallout. Information about them was obtained in the course of reviewing relevant functions in files Fallout2.exe, Fallout.exe and Mapper2.exe. Contents

1. Background 2. FRM- File Format ID (FID) 2.1. FID substance (critter) 2.2. Speaking FID "head" (head) 3. The prototype format identifier (PID) 4. Script Format identifier (SID) 5. Id sound effects (Sound Code ID) 6. File ANIMCOMD.H 7. About the author

1. Background
Ids chetyrehbaytovye numbers represent a clearly describing the objects with which operates Fallout. The exception is the 'Id sound effects' (Sound Code ID), which is the symbol and is the size of 1 byte.

2. FRM- File Format ID (FID)
In general, FID is a number follows: +--||---|---|---|---+ +--||---|---|---|---+ |      |         |                 |                 |                       |   |      |         |                 |                 |                       --- Индекс в LST-файл |     |         |                 |                 --- ID1 |     |         |                 - ID2 |     |         --- Тип объекта (ObjType) |     - ID3 Не используется Fields' type object and 'Index in list-fayl' always used, while Fields' ID3 ',' ID2 'and' ID1 'can be ignored depending on the fields' object type' (Table 1.1). Perhaps not used can be any bit.
 * 31|30|29|28|27|26|25|24|23|22|21|20|19|18|17|16|15|14|13|12|11|10|09|08|07|06|05|04|03|02|01|00|

Table 2.1-use fields ID3, ID2 and ID1 ObjType	 ID3	 ID2	 ID1 0 x00: items (subjects) 0 x01: critters (substantive)	 x	 x	 x 0 x02: scenery (scenery) 0 x03: walls (Wall) 0 x04: tiles (floor tiles) 0 x05: misc (miscellaneous) 0 x06: interface (Ends) 0 x07: invent (equipment) 0 x08: heads (speaking head)	 	 x	x 0 x09: backgrnd (background) 0 x0A: skilldex (skills) For FID, is not related to the substance of the head and "speak", the name of the file is the appropriate element LST- index file.

2.1. FID substance (critter)
File Name FRM- substance is the following RootSuffix1Suffix2.frExtSuffix where Root, root filename (6 characters) Suffix1 first suffix (1 symbol) Suffix2-second suffix (1 symbol) ExtSuffix - suffix expansion filename (1 symbol) Example Let filename HAPOWRBA.FR0 then Root-HAPOWR Suffix1-B Suffix2-A ExtSuffix-0 In FID substance used in all fields. ID1 defines Suffix1, ID2 - Suffix2, ID3 - ExtSuffix. IDs have the following meaning: ID1 - Weapon code-code identifying the type of weapons in the hands of active substance (see "PRO- Format files Fallout2" box Weapon Anim Code) ID2 - Animation code, the code defines the action produced the substance (see ANIMCOMD.H File) ID3 - Direction code, the code defines the orientation of the substance in space When ID2 equal 0x1B (27-ANIM_electrify), 0x1D (29-ANIM_burned_to_nothing), 0x1E (30-ANIM_electrified_to_nothing), 0x37 (55-ANIM_electrify_sf), 0x39 (57-ANIM_burned_to_nothing_sf), 0x3A (58-ANIM_electrified_to_nothing_sf), 0x21 (33-ANIM_fire_dance ), 0x40 (64-called shot interface picture), a change takes place in the Index LST- file. The index is changed to the first number, after facing rows with the root of the file name. Example Must replace index 0x62 (98). Look 99 line file critters.lst. There is nmoldd, 11. Accordingly, the revised index will 0x0B (11). Matches between the values ID1, ID2 and Suffix1, Suffix2 prevedeny in Table 2.2, but between ID3 and ExtSuffix in Table 2.3.

Table 2.2-Match values ID1, ID2 and Suffix1, Suffix2 ID2	 ID1	 Suffix1	 Suffix2	 Notes -	 ID1 ≥ 0x0B (11)	 -	 -	 Invalid value 0 x26 (38) ≤ ID2 ≤ 0x2F (47)	 ID1 = 0x00 (0)	 -	 -	 Invalid value ID1 ≠ 0x00 (0)	 char (ID1 + 0x63 (99)) 'd' + (ID1-1)	 char (ID2 + 0x3D (61)) 'c' + (ID2-38) ID2 = 0x24 (36)	 -	 'c'	 'h' ID2 = 0x25 (37)	 -	 'c'	 'j' ID2 = 0x40 (64)	 -	 'n'	 'a' ID2 ≥ 0x30 (48)	 -	 'r'	 char (ID2 + 0x31 (49)) 'a' + (ID2-48) ID2 ≥ 0x14 (20)	 -	 'b'	 char (ID2 + 0x4D (77)) 'a' + (ID2-20) ID2 = 0x12 (18)	 ID1 = 0x01 (1)	 'd'	 'm' ID1 = 0x04 (4)	 'g'	 'm' -	 'a'	 's' ID2 = 0x0D (13)	 ID1> 0x00 (0)	 char (ID1 + 0x63) 'd' + (ID1-1)	 'e' ID1 = 0x00	 'a'	 'n' ID2 ≤ 0x01 (1)	 ID1> 0x00 (0)	 char (ID1 + 0x63 (99)) 'd' + (ID1-1)	 char (ID2 + 0x61 (97)) 'a' + ID2 -	 -	 'a'	 char (ID2 + 0x61 (97)) 'a' + ID2 Note: Terms of the top lines of the table took precedence over the terms of the bottom lines

Table 2.3-Match values ID3 and ExtSuffix ID3	 ExtSuffix 0 x00	 'm' 0 x01	 '0 ' 0 x02	 '1 ' 0 x03	 '2 ' 0 x04	 '3 ' 0 x05	 '4 ' 0 x06	 '5 ' 0 x07	 '6 '

2.2. Speaking FID "head" (head)
File Name FRM- head "speaking" is the following RootSuffix1Suffix2 [Sufix3].frm where Root, root filename (5 characters) Suffix1 first suffix (1 symbol) Suffix2-second suffix (1 symbol) Suffix3-third suffix (typically 1 symbol, but theoretically could be more, not required ) ID2 defines Suffix1 and Suffix2 and ID1 - Suffix3 (Tables 2.4, 2.5).

Table 2.4-Match values ID2 and Suffix1, Suffix2 ID2	 Suffix1	 Suffix2 0 x00	 'g'	 'v' 0 x01	 'g'	 'f' 0 x02	 'g'	 'n' 0 x03	 'n'	 'g' 0 x04	 'n'	 'f' 0 x05	 'n'	 'b' 0 x06	 'b'	 'n' 0 x07	 'b'	 'f' 0 x08	 'b'	 'v' 0 x09	 'g'	 'p' 0 x0A	 'n'	 'p' 0 x0B	 'b'	 'p' Note: If Suffix2 = 'f', the name of FRM file used Suffix3

Table 2.5-Match values ID1 and Suffix3 ID2	 Suffix3 0 x00	 '0 ' 0 x01	 '1 ' 0 x02	 '2 ' ...	 ...

3. The prototype format identifier (PID)
Prototype ID (PID) is a type of the following: +---|---+ +---|---+           |                                            |             |                                            -- -- The index of LST-file --- -- Type object (ObjType) At meaning 'type of object' is overlapped the following limitations: 0 x00 ≤ ObjType ≤ 0x0B but PRO- files exist only for objects with 0 x00 ≤ ObjType ≤ 0x05 (0 x00: items (objects), 0x01: critters (substance) 0x02: scenery (landscape), 0x03: walls (walls), 0x04: tiles (floor tiles), 0x05: misc (miscellaneous)). On the index file in LST- no restrictions. However, due to the characteristics of initializing the internal structures Mapper can create PID only with the index starting with the unit. Therefore, the zero indesom PID does not exist. Note: The index of new PID LST- file generated from the billing Mapper- BIS is a number of existing PRO- files of this type of facility. Mapper does not verify the existence PRO- file for a new PID, and therefore possible that a show has been created PID sschestvuyuschego prototype.
 * 31|30|29|28|27|26|25|24|23|22|21|20|19|18|17|16|15|14|13|12|11|10|09|08|07|06|05|04|03|02|01|00|

4. Script Format identifier (SID)
Script ID (SID) is a type of the following: +---|---+ +---|---+           |                                            |            |                                             The index of LST- file - Type script (ScriptType) At meaning 'Type script' is overlapped the following limitations: 0 x00 ≤ ScriptType ≤ 0x04 On the index file in LST- no restrictions. Type scripts shown in table 3.1
 * 31|30|29|28|27|26|25|24|23|22|21|20|19|18|17|16|15|14|13|12|11|10|09|08|07|06|05|04|03|02|01|00|

Table 3.1-Type scripts Type the script (ScriptType)	 Type (Information from SeaWolf)	 Type (Information from Mapper2.exe) 0 x00	 -	 s_system 0 x01	 spatial	 s_spatial 0 x02	 items	 s_time 0 x03	 scenery	 s_item 0 x04	 critters	 s_critter It should also be noted that the authors have not met cards (MAP- files), which used scripts types 0x00 and 0x02.

5. Id sound effects (Sound Code ID)
Id sound effects (Sound Code ID) is a character in the filename sound effects. The location of the symbol in the name of the file varies depending on the type of object. Could a value of'0 '-'9', 'A', 'Z','!','@','#','$','_'.

6. File ANIMCOMD.H
/* Copyright 1998-2003 Interplay Entertainment Corp. All rights reserved.


 * 1) ifndef ANIMCOMD_H
 * 2) define ANIMCOMD_H

/************************************************************************** Filename: AnimComd.h

Purpose: This file contains all of the defines for animations used in the game. Please do not alter them unless Jesse Reynolds says you can, as they are used for various purposes throughout the game.

Created: November 20, 1997 Log:

************************************************************/

// Animation macros & defines //
 * 1) define ANIMATE_WALK               (0)
 * 2) define ANIMATE_RUN                (1)
 * 3) define ANIMATE_INTERRUPT          (16)


 * 1) define ANIMATE_FORWARD            (0)
 * 2) define ANIMATE_REVERSE            (1)


 * 1) define animate_move_to_tile(X)        animate_move_obj_to_tile(self_obj, X, ANIMATE_WALK)
 * 2) define animate_run_to_tile(X)         animate_move_obj_to_tile(self_obj, X, ANIMATE_RUN)
 * 3) define animate_stand                  animate_stand_obj(self_obj)
 * 4) define animate_stand_reverse          animate_stand_reverse_obj(self_obj)
 * 5) define animate_move_to_tile_force(X)  animate_move_obj_to_tile(self_obj, X, (ANIMATE_WALK bwor ANIMATE_INTERRUPT))
 * 6) define animate_run_to_tile_force(X)   animate_move_obj_to_tile(self_obj, X, (ANIMATE_RUN bwor ANIMATE_INTERRUPT))
 * 7) define ANIMATE_ROTATION               (1000)
 * 8) define ANIMATE_SET_FRAME              (1010)
 * 9) define MAX_ROTATIONS                  (6)
 * 10) define animate_rotation(X)            anim(self_obj, ANIMATE_ROTATION, X)
 * 11) define animate_set_frame(FRAME)       anim(self_obj, ANIMATE_SET_FRAME, FRAME)

// basic animations 0-19 // knockdown and death  20-35 // change positions 36-37 // weapon 38-47 // single-frame death animations (the last frame of knockdown and death animations)  48-63 //#define ANIM_fire_dance_sf          (61)// doesn't exist, but keeps the enums ordered // called shot interface picture 64
 * 1) define ANIM_stand                   (0)
 * 2) define ANIM_walk                    (1)
 * 3) define ANIM_jump_begin              (2)
 * 4) define ANIM_jump_end                (3)
 * 5) define ANIM_climb_ladder            (4)
 * 6) define ANIM_falling                 (5)
 * 7) define ANIM_up_stairs_right         (6)
 * 8) define ANIM_up_stairs_left          (7)
 * 9) define ANIM_down_stairs_right       (8)
 * 10) define ANIM_down_stairs_left        (9)
 * 11) define ANIM_magic_hands_ground     (10)
 * 12) define ANIM_magic_hands_middle     (11)
 * 13) define ANIM_magic_hands_up         (12)
 * 14) define ANIM_dodge_anim             (13)
 * 15) define ANIM_hit_from_front         (14)
 * 16) define ANIM_hit_from_back          (15)
 * 17) define ANIM_throw_punch            (16)
 * 18) define ANIM_kick_leg               (17)
 * 19) define ANIM_throw_anim             (18)
 * 20) define ANIM_running                (19)
 * 1) define ANIM_fall_back              (20)
 * 2) define ANIM_fall_front             (21)
 * 3) define ANIM_bad_landing            (22)
 * 4) define ANIM_big_hole               (23)
 * 5) define ANIM_charred_body           (24)
 * 6) define ANIM_chunks_of_flesh        (25)
 * 7) define ANIM_dancing_autofire       (26)
 * 8) define ANIM_electrify              (27)
 * 9) define ANIM_sliced_in_half         (28)
 * 10) define ANIM_burned_to_nothing      (29)
 * 11) define ANIM_electrified_to_nothing (30)
 * 12) define ANIM_exploded_to_nothing    (31)
 * 13) define ANIM_melted_to_nothing      (32)
 * 14) define ANIM_fire_dance             (33)
 * 15) define ANIM_fall_back_blood        (34)
 * 16) define ANIM_fall_front_blood       (35)
 * 1) define ANIM_prone_to_standing      (36)
 * 2) define ANIM_back_to_standing       (37)
 * 1) define ANIM_take_out               (38)
 * 2) define ANIM_put_away               (39)
 * 3) define ANIM_parry_anim             (40)
 * 4) define ANIM_thrust_anim            (41)
 * 5) define ANIM_swing_anim             (42)
 * 6) define ANIM_point                  (43)
 * 7) define ANIM_unpoint                (44)
 * 8) define ANIM_fire_single            (45)
 * 9) define ANIM_fire_burst             (46)
 * 10) define ANIM_fire_continuous        (47)
 * 1) define ANIM_fall_back_sf           (48)
 * 2) define ANIM_fall_front_sf          (49)
 * 3) define ANIM_bad_landing_sf         (50)
 * 4) define ANIM_big_hole_sf            (51)
 * 5) define ANIM_charred_body_sf        (52)
 * 6) define ANIM_chunks_of_flesh_sf     (53)
 * 7) define ANIM_dancing_autofire_sf    (54)
 * 8) define ANIM_electrify_sf           (55)
 * 9) define ANIM_sliced_in_half_sf      (56)
 * 10) define ANIM_burned_to_nothing_sf   (57)
 * 11) define ANIM_electrified_to_nothing_sf (58)
 * 12) define ANIM_exploded_to_nothing_sf (59)
 * 13) define ANIM_melted_to_nothing_sf   (60)
 * 1) define ANIM_fall_back_blood_sf     (61)
 * 2) define ANIM_fall_front_blood_sf    (62)
 * 1) define ANIM_called_shot_pic        (63)
 * 2) define ANIM_max_anim               (65)   // 65

/* Anim Commands */
 * 1) define RB_UNRESERVED  1    // unreserved animation sequence, may fail if no available slots
 * 2) define RB_RESERVED    2    // reserved animation sequence, should never fail
 * 3) define REG_ANIM_BEGIN 1
 * 4) define REG_ANIM_CLEAR 2
 * 5) define REG_ANIM_END   3
 * 6) define reg_anim_begin   reg_anim_func(REG_ANIM_BEGIN, RB_UNRESERVED)
 * 7) define reg_anim_clear(who) reg_anim_func(REG_ANIM_CLEAR, who)
 * 8) define reg_anim_end     reg_anim_func(REG_ANIM_END, 0)
 * 9) endif // ANIMCOMD_H