-
Notifications
You must be signed in to change notification settings - Fork 20
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
[DRAFT] Basic StageHandler #421
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
Now has full fxlayers.xml |
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.
This new class allows a couple things currently:
StageHandler.LoadBinary([xml path])
StageHandler.GetBinary([xml path])
RoomConfig.GetRandomRoom/GetRoomByStageTypeAndVariant
in place of theStage
variableStageHandler.ResetRoomWeights([xml path]/RoomConfigSet)/ResetAllRoomWeights()
While not feature complete, this also starts work on allowing custom stages:
content/stages.xml
is now parsedstages.xml
entry, with the change ofname
being used as an identifier anddisplayname
being used as the string to show ingameStageHandler.LoadStage([name])
basestage
paramStageHandler.RestoreStage(StbType)
content
folder binaries can be appended onto existing ones withStageHandler.AppendBinary([path/RoomConfigSet], content stb path)
IsStageOverriden, GetStageIdForToken, GetTokenForStageId
This does not currently add support for:
Custom fxlayers.xmlbosspools.xml
stages.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
, whileStageHandler
functions are logged inrepentogon.log
.