• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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] Form Change on Evolution

StCooler

Mayst thou thy peace discover.
  • 9,304
    Posts
    4
    Years
    • Seen today
    EDIT: Check this post of the complete answer.


    actually, one slight issue here. the evolution scene works perfectly, but now the message afterwards asking if it would like to learn a move doesn't display a name. i tried to paste in the code you have there, tweaking it a little bit, but no dice.

    Can you screen?
    I don't have this bug.
     
    Last edited:

    Foxx_Gaming

    Wacky Wahoo Pizza Pasta Man
  • 35
    Posts
    3
    Years
    i believe it might also be affecting my other form sprites as well, as necrozma_1 doesn't appear with the dusk mane sprite in battle or in summary, and when it changes to ultra necrozma (i have it set as a similar process to mega evo) it doesn't change the sprite either.
    edit: just confirmed it. by commenting out the new script, necrozma shows up with the right form.

    raichu error
    Spoiler:


    necrozma error
    Spoiler:
     

    StCooler

    Mayst thou thy peace discover.
  • 9,304
    Posts
    4
    Years
    • Seen today
    EDIT: Check this post of the complete answer.


    For Necrozma, this is my bad.
    In my code for the function:
    Code:
    def pbCheckPokemonBitmapFiles(params)
    replace the line:
    Code:
      params[4] = sp[1]
    with
    Code:
      params[4] = sp[1] if !params[4] || sp[1] != 0

    For the missing name of Raichu, can you post the entire code of the function:
    Code:
    def pbLearnMove(pkmn,move,ignoreifknown=false,bymachine=false,&block)
     
    Last edited:

    Foxx_Gaming

    Wacky Wahoo Pizza Pasta Man
  • 35
    Posts
    3
    Years
    here you go
    Spoiler:
    also, i'm not sure how to color things like how you do
     

    StCooler

    Mayst thou thy peace discover.
  • 9,304
    Posts
    4
    Years
    • Seen today
    EDIT: Check this post of the complete answer.


    here you go
    Spoiler:
    also, i'm not sure how to color things like how you do

    Sorry, I had completely forgotten about this thread!
    Your code here is perfectly fine.
    Can you post the entire code for:
    Code:
    def pbEvolutionSuccess
    ?
     
    Last edited:

    Foxx_Gaming

    Wacky Wahoo Pizza Pasta Man
  • 35
    Posts
    3
    Years
    no worries! glad you came to check in ^^
    here you go, x2
    Spoiler:
     

    StCooler

    Mayst thou thy peace discover.
  • 9,304
    Posts
    4
    Years
    • Seen today
    EDIT: Check this post of the complete answer.


    no worries! glad you came to check in ^^
    here you go, x2
    First, I introduced a bug where, if it all went well, your Pokémon would be named Raichu - Alolan, instead of simply Raichu lol. (Solved in the code below)

    I don't see an error in your code. Actually I'm looking for a missing pokemon.name = newspeciesname somewhere.
    The fact that your game shows:
    Congratulation, your Pikachu evolved into Raichu - Alolan Form!
    means that, in the function
    Code:
      def pbEvolutionSuccess
    we have the values:
    Code:
    @pokemon.name = "Pikachu"
    newspeciesname  = "Raichu - Alolan"
    Later, in the line:
    Code:
        @pokemon.name    = newspeciesname if @pokemon.name==oldspeciesname
    we should have the values:
    Code:
    @pokemon.name    = "Raichu - Alolan" # With your original code
    @pokemon.name    = "Raichu" # With the fixed code
    but in
    Code:
    def pbLearnMove(pkmn,move,ignoreifknown=false,bymachine=false,&block)
    your bug basically says that we have the value:
    Code:
    pkmn.name    = "" # Instead of "Raichu" / "Raichu - Alolan"
    but I don't see where that would be changed...

    This is my last attempt; if it fails, we will have to enter critical mode. (It's not an official term lol). Critical mode means we need to track variables, and thus, add display messages anywhere suspicious. I have included many "pbMessage" lines; uncomment them if that code doesn't work.

    Spoiler:
     
    Last edited:

    Foxx_Gaming

    Wacky Wahoo Pizza Pasta Man
  • 35
    Posts
    3
    Years
    that did it! made sure it worked for if the pokemon had a nickname and if it was another species (exeggcute) and it all works like a charm!
    thank you so much for your help (once again). this was something i had tried to figure out way earlier on in the dev cycle and it's been bugging me for like 2 or so years.
     

    StCooler

    Mayst thou thy peace discover.
  • 9,304
    Posts
    4
    Years
    • Seen today
    Wonderful :D

    I'm making this final post to sum up the answer, to anyone who opens this thread might see a unique post. (Please add a link to this post in your original post too)


    TUTORIAL (ESSENTIALS V18)

    HOW TO MAKE A POKEMON EVOLVE IN A DIFFERENT FORM

    This only works for Essentials v18. Essentials v19 has its own way of handling this.

    Let's say you want Pikachu to evolve into Raichu with a Thunderstone, and into Alolan Raichu with a Sunstone.
    You can always adapt this to any evolution method you want.

    1. Make a new script, and add this code in it:
      Spoiler:


    2. In your PBS file pokemonforms.txt, check out the form number of the form you want to evolve to. Alolan Raichu is already defined, and its header says:
      Code:
      [RAICHU, 1]
      The form number is 1.
    3. In the PBS file pokemon.txt, add the evolution to this form.
      Code:
      Evolutions = RAICHU,Item,THUNDERSTONE,RAICHU_1,Item,SUNSTONE
      You can always adapt this to any evolution method you want.
     

    Kowi

    avid Stadium 2 enjoyer
  • 5
    Posts
    4
    Years
    Sorry to barge in like that, but:
    Essentials v19 has its own way of handling this.
    Do you know exactly how? I've been trying to get something like this working for a while but I feel like I'm running in circles with this.
     

    StCooler

    Mayst thou thy peace discover.
  • 9,304
    Posts
    4
    Years
    • Seen today
    Sorry to barge in like that, but:

    Essentials v19 has its own way of handling this.

    Do you know exactly how? I've been trying to get something like this working for a while but I feel like I'm running in circles with this.

    Apparently, the first post by burningplain seems to say that it should work without any script edit:

    It should just be RAICHU_1 in the evolutions section to denote the second form. Make sure your pokemonforms.txt has raichu alola defined.

    Note that base essentials 19.1 doesnt have a graphic for raichu alolan, so it will look like raichu, so check your pokemons stats to see if it is a psychic type.
     
  • 1
    Posts
    247
    Days
    • Seen Sep 27, 2023
    EDIT: NVM I didn't actually get it to work. all i changed was the @pokemon.form = 0 if @pokemon.isSpecies?(:MOTHIM) to @pokemon.form = 0 if @pokemon.isSpecies?(:PIKACHU). it worked for a minute where i was able to go into game and test the evolution. however i am no longer able to do that even after reverting the documents and replicating my exact steps. any thoughts as to why this might be?
    So after a bit of finagling with the form evolutions I managed to get it to work. however I am running into an issue where during the evolution animation it only shows a question mark for the form. However I have uploaded battler images into the graphics folder corresponding to the mon. and the images are showing up fine in the party screen and in battle against a wild mon.
     
    Last edited:
    Back
    Top