Welcome to Spline Tools, an extension for MapMagic, a node based procedural and infinite game map generator.
To use this addon a full version of MapMagic is required.
While MapMagic itself can generate infinite maps, this addon can only be used if a finite map is required.
It allows to limit the map size by creating an island/continent or generating mountains at the borders that cannot be passed.
Limiting the world to a defined size allows to generate stuff that crosses multiple chunks and requires knowledge of the neighbors.
It is assumed that a basic setup of MapMagic is already up and running.
First the main script Map Magic - Spline Tools must be added to your scene. You can add it to the same gameobject that already holds MapMagic, but you are free to add it to any other gameobject.
The Main Script
The script in the inspector looks like this:
Log Level - Useful for debugging purposes
Space - Select the Coordinate space (World vs. MapMagic) to display values in SplineTools' generators. Note that the values of the standard MapMagic generators are not affected by this.
Cache Size - Number of chunk's height maps that fit into cache.
Spill to Disk - If too many chunks are cached they are persisted to disk. If disabled, the chunks need to be computed again when needed.
Cache (Sub)Directory - Where to persist the spilled chunks
Clear, Rebuild - Reset and/or rebuild the state of the Cache and WorldGraph
Refresh Integrations - Trigger a scan for integratable assets in the project
Please note that MapMagic's Generate Changed and Force Generate All will NOT reset the WorldGraphs or the cache. Every time you make changes to generators that affect the creation of nodes or edges, you must use the Clear & Rebuild buttons of this script. Some generators may also cache the height input, so you have to at least clear the height cache in order to see the effect of changes.
All possible integrations will be automatically detected. It is possible to use the button Refresh Integrations to force a detection, if a compatible asset has been imported or removed but the automatic detection did not work.
Stale graph: Make sure your graph is not stale by using the Clear & Rebuild button.
Usage of HeightsCache with unspupported input: Since most of MapMagic's generators need special handling to be scaled down in some way, the usage of unhandled generators will lead to wrong results. Use the Preview output to check if the normal and the low-resolution terrain match.
Usage of HeightsCache with very low resolution: With too low resolution the details will get lost.
Using the wrong height input for ConnectionsGenerator: Different connection steps may require different height input to e.g. consider already flattened areas.
Usage of splines with biomes is currently untested/unsupported, but is planned to be supported in the future.
Compilation failes because the wrong version of R.A.M is detected after upgrade/downgrade
Go to the Player Settings and remove the entries ST_RAM or ST_RAM_2019 from the Scripting Define Symbols. After this the correct new R.A.M version should be detected.
Migration to 0.6.0
Since a full reinstall is required for version 0.6.0, all SplineTools nodes in you MapMagic graphs will disappear unless you prepare them for migration.
If you want migrate your graphs, save your scene in text format (before upgrading), open it with a text editor and replace all occurrences of ArctiumStudios. with ArctiumStudios.SplineTools.. This will preserve the overall graph, but most of the values will still be reset to their defaults.