Comment 1 for bug 536542

Revision history for this message
Sigra (sigra) wrote :

XConq claims to have named geographical features: http://sources.redhat.com/xconq/manual/xconq_12.html

This was discussed at:
http://wl.widelands.org/forum/topic/35/

Here are some ideas. A region is a set of locations. Every location belongs to exactly 1 region. When a new map is created, every location belongs to a default region. A new file is created in the binary directory of the map. This file is an array with a 16-bit region ID for each location (just like the file binary/heights stores an 8-bit height value for each node).

One of the files in the map (maybe extra_data) should have a [regions] section:

[regions]
rocky_mountains=_Rocky Mountains
rattlesnake_pass=_Rattlesnake Pass
mirror_lake=_Mirror Lake
misty_ridge=_Misty Ridge

Each key in the section is the name of a region. This name can be referred to in other game data (for example triggers). The value of each key is the descname, which will be visible to the user (after translation). Then there can be a section with additional information about each region:

[rattlesnake_pass]
id=8 109
parent=rocky_mountains

This means that the ID-point for rattlesnake_pass is the node (6, 109). This is where a name label may be shown in the mapview. (This has nothing to do with the 16-big region ID-number in the binary file mentioned above.) The parent key means that the region rattlesnake_pass belongs to the region rocky_mountains. So if there is for example some trigger that reacts for something in the region rocky_mountains, it will also react to that thing in rattlesnake_pass.

The actual user interface in the editor is similar to the one for land usage plans described here:
http://wl.widelands.org/wiki/LandUsagePlans/#user_interface_issues