[KKS][MainGameOptimizations] Increase the maximum number of heroines #67
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
IllusionMods/IllusionFixes!67
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "add_heroines"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Added option to increase the number of heroines that can be registered at each inn.
Please review and merge.
This PR was developed with a commission from bitmagnet.
For KK, this feature is included in https://github.com/ManlyMarco/KoikatuGameplayMods/?tab=readme-ov-file#koikatu-gameplay-mod
Maybe it would make sense to include this into GameplayMod to keep it in one place? Or maybe split this feature off into a separate plugin.
@ -0,0 +14,4 @@[HarmonyPatch(typeof(ActionGame.ClassRoomList), nameof(ActionGame.ClassRoomList.GetClassRegisterMax))]static private bool GetClassRegisterMaxPrefix(ActionGame.ClassRoomList __instance, ref int __result, int schoolClass ){__result = NewGetClassRegisterMax(schoolClass);Why not add
AddHeroines.Valueto the result in a postfix instead of replacing the whole method?You can add a ValueChanged event to this setting that immediately removes any heroines above the limit, instead of using the save prefix patch (unless there are other edge cases where the patch is required).
No. It could be reduced and then increased again. It should be safer not to finalize it until the save.
@ -0,0 +14,4 @@[HarmonyPatch(typeof(ActionGame.ClassRoomList), nameof(ActionGame.ClassRoomList.GetClassRegisterMax))]static private bool GetClassRegisterMaxPrefix(ActionGame.ClassRoomList __instance, ref int __result, int schoolClass ){__result = NewGetClassRegisterMax(schoolClass);Yes, indeed it is.
OK. porting to KKS_GameplayMod.
Thanks for the review.
@ -0,0 +14,4 @@[HarmonyPatch(typeof(ActionGame.ClassRoomList), nameof(ActionGame.ClassRoomList.GetClassRegisterMax))]static private bool GetClassRegisterMaxPrefix(ActionGame.ClassRoomList __instance, ref int __result, int schoolClass ){__result = NewGetClassRegisterMax(schoolClass);I needed to know the upper limit of the number of people from the patch function. That's why I made it a function. I forgot.
Pull request closed