• 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.

[Essentials Tutorial] Simple system for pokemon above the maximum level!

Frost the Fox

FroststormFrenzy
16
Posts
2
Years
    • Seen Jun 14, 2023
    (This isn't actually a question; This is an answer to the question!)

    Before I begin, I'd like to recommend saving a backup of your game, and also commenting out parts of the altered code instead of outright replacing it. This is so, if something went wrong in the installation, it can be reverted easily and safely.

    ALSO! This is for v19, I have zero idea if this works on earlier versions.


    To start things off: The base version of Essentials has a system in place to where, if a pokemon were to exist above the maximum level, the game automatically crashes with the following error message:
    "The level number ({1}) is invalid."
    However, here's where it seems to fail. For you see... this crash actually reveals the location of the error setup.

    To enable pokemon to exist above level 100, or whatever the maximum level in the game is, locate "def level=(value)" under Pokemon. In my game, it was at line 216, although for unmodified copies it'll be a bit earlier; Searching for it directly would be easier, however.

    Once located, simply comment out the following segment:
    Code:
    if value < 1 || value > GameData::GrowthRate.max_level
      raise ArgumentError.new(_INTL("The level number ({1}) is invalid.", value))
    end

    This should be directly below it.

    And... that's it. With that single line disabled, the game is capable of rendering pokemon above the game's maximum level. But this method doesn't allow creation of pokemon above this point... It simply allows them to exist.


    Regarding creating pokemon via debug tools, that's also a simple fix.

    In the debug sections, enter the script "Debug_PokemonCommands", and then locate the "Set level" command registry. This started at 196 for my game.

    Next, under set level's code, locate
    Code:
    params.setRange
    . By default, this would say
    Code:
    params.setRange(1, GameData::GrowthRate.max_level)
    . Replace the "GameData::GrowthRate.max_level" section of it with whatever number you want the spawnable limit to be; I've tested it at 9999 and it works just fine.

    For wild pokemon, under "Debug_MenuCommands", locate "testwildbattle". Line 190 for my game, so look around that point. Then, find params.setRange, and do the exact same step as before. While there, scroll down to "testwildbattleadvanced", and repeat it once again; However, "setRange" appears multiple times, so make sure to modify the right one.

    Now for directly spawning them at the given level. Still in Debug_MenuCommands, search for "addpokemon". For my game, it's 519, so around that point. Then just do the same step again, locating the max_level mention and replacing it with a given value.



    Now: Trainers can have this done, as well! Under "Trainer_LoadAndNew", look for "pbNewTrainer". This is right at the top of it. You know the rules; Locate "params.setRange", change "GameData::GrowthRate.max_level" to your value, Done.

    To set it ingame, look for "EditorScreens" on the script list. Within EditorScreens, locate "pkmn_properties" (659), and within it change the "max_level" section of
    Code:
    [_INTL("Level"),         NonzeroLimitProperty.new(max_level)
    to the max level you'd want.

    Now, another major detail: Within the Compiler, locate def "compile_trainers". Then, look down for
    Code:
    when "Pokemon"
    , which by default is 52 lines below. Comment out everything inside that "When". If using v19.1 hotfixes, MAKE SURE you do this change there as well; Under "Debug bug fixes", this is line 456.



    Small modification for pbBalancedLevel:

    Within Utilities_Pokemon, locate the mentioned def (169). Increase the maximum level to the one you're using. This is so that if the player is given over-max pokemon, balancing would continue upward.



    Quick note: This can also be applied to various other places, these are just some that'll be useful. This also isn't limited to just level; If you choose to, it's possible to locate the values for things like IVs and increase those as well. This Shouldn't have negative results on the base game; However, this wasn't tested much, and I wrote this as I changed these values (Literally just tested if any over 100 things work).


    ...I'm probably unleashing an entirely new breed of impossible boss fights with this...
     
    Last edited:
    Back
    Top