Changes between Version 9 and Version 10 of Random_Map_Generator_Internals


Ignore:
Timestamp:
Sep 29, 2011, 9:11:32 PM (13 years ago)
Author:
historic_bruno
Comment:

Update with new GetCivData function

Legend:

Unmodified
Added
Removed
Modified
  • Random_Map_Generator_Internals

    v9 v10  
    1010The CMapGenerator provides a minimal interface to the random map scripts. One is a global variable `g_MapSettings` which specifies all the map settings as created by game setup. CMapGenerator also exposes some JavaScript functions:
    1111 * `RMS.LoadLibrary(name)` - load a library, choosing the API to which a random map script will have access, e.g. "rmgen".
    12  * `RMS.ExportMap(data)` - return generated map data from the scripts to the engine.
     12 * `RMS.ExportMap(data)` - export generated map data from the scripts to the engine.
    1313 * `RMS.SetProgress(percent)` - set the map generation progress percentage, so the loading screen progress bar can be updated. Percentage must be an integer 1-100.
     14 * `RMS.GetCivData()` - returns an array of civilization data from {{{/civs/*.json}}}, which is useful for determining civ-specific units and structures.
    1415 * `RMS.MaybeGC()` - possibly run the garbage collector.
    1516