[KKS][MainGameOptimizations] Increase the maximum number of heroines #67

Closed
takahiro0327 wants to merge 1 commit from add_heroines into master
takahiro0327 commented 2024-06-16 01:03:40 +00:00 (Migrated from github.com)

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.

image
image

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. ![image](https://github.com/IllusionMods/IllusionFixes/assets/4230203/44844dae-ed3c-41f9-9ef4-5bd31cc0fcda) ![image](https://github.com/IllusionMods/IllusionFixes/assets/4230203/7801710b-6f44-4bf3-b1b6-87d372803902)
ManlyMarco commented 2024-06-17 12:37:44 +00:00 (Migrated from github.com)

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.

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.
ManlyMarco (Migrated from github.com) reviewed 2024-06-17 12:47:38 +00:00
@ -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);
ManlyMarco (Migrated from github.com) commented 2024-06-17 12:40:47 +00:00

Why not add AddHeroines.Value to the result in a postfix instead of replacing the whole method?

Why not add `AddHeroines.Value` to the result in a postfix instead of replacing the whole method?
ManlyMarco (Migrated from github.com) commented 2024-06-17 12:44:09 +00:00

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).

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).
takahiro0327 (Migrated from github.com) reviewed 2024-06-17 13:38:01 +00:00
takahiro0327 (Migrated from github.com) commented 2024-06-17 13:38:01 +00:00

No. It could be reduced and then increased again. It should be safer not to finalize it until the save.

No. It could be reduced and then increased again. It should be safer not to finalize it until the save.
takahiro0327 (Migrated from github.com) reviewed 2024-06-17 13:38:41 +00:00
@ -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);
takahiro0327 (Migrated from github.com) commented 2024-06-17 13:38:41 +00:00

Yes, indeed it is.

Yes, indeed it is.
takahiro0327 commented 2024-06-17 13:46:37 +00:00 (Migrated from github.com)

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.

OK. porting to KKS_GameplayMod.

> 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. OK. porting to KKS_GameplayMod.
takahiro0327 commented 2024-06-17 13:47:14 +00:00 (Migrated from github.com)

Thanks for the review.

Thanks for the review.
takahiro0327 (Migrated from github.com) reviewed 2024-06-18 15:29:18 +00:00
@ -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);
takahiro0327 (Migrated from github.com) commented 2024-06-18 15:29:18 +00:00

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.

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

Sign in to join this conversation.
No description provided.