• 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 Trading Card Game 2 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.

Average Level

  • 129
    Posts
    15
    Years
    • Seen Sep 4, 2023
    I've been trying to set a certain variable (50, for example), with the value of the average level in the trainer's party.
    I read somewhere on the wiki that there is a certain script that gets this average value.
    Namely: "pbBalancedLevel($Trainer.pokemonParty) Returns the average level of the Pokémon in the player's party (ignoring eggs), taking into account standard deviation."
    I'm not sure how to set this value to a certain variable.
    Can anyone help me please?
     
    Thank you very much!
    It is now working almost perfecly, except for the strange fact that this function is returning the average value + 2.
    Using 6 level 20 pokemon returns an average of 22, and so on. But this is easily solvable.
    Thank you once more.
     
    That function doesn't work exactly as described. What it does is return the weighted mean of the levels in the player's party, "plus 2 to challenge the player".

    If you had a party of 2 Pokémon (Level 10 and Level 30), it would not return the average (20), but instead the weighted mean (27) plus 2 (29).

    It's meant to be used solely to change the levels of wild/trainer Pokémon so that they keep challenging the player, and won't really give any useful information other than which level it thinks would be good for that.
     
    Back
    Top