This map generator is used in HttT 17 and SoF 4. which needed to be updated aswell.
With this we finally have a lua generator that is used in mainline and that
can be used an an example by wml authors who want to write other map generators.
Unfortunateley there are still umc add ons in 1.12 that use
scenario_generation=cave so i didn't remove the cpp implementation yet.
According to the Wiki, since 1.13.2 message= is an alias for label=.
Using message= provokes a warning about it being deprecated.
This replaces message= with label= in the entire mainline (where it had not already been changed).
instead of storing the poolypesin savefiles we now have them as 'const'
lua array and store only the indexes to this array in the savefiles.
this has some advantages:
1) It makes the savefiles smaller
2) It simplyfies the lua code becasue we don't have to convert the wml
tables to lua tables anymore.
This also changes the scenario so that the spawned unit types are now
calculated at the beginning (they will be the same when reloading from a
savefile.)
unfortunateley the 'description' (the tooltip of the widget in the mp
configure dialog) doesn't show in current master. This is likeley to be
a bug related to gui internals.
This has multiple advantages:
1) It makes the code easier to understand because we now can use local
variables and return values.
2) It makes the code easier to debug because we don't have to reload the
wml cache anymore for changes to have an effect
3) It makes loading the multiplayer wml faster, specially dark forecasts
wml codes is now so short that we don't need to guard it inside its own
preprocessor marco anymore.
4) It decreases the save file size.
This commit also does other improvements to the code, for example:
1) We don't create temporary units anymore just to query the costs of
a unittype.
2) We now load the weather maps dynamically at runtime with
wesnoth.read_file, this decreased the prorocessor paring time and savefile
size further.
3) When creating the new spawns we use temporary objects to decrease
the units movement, instead of changing and resetting the unit stats
manually.
This also has a disadvantage:
1) It now requires all players to have this scenario installed, since it
it a mainline scenario i see no problems with that.
this adds borders to the 2p dark forecast survival map, it also removes
the big empty space in the upper third of the map.
This also renames the mask files to map files, becasue they are actually
just normal maps, and the [terrain_mask] just replaces the current map
with these.