[DRAFT] Basic StageHandler
This new class allows a couple things currently:
- Binaries can be loaded arbitrarily with
StageHandler.LoadBinary([xml path]) - Loaded binaries can be retrieved arbitrarily with
StageHandler.GetBinary([xml path]) - These binaries can be used with
RoomConfig.GetRandomRoom/GetRoomByStageTypeAndVariantin place of theStagevariable - Room weights are automatically reset on starting a new run
- Binary room weights can also be reset manually with
StageHandler.ResetRoomWeights([xml path]/RoomConfigSet)/ResetAllRoomWeights()
While not feature complete, this also starts work on allowing custom stages:
content/stages.xmlis now parsed- Allows specifying all params normally found in a
stages.xmlentry, with the change ofnamebeing used as an identifier anddisplaynamebeing used as the string to show ingame - Content stages can be loaded with
StageHandler.LoadStage([name]) - Will be loaded into the
basestageparam - Base stage can be restored with
StageHandler.RestoreStage(StbType) contentfolder binaries can be appended onto existing ones withStageHandler.AppendBinary([path/RoomConfigSet], content stb path)- Provides helper functions
IsStageOverriden, GetStageIdForToken, GetTokenForStageId
This does not currently add support for:
- ~~Custom fxlayers.xml~~
- Custom
bosspools.xml - Any fiddling with the base stage beyond what's in
stages.xml(will inherit all other properties such as stage health, damage to player, deal chance) - Saving what overridden stage the player is in
- Auto loading and restoring of overridden stages between saves
- Retention of binary room weights after closing the game
Additionally, entering an overridden stage, closing out of the game, and continuing the save without overriding the stage beforehand will crash.
Internally, this modifies how stage binaries are loaded by hooking the function to store the resulting RoomSet in a map, then on future loads checking if the requested binary was already loaded and retrieving the stored version instead. Testing will be required to see if this has any side effects with things like room weights, though my understanding suggests that won't be an issue. This is logged in the base log.txt, while StageHandler functions are logged in repentogon.log.
Now has full fxlayers.xml stage (stages for fxRays) and backdrop support.
So this would be a step into making the Custom Stage API mod obsolete?
yes, but I'd really like to figure out how to make this work with continued runs + there's some other things that need doing like saving room weights
yes, but I'd really like to figure out how to make this work with continued runs + there's some other things that need doing like saving room weights
What is needed to make it work with continued runs is there any specific blockers?
What sneeded so far?
What sneeded so far?
I mean Rep+ got released, so I assume it has to be updated to support Rep+?
REP+ support as a whole is our primary focus at the moment. Also, stage support is a big feature that still needs a lot of work to get right.
It will come eventually, please be patient and try to refrain from chatting in our pull requests.
Alright, sorry. Best of luck to all you wonderful modders!