# Advanced Strategic Command

documentation

## Mapeditor

`EDHEX.EXE`

Originally the mapeditor was designed to be used by keyboard only (except the dialog boxes) and the mouse routines were added later. Keep that in mind when using the mouse and something does not seem to work. Just use the keyboard... The whole map editor is much less polished than the game.

The <F1>-key in the mapeditor brings up help. Most keys should be listed there.

Selecting items is possible with the keys <F3... Fn>, one <F - key> for each item category ( terrain, tanks, buildings, mines, etc).

Use <F2> to get the cursor back on the map. You can place items with <Space>. <F> is used to fill rectangles with objects. Go to the upper left corner, press <F> then to the lower right corner and press <Space>.

You can rotate some items with <D>.

I recommend to save often and under different filenames to prevent data loss.

### Events

The events are one of the most important functions of ASC. An event consists of:

- an action that describes what the event basically does. Most actions need further information that will be automatically prompted. The following actions are available:
  message
    A Textmessage is displayed. Parameter is the ID of the message. The message itself must be saved in a textfile with the same name as the map but with the ending .MSG . An example of a MSG-file and the documentation of the format- tags are available in the Editor Package in the file EXAMPLE.MSG
  weather change
    The weather of the map changes. There are 2 modes: either the weather on the whole map changes or just in the area of one (implemented) or multiple (not implemented yet) polygons. The sides of the polygons are not allowed to cross each other. You can place the polygon-edges by pressing <Space> and finish with the <Esc> key. Afterwards you will be asked which weather should be used. The following weather types are available by now: "dry", "light rain", "heavy rain", "little snow", "much snow". The weather will only be used if the chosen weather is valid for the terrain- type it is placed on. The event "weather change completed" should always be used after a "weather change".
  new technology discovered
    The player for whom the event is defined for can from this time on use the selected technology. You have to enter the tech-ID. This works with any technology without further parameters.
  loose campaign
    (not implemented yet)
  run script + map
    (not implemented yet)
  new technology researchable
    The player for whom the event is defined for can research the specified technology from that point of time on. In the technology definition it has to be specified that an event is necessary to research it. All other conditions required for researching this technology must be true too.
  map change
    Similar to weather change, only that the terrain changes. The event "weather change completed" should always be used after a "map change".
  erase event
    Has been removed !
  end campaign
    (not implemented yet)
  next map
    A new map will be started. It is used for the connection of two maps in campaigns. You have to know the ID of the map. If it is not possible to relate this ID to a certain map (because there are several maps with the same id) then the map will be used that has the ID of the first map defined as PrevID.
  reinforcement
    (not implemented yet)
  weather change completed
    Checks if all units can exist on the terrain they are standing on. This function is not directly implemented in "map/weather change" to allow using several "weather/map changes" directly after each other. For example: If a map should be flooded but one island should remain it would be a lot of work to define the flooding area precisely. So you can first flood the whole map with water and then "rebuild" the island (if it is not too complex). If there is no "weather change completed" between these two events then it will seem like one map change for the player and units on the island will not be effected by the water.
  new vehicle developed
    The player for whom the event is defined for can produce this unit from that point of time. You will have to know the ID of the unit. This is possible with any vehicle without further parameters.
  palette change
    (not implemented yet)
  alliance change
    (not implemented yet)
  wind change
    Changes wind speed. For different heights different speeds can be defined but this feature should be used only seldom.
  nothing
    Nothing happens. It can be used if further events use this event as trigger. With this technique an event can effectively use any number of triggers.
  change game parameter
    Some game parameters can be changed with this event. Implemented by now are "lifetime of vehicle tracks" and "lifetime of broken ice".
- Player : the player for whom the actual event is defined. "Neutral" means that it can happen to every player, but of course only once.
- Description : to describe the event more precise, maximum are 20 characters
- Trigger: You can use one to four trigger. The triggers describe when the event happens. The following are available:
  - *NONE*: trigger not used
  - turn/move >= : if "turn" and "move" are reached or exceeded
    the game starts at turn = 1 / move = 0
  - building conquered : the building belongs to that player
  - building lost : the building does not belong to that player
  - building destroyed
  - unit lost
  - technology researched
  - event
  - unit conquered
  - unit destroyed
  - all enemy units destroyed
  - all units lost
  - all enemy buildings destroyed/captured
  - all buildings lost
  - energy tribute <
  - material tribute <
  - fuel tribute <
  - any unit enters polygon: select the colors of the players that may trigger the event
  - specific unit enters polygon
  - building is seen
- all these triggers can be used together. The order of these events should be displayed correct in the mapeditor. It is possible to use multiple operators per trigger. Some examples ( I use numbers for the triggers ):
    NOT 1 AND ( 2 OR ( 3 AND NOT 4 ))
    NOT (1 AND ( 2 OR ( 3 AND NOT 4 )))
- time-offset: to delay an event. The triggers will NOT be checked again after that time. If the countdown is started the event can only be stopped by changing the level.

Just some more remarks on the events :

- the order of the events presented in the mapeditor can be important. The events will be evaluated from top to bottom.
- Some trigger show some information about the item they are referencing when right-clicking on the beginning of their name.

### Importing Battle Isle maps

The game engine of ASC is quite different to that of Battle Isle, since when we designed it several years ago we never intended to make ASC Battle Isle compatible. A major difference are the buildings: In Battle Isle a shop is totally independent of the graphics that are used to show it on the map, while in ASC every shop type has its own graphics. When ASC finds a shop when importing a map, it determines the ASC-building-type by the graphics of the object on the shop's and its surrounding fields. This building type may have completely different settings than the shop in Battle Isle ! Or for many exotic shops ASC may find no matching building type at all.

The first possibility to resolve this problem is creating more building types in ASC, which is much work especially if a map like Steffen Fröhlich's city map should be imported.

But there is another possibility which requires some enhancements to the game engine: to make invisible buildings and combine them with any object. The ability to make invisible buildings is already implemented quite a long time in the game, but I must admit that we did not test it very intensively. Up to now nothing is allowed to stand on a building entry, neither a unit nor an object, but I think it should be possible to allow objects there without changing too much of the game engine. I will add this feature as soon as someone has made the necessary object types (that don't hinder or slow units entering them) and building types (which are just one field large).

Note that if a map is not completely imported because some terrain, objects or buildings are missing it is usually easier to build the missing items and than import the map again then adding them later to an already existing ASC map.

It is not possible yet to read the shop names form TPWM encoded files. Decode the files first if you want to keep the shop names.

After importing a map make sure that the airports have a runway that is long enough to be used by airplanes !