W3X Tools

This bundle is marked as pending. It has not been reviewed by a staff member yet.
W3X Tools

General Information

W3X Tools generates code based on a map's preplaced world information like terrain, units, items, destructables and rects.
The benefit of having a map's layout stored as code is being able to access it dynamially in game. A use case would be to make a map with an easy, middle and hard terrain.

Supported Formats
  • war3map.i (map information)
  • war3mapUnits.doo (preplaced units/items)
  • war3map.doo (preplaced doodads/destructables)
  • war3map.w3e (terrain)
  • war3map.w3u (unit modifications)
  • war3map.w3t (item modifications)
  • war3map.w3b (destructable modifications)
  • war3map.w3a (ability modifications)
  • war3map.w3h (buff modifications)
  • war3map.w3q (upgrade modifications)
  • war3map.w3d (doodad modifications)
All files except terrain file have write functionality.
The object modification files only allow write "value" fields. Modifying something like based object id makes no sense for this tool.

All files from mpq can be extraxted. Right click on file structure -> Extract all files. Or drag & drop a single file on desktop.

Data Table

All data from supported file formats are shown in a data table, and can be altered there. An example of some fields of the preplaced units file:

224233-9a7cf558c19bf3e80e90c80569cc87e4.png


Each table has two checkboxes:
  • "Readonly" controls if you can write the fields. Next to write, a whole line also can be deleted by pressing DEL button on keyboard.
  • "Show all fields" will also show fields you mostly won't need for code generation.
Code Generation

Based on the table data one can generate code. Actually just plain text is created, but depending on the generator input, it can result in valid code. The generator can loop over all table entities or also only over selected ones to create the code.

Example to generate code based on some selected lines from preplaced units:

224234-d5d79be6052d4d6c672c5b5018790d47.png


In the example above:
  • 2 entities of the unit table are selected
  • As generate option we choose "Generate Only Selected"
Here is a list of all functionalites that can be used for code generation:

$

#

#if

Global Region Filter

Global Coordinates

The $ operator allows to refer to the values of the table.
Example input:
Code:
unit gg_$Type$_$CreationNumber$
Example output:
JASS:
unit gg_hpea_0001
unit gg_Hpal_0002
$Type$ will generate the Type -value of the current entitiy.
$CreationNumber$ will generate the CreationNumber -value of the current entitiy.
The # operator written alone in a line indicates a new batch for code generation.
Example input:
Code:
$X$
#
$Y$
Example output:
JASS:
1 // X
2 // X
1 // Y
2 // Y
At first, it will generate the X-data for all entities, and when finished, it will generate the Y-data for all entities.
It's technically the same as you would generate the code first only with X, and then with Y.
The #if expression helps to filter for specific field values. Example:
Code:
#if ( $Type$ == "ngol" )
call SetResourceAmount(gg_$Type$_$CreationNumber$, $GoldAmount$)
#end
The function call will only be generated if the unit type is 'ngol', a gold mine.

There are some rules for the #if expression:
  • ==, !=, <, > <=, >=, && are supported symbols (there is no "OR")
  • brackets are needed around the expression
  • for non-integer literals "" are needed around the value
  • ifs can't be nested
  • # operator does not work inside an if statement
  • must be closed with #end

A global region filter can be defined in the terrain file, which will be available for code generation from other files as well.
One can define custom coordinates, or use an already existing region from map. When the box "use global filter" is checked, all entities will be filtered by their coordinates.

224252-969ec98df64c82085d8b8e988033112f.png


From the region file one can also apply a specific region as new global filter:

224259-025f3d110dbe94c3f2930bf5d69e14ff.png


Global coordinates from region filter might be used in code generation.

224245-e9cb7efdecf4ab46c949592b17cfbfd5.png


They can be accesesed with $ operator:

224246-3e5a416a6cb556c55004ef396e46226d.png



MergeMaps

MergeMaps is a included tool to automatically generate code from any amount of maps and to inject the result into a base map.
For example one map has the terrain for an easy world, and the other ones for middle and hard. The terrain of different difficulties must all be available in the base map for dynamic creation.

Two things are required
  • Injection points
  • Config xml

Injection points

Config xml


A unique name in your code in the base map must be used as injection point.
We need a start point and also an end point. The reason why also an end point is used is that the tool will firstly remove any text between start and end before injecting new one. With doing this we can simply inject an updated map version into the base map, not having to care about removing old generation results.

JASS:
function InjectionTest takes nothing returns nothing
    // TERRAIN_EASY_INJECT_START

    // TERRAIN_EASY_INJECT_END
endfunction
The example marks the position where terrain code for the easy map should be generated. The identifier to be used in config is without suffix, so just "TERRAIN_EASY_INJECT".

XML:
<?xml version="1.0"?>
<Merge path="maps\my maps" sourceMap="Map_base" targetMap="Map_merge">
  <Maps>
    <Map name="Map_easy">
      <!-- No position filter -->
      <Terrain injectionPoint="TERRAIN_EASY_INJECT" template="vjass.txt" groupTiles="true"/>
      <!-- Add a indent to the generated text -->
      <Units injectionPoint="UNITS_EASY_INJECT"  template="vjass.txt" indentionLevel="1"/>
    </Map>
    <Map name="Map_middle">
      <!-- use only entries in this region-->
      <Area region="region2">
        <Terrain injectionPoint="TERRAIN_MIDDLE_INJECT" template="vjass.txt"/>
        <Units injectionPoint="UNITS_MIDDLE_INJECT" template="test"/>
      </Area>
      <!-- use only entries in this rect-->
      <Area minX="0" minY="0" maxX="50" maxY="50">
        <Terrain injectionPoint="TERRAIN_MIDDLE_INJECT" template="vjass.txt" />
      </Area>
    </Map>
  </Maps>
  <Templates>
    <Template name="test">unit $Type$</Template>
  </Templates>
</Merge>

Merge is the root tag. Attributes:
  • path (base directory which contains all maps and templates)
  • sourceMap (base map where code will be injected)
  • targetMap (modified base map with injected code)
Map tags must be inside a Maps tag. Attributes:
  • Name (name of the map)
Map tags defines what code will be finally generated. A map tag can include units, terrain, regions and doodads tags. They have attributes:
  • injectionPoint (code will be injected here)
  • template (template must exist in w3x tools templates)
  • groupTiles (only available for terrain)
  • indentionLevel (how many tabs generated code will have)
Area tag will filter data at code generation. Regions or coordinates can be used.
  • region (name of region for filter)
  • minX, minY, maxX, maxY (coordinates for filter)
Template is only used if a template is embedded in xml and no template file exists for it. Rare usecase.
  • name (name of template to be used for code generation)


MergeMaps exists in GUI and as CLI.

GUI

CLI


Drag and drop a config.xml file into the normal GUI of the app.

Example CLI usage:
Code:
MapMergeCLI.exe MyConfig.xml


Templates

Templates can be used instead of writing the same generation patterns repetitively. There are default ones for JASS. You just can navigate to the "Templates" directory and add custom templates in .txt files, or modify current ones.

Requirements
  • .NET 4.8
  • 64 Bit
Credits

Changelog

v 1.2.0
  • Added MergeMaps
  • Added Global Regions Filter
  • Added format support for object modification files
v 1.1.0
  • Fixed parsing units.doo file.
v 1.0.0
  • Initial release.
Contents

W3X Tools v1.2.0 (Binary)

Our clan wanted a map to test skills for ice escape, so a map with different difficulties. At our example we have following difficulties:
  • peon ( easy )
  • grunt
  • headhunter
  • raider
  • tauren
  • blademaster ( hard )
So how we make 6 levels in one map?

Common approach:
Create a big map, and create all 6 levels statically in the map. (there's not essentially something bad with it)

W3X Tools approach:
Having a map, which is initially empty, but holds code to re-create all 6 levels dynamicaly in game. Only the level which is currently needed, does exist on map.

Process:

For each difficulty I have a seperate map, where I maintain only one level. So I end up having 6 maps, one for each difficutly. Only I as developer need these maps for maintenance.

For public, there's still only one map. In this map I enter the generated code, which I got from w3x tools, after parsing my 6 maps.

Demo:

One can play the attached demo "Ice Escape Ranks", write "-rank 0" to play difficutly 0 upto "-rank 5" to play difficutly 5. The levels are only for demo.
The generated code is in folder "Levels". Here is one example of the result how I create one difficulty.
JASS:
struct Peon extends Level
    method createRegions takes nothing returns nothing
        local rect rect_0 = Rect(-1120, 2048, -864, 2336)
        local rect rect_1 = Rect(-3296, -32, 0, 3360)
        local rect rect_2 = Rect(-1376, 544, -672, 1248)
        set udg_Spawn = Location(GetRectCenterX(rect_0), GetRectCenterY(rect_0))
        call RemoveRect(rect_0)
        set rect_0 = null
        set udg_LevelBounds = rect_1
        set rect_1 = null
        set udg_RankRegion = rect_2
        set rect_2 = null
    endmethod

    method createUnits takes nothing returns nothing
        set UnitCounter = UnitCounter + 1
        set Units[UnitCounter] = CreateUnit(Player(23), 'n005', -1024, 896, 4.712389*bj_RADTODEG)
        set finish = Units[UnitCounter]
    endmethod
  
    method createDestructables takes nothing returns nothing
        set DestructableCounter = DestructableCounter + 1
        set Destructables[DestructableCounter] = CreateDestructableZ('B00A', -576, 1216, 0, 4.712389*bj_RADTODEG, 0.9, 0)
        set DestructableCounter = DestructableCounter + 1
        set Destructables[DestructableCounter] = CreateDestructableZ('B002', -768, 896, 0, 3.141593*bj_RADTODEG, 0.9, 0)
        set DestructableCounter = DestructableCounter + 1
        set Destructables[DestructableCounter] = CreateDestructableZ('B00A', -576, 576, 0, 2.356194*bj_RADTODEG, 0.9, 0)
        set DestructableCounter = DestructableCounter + 1
        set Destructables[DestructableCounter] = CreateDestructableZ('B00C', -704, 1856, 0, 2.164208*bj_RADTODEG, 0.9, 0)
        set DestructableCounter = DestructableCounter + 1
        set Destructables[DestructableCounter] = CreateDestructableZ('B00C', -704, 2496, 0, 3.647738*bj_RADTODEG, 0.9, 0)
        set DestructableCounter = DestructableCounter + 1
        set Destructables[DestructableCounter] = CreateDestructableZ('B007', -1568, 1440, 0, 4.712389*bj_RADTODEG, 1.415586, 1)
        set DestructableCounter = DestructableCounter + 1
        set Destructables[DestructableCounter] = CreateDestructableZ('B007', -224, 1952, 0, 4.712389*bj_RADTODEG, 1.40054, 1)
        set DestructableCounter = DestructableCounter + 1
        set Destructables[DestructableCounter] = CreateDestructableZ('B007', -864, 1440, 0, 4.712389*bj_RADTODEG, 1.197378, 2)
        set DestructableCounter = DestructableCounter + 1
        set Destructables[DestructableCounter] = CreateDestructableZ('B007', -288, 2592, 0, 4.712389*bj_RADTODEG, 1.476821, 1)
        set DestructableCounter = DestructableCounter + 1
        set Destructables[DestructableCounter] = CreateDestructableZ('B007', -416, 1568, 0, 4.712389*bj_RADTODEG, 1.353359, 1)
        set DestructableCounter = DestructableCounter + 1
        set Destructables[DestructableCounter] = CreateDestructableZ('B007', 416, 2528, 0, 4.712389*bj_RADTODEG, 1.427915, 0)
        set DestructableCounter = DestructableCounter + 1
        set Destructables[DestructableCounter] = CreateDestructableZ('B004', -1536, 2816, 0, 4.712389*bj_RADTODEG, 1.437849, 6)
        set DestructableCounter = DestructableCounter + 1
        set Destructables[DestructableCounter] = CreateDestructableZ('B004', -1088, 3136, 0, 4.712389*bj_RADTODEG, 1.114246, 3)
        set DestructableCounter = DestructableCounter + 1
        set Destructables[DestructableCounter] = CreateDestructableZ('B004', -1216, 2816, 0, 4.712389*bj_RADTODEG, 1.043748, 0)
        set DestructableCounter = DestructableCounter + 1
        set Destructables[DestructableCounter] = CreateDestructableZ('B004', -768, 3008, 0, 4.712389*bj_RADTODEG, 1.114521, 9)
        set DestructableCounter = DestructableCounter + 1
        set Destructables[DestructableCounter] = CreateDestructableZ('B004', -2176, 2752, 0, 4.712389*bj_RADTODEG, 1.174841, 7)
        set DestructableCounter = DestructableCounter + 1
        set Destructables[DestructableCounter] = CreateDestructableZ('B004', -1920, 3072, 0, 4.712389*bj_RADTODEG, 1.407376, 3)
        set DestructableCounter = DestructableCounter + 1
        set Destructables[DestructableCounter] = CreateDestructableZ('B004', -2496, 3072, 0, 4.712389*bj_RADTODEG, 1.302393, 8)
        set DestructableCounter = DestructableCounter + 1
        set Destructables[DestructableCounter] = CreateDestructableZ('B004', -2944, 2752, 0, 4.712389*bj_RADTODEG, 1.289163, 4)
        set DestructableCounter = DestructableCounter + 1
        set Destructables[DestructableCounter] = CreateDestructableZ('B004', -3072, 3136, 0, 4.712389*bj_RADTODEG, 1.469604, 4)
        set DestructableCounter = DestructableCounter + 1
        set Destructables[DestructableCounter] = CreateDestructableZ('B004', -3200, 2368, 0, 4.712389*bj_RADTODEG, 1.324992, 5)
        set DestructableCounter = DestructableCounter + 1
        set Destructables[DestructableCounter] = CreateDestructableZ('B004', -3072, 1856, 0, 4.712389*bj_RADTODEG, 1.000244, 5)
        set DestructableCounter = DestructableCounter + 1
        set Destructables[DestructableCounter] = CreateDestructableZ('B004', -3264, 1344, 0, 4.712389*bj_RADTODEG, 1.334391, 9)
        set DestructableCounter = DestructableCounter + 1
        set Destructables[DestructableCounter] = CreateDestructableZ('B004', -2944, 1152, 0, 4.712389*bj_RADTODEG, 1.443159, 9)
        set DestructableCounter = DestructableCounter + 1
        set Destructables[DestructableCounter] = CreateDestructableZ('B004', -3200, 768, 0, 4.712389*bj_RADTODEG, 1.438871, 1)
        set DestructableCounter = DestructableCounter + 1
        set Destructables[DestructableCounter] = CreateDestructableZ('B004', -2944, 512, 0, 4.712389*bj_RADTODEG, 1.102557, 7)
        set DestructableCounter = DestructableCounter + 1
        set Destructables[DestructableCounter] = CreateDestructableZ('B004', -3200, 320, 0, 4.712389*bj_RADTODEG, 1.013047, 3)
        set DestructableCounter = DestructableCounter + 1
        set Destructables[DestructableCounter] = CreateDestructableZ('B004', -2688, 128, 0, 4.712389*bj_RADTODEG, 1.237709, 0)
        set DestructableCounter = DestructableCounter + 1
        set Destructables[DestructableCounter] = CreateDestructableZ('B004', -2304, 256, 0, 4.712389*bj_RADTODEG, 1.013855, 1)
        set DestructableCounter = DestructableCounter + 1
        set Destructables[DestructableCounter] = CreateDestructableZ('B004', -1280, 0, 0, 4.712389*bj_RADTODEG, 1.247002, 6)
        set DestructableCounter = DestructableCounter + 1
        set Destructables[DestructableCounter] = CreateDestructableZ('B007', -160, 32, 0, 4.712389*bj_RADTODEG, 1.162374, 1)
        set DestructableCounter = DestructableCounter + 1
        set Destructables[DestructableCounter] = CreateDestructableZ('B007', 224, 1504, 0, 4.712389*bj_RADTODEG, 1.252449, 1)
        set DestructableCounter = DestructableCounter + 1
        set Destructables[DestructableCounter] = CreateDestructableZ('B007', 416, 2016, 0, 4.712389*bj_RADTODEG, 1.258614, 1)
        set DestructableCounter = DestructableCounter + 1
        set Destructables[DestructableCounter] = CreateDestructableZ('B004', -1536, 128, 0, 4.712389*bj_RADTODEG, 1.348216, 1)
        set DestructableCounter = DestructableCounter + 1
        set Destructables[DestructableCounter] = CreateDestructableZ('B004', -960, 192, 0, 4.712389*bj_RADTODEG, 1.262307, 6)
        set DestructableCounter = DestructableCounter + 1
        set Destructables[DestructableCounter] = CreateDestructableZ('B004', -1984, -64, 0, 4.712389*bj_RADTODEG, 1.197348, 2)
        set DestructableCounter = DestructableCounter + 1
        set Destructables[DestructableCounter] = CreateDestructableZ('B007', 160, 3040, 0, 4.712389*bj_RADTODEG, 1.302576, 2)
        set DestructableCounter = DestructableCounter + 1
        set Destructables[DestructableCounter] = CreateDestructableZ('B004', -1856, 192, 0, 4.712389*bj_RADTODEG, 1.028443, 2)
        set DestructableCounter = DestructableCounter + 1
        set Destructables[DestructableCounter] = CreateDestructableZ('B004', -1664, -128, 0, 4.712389*bj_RADTODEG, 1.009858, 3)
        set DestructableCounter = DestructableCounter + 1
        set Destructables[DestructableCounter] = CreateDestructableZ('B004', -1024, -192, 0, 4.712389*bj_RADTODEG, 1.224342, 9)
        set DestructableCounter = DestructableCounter + 1
        set Destructables[DestructableCounter] = CreateDestructableZ('B007', 288, 96, 0, 4.712389*bj_RADTODEG, 1.061769, 2)
        set DestructableCounter = DestructableCounter + 1
        set Destructables[DestructableCounter] = CreateDestructableZ('B007', 480, 864, 0, 4.712389*bj_RADTODEG, 1.395901, 0)
        set DestructableCounter = DestructableCounter + 1
        set Destructables[DestructableCounter] = CreateDestructableZ('B007', -160, 736, 0, 4.712389*bj_RADTODEG, 1.142933, 2)
        set DestructableCounter = DestructableCounter + 1
        set Destructables[DestructableCounter] = CreateDestructableZ('B007', -288, -352, 0, 4.712389*bj_RADTODEG, 1.086978, 2)
        set DestructableCounter = DestructableCounter + 1
        set Destructables[DestructableCounter] = CreateDestructableZ('B007', -608, 96, 0, 4.712389*bj_RADTODEG, 1.356487, 1)
    endmethod
  
    method createTerrain takes nothing returns nothing
        call SetTerrainType(-3200, 0, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-3072, 0, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-2944, 0, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-2816, 0, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-2688, 0, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-2560, 0, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-2432, 0, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-2304, 0, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-2176, 0, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-2048, 0, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-1920, 0, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-1792, 0, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-1664, 0, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-1536, 0, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-1408, 0, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-1280, 0, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-1152, 0, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-1024, 0, 'Nsnw', 13, 1, 1)
        call SetTerrainType(-896, 0, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-768, 0, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-640, 0, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-512, 0, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-384, 0, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-256, 0, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-128, 0, 'Nsnw', 8, 1, 1)
        call SetTerrainType(0, 0, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-3200, 128, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-3072, 128, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-2944, 128, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-2816, 128, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-2688, 128, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-2560, 128, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-2432, 128, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-2304, 128, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-2176, 128, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-2048, 128, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-1920, 128, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-1792, 128, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-1664, 128, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-1536, 128, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-1408, 128, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-1280, 128, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-1152, 128, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-1024, 128, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-896, 128, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-768, 128, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-640, 128, 'Nsnw', 5, 1, 1)
        call SetTerrainType(-512, 128, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-384, 128, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-256, 128, 'Nsnw', 9, 1, 1)
        call SetTerrainType(-128, 128, 'Nsnw', 16, 1, 1)
        call SetTerrainType(0, 128, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-3200, 256, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-3072, 256, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-2944, 256, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-2816, 256, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-2688, 256, 'Nsnw', 2, 1, 1)
        call SetTerrainType(-2560, 256, 'Nsnw', 6, 1, 1)
        call SetTerrainType(-2432, 256, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-2304, 256, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-2176, 256, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-2048, 256, 'Nsnw', 1, 1, 1)
        call SetTerrainType(-1920, 256, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-1792, 256, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-1664, 256, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-1536, 256, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-1408, 256, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-1280, 256, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-1152, 256, 'Nsnw', 5, 1, 1)
        call SetTerrainType(-1024, 256, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-896, 256, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-768, 256, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-640, 256, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-512, 256, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-384, 256, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-256, 256, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-128, 256, 'Nsnw', 4, 1, 1)
        call SetTerrainType(0, 256, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-3200, 384, 'Nsnw', 9, 1, 1)
        call SetTerrainType(-3072, 384, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-2944, 384, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-2816, 384, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-2688, 384, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-2560, 384, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-2432, 384, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-2304, 384, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-2176, 384, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-2048, 384, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-1920, 384, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-1792, 384, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-1664, 384, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-1536, 384, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-1408, 384, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-1280, 384, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-1152, 384, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-1024, 384, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-896, 384, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-768, 384, 'Nsnw', 13, 1, 1)
        call SetTerrainType(-640, 384, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-512, 384, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-384, 384, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-256, 384, 'Nsnw', 9, 1, 1)
        call SetTerrainType(-128, 384, 'Nsnw', 8, 1, 1)
        call SetTerrainType(0, 384, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-3200, 512, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-3072, 512, 'Nsnw', 1, 1, 1)
        call SetTerrainType(-2944, 512, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-2816, 512, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-2688, 512, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-2560, 512, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-2432, 512, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-2304, 512, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-2176, 512, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-2048, 512, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-1920, 512, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-1792, 512, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-1664, 512, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-1536, 512, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-1408, 512, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-1280, 512, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-1152, 512, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-1024, 512, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-896, 512, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-768, 512, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-640, 512, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-512, 512, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-384, 512, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-256, 512, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-128, 512, 'Nsnw', 17, 1, 1)
        call SetTerrainType(0, 512, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-3200, 640, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-3072, 640, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-2944, 640, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-2816, 640, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-2688, 640, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-2560, 640, 'Nice', 12, 1, 1)
        call SetTerrainType(-2432, 640, 'Nice', 8, 1, 1)
        call SetTerrainType(-2304, 640, 'Nice', 8, 1, 1)
        call SetTerrainType(-2176, 640, 'Nice', 0, 1, 1)
        call SetTerrainType(-2048, 640, 'Nice', 8, 1, 1)
        call SetTerrainType(-1920, 640, 'Nice', 16, 1, 1)
        call SetTerrainType(-1792, 640, 'Nice', 0, 1, 1)
        call SetTerrainType(-1664, 640, 'Nice', 4, 1, 1)
        call SetTerrainType(-1536, 640, 'Nice', 0, 1, 1)
        call SetTerrainType(-1408, 640, 'Nice', 8, 1, 1)
        call SetTerrainType(-1280, 640, 'Itbk', 8, 1, 1)
        call SetTerrainType(-1152, 640, 'Itbk', 12, 1, 1)
        call SetTerrainType(-1024, 640, 'Itbk', 4, 1, 1)
        call SetTerrainType(-896, 640, 'Itbk', 13, 1, 1)
        call SetTerrainType(-768, 640, 'Itbk', 17, 1, 1)
        call SetTerrainType(-640, 640, 'Itbk', 15, 1, 1)
        call SetTerrainType(-512, 640, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-384, 640, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-256, 640, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-128, 640, 'Nsnw', 16, 1, 1)
        call SetTerrainType(0, 640, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-3200, 768, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-3072, 768, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-2944, 768, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-2816, 768, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-2688, 768, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-2560, 768, 'Nice', 4, 1, 1)
        call SetTerrainType(-2432, 768, 'Nice', 16, 1, 1)
        call SetTerrainType(-2304, 768, 'Nice', 16, 1, 1)
        call SetTerrainType(-2176, 768, 'Nice', 8, 1, 1)
        call SetTerrainType(-2048, 768, 'Nice', 16, 1, 1)
        call SetTerrainType(-1920, 768, 'Nice', 12, 1, 1)
        call SetTerrainType(-1792, 768, 'Nice', 16, 1, 1)
        call SetTerrainType(-1664, 768, 'Nice', 16, 1, 1)
        call SetTerrainType(-1536, 768, 'Nice', 4, 1, 1)
        call SetTerrainType(-1408, 768, 'Nice', 17, 1, 1)
        call SetTerrainType(-1280, 768, 'Itbk', 8, 1, 1)
        call SetTerrainType(-1152, 768, 'Itbk', 16, 1, 1)
        call SetTerrainType(-1024, 768, 'Itbk', 12, 1, 1)
        call SetTerrainType(-896, 768, 'Itbk', 4, 1, 1)
        call SetTerrainType(-768, 768, 'Itbk', 1, 1, 1)
        call SetTerrainType(-640, 768, 'Itbk', 16, 1, 1)
        call SetTerrainType(-512, 768, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-384, 768, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-256, 768, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-128, 768, 'Nsnw', 0, 1, 1)
        call SetTerrainType(0, 768, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-3200, 896, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-3072, 896, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-2944, 896, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-2816, 896, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-2688, 896, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-2560, 896, 'Nice', 17, 1, 1)
        call SetTerrainType(-2432, 896, 'Nice', 16, 1, 1)
        call SetTerrainType(-2304, 896, 'Nice', 16, 1, 1)
        call SetTerrainType(-2176, 896, 'Nice', 8, 1, 1)
        call SetTerrainType(-2048, 896, 'Nice', 16, 1, 1)
        call SetTerrainType(-1920, 896, 'Nice', 8, 1, 1)
        call SetTerrainType(-1792, 896, 'Nice', 8, 1, 1)
        call SetTerrainType(-1664, 896, 'Nice', 8, 1, 1)
        call SetTerrainType(-1536, 896, 'Nice', 17, 1, 1)
        call SetTerrainType(-1408, 896, 'Nice', 8, 1, 1)
        call SetTerrainType(-1280, 896, 'Itbk', 9, 1, 1)
        call SetTerrainType(-1152, 896, 'Itbk', 8, 1, 1)
        call SetTerrainType(-1024, 896, 'Itbk', 4, 1, 1)
        call SetTerrainType(-896, 896, 'Itbk', 6, 1, 1)
        call SetTerrainType(-768, 896, 'Itbk', 16, 1, 1)
        call SetTerrainType(-640, 896, 'Itbk', 12, 1, 1)
        call SetTerrainType(-512, 896, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-384, 896, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-256, 896, 'Nsnw', 5, 1, 1)
        call SetTerrainType(-128, 896, 'Nsnw', 8, 1, 1)
        call SetTerrainType(0, 896, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-3200, 1024, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-3072, 1024, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-2944, 1024, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-2816, 1024, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-2688, 1024, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-2560, 1024, 'Nice', 16, 1, 1)
        call SetTerrainType(-2432, 1024, 'Nice', 0, 1, 1)
        call SetTerrainType(-2304, 1024, 'Nice', 12, 1, 1)
        call SetTerrainType(-2176, 1024, 'Nice', 8, 1, 1)
        call SetTerrainType(-2048, 1024, 'Nice', 16, 1, 1)
        call SetTerrainType(-1920, 1024, 'Nice', 12, 1, 1)
        call SetTerrainType(-1792, 1024, 'Nice', 0, 1, 1)
        call SetTerrainType(-1664, 1024, 'Nice', 12, 1, 1)
        call SetTerrainType(-1536, 1024, 'Nice', 8, 1, 1)
        call SetTerrainType(-1408, 1024, 'Nice', 17, 1, 1)
        call SetTerrainType(-1280, 1024, 'Itbk', 17, 1, 1)
        call SetTerrainType(-1152, 1024, 'Itbk', 12, 1, 1)
        call SetTerrainType(-1024, 1024, 'Itbk', 12, 1, 1)
        call SetTerrainType(-896, 1024, 'Itbk', 0, 1, 1)
        call SetTerrainType(-768, 1024, 'Itbk', 12, 1, 1)
        call SetTerrainType(-640, 1024, 'Itbk', 8, 1, 1)
        call SetTerrainType(-512, 1024, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-384, 1024, 'Nsnw', 2, 1, 1)
        call SetTerrainType(-256, 1024, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-128, 1024, 'Nsnw', 4, 1, 1)
        call SetTerrainType(0, 1024, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-3200, 1152, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-3072, 1152, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-2944, 1152, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-2816, 1152, 'Nsnw', 1, 1, 1)
        call SetTerrainType(-2688, 1152, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-2560, 1152, 'Nice', 17, 1, 1)
        call SetTerrainType(-2432, 1152, 'Nice', 4, 1, 1)
        call SetTerrainType(-2304, 1152, 'Nice', 0, 1, 1)
        call SetTerrainType(-2176, 1152, 'Nice', 16, 1, 1)
        call SetTerrainType(-2048, 1152, 'Nice', 0, 1, 1)
        call SetTerrainType(-1920, 1152, 'Nice', 8, 1, 1)
        call SetTerrainType(-1792, 1152, 'Nice', 4, 1, 1)
        call SetTerrainType(-1664, 1152, 'Nice', 17, 1, 1)
        call SetTerrainType(-1536, 1152, 'Nice', 0, 1, 1)
        call SetTerrainType(-1408, 1152, 'Nice', 0, 1, 1)
        call SetTerrainType(-1280, 1152, 'Itbk', 8, 1, 1)
        call SetTerrainType(-1152, 1152, 'Itbk', 15, 1, 1)
        call SetTerrainType(-1024, 1152, 'Itbk', 4, 1, 1)
        call SetTerrainType(-896, 1152, 'Itbk', 16, 1, 1)
        call SetTerrainType(-768, 1152, 'Itbk', 17, 1, 1)
        call SetTerrainType(-640, 1152, 'Itbk', 8, 1, 1)
        call SetTerrainType(-512, 1152, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-384, 1152, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-256, 1152, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-128, 1152, 'Nsnw', 17, 1, 1)
        call SetTerrainType(0, 1152, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-3200, 1280, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-3072, 1280, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-2944, 1280, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-2816, 1280, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-2688, 1280, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-2560, 1280, 'Nice', 4, 1, 1)
        call SetTerrainType(-2432, 1280, 'Nice', 4, 1, 1)
        call SetTerrainType(-2304, 1280, 'Nice', 16, 1, 1)
        call SetTerrainType(-2176, 1280, 'Nice', 8, 1, 1)
        call SetTerrainType(-2048, 1280, 'Nice', 17, 1, 1)
        call SetTerrainType(-1920, 1280, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-1792, 1280, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-1664, 1280, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-1536, 1280, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-1408, 1280, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-1280, 1280, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-1152, 1280, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-1024, 1280, 'Nsnw', 5, 1, 1)
        call SetTerrainType(-896, 1280, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-768, 1280, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-640, 1280, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-512, 1280, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-384, 1280, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-256, 1280, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-128, 1280, 'Nsnw', 17, 1, 1)
        call SetTerrainType(0, 1280, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-3200, 1408, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-3072, 1408, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-2944, 1408, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-2816, 1408, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-2688, 1408, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-2560, 1408, 'Nice', 17, 1, 1)
        call SetTerrainType(-2432, 1408, 'Nice', 0, 1, 1)
        call SetTerrainType(-2304, 1408, 'Nice', 12, 1, 1)
        call SetTerrainType(-2176, 1408, 'Nice', 8, 1, 1)
        call SetTerrainType(-2048, 1408, 'Nice', 8, 1, 1)
        call SetTerrainType(-1920, 1408, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-1792, 1408, 'Nsnw', 1, 1, 1)
        call SetTerrainType(-1664, 1408, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-1536, 1408, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-1408, 1408, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-1280, 1408, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-1152, 1408, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-1024, 1408, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-896, 1408, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-768, 1408, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-640, 1408, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-512, 1408, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-384, 1408, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-256, 1408, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-128, 1408, 'Nsnw', 17, 1, 1)
        call SetTerrainType(0, 1408, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-3200, 1536, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-3072, 1536, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-2944, 1536, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-2816, 1536, 'Nsnw', 2, 1, 1)
        call SetTerrainType(-2688, 1536, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-2560, 1536, 'Nice', 4, 1, 1)
        call SetTerrainType(-2432, 1536, 'Nice', 8, 1, 1)
        call SetTerrainType(-2304, 1536, 'Nice', 16, 1, 1)
        call SetTerrainType(-2176, 1536, 'Nice', 17, 1, 1)
        call SetTerrainType(-2048, 1536, 'Nice', 16, 1, 1)
        call SetTerrainType(-1920, 1536, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-1792, 1536, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-1664, 1536, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-1536, 1536, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-1408, 1536, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-1280, 1536, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-1152, 1536, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-1024, 1536, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-896, 1536, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-768, 1536, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-640, 1536, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-512, 1536, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-384, 1536, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-256, 1536, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-128, 1536, 'Nsnw', 8, 1, 1)
        call SetTerrainType(0, 1536, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-3200, 1664, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-3072, 1664, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-2944, 1664, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-2816, 1664, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-2688, 1664, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-2560, 1664, 'Nice', 0, 1, 1)
        call SetTerrainType(-2432, 1664, 'Nice', 8, 1, 1)
        call SetTerrainType(-2304, 1664, 'Nice', 16, 1, 1)
        call SetTerrainType(-2176, 1664, 'Nice', 16, 1, 1)
        call SetTerrainType(-2048, 1664, 'Nice', 12, 1, 1)
        call SetTerrainType(-1920, 1664, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-1792, 1664, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-1664, 1664, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-1536, 1664, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-1408, 1664, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-1280, 1664, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-1152, 1664, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-1024, 1664, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-896, 1664, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-768, 1664, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-640, 1664, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-512, 1664, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-384, 1664, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-256, 1664, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-128, 1664, 'Nsnw', 12, 1, 1)
        call SetTerrainType(0, 1664, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-3200, 1792, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-3072, 1792, 'Nsnw', 9, 1, 1)
        call SetTerrainType(-2944, 1792, 'Nsnw', 10, 1, 1)
        call SetTerrainType(-2816, 1792, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-2688, 1792, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-2560, 1792, 'Nice', 17, 1, 1)
        call SetTerrainType(-2432, 1792, 'Nice', 16, 1, 1)
        call SetTerrainType(-2304, 1792, 'Nice', 17, 1, 1)
        call SetTerrainType(-2176, 1792, 'Nice', 16, 1, 1)
        call SetTerrainType(-2048, 1792, 'Nice', 17, 1, 1)
        call SetTerrainType(-1920, 1792, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-1792, 1792, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-1664, 1792, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-1536, 1792, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-1408, 1792, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-1280, 1792, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-1152, 1792, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-1024, 1792, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-896, 1792, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-768, 1792, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-640, 1792, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-512, 1792, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-384, 1792, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-256, 1792, 'Nsnw', 5, 1, 1)
        call SetTerrainType(-128, 1792, 'Nsnw', 16, 1, 1)
        call SetTerrainType(0, 1792, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-3200, 1920, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-3072, 1920, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-2944, 1920, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-2816, 1920, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-2688, 1920, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-2560, 1920, 'Nice', 12, 1, 1)
        call SetTerrainType(-2432, 1920, 'Nice', 8, 1, 1)
        call SetTerrainType(-2304, 1920, 'Nice', 8, 1, 1)
        call SetTerrainType(-2176, 1920, 'Nice', 16, 1, 1)
        call SetTerrainType(-2048, 1920, 'Nice', 16, 1, 1)
        call SetTerrainType(-1920, 1920, 'Nice', 0, 1, 1)
        call SetTerrainType(-1792, 1920, 'Nice', 8, 1, 1)
        call SetTerrainType(-1664, 1920, 'Nice', 8, 1, 1)
        call SetTerrainType(-1536, 1920, 'Nice', 4, 1, 1)
        call SetTerrainType(-1408, 1920, 'Nice', 16, 1, 1)
        call SetTerrainType(-1280, 1920, 'Ibkb', 0, 1, 1)
        call SetTerrainType(-1152, 1920, 'Ibkb', 16, 1, 1)
        call SetTerrainType(-1024, 1920, 'Ibkb', 17, 1, 1)
        call SetTerrainType(-896, 1920, 'Ibkb', 4, 1, 1)
        call SetTerrainType(-768, 1920, 'Ibkb', 4, 1, 1)
        call SetTerrainType(-640, 1920, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-512, 1920, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-384, 1920, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-256, 1920, 'Nsnw', 2, 1, 1)
        call SetTerrainType(-128, 1920, 'Nsnw', 12, 1, 1)
        call SetTerrainType(0, 1920, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-3200, 2048, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-3072, 2048, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-2944, 2048, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-2816, 2048, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-2688, 2048, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-2560, 2048, 'Nice', 0, 1, 1)
        call SetTerrainType(-2432, 2048, 'Nice', 4, 1, 1)
        call SetTerrainType(-2304, 2048, 'Nice', 8, 1, 1)
        call SetTerrainType(-2176, 2048, 'Nice', 12, 1, 1)
        call SetTerrainType(-2048, 2048, 'Nice', 8, 1, 1)
        call SetTerrainType(-1920, 2048, 'Nice', 12, 1, 1)
        call SetTerrainType(-1792, 2048, 'Nice', 4, 1, 1)
        call SetTerrainType(-1664, 2048, 'Nice', 8, 1, 1)
        call SetTerrainType(-1536, 2048, 'Nice', 12, 1, 1)
        call SetTerrainType(-1408, 2048, 'Nice', 16, 1, 1)
        call SetTerrainType(-1280, 2048, 'Ibkb', 4, 1, 1)
        call SetTerrainType(-1152, 2048, 'Ibkb', 8, 1, 1)
        call SetTerrainType(-1024, 2048, 'Ibkb', 9, 1, 1)
        call SetTerrainType(-896, 2048, 'Ibkb', 16, 1, 1)
        call SetTerrainType(-768, 2048, 'Ibkb', 16, 1, 1)
        call SetTerrainType(-640, 2048, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-512, 2048, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-384, 2048, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-256, 2048, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-128, 2048, 'Nsnw', 17, 1, 1)
        call SetTerrainType(0, 2048, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-3200, 2176, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-3072, 2176, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-2944, 2176, 'Nsnw', 1, 1, 1)
        call SetTerrainType(-2816, 2176, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-2688, 2176, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-2560, 2176, 'Nice', 0, 1, 1)
        call SetTerrainType(-2432, 2176, 'Nice', 0, 1, 1)
        call SetTerrainType(-2304, 2176, 'Nice', 16, 1, 1)
        call SetTerrainType(-2176, 2176, 'Nice', 17, 1, 1)
        call SetTerrainType(-2048, 2176, 'Nice', 0, 1, 1)
        call SetTerrainType(-1920, 2176, 'Nice', 12, 1, 1)
        call SetTerrainType(-1792, 2176, 'Nice', 17, 1, 1)
        call SetTerrainType(-1664, 2176, 'Nice', 4, 1, 1)
        call SetTerrainType(-1536, 2176, 'Nice', 8, 1, 1)
        call SetTerrainType(-1408, 2176, 'Nice', 8, 1, 1)
        call SetTerrainType(-1280, 2176, 'Ibkb', 12, 1, 1)
        call SetTerrainType(-1152, 2176, 'Ibkb', 17, 1, 1)
        call SetTerrainType(-1024, 2176, 'Ibkb', 12, 1, 1)
        call SetTerrainType(-896, 2176, 'Ibkb', 1, 1, 1)
        call SetTerrainType(-768, 2176, 'Ibkb', 16, 1, 1)
        call SetTerrainType(-640, 2176, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-512, 2176, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-384, 2176, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-256, 2176, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-128, 2176, 'Nsnw', 16, 1, 1)
        call SetTerrainType(0, 2176, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-3200, 2304, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-3072, 2304, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-2944, 2304, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-2816, 2304, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-2688, 2304, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-2560, 2304, 'Nice', 16, 1, 1)
        call SetTerrainType(-2432, 2304, 'Nice', 12, 1, 1)
        call SetTerrainType(-2304, 2304, 'Nice', 4, 1, 1)
        call SetTerrainType(-2176, 2304, 'Nice', 16, 1, 1)
        call SetTerrainType(-2048, 2304, 'Nice', 4, 1, 1)
        call SetTerrainType(-1920, 2304, 'Nice', 12, 1, 1)
        call SetTerrainType(-1792, 2304, 'Nice', 8, 1, 1)
        call SetTerrainType(-1664, 2304, 'Nice', 8, 1, 1)
        call SetTerrainType(-1536, 2304, 'Nice', 16, 1, 1)
        call SetTerrainType(-1408, 2304, 'Nice', 14, 1, 1)
        call SetTerrainType(-1280, 2304, 'Ibkb', 17, 1, 1)
        call SetTerrainType(-1152, 2304, 'Ibkb', 17, 1, 1)
        call SetTerrainType(-1024, 2304, 'Ibkb', 8, 1, 1)
        call SetTerrainType(-896, 2304, 'Ibkb', 16, 1, 1)
        call SetTerrainType(-768, 2304, 'Ibkb', 5, 1, 1)
        call SetTerrainType(-640, 2304, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-512, 2304, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-384, 2304, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-256, 2304, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-128, 2304, 'Nsnw', 8, 1, 1)
        call SetTerrainType(0, 2304, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-3200, 2432, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-3072, 2432, 'Nsnw', 5, 1, 1)
        call SetTerrainType(-2944, 2432, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-2816, 2432, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-2688, 2432, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-2560, 2432, 'Nice', 0, 1, 1)
        call SetTerrainType(-2432, 2432, 'Nice', 8, 1, 1)
        call SetTerrainType(-2304, 2432, 'Nice', 8, 1, 1)
        call SetTerrainType(-2176, 2432, 'Nice', 4, 1, 1)
        call SetTerrainType(-2048, 2432, 'Nice', 17, 1, 1)
        call SetTerrainType(-1920, 2432, 'Nice', 17, 1, 1)
        call SetTerrainType(-1792, 2432, 'Nice', 0, 1, 1)
        call SetTerrainType(-1664, 2432, 'Nice', 0, 1, 1)
        call SetTerrainType(-1536, 2432, 'Nice', 12, 1, 1)
        call SetTerrainType(-1408, 2432, 'Nice', 16, 1, 1)
        call SetTerrainType(-1280, 2432, 'Ibkb', 8, 1, 1)
        call SetTerrainType(-1152, 2432, 'Ibkb', 9, 1, 1)
        call SetTerrainType(-1024, 2432, 'Ibkb', 16, 1, 1)
        call SetTerrainType(-896, 2432, 'Ibkb', 17, 1, 1)
        call SetTerrainType(-768, 2432, 'Ibkb', 8, 1, 1)
        call SetTerrainType(-640, 2432, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-512, 2432, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-384, 2432, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-256, 2432, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-128, 2432, 'Nsnw', 12, 1, 1)
        call SetTerrainType(0, 2432, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-3200, 2560, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-3072, 2560, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-2944, 2560, 'Nsnw', 11, 1, 1)
        call SetTerrainType(-2816, 2560, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-2688, 2560, 'Nsnw', 2, 1, 1)
        call SetTerrainType(-2560, 2560, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-2432, 2560, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-2304, 2560, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-2176, 2560, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-2048, 2560, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-1920, 2560, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-1792, 2560, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-1664, 2560, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-1536, 2560, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-1408, 2560, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-1280, 2560, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-1152, 2560, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-1024, 2560, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-896, 2560, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-768, 2560, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-640, 2560, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-512, 2560, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-384, 2560, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-256, 2560, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-128, 2560, 'Nsnw', 17, 1, 1)
        call SetTerrainType(0, 2560, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-3200, 2688, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-3072, 2688, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-2944, 2688, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-2816, 2688, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-2688, 2688, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-2560, 2688, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-2432, 2688, 'Nsnw', 1, 1, 1)
        call SetTerrainType(-2304, 2688, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-2176, 2688, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-2048, 2688, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-1920, 2688, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-1792, 2688, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-1664, 2688, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-1536, 2688, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-1408, 2688, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-1280, 2688, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-1152, 2688, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-1024, 2688, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-896, 2688, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-768, 2688, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-640, 2688, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-512, 2688, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-384, 2688, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-256, 2688, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-128, 2688, 'Nsnw', 16, 1, 1)
        call SetTerrainType(0, 2688, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-3200, 2816, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-3072, 2816, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-2944, 2816, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-2816, 2816, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-2688, 2816, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-2560, 2816, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-2432, 2816, 'Nsnw', 14, 1, 1)
        call SetTerrainType(-2304, 2816, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-2176, 2816, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-2048, 2816, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-1920, 2816, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-1792, 2816, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-1664, 2816, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-1536, 2816, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-1408, 2816, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-1280, 2816, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-1152, 2816, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-1024, 2816, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-896, 2816, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-768, 2816, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-640, 2816, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-512, 2816, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-384, 2816, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-256, 2816, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-128, 2816, 'Nsnw', 12, 1, 1)
        call SetTerrainType(0, 2816, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-3200, 2944, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-3072, 2944, 'Nsnw', 1, 1, 1)
        call SetTerrainType(-2944, 2944, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-2816, 2944, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-2688, 2944, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-2560, 2944, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-2432, 2944, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-2304, 2944, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-2176, 2944, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-2048, 2944, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-1920, 2944, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-1792, 2944, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-1664, 2944, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-1536, 2944, 'Nsnw', 9, 1, 1)
        call SetTerrainType(-1408, 2944, 'Nsnw', 5, 1, 1)
        call SetTerrainType(-1280, 2944, 'Nsnw', 2, 1, 1)
        call SetTerrainType(-1152, 2944, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-1024, 2944, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-896, 2944, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-768, 2944, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-640, 2944, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-512, 2944, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-384, 2944, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-256, 2944, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-128, 2944, 'Nsnw', 12, 1, 1)
        call SetTerrainType(0, 2944, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-3200, 3072, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-3072, 3072, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-2944, 3072, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-2816, 3072, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-2688, 3072, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-2560, 3072, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-2432, 3072, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-2304, 3072, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-2176, 3072, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-2048, 3072, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-1920, 3072, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-1792, 3072, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-1664, 3072, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-1536, 3072, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-1408, 3072, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-1280, 3072, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-1152, 3072, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-1024, 3072, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-896, 3072, 'Nsnw', 13, 1, 1)
        call SetTerrainType(-768, 3072, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-640, 3072, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-512, 3072, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-384, 3072, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-256, 3072, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-128, 3072, 'Nsnw', 8, 1, 1)
        call SetTerrainType(0, 3072, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-3200, 3200, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-3072, 3200, 'Nsnw', 2, 1, 1)
        call SetTerrainType(-2944, 3200, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-2816, 3200, 'Nsnw', 10, 1, 1)
        call SetTerrainType(-2688, 3200, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-2560, 3200, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-2432, 3200, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-2304, 3200, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-2176, 3200, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-2048, 3200, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-1920, 3200, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-1792, 3200, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-1664, 3200, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-1536, 3200, 'Nsnw', 5, 1, 1)
        call SetTerrainType(-1408, 3200, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-1280, 3200, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-1152, 3200, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-1024, 3200, 'Nsnw', 1, 1, 1)
        call SetTerrainType(-896, 3200, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-768, 3200, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-640, 3200, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-512, 3200, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-384, 3200, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-256, 3200, 'Nsnw', 13, 1, 1)
        call SetTerrainType(-128, 3200, 'Nsnw', 1, 1, 1)
        call SetTerrainType(0, 3200, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-3200, 3328, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-3072, 3328, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-2944, 3328, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-2816, 3328, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-2688, 3328, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-2560, 3328, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-2432, 3328, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-2304, 3328, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-2176, 3328, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-2048, 3328, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-1920, 3328, 'Nsnw', 10, 1, 1)
        call SetTerrainType(-1792, 3328, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-1664, 3328, 'Nsnw', 16, 1, 1)
        call SetTerrainType(-1536, 3328, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-1408, 3328, 'Nsnw', 0, 1, 1)
        call SetTerrainType(-1280, 3328, 'Nsnw', 4, 1, 1)
        call SetTerrainType(-1152, 3328, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-1024, 3328, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-896, 3328, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-768, 3328, 'Nsnw', 17, 1, 1)
        call SetTerrainType(-640, 3328, 'Nsnw', 5, 1, 1)
        call SetTerrainType(-512, 3328, 'Nsnw', 12, 1, 1)
        call SetTerrainType(-384, 3328, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-256, 3328, 'Nsnw', 8, 1, 1)
        call SetTerrainType(-128, 3328, 'Nsnw', 14, 1, 1)
        call SetTerrainType(0, 3328, 'Nsnw', 17, 1, 1)
    endmethod
  
    method getLevelName takes nothing returns string
        return "Peon"
    endmethod
  
    method getLevelRank takes nothing returns integer
        return 0
    endmethod
  
    method onDestroy takes nothing returns nothing
        call RemoveUnit(finish)
        call DestroyTrigger(finishHandler)
        set finishHandler = null
        set finish = null
      
        call RemoveRect(.rankRegion)
        call DestroyTrigger(rankHandler)
        set .rankRegion = null
        set .rankHandler = null
    endmethod
  
    static method create takes nothing returns thistype
        local thistype this = .allocate()
        call .createLevel()
      
        set .finishHandler = CreateTrigger()
        call TriggerRegisterUnitInRange(.finishHandler, .finish, 105, Filter(function Level.onFinishFilter))
        call TriggerAddAction(.finishHandler, function Level.enterFinish)
      
        set .rankHandler = CreateTrigger()
        call TriggerRegisterEnterRectSimple(.rankHandler, .rankRegion)
        call TriggerAddAction(.rankHandler, function Level.enterRankRegion)
      
        return this
    endmethod
endstruct
 

Attachments

  • Ice Escape Ranks v0.6.w3x
    2.4 MB · Views: 290
Last edited:
Thanks! I now saw your posted tool, too. It's some ltitle bit related! It gave motiviation for a new feature, being able to config a file for some batch creation. When user changes a map, he for now would neeed to re-egenrate the map on his own, as code in base map need to be updated to match new terrain. The goal of new feature would be to have one config file for his base map, where he defines what maps layouts should be included in whih position of code, and w3x tools parses all target maps in row, and injects generated code in the base map automatically. At least it's the idea.
 
Level 12
Joined
Jan 30, 2020
Messages
876
Another godsend tool that I missed !

This is great, previous tools I tried to use on my Reforged map to retrieve doodads and destructs failed.
The code generator script is very well thought.

I would love to see this tool extended to other object files, it would just be wonderful.
Especially as I used my old patch 1.24 map to rebuild it from scratch progressively, so I have some corrupted hidden settings (I can't find the custom configuration SLKs I was using back in 2004) on some objects, and this has unexpected issues, like the impossibility to use weather effects in my map.

I thought of recreating from scratch, but honestly thats a titan's work considering the amount of custom object data implied.

I would advise anyone to use this tool to regain control of the creation of preplaced objects on their maps !!!
 
Level 12
Joined
Jan 30, 2020
Messages
876
Yes that would be really nice.
I currently have no use of the preplaced unit data (thus did not experiment the issues) because one can simply retrieve that from the map script, but not everyone likes to dig in war3map.Lua (or .j).
Besides units, there is so much data we can't access directly and if you make the tool evolve, it would be so awesome for everyone !
 
Level 4
Joined
Dec 7, 2018
Messages
24
Thanks man! great tool, is it possible to change the Angle value to be in 360 degrees format just like inside WE?

Can u please make it possible to drag & drop a single war3map file without having to import the entire map?
 
Last edited:
Sorry for not promised updates, inactivty kicked in.

Terrain writing most likely won't be supported, sorry, @yxq1122 .

@grimgrents it's supposed to multiply with bj_RADTODEG. I could add an extra column, so then value in RAD and one in DEG would exist, but I'm not sure it's required.

There are some improvements and new features like viewing raw object editor modifications, that I will upload very soon, when I only find motiviation to extend the docu and description. :wthumbsup:
 
Level 14
Joined
Oct 17, 2012
Messages
705
@IcemanBo Some features like the ability to scale down or extend the size of the entire terrain environment would be great! In fact, the power to move the entire terrain environment to a new set of coordinates would be superb. A use case for this is to combine different terrain environments from two different maps. The same can be applied to all other preplaced objects.
 
Level 12
Joined
Oct 18, 2013
Messages
652
Iirc, Preplaced unit generation has a leak. This tool could be used to re-compile, fixing that leak. Neat!
 
Level 2
Joined
Jan 19, 2022
Messages
6
this is hardcore and something that ive been wanting to make myself lmao, now i dont have to
so glorious, thank you
 
Top