• 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 Trading Card Game 2 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] Wrong season deerling spawning

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

    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:
    Back
    Top