MAP File Format

MAP files describe playable locations: header metadata, map variables, floor and roof tiles, active scripts, and placed objects. Fallout maps can contain up to three elevations. Each elevation has a 200 by 200 hex grid for objects and a 100 by 100 square grid for floor and roof tiles.

In Fallout 2, map files are normally loaded from maps\*.map. When a save-game version exists, the engine checks for a matching .sav map first and loads that instead. The saved map has the same broad structure, but includes runtime state that a clean mapper-authored MAP may not contain. See Savegame Structure for the surrounding SAVE.DAT and slot sidecar layout.

Clean maps and saved maps

Clean .MAP files and saved .SAV map files use the same main section order. The difference is mostly in the meaning and freshness of the stored values: a clean map describes the mapper-authored starting state, while a saved map records the state after scripts, combat, inventory changes, doors, locks, and player interaction have modified the map.

AreaClean .MAPSaved .SAV map
Header flagsSaved-map flag 0x00000001 is normally clear.Saved-map flag is set before the engine writes an in-game map save.
last_visit_timeOften zero or mapper/default data.Updated to the current game time when saving, then used for aging and healing logic when returning.
Map variablesOften initial values or zero-filled arrays.Contains runtime map_var and script local-variable values.
Script recordsCan be rebuilt or initialized from map/object script references.Preserves runtime script fields, local-variable offsets/counts, fixed parameters, and queued/removed state.
Object flagsUsually close to PRO defaults plus mapper placement choices.May include hidden, seen, queued, equipped, open-door, and other runtime bits.
Critter payloadsInitial critter state.Current hit points, radiation, poison, combat maneuver/results, AI packet, team, and last-attacker combat id.
Items and inventoryInitial placement, stack sizes, charges, ammo, and container contents.Current quantities, weapon ammo, charges, equipped state, moved items, and nested inventory contents.
Doors and containersInitial open/locked/jammed state.Current open, locked, jammed, searched, or script-modified state.

Fallout 2 CE also treats saved and clean maps differently during load. For example, when the saved-map flag is not set, loaded script local_vars_count is cleared and can be recovered later from scripts.lst; when the flag is set, saved local variable state is preserved. Static parsers should therefore avoid assuming that zeroed runtime fields mean the format lacks those fields.

Some travel systems reference MAPs indirectly. Elevator configuration, for example, stores destination map indexes, elevations, and tiles; the map index resolves through data\maps.txt, while the target elevation and tile must be valid in the destination MAP.

File order

The engine reads a MAP file in this order:

  1. Map header.
  2. Global map variables.
  3. Local map variables.
  4. Tile data for each elevation present in the map flags.
  5. Script lists.
  6. Object lists and nested inventory objects.

All integer fields are stored as big-endian values, using the same file helpers described on the PRO page.

The header is 0xEC bytes long in Fallout 2 CE. Versions 19 and 20 are accepted; Fallout 1 maps are generally version 19, and Fallout 2 maps are generally version 20.

OffsetTypeFieldDescription
0x0000int32versionMap version, usually 19 or 20.
0x0004char[16]nameMap file name stored in the header.
0x0014int32entering_tileDefault starting hex tile.
0x0018int32entering_elevationDefault starting elevation, 0 through 2.
0x001Cint32entering_rotationDefault starting rotation, 0 through 5.
0x0020int32local_vars_countNumber of local map variables following the global variable array.
0x0024int32script_indexMap script list index. Fallout 2 CE creates a map script only when this value is greater than zero, then subtracts one for the zero-based scripts.lst index.
0x0028int32flagsSave/elevation flags.
0x002Cint32darknessMapper darkness field. Fallout 2 CE writes 1.
0x0030int32global_vars_countNumber of global map variables immediately after the header.
0x0034int32map_indexWorldmap/maps.txt map index.
0x0038uint32last_visit_timeGame time tick when the map was last visited.
0x003Cint32[44]unknownReserved/unknown header data.

Map flags

FlagMeaning
0x00000001Saved map state. The engine sets this when saving an in-game .sav map.
0x00000002Elevation 0 has no map data when set.
0x00000004Elevation 1 has no map data when set.
0x00000008Elevation 2 has no map data when set.

Tile data is present only for elevations whose flag is clear. Fallout 2 CE also uses these flags while saving: an elevation with no non-default tiles and no saveable objects is marked absent.

Variables

Immediately after the header, the file stores global_vars_count 32-bit integers, then local_vars_count 32-bit integers. Negative counts are treated as zero by Fallout 2 CE before allocation.

Global map variables are the map-wide map_var array. Local map variables back script local variables. Saved maps can contain runtime values here; clean mapper maps often contain zero-initialized arrays.

Tiles

For each present elevation, MAP stores 10000 32-bit tile entries. Each entry packs one roof tile id and one floor tile id:

BitsMeaning
31..16Roof tile halfword.
15..0Floor tile halfword.

Within each halfword, the low 12 bits are the tile art id and the high 4 bits are tile flags:

Halfword bitsMaskMeaning
11..00x0FFFTile art id, resolved through art\tiles\tiles.lst.
15..120xF000Tile flags. Preserve these bits when rewriting unless intentionally normalizing the map.

For rendering or preview purposes, use roof_id = (entry >> 16) & 0x0FFF and floor_id = entry & 0x0FFF. Tile id 1 is the default/no-tile value used when the engine resets the square grid.

Fallout 2 CE normalizes roof tile data while loading: it keeps the roof art id, keeps the high-nibble roof flags, but clears bit 0x1000 from the roof halfword. The floor halfword is left as read. A read-only parser can report the raw file value; an editor that writes maps should decide explicitly whether it preserves raw tile halfwords or follows CE's normalized in-memory value.

The tile grid is 100 by 100 square cells, not the 200 by 200 hex grid used by objects. Readers should not use object tile coordinates to index this array directly.

Scripts

The script section stores five script lists in fixed script-type order. Each list begins with a live script count, followed by enough 16-slot extents to hold that many records. Fallout 2 CE computes the number of extents as ceil(script_count / 16).

Deleted script slots are compacted away when saving. This means script_count is the number of live records, not necessarily the number of physical records that follow: every stored extent still contains 16 serialized script slots, then two extent trailer integers.

Script typeValue
System0
Spatial1
Timed2
Item3
Critter4
List fieldTypeDescription
script_countint32Number of live scripts in this script-type list. If zero, no extents follow for that list.
extent.records16 script recordsEach extent always stores 16 record slots, even when the final extent is only partly used.
extent.lengthint32Number of valid slots in this extent. Full extents usually store 16; the final extent may store a smaller value.
extent.nextint32Serialized linked-list pointer placeholder. Fallout 2 CE writes 0 and ignores the value when reading.

Script ids use the packed style described on the SCRIPTS.LST page. The high byte is the script type, which also controls whether the record has spatial or timed extra fields.

OffsetFieldDescription
0x00sidPacked script id.
0x04nextLinked-list field in the original engine; usually not useful to external tools.
0x08built_tileOnly present for spatial scripts. Packed tile/elevation value.
0x0CradiusOnly present for spatial scripts. Spatial trigger radius.
0x08timeOnly present for timed scripts. Game-time value for the timed script.

After the optional spatial/timed fields, every script record stores the same 14 integers:

FieldDescription
flagsRuntime script flags. Fallout 2 CE uses 0x08 as the removed/deleted marker while compacting saves.
script_indexIndex into scripts\scripts.lst.
programOriginal-engine program pointer slot. Fallout 2 CE writes 0 and discards the value when reading.
owner_idObject id owned by this script, or another script owner id depending on script type.
local_vars_offsetOffset into the map local-variable array.
local_vars_countNumber of local variables assigned to this script. Fallout 2 CE clears it when the map is not marked as saved state.
return_valueLast value set by the script return opcode.
actionCurrently executed action.
fixed_paramFixed parameter used by queued/timed script actions.
action_being_usedAction id currently being used.
script_overridesRuntime override flag/state.
field_48Unknown/runtime field preserved by the file format.
how_muchRuntime quantity parameter used by some actions.
field_50Unknown/runtime field preserved by the file format.

Record size therefore depends on script type: system, item, and critter records are 16 int32 values (0x40 bytes), timed records are 17 int32 values (0x44 bytes), and spatial records are 18 int32 values (0x48 bytes). To skip a script list safely, skip ceil(script_count / 16) extents, not just script_count records. The byte size of one extent is 16 * record_size + 8.

Script ownership and local variables

There are two related script references in play. A PRO file stores the default script id for an object prototype. A MAP file stores runtime script instances: the object sid at offset 0x40 points to a script record in the MAP script lists, and the script record's owner_id points back to the object's id.

PlaceFieldMeaning
PROsidDefault packed script id for objects created from that prototype. The low bits identify an entry in scripts\scripts.lst.
MAP headerscript_indexMap script reference. Fallout 2 CE treats positive values as one-based and stores script_index - 1 in the created system script record.
MAP objectsidRuntime script instance id attached to this placed object, or -1 when no runtime script is attached.
MAP objectscript_indexCached script-list index for the object. For critters, CE updates this from the runtime script when creating an instance.
MAP script recordsidRuntime script instance id. The high byte is the script type.
MAP script recordscript_indexZero-based index into scripts\scripts.lst; this selects the .int program name.
MAP script recordowner_idObject id of the owning object. For spatial/map helper scripts, the engine may create hidden helper objects as owners.

When CE creates a new object script instance, it allocates a fresh runtime sid, copies the script-list index from the PRO script id, and sets owner_id to the object's id. For spatial scripts it also initializes built_tile from the object's tile/elevation and gives the script a default radius of 3.

Script local variables are stored in the MAP local-variable array, not inside the script record itself. A script record's local_vars_offset is the starting index in that array, and local_vars_count is the number of values reserved for the script. The local_vars=N metadata in scripts.lst tells the engine how many locals a script wants when it needs to allocate or re-discover them.

Saved maps preserve local variable values and set the saved-map flag 0x00000001. For non-saved maps, Fallout 2 CE clears loaded script local_vars_count; the script engine can later recover the intended count from scripts.lst and allocate fresh zeroed local variables. This is why clean mapper-authored maps and runtime .sav maps can differ even when their script records point to the same .int files.

Objects

The object section begins with the total number of saved objects across all elevations. Then, for each of the three elevations, it stores that elevation's object count followed by the serialized objects for that elevation.

FieldMeaning
total_object_countTotal number of top-level saved objects across all elevations.
elevation_object_count[0]Number of top-level saved objects serialized for elevation 0.
elevation_object_count[1]Number of top-level saved objects serialized for elevation 1.
elevation_object_count[2]Number of top-level saved objects serialized for elevation 2.

Inventory objects are not counted in the per-elevation object counts. They are serialized recursively under their owner after the owner's base object and subtype payload. Objects with OBJECT_NO_SAVE are skipped when the engine writes the object lists.

OffsetFieldDescription
0x00idObject id.
0x04tileObject hex tile, or -1 for objects not placed on the map.
0x08xPixel x offset.
0x0CyPixel y offset.
0x10sxCached screen x.
0x14syCached screen y.
0x18frameCurrent FRM frame.
0x1CrotationRotation, 0 through 5.
0x20fidCurrent art FID.
0x24flagsInstance object flags.
0x28elevationObject elevation. During load the engine also forces this to the current elevation loop.
0x2CpidPrototype PID. Use this with PRO files to enrich the object.
0x30cidCombat id, mostly relevant to saved/in-combat state.
0x34light_distanceInstance light radius.
0x38light_intensityInstance light intensity.
0x3CoutlineOutline color/state in saved maps. Clean map reads ignore this value.
0x40sidRuntime script id attached to the object.
0x44script_indexScript index from scripts.lst, or -1.

After these base fields, the engine reads object instance data. This part is not determined by the object's FID. It is determined by the object PID and, for items and scenery, by the subtype in the matching PRO file.

Object flags

The object flags field at offset 0x24 is the runtime instance flag word. New objects usually inherit many of these bits from the matching PRO record, but MAP stores the instance value that the engine actually uses for rendering, blocking, saving, and interaction state. Static tools should preserve bits they do not interpret.

FlagNameMeaning
0x00000001OBJECT_HIDDENObject is hidden and should not be visible or trigger normal spatial processing.
0x00000004OBJECT_NO_SAVERuntime/system object should not be saved with the map.
0x00000008OBJECT_FLATFlat object; rendered in the flat/pre-roof layer.
0x00000010OBJECT_NO_BLOCKDoes not block movement on its tile.
0x00000020OBJECT_LIGHTINGObject participates in light handling.
0x00000400OBJECT_NO_REMOVERuntime/system object should not be freed or removed normally.
0x00000800OBJECT_MULTIHEXMulti-hex object.
0x00001000OBJECT_NO_HIGHLIGHTSuppresses normal object highlight outline.
0x00002000OBJECT_QUEUEDObject has or had a queued event.
0x00004000OBJECT_TRANS_REDRed translucency mode.
0x00008000OBJECT_TRANS_NONEOpaque/no translucency mode.
0x00010000OBJECT_TRANS_WALLWall translucency mode.
0x00020000OBJECT_TRANS_GLASSGlass translucency mode.
0x00040000OBJECT_TRANS_STEAMSteam translucency mode.
0x00080000OBJECT_TRANS_ENERGYEnergy translucency mode.
0x01000000OBJECT_IN_LEFT_HANDItem is equipped in the left hand.
0x02000000OBJECT_IN_RIGHT_HANDItem is equipped in the right hand.
0x04000000OBJECT_WORNItem is worn as armor.
0x10000000OBJECT_WALL_TRANS_ENDWall-transparency end marker used by the transparency system.
0x20000000OBJECT_LIGHT_THRULight passes through the object.
0x40000000OBJECT_SEENObject has been seen/discovered in runtime state.
0x80000000OBJECT_SHOOT_THRUProjectiles can pass through the object.

The six translucency bits from 0x00004000 through 0x00080000 are a mutually meaningful group in engine code. Fallout 2 CE names their combined mask OBJECT_FLAG_0xFC000. Open doors are represented on the base object flags as OBJECT_OPEN_DOOR, which is OBJECT_SHOOT_THRU | OBJECT_LIGHT_THRU | OBJECT_NO_BLOCK.

Common instance data

Every object stores inventory metadata immediately after the base object record:

OffsetFieldDescription
0x48inventory_lengthNumber of inventory entries owned by this object.
0x4Cinventory_capacityAllocated inventory capacity in the saved object data.
0x50inventory_items_ptrSerialized pointer placeholder from the original engine; Fallout 2 CE reads it and discards it.

Critter instance data

If PID_TYPE(pid) == 1, the object continues with critter runtime state:

OffsetFieldDescription
0x54flagsCritter instance flags.
0x58damage_last_turnCombat damage tracker.
0x5CmaneuverCombat maneuver flags/state.
0x60apCurrent combat action points.
0x64resultsCombat result flags/state.
0x68ai_packetRuntime AI packet.
0x6CteamRuntime team number.
0x70who_hit_me_cidCombat id of the critter that last hit this critter, or -1.
0x74hit_pointsCurrent hit points.
0x78radiationCurrent radiation level.
0x7CpoisonCurrent poison level.

Non-critter instance data

All non-critter objects store an additional instance flags field at 0x54. Fallout 2 CE normalizes the uninitialized debug value 0xCCCCCCCC to 0 when reading. For lockable containers this field uses 0x02000000 for locked and 0x04000000 for jammed. Door lock and jam state uses the door open_flags field instead.

Object kindExtra fields after 0x54Notes
Item, armorNone.Only the common inventory metadata and instance flags are stored.
Item, containerNone.Lock/jam/open state uses the instance flags.
Item, drugNone.Drug behavior comes from the PRO payload.
Item, weapon0x58 ammo_quantity, 0x5C ammo_type_pid.Fallout 2 CE repairs invalid clean-map ammo values from the weapon PRO when the map is not a saved map.
Item, ammo0x58 quantity.Current rounds in the stack.
Item, misc0x58 charges.Current charges.
Item, key0x58 key_code.Instance key code.
WallNone.No additional object data after instance flags.
TileNone.Tiles are not normally handled as placed object records.
MiscOnly exit grids add fields.Most misc objects stop after instance flags.

Scenery instance data

Scenery object payloads depend on the scenery subtype in the PRO file:

Scenery subtypeValueExtra fields after 0x54 flags
Door00x58 open_flags.
Stairs10x58 destination_built_tile, 0x5C destination_map.
Elevator20x58 elevator_type, 0x5C elevator_level.
Ladder up3Fallout 1/version 19: 0x58 destination_built_tile. Fallout 2/version 20: 0x58 destination_map, 0x5C destination_built_tile.
Ladder down4Same as ladder up.
Generic5No extra MAP instance field is read by Fallout 2 CE.

Door open_flags is also used for lock and jam state. Stairs and ladders use packed built-tile values for tile, elevation, and rotation. The destination map field determines whether the destination is on the current map or should be handed to the map-transition system.

Exit grid instance data

Misc objects whose PID is in the exit-grid range store four additional fields after instance flags:

OffsetFieldDescription
0x58mapDestination map id.
0x5CtileDestination tile.
0x60elevationDestination elevation.
0x64rotationDestination rotation.

Map transitions

Stairs, ladders, and exit grids all describe movement, but the engine does not treat their map fields identically. Stairs create a cross-map transition only when destination_map > 0; otherwise they move the object on the current map. Ladders create a transition when destination_map != 0; otherwise they move the object on the current map.

Map valueMeaning in transition handlingNotes
0Usually same-map movement before a transition is created.If a MapTransition is explicitly created with map 0, Fallout 2 CE converts it to -2.
> 0Load another map by map index.The destination tile, elevation, and rotation are then applied after the map load when valid.
-1Town map transition in CE's transition handler.Older notes sometimes describe negative values differently for specific scenery data, so preserve the original value when rewriting.
-2World map transition in CE's transition handler.This value can be produced internally from transition map 0.

Exit-grid misc objects store separate map, tile, elevation, and rotation fields instead of a packed built-tile value. Scenery stairs and ladders store tile/elevation/rotation in destination_built_tile and store the destination map separately.

Inventory objects

If an object's inventory length is non-zero, inventory entries immediately follow that object. Each entry starts with a quantity, followed by another serialized object. These nested objects use the same object format, but their tile is usually -1 and their owner is the containing object.

This recursive structure matters for parsers: the elevation object count counts top-level objects for that elevation, not every nested inventory object.

Coordinates

Object tiles are hex-grid indexes in the 200 by 200 map grid, normally 0 through 39999. Rotations use six directions: 0 northeast, 1 east, 2 southeast, 3 southwest, 4 west, and 5 northwest.

Spatial scripts, stairs, and ladders use a packed built-tile value instead of separate tile/elevation/rotation fields:

BitsMaskFieldDescription
25..00x03FFFFFFtileHex tile number. Normal MAP values use 0 through 39999.
28..260x1C000000rotationRotation, shifted right by 26. Values normally use 0 through 5.
31..290xE0000000elevationElevation, shifted right by 29. Values normally use 0 through 2.

In C-like notation: tile = built_tile & 0x03FFFFFF, rotation = (built_tile & 0x1C000000) >> 26, and elevation = (built_tile & 0xE0000000) >> 29. Fallout 2 CE's builtTileCreate(tile, elevation) helper only writes tile and elevation, leaving rotation as zero; however, transition code still reads the rotation bits for stairs and ladders.

Using PRO data

A MAP object carries both fid and pid. The fid tells the renderer which art is currently displayed; the pid points to the prototype that supplies object type, subtype, default flags, name and description message ids, item data, critter data, and other base behavior.

For lightweight object enrichment, the most useful PRO fields are the PID high byte, item/scenery subtype at offset 0x20, script id at offset 0x1C for script-bearing prototypes, and the common header FID/message fields.

Inter-file dependencies

A MAP file can be parsed as bytes on its own, but it cannot be fully named, rendered, or semantically classified without other game data. Most fields are indexes into lists or ids that are resolved elsewhere.

DependencyUsed forMAP fields that lead there
proto\items\items.lst, proto\critters\critters.lst, proto\scenery\scenery.lst, proto\walls\walls.lst, proto\tiles\tiles.lst, proto\misc\misc.lstResolve a PID's low bits to a PRO filename.pid.
proto\...\*.proDetermine object type/subtype payloads, default flags, message ids, FID, material, scripts, critter stats, item data, and scenery behavior.pid.
art\items\items.lst, art\critters\critters.lst, art\scenery\scenery.lst, art\walls\walls.lst, art\tiles\tiles.lst, art\misc\misc.lstResolve FID art ids to FRM filenames.fid, tile roof/floor ids, PRO FID fields.
art\...\*.frmRender objects, tiles, inventory images, critters, walls, scenery, and animation frames.Resolved from fid and art LST entries.
scripts\scripts.lstResolve script indexes to .int script names and read local_vars=N metadata.Header script_index, object script_index, script record script_index, PRO sid.
scripts\*.intExecutable script bytecode used by the engine.Resolved through scripts.lst.
text\english\game\pro_item.msg, pro_crit.msg, pro_scen.msg, pro_wall.msg, pro_tile.msg, pro_misc.msgObject names and descriptions. See MSG File Format.PRO message ids reached through object pid.
data\maps.txt / worldmap map listResolve map indexes used by the header, transitions, stairs, ladders, and exit grids. See World-map Text Configuration Files.Header map_index, exit-grid map, scenery destination_map.
elevators.ini / elevator definitions in modern enginesResolve elevator type and level behavior.Elevator scenery elevator_type and elevator_level.

For a static object index, PRO files are the most important dependency because MAP object payload size depends on PID type and item/scenery subtype. For a visual map preview, art LSTs and FRM files become equally important. For script analysis, scripts.lst is required even if the .int bytecode itself is not parsed.

Minimal parser recipe

  1. Read the 0xEC-byte header and accept only known versions, normally 19 or 20.
  2. Clamp negative global_vars_count and local_vars_count to zero, matching Fallout 2 CE behavior.
  3. Read global_vars_count big-endian 32-bit integers, then local_vars_count big-endian 32-bit integers.
  4. For each elevation 0 through 2, read 10000 tile entries only when that elevation's map flag bit is clear.
  5. Read the five script lists in system, spatial, timed, item, critter order. For each list, read script_count, compute ceil(script_count / 16) extents, and remember that every extent stores 16 physical script slots plus two trailer integers.
  6. Read the object section's total object count, then each elevation's top-level object count and object records.
  7. For each object, read the base object fields through script_index, then the common inventory metadata.
  8. Use the object's pid to determine object type. For item and scenery payloads, read the matching PRO file or a cached PRO index to determine the subtype-specific MAP payload.
  9. After each top-level or nested object, if inventory_length is non-zero, read that many inventory entries. Each entry is a quantity followed by another full serialized object.
  10. When rewriting, preserve pointer placeholders, unknown fields, runtime flags, and unrecognized subtype data unless the tool is intentionally normalizing the map.

Minimal static parser subset

Tools that only need map indexing, object listings, or lightweight previews do not need to interpret every runtime field. They still need to stay byte-aligned, especially across scripts, subtype payloads, and recursive inventory objects.

GoalRequired parsingCan usually ignore
Map metadataHeader, map flags, map index, entrance tile/elevation/rotation, visit time.Script records, object payloads, inventory contents.
Tile previewHeader, elevation flags, present tile arrays, low 12-bit roof/floor tile ids.Scripts, objects, object payloads, tile flag semantics beyond preservation.
Object listingObject counts, base object records, recursive inventory structure, enough PRO data to skip subtype payloads.Combat internals, script runtime fields, pointer placeholders, exact animation state.
Object enrichmentObject pid, fid, sid, script_index, PRO type/subtype, PRO message ids, related LST files.Most saved-game runtime values unless they are part of the search/index feature.
Transition extractionMisc exit-grid payloads, scenery subtype payloads for stairs/ladders, packed built-tile decoding.Unrelated item/critter payload details after they have been skipped correctly.

A practical static reader can treat many fields as opaque while still exposing useful results. The important rule is that opaque does not mean absent: read or skip the correct number of bytes, keep raw values available when rewriting, and use PRO subtype information before deciding how long an object payload is.

Loader normalization and validation

A parser can either expose raw on-disk values or values after applying the same cleanup Fallout 2 CE performs while loading. Both are useful, but they should not be mixed without saying so.

Field or sectionCE load behaviorParser/editor note
Header versionAccepts versions 19 and 20.Reject or warn on other versions unless the tool explicitly supports them.
Variable countsNegative global/local variable counts are clamped to zero before allocation.Report the raw value if validating corrupt maps; use the clamped value for safe reading.
Clean-map script localsWhen the saved-map flag is clear, loaded script local_vars_count is cleared.Use scripts.lst metadata to recover intended local counts for analysis.
Tile roof halfwordRoof data is normalized and roof flag bit 0x1000 is cleared in memory.Rendering tools usually want the normalized art id; preserving editors may want the raw halfword.
Object elevationObject load runs inside an elevation loop and forces the object's elevation to that loop value.A mismatch between stored object elevation and containing list is suspicious.
Non-critter instance flags0xCCCCCCCC is normalized to 0.Treat this as an uninitialized/debug fill value, not as meaningful flag bits.
Pointer placeholdersMany pointer slots are read and discarded; CE writes some as 0.Do not interpret these as file offsets or references.

Useful consistency checks include: the sum of the three elevation object counts should match total_object_count; object elevations should match the elevation list they were read from; normal object tiles should be -1 or 0..39999; normal elevations should be 0..2; rotations should normally be 0..5; PID/FID/SID high bytes should be in known object or script type ranges; and script list extents should be exactly the number implied by script_count.

Inventory recursion should also be bounded by the actual file length and by reasonable tool limits. The engine format is recursive, so a defensive reader should fail gracefully on cyclic-looking or absurdly deep inventory data instead of trusting counts blindly.

Unknown and preserved fields

Some MAP fields are known to exist and are preserved by the engine, but their complete semantic meaning is not documented here. A reader can expose them as raw values; a writer should keep them unchanged unless it has a specific reason to normalize them.

FieldLocationWhat is knownRecommendation
field_3C[44]Header 0x003C-0x00EBReserved/unknown header payload preserved by the header read/write code.Preserve exactly when rewriting.
programScript record shared tailOriginal-engine program pointer slot. Fallout 2 CE writes 0 and discards the read value.Do not treat as an offset or file reference.
field_48Script record shared tailRuntime/unknown script integer preserved in the serialized record.Expose as raw integer; preserve on rewrite.
field_50Script record shared tailRuntime script field; CE also uses it while finding script run information.Preserve unless rebuilding scripts intentionally.
outlineObject base offset 0x3COutline color/state in saved maps. Clean map loading may ignore this value.Preserve for saved maps and round-trip editors.
inventory_items_ptrObject common data offset 0x50Serialized pointer placeholder from the original engine; CE reads and discards it.Do not interpret as a pointer in the file.
Extent nextScript list extent trailerSerialized linked-list pointer placeholder. CE writes 0 and ignores the read value.Write 0 for CE-style output, or preserve raw value for strict round trips.
Tile flag bitsHigh nibble of roof/floor halfwordsUsed by the tile system, but not fully described by this MAP page.Use low 12 bits for art ids; preserve high bits unless normalizing.

When documenting or implementing support for these fields, keep source-backed behavior separate from interpretation. For example, "CE writes this slot as zero" is known behavior; "the original engine used every possible value this way" would require stronger evidence.

Writing and rebuilding maps

Writing a MAP file is not just writing the same records back in place. Several counts and flags describe the serialized shape of the file, so they must match the data being written.

AreaWriter responsibility
Header variable countsSet global_vars_count and local_vars_count to the number of 32-bit values actually written after the header.
Saved-map flagSet or clear 0x00000001 deliberately. Saved maps preserve runtime state; clean maps may have script locals rebuilt from scripts.lst.
Elevation flagsSet elevation-absent flags only when the elevation has no non-default tiles and no saveable top-level objects.
Tile arraysWrite exactly 10000 tile entries for each elevation whose absent flag is clear, and no tile array for elevations whose absent flag is set.
Script listsRecompute each script type's live script_count, write enough 16-slot extents, and write each extent's length plus trailer.
Object countsRecompute the total and per-elevation top-level object counts. Do not include nested inventory objects in these counts.
Object payloadsUse PID and PRO subtype data to choose the correct instance payload shape before writing.
InventoryWrite each inventory entry immediately after its owner object as quantity followed by a full nested object.
Pointer placeholdersEither preserve raw placeholder values for strict round trips, or write CE-style zero placeholders consistently.

A format-preserving editor should avoid silently converting a saved map into a clean map or vice versa. In particular, normalizing script locals, object flags, outline state, tile flags, or pointer placeholders can be reasonable for a map-cleaning tool, but it should be an explicit operation.

Editing notes

Source References

History

2026-05-01 - Added source-backed local documentation based on Fallout 2 CE by OpenAI

Original public documentation: https://falloutmods.fandom.com/wiki/MAP_File_Format