• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Trading Card Game 2 protagonist in the poll by clicking here.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Scripting Question] Trick Room Battle Rule

  • 104
    Posts
    3
    Years
    • Seen Mar 12, 2024
    I have been trying to make a battle rule that creates the Trick Room priority usage (slowest mon in priority bracket goes first) the default priority for the battle, but I have been having trouble with it.

    Does anyone know how to do this in v19.1.? Any help would be appreciated. Thanks.
     
    This seems pretty simple, actually. Dedicate a switch to this, and then under "Battle_Action_AttacksPriority", locate "if needRearranging". There is a section within it that says "elsif @priorityTrickRoom", which simply needs to be edited.

    Only briefly tested, but I believe this should work, as it's just a simple edit. Replace the "elsif @priorityTrickRoom" with the following (Change 60 to the switch that you'll use to determine it)

    elsif (@priorityTrickRoom && !$game_switches[60]) || (!@priorityTrickRoom && $game_switches[60])

    In this example, if switch 60 is on, it'll use trick room priority in all instances except for actual trick room.

    Edit: Can confirm it works with trick room, this isn't a battle rule but it shouldn't be too hard to set a switch
     
    Last edited:
    Worked like a charm, thank you! I kept adding a new elsif line there, and it would just override normal priority. So thank you for figuring it out.
     
    Back
    Top