Vault-Tec Labs
Advertisement

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.

Background[]

Ids are 4-byte numbers representing 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.

FRM File ID (FID)[]

In general, FID is a number follows:

+--|--------|-----------|-----------------------|-----------|-----------------------------------+  
|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|
+--|--------|-----------|-----------------------|-----------|-----------------------------------+
 |      |         |                 |                 |                       |  
 |      |         |                 |                 |                       ------------------- Index in LST-file  
 |      |         |                 |                 ------------------------------------------- ID1  
 |      |         |                 ------------------------------------------------------------- ID2  
 |      |         ------------------------------------------------------------------------------- Type of object (ObjType)  
 |      ----------------------------------------------------------------------------------------- ID3
 ------------------------------------------------------------------------------------------------ Unused

Fields' type object and 'Index in list-file' 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.

Table 2.1-use fields ID3, ID2 and ID1

ObjType ID3 ID2 ID1
0x00: items
0x01: critters x x x
0x02: scenery
0x03: walls
0x04: tiles
0x05: misc
0x06: interface
0x07: invent
0x08: heads x x
0x09: backgrnd
0x0A: skilldex

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.

Critter FID[]

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

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. Note that .frm files contain animations for all six orientations

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 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 - - Invalid value
ID1 > 0x00 'd' + (ID1 - 1) 'c' + (ID2 - 38) weapon animations
ID2 = 0x24 (36) - 'c' 'h' stand from prone
ID2 = 0x25 (37) - 'c' 'j' stand from back
ID2 = 0x40 (64) - 'n' 'a' called shot picture
ID2 ≥ 0x30 (48) - 'r' 'a' + (ID2 - 48) single-frame death animations
ID2 ≥ 0x14 (20) - 'b' 'a' + (ID2 - 20) knockdown and death
ID2 = 0x12 (18) ID1 = 0x01 'd' 'm' knife throw
ID1 = 0x04 'g' 'm' spear throw
- 'a' 's' unarmed (i.e., grenades) throw
ID2 = 0x0D (13) ID1 > 0x00 'd' + (ID1 - 1) 'e' dodge (parry)
ID1 = 0x00 'a' 'n' unarmed dodge
ID2 = 0x00 ID1> 0x00 'd' + (ID1 - 1) 'a' stand
ID2 = 0x01 ID1 > 0x00 'd' + (ID1 - 1) 'b' walking
- - 'a' 'a' + ID2 other basic animations
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
0x00 'm'
0x01 '0 '
0x02 '1 '
0x03 '2 '
0x04 '3 '
0x05 '4 '
0x06 '5 '
0x07 '6 '

Talking head FID[]

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
0x00 'g' 'v'
0x01 'g' 'f'
0x02 'g' 'n'
0x03 'n' 'g'
0x04 'n' 'f'
0x05 'n' 'b'
0x06 'b' 'n'
0x07 'b' 'f'
0x08 'b' 'v'
0x09 'g' 'p'
0x0A 'n' 'p'
0x0B 'b' 'p'
Note: If Suffix2 = 'f', the name of FRM file used Suffix3

Table 2.5-Match values ID1 and Suffix3

ID2 Suffix3
0x00 '0 '
0x01 '1 '
0x02 '2 '
... ...

Prototype identifier (PID)[]

Prototype ID (PID) is a type of the following:

+-----------------------|-----------------------------------------------------------------------+
|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|
+-----------------------|-----------------------------------------------------------------------+
            |                                            | 
            |                                            ---------------------------------------- The index of LST-file
            ------------------------------------------------------------------------------------- Type of object (ObjType)

At meaning 'type of object' is overlapped the following limitations:

0x00 ≤ ObjType ≤ 0x0B 

but PRO- files exist only for objects with

0x00 ≤ ObjType ≤ 0x05 

(0x00: 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 existing prototype.

Script identifier (SID)[]

Script ID (SID) is a type of the following:

+-----------------------|-----------------------------------------------------------------------+
|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|
+-----------------------|-----------------------------------------------------------------------+
            |                                            |
            |                                            ---------------------------------------- The index of LST- file
            ------------------------------------------------------------------------------------- Type of script (ScriptType)

At meaning 'Type script' is overlapped the following limitations:

0x00 ≤ ScriptType ≤ 0x04 

On the index file in LST- no restrictions.

Type scripts shown in table 3.1

Table 3.1-Type scripts

Type of script

(ScriptType)

Type

(Information from SeaWolf)

Type

(Information from Mapper2.exe)

0x00 - s_system
0x01 spatial s_spatial
0x02 items s_time
0x03 scenery s_item
0x04 critters s_critter

It should also be noted that the authors have not met cards (MAP- files), which used scripts types 0x00 and 0x02.

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','!','@','#','$','_'.

ANIMCOMD.H[]

Animation letter codes have been added; they are not in the original file.

/*
	Copyright 1998-2003 Interplay Entertainment Corp.  All rights reserved.
*/

#ifndef ANIMCOMD_H
#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 //
#define ANIMATE_WALK                (0)
#define ANIMATE_RUN                 (1)
#define ANIMATE_INTERRUPT           (16)

#define ANIMATE_FORWARD             (0)
#define ANIMATE_REVERSE             (1)

#define animate_move_to_tile(X)         animate_move_obj_to_tile(self_obj, X, ANIMATE_WALK)
#define animate_run_to_tile(X)          animate_move_obj_to_tile(self_obj, X, ANIMATE_RUN)
#define animate_stand                   animate_stand_obj(self_obj)
#define animate_stand_reverse           animate_stand_reverse_obj(self_obj)
#define animate_move_to_tile_force(X)   animate_move_obj_to_tile(self_obj, X, (ANIMATE_WALK bwor ANIMATE_INTERRUPT))
#define animate_run_to_tile_force(X)    animate_move_obj_to_tile(self_obj, X, (ANIMATE_RUN bwor ANIMATE_INTERRUPT))
#define ANIMATE_ROTATION                (1000)
#define ANIMATE_SET_FRAME               (1010)
#define MAX_ROTATIONS                   (6)
#define animate_rotation(X)             anim(self_obj, ANIMATE_ROTATION, X)
#define animate_set_frame(FRAME)        anim(self_obj, ANIMATE_SET_FRAME, FRAME)

/* weapon animation sets:
A = unarmed     D = knife       E = club        F = hammer
G = spear       H = pistol      I = SMG         J = rifle
K = big gun     L = minigun     M = rocket launcher
*/

// basic animations  0-19
#define ANIM_stand                    (0)	AA, [D-M]A
#define ANIM_walk                     (1)	AB, [D-M]B
#define ANIM_jump_begin               (2)	(AC?)
#define ANIM_jump_end                 (3)	(AD?)
#define ANIM_climb_ladder             (4)	AE
#define ANIM_falling                  (5)	(AF?)
#define ANIM_up_stairs_right          (6)	AG
#define ANIM_up_stairs_left           (7)	AH
#define ANIM_down_stairs_right        (8)	AI
#define ANIM_down_stairs_left         (9)	AJ
#define ANIM_magic_hands_ground      (10)	AK
#define ANIM_magic_hands_middle      (11)	AL
#define ANIM_magic_hands_up          (12)	(AM?)
#define ANIM_dodge_anim              (13)	AN
#define ANIM_hit_from_front          (14)	AO
#define ANIM_hit_from_back           (15)	AP
#define ANIM_throw_punch             (16)	AQ
#define ANIM_kick_leg                (17)	AR
#define ANIM_throw_anim              (18)	AS, DM, GM
#define ANIM_running                 (19)	AT
        ?                                       AU
// knockdown and death   20-35
#define ANIM_fall_back               (20)	BA
#define ANIM_fall_front              (21)	BB
#define ANIM_bad_landing             (22)	BC
#define ANIM_big_hole                (23)	BD
#define ANIM_charred_body            (24)	BE
#define ANIM_chunks_of_flesh         (25)	BF
#define ANIM_dancing_autofire        (26)	BG
#define ANIM_electrify               (27)	BH
#define ANIM_sliced_in_half          (28)	BI
#define ANIM_burned_to_nothing       (29)	BJ
#define ANIM_electrified_to_nothing  (30)	BK
#define ANIM_exploded_to_nothing     (31)	BL
#define ANIM_melted_to_nothing       (32)	BM
#define ANIM_fire_dance              (33)	BN
#define ANIM_fall_back_blood         (34)	BO
#define ANIM_fall_front_blood        (35)	BP
// change positions  36-37
#define ANIM_prone_to_standing       (36)	CH
#define ANIM_back_to_standing        (37)	CJ
// weapon 38-47
#define ANIM_take_out                (38)	[D-M]C
#define ANIM_put_away                (39)	[D-M]D
#define ANIM_parry_anim              (40)	[D-M]E
#define ANIM_thrust_anim             (41)	[D-G]F
#define ANIM_swing_anim              (42)	[D-F]G
#define ANIM_point                   (43)	[H-M]H
#define ANIM_unpoint                 (44)	[H-M]I
#define ANIM_fire_single             (45)	[H-M]J
#define ANIM_fire_burst              (46)	[H-M]K
#define ANIM_fire_continuous         (47)	[H-M]L
// single-frame death animations (the last frame of knockdown and death animations)   48-63
#define ANIM_fall_back_sf            (48)	RA
#define ANIM_fall_front_sf           (49)	RB
#define ANIM_bad_landing_sf          (50)	RC
#define ANIM_big_hole_sf             (51)	RD
#define ANIM_charred_body_sf         (52)	RE
#define ANIM_chunks_of_flesh_sf      (53)	RF
#define ANIM_dancing_autofire_sf     (54)	RG
#define ANIM_electrify_sf            (55)	RH
#define ANIM_sliced_in_half_sf       (56)	RI
#define ANIM_burned_to_nothing_sf    (57)	RJ
#define ANIM_electrified_to_nothing_sf  (58)	RK
#define ANIM_exploded_to_nothing_sf  (59)	RL
#define ANIM_melted_to_nothing_sf    (60)	RM
//#define ANIM_fire_dance_sf           (61)// doesn't exist, but keeps the enums ordered
#define ANIM_fall_back_blood_sf      (61)	RO
#define ANIM_fall_front_blood_sf     (62)	RP
// called shot interface picture	 64
#define ANIM_called_shot_pic         (63)	NA
#define ANIM_max_anim                (65)   // 65

/* Anim Commands */
#define RB_UNRESERVED   1    // unreserved animation sequence, may fail if no available slots
#define RB_RESERVED     2    // reserved animation sequence, should never fail
#define REG_ANIM_BEGIN  1
#define REG_ANIM_CLEAR  2
#define REG_ANIM_END    3
#define reg_anim_begin()    reg_anim_func(REG_ANIM_BEGIN, RB_UNRESERVED)
#define reg_anim_clear(who) reg_anim_func(REG_ANIM_CLEAR, who)
#define reg_anim_end()      reg_anim_func(REG_ANIM_END, 0)

#endif // ANIMCOMD_H
Advertisement