• 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!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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.

Balanced levels?

pokemonmasteraaron

The blind Pokémon Master!
  • 323
    Posts
    14
    Years
    I read somewhere on the wiki, I think it was in the dungeons section, where you could do something with the scripts to keep the Pokémon at a balanced level with the trainers Pokémon.
    Is there a way to do this with trainers?
    I want a trainer to have balanced Pokémon with the trainer.
    Also, the wiki didn't say how to setup the scripts to allow the ballanced level thing/.
    Help?
    Please?
     
    The wiki says a lot of things, but doesn't say how easy (or difficult, usually) it would be to do them.

    It will be possible to use pbBalancedLevel for trainer Pokémon as well as wild Pokémon, but there's a lot of things to consider (special movesets, possible underlevelled Pokémon, strangely overlevelled unevolved Pokémon, etc. etc.).

    For starters, go into the script section PokemonTrainers and find the def pbLoadTrainer (it's right at the top). Find the following lines and change the red one:

    Code:
        for poke in trainer[3]
          species=poke[0]
          [COLOR=Red]level=pbBalancedLevel($Trainer.party)-2+rand(5)[/COLOR]
          pokemon=PokeBattle_Pokemon.new(species,level,opponent)
          iv=poke[2]
    This should set all trainer Pokémon's levels to the weighted mean level of the player's party, plus or minus 2 for randomness.

    There's plenty of scope for improving this. When defining the trainer Pokémon, instead of the level you could put a given value which is then added to, say, "pbBalancedLevel-10", so that you have some sort of control over the difficulty of each Pokémon. Alternatively, make the defined level be a minimum level only. You could make the level changing apply only to certain trainers, or only while on certain maps. With a fair amount of effort, you could evolve overlevelled Pokémon (the chance of evolving them increases the more overlevelled they are) - this would allow you to define the Pokémon as the lowest evolutions, and let the scripts take care of evolving them where necessary, which avoids the underlevelled problem. And there's many other ideas too.

    You'll need to watch out for trainers that you can rebattle, since it's possible their Pokémon may lose levels if the player changes their party. You'll also need to watch out for min-maxing, to make sure a player doesn't breeze through with one really powerful Pokémon and a stack of Level 2 Pidgeys.

    Essentially, what you're doing here is letting the player influence the difficulty of the trainers, and that's open for abuse. You also need to thoroughly make sure the system works well, as I suggested in my "scope for improvement" paragraph.
     
    Okay, but what I need is for just 1 or 2 trainers to have balanced levels.
    Can I make the balanced thing happen only when, oh say, switch 500 is on?
    Also, how can they change the difficulty of the game?
    If you have one powerful Pokémon, wouldn't the pidgeys be powerful, not level 2?
    I couldn't see the red part of the code, sorry.
    I'm that blind dude again.
     
    In that case, make the code look like this:

    Code:
        for poke in trainer[3]
          species=poke[0]
          level=poke[1]
          [COLOR=Red]level=pbBalancedLevel($Trainer.party)-2+rand(5) if $game_switches[500][/COLOR]
          pokemon=PokeBattle_Pokemon.new(species,level,opponent)
          iv=poke[2]
    Just add in the second "level=" line to the existing code.

    pbBalancedLevel returns the weighted mean of the levels of all Pokémon in the party (including eggs) plus 2. That's a mathematical term, and involves calculating the standard deviation of the levels, then weighting each level's contribution to the mean according to the standard deviation, and using those weighted contributions to calculate a weighted mean.

    In practice, I don't know how it affects things. I think if there's a big level gap between the Pokémon in your party, the higher-levelled Pokémon make much bigger contributions, so the opposing Pokémon are about as powerful as them (effectively ignoring the weak Pokémon in the player's party). It's something you can try out.
     
    I'll check that out.
    Thanks.

    Okay, It's definitely done something.
    I won't know what level it is until someone gets home who can read me the screen (screen readers can't read in the game window)
    I set CorruptedJirachi's level to 1, and it definitely wasn't level one.
    So, it probably worked, I'll see when they get home.
    Thanks so much.
     
    Last edited:
    Back
    Top