Changes between Version 14 and Version 15 of Random_Map_Generator_Internals


Ignore:
Timestamp:
Nov 26, 2017, 2:42:51 AM (6 years ago)
Author:
leper
Comment:

Update for r20525.

Legend:

Unmodified
Added
Removed
Modified
  • Random_Map_Generator_Internals

    v14 v15  
    5656
    5757The 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:
    58  * `RMS.LoadLibrary(name)` - load a library, choosing the API to which a random map script will have access, e.g. "rmgen".
    59  * `RMS.ExportMap(data)` - export generated map data from the scripts to the engine.
    60  * `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.
    61  * `RMS.GetCivData()` - returns an array of civilization data from {{{/civs/*.json}}}, which is useful for determining civ-specific units and structures.
    62  * `RMS.GetTemplate(templateName)` - returns an array containing the data of the requested template.
    63  * `RMS.MaybeGC()` - possibly run the garbage collector.
     58 * `Engine.LoadLibrary(name)` - load a library, choosing the API to which a random map script will have access, e.g. "rmgen".
     59 * `Engine.ExportMap(data)` - export generated map data from the scripts to the engine.
     60 * `Engine.SetProgress(percent)` - set the map generation progress percentage, so the loading screen progress bar can be updated. Percentage must be an integer 1-100.
     61 * `Engine.GetCivData()` - returns an array of civilization data from {{{/civs/*.json}}}, which is useful for determining civ-specific units and structures.
     62 * `Engine.GetTemplate(templateName)` - returns an array containing the data of the requested template.
     63 * `Engine.MaybeGC()` - possibly run the garbage collector.
    6464
    6565== Data format ==