Forts
Not enough ratings
Map Save Format (fwe)
By Ximsa
A quick documentation on how forts saves terrain data
   
Award
Favorite
Favorited
Unfavorite
Header
Everything is little-endian
16 bytes constant(?) 0x1400 0000 0000 0000 0040 7544 0000 0000 4x4 bytes float worldborder (left, right, top, bottom) 4 bytes environment string length environment string 4 bytes Blockcount
Blocks
4 bytes block name length (can be 0) blockname 4 bytes node count 4x4 bytes float colour (R,G,B,A) 4 bytes terrain name count terrain name 4 bytes global surface name count (can be 0) global surface name const(?) 0x0000 c03e 16 bytes zero const(?) 4 bytes teamId (1 -> 1, 2 -> 2, None -> 0, Any -> -1, Background -> -2) 7 bytes(?) Flags -WindFloor = 1 << (8*0) -ViewFloor = 1 << (8*1) -NoDraw = 1 << (8*2) -Foundations = 1 << (8*3) -Mines = 1 << (8*4) -OilDrills = 1 << (8*5) -OilRigs = 1 << (8*6) + 0 -PassProjectiles = 1 << (8*6) + 1 -PassBeams = 1 << (8*6) + 2 -Hazard = 1 << (8*6) + 3 -NoSplash = 1 << (8*6) + 4 -NoBuild = 1 << (8*6) + 5 |3x4 bytes float (x,y,z) |4 bytes Zero const(?) |4 bytes surface name length (can be 0) |surface name 8 Byte 0 if no props and file termintates
Props
4 bytes #props |4 bytes prop name length |prop name |probably position, size and rotation
Sample Implementation
Mapeditor[gist.github.com]
Example usage:

Print all team 1 or 2 blocks
editor = MapEditor("playermap1.fwe") for block in editor.blocks: if block.teamid == 1 or block.teamid == 2: print(block.nodes[1].point) 

Plot all terrain blocks
editor = MapEditor("playermap1.fwe") editor.plot()