This could one day become a random map generator!!!
(Although it would not use RMS scripts of-course...)
Modify or detect elevations; very easy.
But not tested yet to check if surrounding hills will be blended.
The best way to keep the hills realistic is to have a bump-map (similar to 3D bump-textures) ranging from 0-8 grey gradients.
I believe 0-8 elev. is the range; however I did see a scenario that used elev. 16; although I recall it would crash.
Can also detect the terrain easily. Example: prevent units from being created on water.
However, I would still prefer to allow the designer some freedom.
I do not wish to create many rules; as I believe it is the designer's choice to ensure its scenario is valid.
The more rules; the less freedom to optimize, especially for experts.
There will be a few rules, but only simple and strict rules and functions.
Most of the functions rely on a specified area:
If the map is 255x255, than its entire area is 0,0->255,255.
Area is filtered to ensure it is correct.
Specified area can also be inverted.
Terrain functions that rely on bitmap:
Terrain/elevation is defined by specifying exact color. (Color is specified either by index or RGB).
This is not specified within area because it is the bitmap that will dictate the terrain.
Bitmap size (width & height) must be identical to map size.
I do not want to waste my time making functions or exceptions for such a simple rule.
Can also specify random mix of terrains according to pixel-color/index.
Units also rely on bitmap:
Can specify unit to be created according to pixel-color or pixel-index.
Can specify array of units to be randomly created (useful good for forests).
Can specify frame and/or rotation of units either adjacent or random.
Can specify array of terrains/elevations for units to be avoided. Or opposite; encourage units to be created on specified terrain (and/or randomly).
Maybe, I might add an option to allow units to avoid other units; however, that means I have to specify the size of each building (lot of work).
The following functions obviously do not require bitmap:
Can specify terrain/elevation to be converted as different terrain/elevation (within specified area). This is super simple.
Can convert all land-to-water as either beach or ice (within specified area).
... any more ideas for further functions?[This message has been edited by AOHH (edited 10-13-2013 @ 10:39 PM).]