- 19
- Posts
- 3
- Years
- Seen Aug 12, 2022
I need to make a Pokémon change its form when night/day and i dont know how to do it, pls help
Thanks in advance :)
Thanks in advance :)
Last edited:
MultipleForms.register(:ROCKRUFF,{
"getForm" => proc { |pkmn|
next if pkmn.formSimple>=2 # Own Tempo Rockruff cannot become another form
next 1 if PBDayNight.isNight?
next 0
}
})
MultipleForms.register(:LYCANROC,{
"getFormOnCreation" => proc { |pkmn|
next 2 if PBDayNight.isEvening? # Dusk
next 1 if PBDayNight.isNight? # Midnight
next 0 # Midday
},
})
If you want the Pokémon to continuously change forms, you can check the way Rockruff works:
Code:MultipleForms.register(:ROCKRUFF,{ "getForm" => proc { |pkmn| next if pkmn.formSimple>=2 # Own Tempo Rockruff cannot become another form next 1 if PBDayNight.isNight? next 0 } })
or if you want a Pokémon whose form is defined by the time of the day, but when you catch that Pokémon, its form no longer changes, you can check the way Lycanrock works:
Code:MultipleForms.register(:LYCANROC,{ "getFormOnCreation" => proc { |pkmn| next 2 if PBDayNight.isEvening? # Dusk next 1 if PBDayNight.isNight? # Midnight next 0 # Midday }, })
it doesnt changes form when it's day or night tho, i change the clock of my computer to test and it shows the same sprite when day/night
What did you do exactly?
You're supposed to adapt the corresponding code (Lycanroc or Rockruff) to your own Pokémon, also you need to define the form of your Pokémon in the PBS file pokemonforms.txt and also also, have sprites for each form.
My Pokemon is supposed to change its form depending on the time. I copied the script of Rockruff but replaced ROCKRUFF with the name of the Pokemon
Do you have sprites for the different forms of your Pokémon?
Have you defined the different forms in the PBS file pokemonforms.txt?
MultipleForms.register(:YOURPOKEMON,{
"getForm" => proc { |pkmn|
next 1 if PBDayNight.isNight? # Night
next 0 # Day
}
})
A Rockruff with Own Tempo evolves into Dusk Form Lycanroc when leveled up from 7 PM to 7:59 PM in real-time (Generation VIII) or 5 PM to 5:59 PM in in-game time (Pokémon Ultra Sun and Moon, equating to 5 PM to 5:59 PM in real-time for Ultra Sun and 5 AM to 5:59 AM in real-time for Ultra Moon).
According to Bulbapedia:
Rockruff needs to have Own Tempo and be level 25. Do you meet these conditions?
if it meets the conditions but not the same it evolves to the Midday Form I am using essentialv v18.1 with the 8th generation project
pbMessage(_INTL("Rockruff form = {1}", $Trainer.party[0].form))