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

Foggy Weather (New Weather of Sw&Sh)

Diegou18

Forever Chandelure lover.
75
Posts
6
Years
    • Seen Aug 16, 2021
    Time ago I asked about this, and after many tries (with a few of free time in many days xd) I made it. I want to say that this is my first script, so it could be shorter or may have an error that I didn't saw before (the last thing would be rare, since I tested it in every case that it affects, obviously, based on Gen 8 mechanics, and on Gen 7 ones in the case of Primordial Sea, Desolate Land and Delta Stream, but I won't say that it doesn't have any error, because as I said, it's my first script).
    Hope it'll be useful to someone. If I have time, I'll try coding the other weather: the Thunder Storm, that mixes rain with Electric Terrain effects. But it's another thing. Here I go (by the way, I use v17.2).

    Description: With this, you'll add the new weather of Gen 8. Foggy weather sets Misty Terrain's effects during all the battle, except if you change the terrain with another one (by a move like Electric Terrain, or an ability like Psychic Surge, if we follow the logic that we can analize here). When the effect of a modified terrain disappears, Misty Terrain's effect comes back.
    It doesn't depend of the "real weather" in battle (with "real weather" I mean sun, rain, hail and the weathers of Groudon, Kyogre and Rayquaza, if we follow the last logic here too).
    So, you can have Misty Terrain with rain, hail, sun and any original Pokémon Game's weather, but you can't have 2 Terrains at the same time. That's why I separate them as "terrain weather" and "real weather".

    Installation:

    1) In PBEffects, search "# These effects apply to the battle (i.e. both sides)" and add new effects:
    Code:
        PlasmaFists     = 15
        Foggy           = 16
        Mist            = 17
    Note: Replace them with the last numbers that you haven't used. In my case, they're 16 and 17.

    2) Then, go to PBWeather, and create a new one:
    Code:
        STRONGWINDS = 7
        FOGGY       = 9
        # Shadow Sky is weather 8
      end
    Note: Same as before, use the last number that you haven't used (mine is 9) EXCEPT the 8. It's Shadow Sky, so don't use it.

    3) In PokeBattle_ActiveSideField, add at the end of the second list of effects the new ones:
    Spoiler:
    Note: You may or not have some effects that I have. Focus in your last one.

    4) Go to PokeBattle_Battler, and look for "# Weather" and add the red lines:
    Spoiler:

    -After that, in the same script section, search "# Electric Surge" and add the red lines:
    Spoiler:

    5) Then, the next script section is PokeBattle_BattlerEffects. Add the red lines in every status change, even Confusion (if you don't have it, add the blue lines too, since it works in that way since Gen 7):
    Spoiler:

    6) Now, it's time to go to PokeBattle_MoveEffects, and add the red lines in the next move codes:
    Spoiler:
    Note: I've added and deleted some effects in Defog. I did it because my game is based on Gen 6, 7 and 8 mechanics. If you have their scripts, you can copy them too, but if you don't, only copy and past the red lines.

    7) The next one is PokeBattle_Battle. This part will be a little bit... LAAAAAAAAARGE xd. (Here is where I think that the code could be shorter. If anyone knows a way to do that, please write it. Thanks in advance).

    Spoiler:

    8) Go to the PField_Weather script:
    Spoiler:

    9) Go to PField_Battles and in "def pbPrepareBattle(battle)" add the red lines:
    Spoiler:

    10) In Pokemon_Evolution add this new weather in the "LevelRain" case:
    Spoiler:

    Note: The number of the weather must be the same that you used in PField_Weather.

    And done! You only need to write "Weather:Foggy,100" (or whatever probability you like) in metadata.txt in the map that you want (or set it with the Debug Mode in game).

    NOTE: A thing that I didn't do, because I've not figured it out yet, it's how to show fog in the overworld when a map has this weather. Anyways, a fast and different way to do it, is creating an Event that sets fog's graphics. I use the one posted here: https://www.pokecommunity.com/showthread.php?t=428411
    Of course, credits to Richard PT for posting it and to zerokid, since Richard PT says that in his post.
    (I didn't created another script than the one posted here related with the title. Credits to everyone that have made other script that appears in this installation guide).
     
    Last edited:

    Diegou18

    Forever Chandelure lover.
    75
    Posts
    6
    Years
    • Seen Aug 16, 2021
    Changes:
    EDIT 1:
    -Added Foggy Weather to "LevelRain" Evolution case (Sligoo evolves when there's fog too).
    -Fixed some details with the bad placed message of "The rain stopped" and with the deleted message of "The sandstorm subsided" in step 7.2.
    -Added more Effects in step 1.
    -Replaced every "if PBFieldWeather::Foggy" code with "if @field.effects[PBEffects::Mist]" (in steps 7.2 and 7.3) to fix the error that Misty Terrain came back in every weather when a modified terrain effect (due to an ability or a move) ended (Thanks mgriffin for the indirect idea).
    -Added more codes at the end of the step 7.2.
    EDIT 2:
    -Fixed minor errors in some typos with "if @field.effects[PBEffects::Mist]", which needs "==true" in steps 7.2 and 7.3.
    -Effect "Mist" added in step 3 (yes, I forgot it and it was a big mistake. I apologize).
    -Some extra Effects were deleted in steps 1 and 3 (they're from another code so they were in this script doing nothing).
     
    Last edited:
    465
    Posts
    7
    Years
    • Seen May 9, 2024
    Excellent script but, the way fog/mist works in swsh is a bit more complicated thus why your script is ig more complicated.

    Is there anyway just for the misty terrain to be summoned at the start, much like sun, but without it coming back with the removal of terrain?
     

    Diegou18

    Forever Chandelure lover.
    75
    Posts
    6
    Years
    • Seen Aug 16, 2021
    Excellent script but, the way fog/mist works in swsh is a bit more complicated thus why your script is ig more complicated.

    Is there anyway just for the misty terrain to be summoned at the start, much like sun, but without it coming back with the removal of terrain?

    Delete the lines that I added in "-Finally, find "# Electric Terrain" in the same script section and add the red lines:" (step 7.3).
    That'll cause that when Misty Terrain is replaced by another terrain, if the last ends, Misty one won't come back
     
    465
    Posts
    7
    Years
    • Seen May 9, 2024
    Okay removed everything in the message here; error was my fault.

    it all summons now; however theres something with the initial trigger for the fog field effect (not the weather) either its not activating or its being untriggered.

    Pinned it down to the initial trigger in # Initialize battle seems it cant tell what the terrain is (The actual effect @) do you know any way to call it elsewhere, might be down to EBS but its practically identical to the initial part for base 16 and 17
     
    Last edited:
    Back
    Top