• 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 Conquest 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] Scripting New Weather Effects

  • 9
    Posts
    4
    Years
    • Seen Jun 18, 2020
    How do I add new weather effects to the game? After doing so, where do I add the weather effects interactions with types, abilities, moves, etc.?
     
    Update: CTRL + SHIFT + F will allow you to search the entire script. Makes it easier to find code. wish I knew this earlier. Off topic, but natures are determined mathmatically. I used:
    if nature==PBNatures::NATURE_NAME_HERE
    pvalues=[100,100,100,100,100]
    By changing the numbers within the array, a nature's stat bonus can be modified. You can even add new ones. Don't know how to remove the stat highlighters though. Still need
    to work on getting that new weather effect.

    Thanks. There was a lot of info I was looking for on essentialsdocs that I couldn't find. I thought I had already checked for weather. Next time I'll be sure to search there before I ask
    a question here. It would be nice if there was a guide to where codes are in the script. For instance, I'm currently looking for the location where the code for a nature's stat bonus is
    stored so I can create new ones. There's PBNatures & PokeBattle_Pokemon, but the codes there don't seem to deal with a nature's stat bonus. Maybe the answer is obvious, I'm still learning, but a guide to the poke essentials script would be helpful (I mean for where code is located).
     
    Last edited:
    Back to adding new weather. I'll go through the steps I did. Let's say I wanted Falling Ash (not really what I'm adding).

    In PField_Weather, under module PBFieldWeather, write Ash = 8.
    Change def PBFieldWeather.maxValue from 7 to 8.

    In PBweather, under module PBWeather, write ASH = 8.

    In PokeBattle_Battle put these in their proper places

    elsif @weather==PBWeather::ASH
    pbCommonAnimation("Ash",nil,nil)
    pbDisplay(_INTL("Ash is falling."))

    when PBWeather::ASH
    @weatherduration=@weatherduration-1 if @weatherduration>0
    if @weatherduration==0
    pbDisplay(_INTL("The ash stopped."))
    @weather=0
    PBDebug.log("[End of effect] falling ash ended")
    else
    pbCommonAnimation("Ash",nil,nil)
    end

    essentialsdocs said to add in four places. Where are the other places? Does it mean the code for abilities?

    After this, can I make a move that triggers the weather effect? Are interactions with abilities added in PokeBattle_Battler? Where do I put the boosts given to types by the weather, Like stats or Move BP? How do I add my own animation for the weather effect active in battle?
     
    This didn't work

    Code:
        when PBWeather::ASH
        @weatherduration=@weatherduration-1 if @weatherduration>0
         if @weatherduration==0
          pbDisplay(_INTL("The ash stopped."))
          @weather=0
          PBDebug.log("[End of effect] falling ash ended")
        else
            pbCommonAnimation("Ash",nil,nil)
        end

    caused a syntax error. Did I place it in the wrong location? I placed it above the future sight code.
     
    Last edited by a moderator:
    Back
    Top