Hi, I'm trying to make it so the HMs require a certain switch rather than a badge, as the 2 aren't connected in my game
I know that I need to define the switches like
and then
if $game_switches[HM_CUT_SWITCH] = true
but I dont know how to add it to "[001] Field Skills" for each HM to check whether that switch is ON or not
I'm assuming you're asking because you want to use the
HM_SKILLS_REQUIRE_BADGE
setting in the plugin, so that HM Skills only appear in the menu if the appropriate badges (or in your case, switches) are enabled for that particular skill, correct? Because if you just want all HM Skills to show up in the menu from the start (regardless if they can be used yet or not), then simply setting this setting to "false" is all you gotta do.
Otherwise, if you want these skills to be hidden until the appropriate switch has been turned on, you kinda have to customize your own set up for this. How I set up the plugin was that I created a new method called
pbBadgeFromSkill
, which simply returns the number of badges required for each HM Skill (which is set up in the default Essentials settings). Then, the
pbCheckHiddenMoveBadge
script is called to check if the player has the appropriate badges for that move.
So really, there's not much to really change in the plugin itself. What you'd most likely have to do instead is change all of the "badge" settings in Essentials (BADGE_FOR_CUT, BADGE_FOR_SURF, etc, etc..) to return a switch number instead of a badge number. Then, edit the
pbCheckHiddenMoveBadge
method in Essentials so that it returns whether the appropriate switch has been enabled, instead of returning whether or not the player has the appropriate badges.