• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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] How do you give a route Rain, Electric Terrain, and permanent Tailwind against the player?

  • 429
    Posts
    4
    Years
    How do you give a route permanent Rain, permanent Electric Terrain, and permanent Tailwind against the player?

    If the player tries anything to change the weather in this area it should fail. It's for important lore and gameplay difficulty reasons.
     

    Swdfm

    Game Developer
  • 245
    Posts
    5
    Years
    • he/him
    • UK
    • Seen Dec 8, 2023
    Hi @SuperSpyroDragon64
    When trying to do a task like this, the trick is to think in smaller stages.

    The rough steps would be as follows:
    NOTE: I'm presuming that there are no changes to the overworld
    0) Write a method checking to see if the player is on the map
    1) Have it such that it is rain upon entry in the battle. This is made easier thanks to things like overworld weather.
    2) Have it such that it is electric terrain upon entry in the battle
    3) Have it such that it is an opposing Tailwind all the time. This one is more difficult
    4) Have it such that rain never ends.
    5) Have it such that electric terrain never ends
    6) Have it such that Tailwind never ends, if it is the opponent's
    7) Stop the player from changing the weather
    8) Stop the player from changing the terrain
    9) Stop the player from changing the tailwind
    At the moment, only Defog can stop Tailwind, so let's have Defog fail on this map

    This should cover Step 0)
    Spoiler:

    This should override any other settings in place
    This covers Steps 1) and 2), and actually also covers steps 4) and 5) due to how defaultWeather already works
    On Overworld_BattleStarting, before line:
    Code:
        # Environment
    Put:
    Spoiler:

    This covers part of step 3)
    On Battle_StartAndEnd, before line:
    Code:
        # Abilities upon entering battle
    Put:
    Code:
      pbStartOpponentsTailwind

    On the following:
    - The first method covers the second half of step 3)
    - The second method covers step 6)
    - The third method covers the first half of step 7)
    - The fourth method covers the first half of step 8)
    Wherever you want, between all the Battle sections and Main, or in a plugin, put:
    Spoiler:

    This covers the second half of step 7)
    Put this in the same place that I told you to put the previous block in:
    Spoiler:

    This covers the second half of step 8)
    Put this in the same place that I told you to put the previous two blocks in:
    Spoiler:

    This should cover the step 9)
    As far as I know, the only way to stop a Tailwind is to use Defog, so let's have Defog fail in this situation
    Spoiler:
     
    Last edited:
    Back
    Top