• 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] Temporarily changing a Pokémon's level

Tigerfang98

Elite 4
44
Posts
11
Years
    • Seen Aug 28, 2017
    Does anyone know how to temporarily raise all pokemon in your party to lv100 and then bring them back to their normal levels when you leave the room or something?
     
    Last edited by a moderator:
    91
    Posts
    14
    Years
    • Seen Sep 5, 2015
    Im NOT very good at scripts, but I think I got some clues on how to do it.

    https://pokemonessentials.wikia.com/wiki/Manipulating_Pokémon#Choosing_a_Pok.C3.A9mon

    Take a look at the second bits of code. There's a code for storing a Level as a variable. Pair it with the scriptcall to manipulate a pokemon in the party ($Trainer.pokemonParty[0] ??) so you can store their levels in 6 different variables, then simply modifiy their level (the easiest part) and use Poke.calcstats before fighting, then using the variables to set their levels backs (then calcstats again).

    The problem comes with allowing the player to change the party's order. Then everything I said is not doable.
     
    824
    Posts
    8
    Years
  • There's probably a cleaner way of doing this, but here's how I'd do it, since AFAIK, pokemon.level is just a function that calculates itself based on pokemon.exp:

    In Pokemon_MultipleForms, around line 152 (in my game, though I think I added some stuff so it should be higher for you), do this

    Code:
      alias __mf_baseStats baseStats
      alias __mf_ability ability
      alias __mf_type1 type1
      alias __mf_type2 type2
      alias __mf_weight weight
      alias __mf_getMoveList getMoveList
      alias __mf_wildHoldItems wildHoldItems
      alias __mf_baseExp baseExp
      alias __mf_evYield evYield
      alias __mf_initialize initialize
      [COLOR="Red"]alias __mf_level level
    
      def level
        if $game_switches[98]
          return 100
        else
          return __mf_level
        end
      end[/COLOR]

    Put the information shown in the picture attached, in the event data for the door that leads into the room where you want all Pokemon to be level 100. For the door that leads out, add something similar, but turn switch 98 OFF.

    Note, however, that this method affects Pokemon in both your party and opponents' parties, meaning if you wanted to do a room where the Devine Power Of Arceus is flowing through you and you show this by making your Pokemon level 100 and enemies' Pokemon level 1, this method wouldn't work. But I'm working under the assumption you just want to make something like the Battle Maison, where levels are equalized across the board.
     
    Last edited:

    Tigerfang98

    Elite 4
    44
    Posts
    11
    Years
    • Seen Aug 28, 2017
    There's probably a cleaner way of doing this, but here's how I'd do it, since AFAIK, pokemon.level is just a function that calculates itself based on pokemon.exp:

    In Pokemon_MultipleForms, around line 152 (in my game, though I think I added some stuff so it should be higher for you), do this

    Code:
      alias __mf_baseStats baseStats
      alias __mf_ability ability
      alias __mf_type1 type1
      alias __mf_type2 type2
      alias __mf_weight weight
      alias __mf_getMoveList getMoveList
      alias __mf_wildHoldItems wildHoldItems
      alias __mf_baseExp baseExp
      alias __mf_evYield evYield
      alias __mf_initialize initialize
      [COLOR="Red"]alias __mf_level level
    
      def level
        if $game_switches[98]
          return 100
        else
          return __mf_level
        end
      end[/COLOR]

    Put the information shown in the picture attached, in the event data for the door that leads into the room where you want all Pokemon to be level 100. For the door that leads out, add something similar, but turn switch 98 OFF.

    Note, however, that this method affects Pokemon in both your party and opponents' parties, meaning if you wanted to do a room where the Devine Power Of Arceus is flowing through you and you show this by making your Pokemon level 100 and enemies' Pokemon level 1, this method wouldn't work. But I'm working under the assumption you just want to make something like the Battle Maison, where levels are equalized across the board.

    The levels are listed as 100, but the stats are still the same. Why is this?
     
    Back
    Top