• 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.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Serena, Kris, Dawn, Red - which Pokémon protagonist is your favorite? Let us know by voting in our grand final favorite protagonist poll!
  • PokéCommunity supports the Stop Killing Games movement. If you're a resident of the UK or EU, consider signing one of the petitions to stop publishers from destroying games. Click here for more information!
  • 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