-
Notifications
You must be signed in to change notification settings - Fork 37
[DRAFT] Basic StageHandler #421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
this clobbers an unused stage 23, need to be sure other things don't use this
Args: [path/RoomConfigSet], path to content stb
to prevent memory leakage from unnecessary new RoomSets
currently only properly detects by backdrop, (with altStages="64"). unsure why stage detection isn't working, i'm hijacking the variable after the function mangles the input param to fit the fxlayers.xml convention
|
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 |
What is needed to make it work with continued runs is there any specific blockers? |
i don't like it, but i don't want to figure out what broke in the merge
|
What sneeded so far? |
unordered map containing the filepath and an id
This reverts commit a49bef2.
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! |
This new class allows a couple things currently:
StageHandler.LoadBinary([xml path])StageHandler.GetBinary([xml path])RoomConfig.GetRandomRoom/GetRoomByStageTypeAndVariantin place of theStagevariableStageHandler.ResetRoomWeights([xml path]/RoomConfigSet)/ResetAllRoomWeights()While not feature complete, this also starts work on allowing custom stages:
content/stages.xmlis now parsedstages.xmlentry, with the change ofnamebeing used as an identifier anddisplaynamebeing used as the string to show ingameStageHandler.LoadStage([name])basestageparamStageHandler.RestoreStage(StbType)contentfolder binaries can be appended onto existing ones withStageHandler.AppendBinary([path/RoomConfigSet], content stb path)IsStageOverriden, GetStageIdForToken, GetTokenForStageIdThis does not currently add support for:
Custom fxlayers.xmlbosspools.xmlstages.xml(will inherit all other properties such as stage health, damage to player, deal chance)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, whileStageHandlerfunctions are logged inrepentogon.log.