Coding spree striked again. I have almost completed initial coding (no code executed yet) of the handling of Map Objects groups by the replace objects. So here is how it works : it's exactly the same as the graphics layers

..... except the game engine currently doesn't care about the MapObject groups ! (You know, the little folder in Tiled, where you place your MapObjects). Need a proof ? The current "debugmap" used for debugging only uses NONE. All objects of all types (rest, mapchange, key, sign and mapchange) are in the same group "Object Layer 1". Only the spawnarea are separate, but even then, the map parser really doesn't mind about it. So, here is what I did :
- All Map Objects now hold a reference to the group they belong to in Tiled (String variable conatining the group's name).
- All Map Objects include a "isActive" boolean variable, initially set to true for all.
- When a replace area references a Map Object Group, as the "new" group after replacement, all members of that group are initially disabled (isActive = false).
- When the condition of the replace is met, all the Map Objects belonging to the source groups that are FULLY INCLUDED in the replace area are disabled, and the Map Objects belonging to the target (new) groups that are FULLY INCLUDED in the replace area are enabled. ATM, the replace condition is the usual Quest Progress, for those expecting the broader requirements referenced in this topic, it will be done when I will merge my two branches, but I wanted to keep the features separate.
The Spawn areas are concerned too, but ATM I don't know how to deal with the spawning of the new vs disappearing of the old.... what I did is let the old monster live, but not respawn, and do not auto spawn the new ones, but let them random-spawn. Everything is as expected after a full reset of the map (the 3 minute counter).


- #1 Clean up everything. Make the old monster vanish, and the new ones appear as soon as the map replace is activated !
- #2 Leave the old, spawn the new.
- #3 Leave the old, don't spawn the new. Wait until the 3 minute counter, just as it currently is.
- #4 All of the above, depending on a property of the "replace" object. Power to the map makers ! (Those who will NOT select this option deserve a free hug !

Oh, and note that for extra-juicy feature feast (and mapmaking & debugging headaches), those replace areas can also be replaced by other replace areas ! Change your map completely (including map size, using neat tricks with "walkable") at every quest stage ! (After the merge), add rainbow bunnies everywhere for those who carry two RoLS and two RoL !
After implementation of your favorite behavior (#1, #2, #3, or #4) and some testing, I'll send the pull request to Oskar and start merging the two features in a single branch, so that if Oskar hasn't yet merged any when I'm done, and if he likes both, he will only have one commit to merge !