- 41
- Posts
- 4
- Years
- Seen Sep 19, 2023
I'm running 18.1 and i have a forest which changes based on the season... so obviously deerling will be there.
It's October which means Summer and the map is showing me summer but when I get into an encounter with deerling it's showing up as the Autumn one. Any idea what may be wrong? Below are my code for seasons and deerling forms. I already checked and the sprites are correct. regular is spring _1, _2, and _3 are Spring Autumn and Winter as they should be.
It's October which means Summer and the map is showing me summer but when I get into an encounter with deerling it's showing up as the Autumn one. Any idea what may be wrong? Below are my code for seasons and deerling forms. I already checked and the sprites are correct. regular is spring _1, _2, and _3 are Spring Autumn and Winter as they should be.
Code:
#===============================================================================
# Seasons
#===============================================================================
def pbGetSeason
return (pbGetTimeNow.mon-1)%4
end
def pbIsSeason(seasonVariable,*arg)
thisseason = pbGetSeason
ret = false
for wd in arg
ret = true if wd==thisseason
end
if seasonVariable>0
$game_variables[seasonVariable] = [
_INTL("Spring"),
_INTL("Summer"),
_INTL("Autumn"),
_INTL("Winter")][thisseason]
$game_map.need_refresh = true if $game_map
end
return ret
end
def pbIsSpring; return pbIsSeason(0,0); end # Jan, May, Sep
def pbIsSummer; return pbIsSeason(0,1); end # Feb, Jun, Oct
def pbIsAutumn; return pbIsSeason(0,2); end # Mar, Jul, Nov
def pbIsFall; return pbIsAutumn; end
def pbIsWinter; return pbIsSeason(0,3); end # Apr, Aug, Dec
def pbGetSeasonName(season)
return [_INTL("Spring"),
_INTL("Summer"),
_INTL("Autumn"),
_INTL("Winter")][season]
end
Code:
MultipleForms.register(:DEERLING,{
"getForm" => proc { |pkmn|
next pbGetSeason
}
})
Last edited: