Changes between Version 9 and Version 10 of Random_Map_Generator
- Timestamp:
- Nov 26, 2017, 2:41:23 AM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Random_Map_Generator
v9 v10 19 19 == Load libraries == 20 20 21 A random map script should first load any libraries it will need. Libraries are stored in the game data directories under `maps/random/libraryName/`. When a library is loaded, all scripts in that directory are parsed and their code made available to the random map script. They are loaded through the function call ` RMS.LoadLibrary(libraryName)`. Currently there is only one library available, [wiki:Rmgen_Library rmgen] - in the future there may be others or you can create your own.21 A random map script should first load any libraries it will need. Libraries are stored in the game data directories under `maps/random/libraryName/`. When a library is loaded, all scripts in that directory are parsed and their code made available to the random map script. They are loaded through the function call `Engine.LoadLibrary(libraryName)`. Currently there is only one library available, [wiki:Rmgen_Library rmgen] - in the future there may be others or you can create your own. 22 22 23 23 == Initialize the library == … … 27 27 == Save the results == 28 28 29 The random map script should end with a call to ` RMS.ExportMap(data)`, which returns all the map data back to the engine. In rmgen this is abstracted by a call to `ExportMap()`. For the exact format of the data see [wiki:Random_Map_Generator_Internals Random Map Generator Internals].29 The random map script should end with a call to `Engine.ExportMap(data)`, which returns all the map data back to the engine. In rmgen this is abstracted by a call to `ExportMap()`. For the exact format of the data see [wiki:Random_Map_Generator_Internals Random Map Generator Internals]. 30 30 31 31 '''Note:''' The export map function does a coordinate conversion from the 2D used in the rmgen libs to 3D for the engine. You should only use it once, only after the map is fully generated.