Changes between Version 9 and Version 10 of Random_Map_Generator_Internals
- Timestamp:
- Sep 29, 2011, 9:11:32 PM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Random_Map_Generator_Internals
v9 v10 10 10 The 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: 11 11 * `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)` - returngenerated map data from the scripts to the engine.12 * `RMS.ExportMap(data)` - export generated map data from the scripts to the engine. 13 13 * `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. 14 15 * `RMS.MaybeGC()` - possibly run the garbage collector. 15 16