[Difficulty Options] Leever Spawn Rate (#3460)

* Spawn Rate

* Update z_en_reeba.c

Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>

* gEnhancements

* Merging issues

* Added preset entry and changed timer value math

* Update soh/src/overlays/actors/ovl_En_Reeba/z_en_reeba.c

* this should do it

* Update soh/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c

* move out of loop

---------

Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
Co-authored-by: Garrett Cox <garrettjcox@gmail.com>
This commit is contained in:
Patrick12115 2024-02-15 23:12:09 -05:00 committed by GitHub
parent 4599212546
commit c484ea227b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 0 deletions

View File

@ -269,6 +269,7 @@ const std::vector<const char*> enhancementsCvars = {
"gEnhancements.OpenAllHours",
"gEnhancements.ResetNaviTimer",
"gEnhancements.ScaleAdultEquimentAsChild",
"gEnhancements.LeeverSpawnRate",
"gEnhancements.SwordToggle",
"gEnhancements.FixFloorSwitches",
"gFixZoraHintDialogue",

View File

@ -977,6 +977,8 @@ void DrawEnhancementsMenu() {
UIWidgets::Tooltip("All dogs can be traded in and will count as Richard.");
UIWidgets::PaddedEnhancementSliderInt("Cuccos Stay Put Multiplier: %dx", "##CuccoStayDurationMultiplier", "gCuccoStayDurationMultiplier", 1, 5, "", 1, true, true, false);
UIWidgets::Tooltip("Cuccos will stay in place longer after putting them down, by a multiple of the value of the slider.");
UIWidgets::PaddedEnhancementSliderInt("Leever Spawn Rate: %d seconds", "##LeeverSpawnRate", "gEnhancements.LeeverSpawnRate", 0, 10, "", 0, true, true, false);
UIWidgets::Tooltip("The time between leever groups spawning.");
ImGui::EndMenu();
}

View File

@ -169,6 +169,10 @@ void EnEncount1_SpawnLeevers(EnEncount1* this, PlayState* play) {
break;
}
}
int32_t modifiedSpawnRate = CVarGetInteger("gEnhancements.LeeverSpawnRate", 0);
if (modifiedSpawnRate) {
this->timer = 20 * modifiedSpawnRate;
}
}
}
}