• 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!
  • Which Pokémon Masters protagonist do you like most? Let us know by casting a vote in our Masters favorite protagonist poll here!
  • Red, Hilda, Paxton, or Kellyn - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • 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] Setting Form during Evolution

  • 11
    Posts
    8
    Years
    • Seen Feb 5, 2017
    I've been attempting at this, but its pretty tough.

    Anyway, about Rockruff, it evolves depending on the version and the time of day, but since I'm not doing versions, its just time of day. What happens when I do this in Essentials is that whenever it is nighttime, Rockruff does evolve into Lycanroc, it is the Midday form, not the midnight form, but after evolution, it goes to Midnight Form. Which leads to my main question:

    Is there any way to set Lycanroc's form permanently during Rockruff's evolution?
     
    Last edited by a moderator:
    My first thought would be to just have it evolve into two different pokemon, but then you've got to try and disguise that.
     
    My first thought would be to just have it evolve into two different pokemon, but then you've got to try and disguise that.

    Yeah, that was also my first thought when I tried that, however, I also want to keep its National Pokedex Number. So that could retain a problem even if that did work..
     
    In Pokemon_MultipleForms, make it so game checks if it's day or night and assigns a form for Lycanroc on creation depending on what it gets.

    Code:
    MultipleForms.register(:LYCANROC,{
    "getFormOnCreation"=>proc{|pokemon|
       if PBDayNight.isNight? # I am not sure if this is the correct one
         next 1 # Midnight
       else
         next 0 # Midday
       end
    },
     
    Last edited:
    The actual trick is to make two forms for Rockruff, and force those based on the time of day. The two forms can be identical, so the player doesn't know it's a thing. When Rockruff evolves into Lycanroc, it will stay in whichever form it's in at the time it evolves, and that's how you pull the evolution off.

    Code:
    MultipleForms.register(:ROCKRUFF,{
    "getForm"=>proc{|pokemon|
       if PBDayNight.isNight? # I am not sure if this is the correct one
         next 1 # will evolve into Midnight
       else
         next 0 # will evolve into Midday
       end
    }
    })

    Then add the differences between forms for Lycanroc normally.
     
    In PField_Time locate this code:
    Code:
    # Returns true if it's the evening.
      def self.isEvening?(time=nil)
        time = pbGetTimeNow if !time
        return (time.hour>=[COLOR="Red"]18[/COLOR] && time.hour<20)
      end
    Alter the above code in red and add this code immediately before:
    Code:
    # Returns true if it's dusk.
      def self.isDusk?(time=nil)
        time = pbGetTimeNow if !time
        return (time.hour==17)
      end
    Alter Rot8er_ConeX's code to something like this:
    Code:
    MultipleForms.register(:ROCKRUFF,{
    "getForm"=>proc{|pokemon|
       if PBDayNight.isNight? [COLOR="Red"]|| PBDayNight.isEvening?[/COLOR] # I am not sure if this is the correct one
         next 1 # will evolve into Midnight
       [COLOR="Red"]elsif PBDayNight.isDusk?
         if pokemon.hasAbility?(:OWNTEMPO)
           next 2 # will evolve into Dusk
         else
           next 0
         end[/COLOR]
       else
         next 0 # will evolve into Midday
       end
    }
    })
    Officially only a Rockruff with the Own Tempo ability can evolve to the Dusk Form Lycanroc between 5pm and 6pm. If you want all Rockruff to evolve to Dusk Form Lycanroc at that time, change the Own Tempo if statement (from if to end) to next 2.
     
    Last edited:
    And how can I do that the starter (Rockruff) can't evolve into the midday or midnight form and evolve to dusk form in a moment of the history, with an event?
     
    For a starter Rockruff to always evolve into Dusk Lycanroc you can give it a new form that won't change depending on time. Lycanroc's form 3 will be a Dusk Form. The code for that is simply:
    Code:
    MultipleForms.register(:ROCKRUFF,{
    "getForm"=>proc{|pokemon|
       [COLOR="Red"]next 3 if pokemon.form==3[/COLOR]
       if PBDayNight.isNight? || PBDayNight.isEvening?
         next 1 # will evolve into Midnight
       elsif PBDayNight.isDusk?
         next 2 # will evolve into Dusk
       else
         next 0 # will evolve into Midday
       end
    }
    })
    Make sure the starter's form is set to 3 when you program the event that gives it to you.
     
    Back
    Top