15place
9 votes Vote

Ability to tell MapMagic not to generate a chunk

Perhaps in a pre generate / prepare callback, ability to return whether or not mapmagic is to continue generating a chunk.
I havn't found any callbacks as yet in MM2, but perhaps a little like this...

enum GenerateOption{
Normal, // carry on as normal.
Skip, // skip generate and leave a big hole where the terrain should be.
Referrence // use the ref terrain passed in the callback method
}

GenerateOption OnPrepareStarted(Terrain terrain){
// User code
// do stuff to see what we want to do
terrain = LoadTerrain();
return GenerateOption.Reference;
}

or

GenerateOption OnPrepareStarted(Terrain terrain){
// User code
// do stuff to see what we want to do
….
// Do nothing
return GenerateOption.Skip;
}

Hope I explained this well enough :)

BywayBandit, 06.01.2020, 00:39
Idea status: under consideration

Comments

Wraith, 10.01.2020, 12:08
What is the use case for this feature? Why one need to leave a big hole where terrain should be?
BywayBandit, 14.01.2020, 19:31
I have implemented this myself in Mapmagic 1, so I can save generated terraindata then manually edit the terrain (carefully so I don't alter the edges) then load it when required instead of mapmagic generating it, a little like locking a terrain but saved to disc as opposed to kept in memory.


In one project I have skipped the generating of a chunk and replaced it with a city gameobject, also use it to limit an area generated for a world map
slimGames, 20.09.2020, 15:49
To me this seems pretty easy to implement as a Script controlling MM. Just turn off the regular auto generation and let that script either enable your prepared terrain or pin a MM chunk. One could take the logic which tiles to activate (around main cam) straight from the MM code itself.

Leave a comment