Solved Issues with custom weather[16.2]

ArchyArc

Lead Developer of Pokemon Sacred Johto
Member
Posts
20
#1
So, i have no idea why this happens but it does, dont think there are much changes here between 16 and 17 tho.

So first off its field weather and not weather itself, custom weathers work fine but in this case it does not.

ive looked over most things and made sure it works; i have a custom "ash" weather.

Now the game itself can detect that the field weather is on however nothing happens in battle.

so this is what the pbPrepareBattle in PField_Field looks like;

Code:
def pbPrepareBattle(battle)
  case $game_screen.weather_type
  when PBFieldWeather::Rain, PBFieldWeather::HeavyRain, PBFieldWeather::Storm
    battle.weather=PBWeather::RAINDANCE
    battle.weatherduration=-1
  when PBFieldWeather::Snow, PBFieldWeather::Blizzard
    battle.weather=PBWeather::HAIL
    battle.weatherduration=-1
  when PBFieldWeather::Sandstorm
    battle.weather=PBWeather::SANDSTORM
    battle.weatherduration=-1
  when PBFieldWeather::Sun
    battle.weather=PBWeather::SUNNYDAY
    battle.weatherduration=-1
  when PBFieldWeather::Ashy
    battle.weather=PBWeather::ASHFALL
    battle.weatherduration=-1
  end

Ashy and ASHFALL being the custom field and battle weather.

then in #Initialize battle in PokeBattle_Battle it looks like this;

Code:
#==================
# Initialize battle
#==================
    if @weather==PBWeather::SUNNYDAY
      pbCommonAnimation("Sunny",nil,nil)
      pbDisplay(_INTL("The sunlight is strong."))
    elsif @weather==PBWeather::RAINDANCE
      pbCommonAnimation("Rain",nil,nil)
      pbDisplay(_INTL("It is raining."))
    elsif @weather==PBWeather::SANDSTORM
      pbCommonAnimation("Sandstorm",nil,nil)
      pbDisplay(_INTL("A sandstorm is raging."))
    elsif @weather==PBWeather::HAIL
      pbCommonAnimation("Hail",nil,nil)
      pbDisplay(_INTL("Hail is falling."))
    elsif @weather==PBWeather::ASHFALL
      pbCommonAnimation("Ash",nil,nil)
      pbDisplay(_INTL("Ash is falling from the sky"))
    elsif @weather==PBWeather::HEAVYRAIN
      pbCommonAnimation("HeavyRain",nil,nil)
      pbDisplay(_INTL("It is raining heavily."))
    elsif @weather==PBWeather::HARSHSUN
      pbCommonAnimation("HarshSun",nil,nil)
      pbDisplay(_INTL("The sunlight is extremely harsh."))
    elsif @weather==PBWeather::STRONGWINDS
      pbCommonAnimation("StrongWinds",nil,nil)
      pbDisplay(_INTL("The wind is strong."))
    end

Not sure why its not causing anything no message appears at the start of battle meaning it doesnt even trigger the initialize battle part.

and its not just ashy weather its any custom weather.
 

ArchyArc

Lead Developer of Pokemon Sacred Johto
Member
Posts
20
#3
Yes, however the issue wasnt down to ebs; didnt realise the thread was still here;
it just needed a trigger elsewhere that ebs or base couldnt do on starting the battle.
 

Luka S.J.

Wastage of Time
Member
Posts
89
#4
I asked because EBS overwrites the stock battle initialization. So in the case where you were making the changes to the battle initialization in the stock battle scripts, they wouldn’t be applied as EBS would be overwriting any potential changes you make. Hence you’d need to apply said changes to the EBS scripts instead.
 

ArchyArc

Lead Developer of Pokemon Sacred Johto
Member
Posts
20
#5
Yea i realised not long after this, but even that didnt fix it, just highlighted the issue, did let me know for future reference tho.
 
Top