rss rss Like this on facebook Twitter this +1 this Steam group

Modding the Maps

An important note: Everysingle map in Fallout 2 is different, so you'll have to get started with the 'artemple.map' and then work out things for other maps based on your findings here. In Fallout 2, the map files are split into 4 different areas:



Now lets begin with the basics. This starts at the begginning of the map at continues till the offset EC. The basics contains information on the map, such as the script file it uses and the grid size. Now to explain each of the parts, open up 'artemple.map' and I will explain each of the bits:

Offset Byte length Description
26h - 27h 2 associated script number for the map
2bh 1 grid size, values can be:
0c 100x100 40,000 bytes
08 100x200 80,000 bytes
00 100x300 120,000 bytes
36h - 37h 2 Map name can be found in \text\english\game\map.msg

The tiles begin in every map at ECh, but vary when coming to where they end, in the above table where it says 0C - 100x100 - 40,000 bytes etc. means if at 28h it says 000C then the tiles will go for 40,000 bytes, etc. making it a 100x100 grid - heres the format of a tile.

RRRR FFFF

RRRR - the frame number for a roof tile
FFFF - The frame number for a floor tile

For example: 0001 00C5

Where 0001 is the roof and 00C5 is the floor. 0001 means no tile (this is for both the roof and the floor).

And in the game, the tiles always go from right to left, and from top to bottom.

The scripts are located in the map right after the tiles have ended. However, the format of the scripts section in the map is not fully understood. Basically, this is how they are presented:

0001 FFFF FFFF 0000 0000 0000 0004

At the moment, it seems like the 0001 refers to an object in the map (not sure how this works), and then the 0004 refers to the script (in this case, script test 03).

The section of the map after all of the scripts is the section which contains all of the screen-painting information. This section is the biggest section of the map.

The different object ID's are:

Object Type Hex Number
Items 00
Critters 01
Scenery 02
Walls 03
Nothing 04
Misc 05
Items

Object Type Block Length
Armor 88
Container 88
Drug 88
Weapon 96
Ammo 96
Misc 92
Key 92

Now the offsets. If a container has items in it, go down to the inventory section, to learn how to put items into it. Also note, the offsets in the following sections use offsets for the item if it's starting offset is 00.

Offset Length(Byte) Description
00h - 03h
4
Tile number
1Ch
1
Object Type Id 00 - Item
1Eh - 1Fh
2
Frame of Item
28h
1
Object Type Id 00
2Ah - 2Bh
2
Object ID
28h - 2Bh
4
PID (Object type ID + Object ID)
40h - 43h
4
Script no. (FFFF FFFF = no script)
44h - 47h
4
No. of items (Container only)

Critters

If a critter has items in it, refer to the inventory section

Offset Length(Byte) Description
00h - 03h
4
Tile no.
1Bh
1
Angle of Critter. Values can be:
00 Lower Right
01 Down
02 Lower Left
03 Higher Left
04 Up
05 High Right
1Ch
1
Object Type ID 01 - Critter
1Eh - 1Fh
2
Frame of Critter
28h
1
Object Type ID 01
2Ah - 2Bh
2
Object ID
28h - 2Bh
4
PID (Object Type ID + Object ID)
40h - 43h
4
Script No. (No script means dead)
44h - 47h
4
Number of Items if any
68h - 6Bh
4
Group id
70h - 73h
4
hit Points
7Dh - 7Eh
2
Quantity of first item, if they have items

Scenery

Object Subtype Block Length
Portal 92
Stairs 96
Elevator 96
Ladder down 96
Ladder Up 96
Generic 88

Offset Length(byte) Description
00h - 03h 4 Tile no.
1Ch 1 Object Type ID 02 - Scenery
1Eh - 1Fh 2 Frame of Scenery
28h 1 Object type id 02
2Ah - 2Bh 2 Object ID
28h - 2Bh 4 PID
40h - 43h 4 Script no. (FFFF FFFF - No script)

Walls

Offset Length(byte) Description
00h - 03h
4
Tile no.
1Ch
1
Object type ID 03 - Wall
1Eh - 1Fh
2
Frame of Wall
20h - 23h
4
Aligns the walls, not all walls have this though.
28h
1
Object type ID 03
2Ah - 2Bh
2
Object ID
28h - 2Bh
4
PID
40h - 43h
4
FFFF FFFF - Don't think walls can have scripts

Misc

Object type: Block Length
Exit Grid 104
Generic 88

Offset Length(byte) Description
00h - 03h
4
Tile no.
1Ch
1
Object Type ID 05 - Misc
1Eh - 1Fh
2
Frame of Misc
28h
1
Object Type ID 05
2Ah - 2Bh
2
Object ID
28h - 2Bh
4
PID
40h - 43h
4
ffff ffff (Might be able to have script)
56h - 57h
2
Calls up that Map file when you Step on a green exit grid (I think)
58h - 5Bh
4
????, Tile no. for what, Something to do with the exit grid

Inventory Editing
How to add new items to critters and containers.

Subtype Block Length
Armor 92
Container 96
Drug 92
Weapon 100
Ammo 96
Misc 96
Key 96

Now here are the offsets for inventory:

Offset Length Description
24h
1
Wielding or not wielding, it sort of works, possible values:
00 Not wielding
02 is wielding
0a ??
2Ch
1
Object Type ID for Inventory, Values same as above, I think
2Eh - 2Fh
2
item ID
5Ah - 5Bh
2
Amount of Ammo if any (Weapon Only)
5Fh
1
Ammunition Type, if any (Weapon Only)
5Ah - 5Fh
6
If weapon doesnt have ammuniton, then just 6 lots of FF

Back

Copyright 2000 by Neo (kingpin131@hotmail.com)
corrections and additions made by Smackrazor (sea_man_stains__@hotmail.com)