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

Leveling Enemies Up.

  • 6
    Posts
    12
    Years
    • Seen Oct 30, 2014
    Okay.
    So I want enemy trainers to 'level up' with the players.

    For example if the highest Pokemon in a players party is 62 all trainers would have Pokemon around level 60.

    I have a few ideas about how to do this but I can only seem to be able to calculate the mean of the players party not find the highest level poke. I want the highest pokemon to count because I want to discourage raising 1 Pokemon mega high and blitzing through the game against medium level pokemon.

    So

    1) Is there any way to return the highest current party member?

    2) Is there any way to use that information to manipulate trainers?

    Any suggestions or ideas would be helpful!
    Thanks
     
    Thanks!
    That's an interesting thread.
    I've worked out how to get all my trainers to roughly the level of the player using the weighted mean of the party script.
    It's working well enough for the moment as the weighted mean counts higher level pokemon much more than lower levels.
    If anyone does know the command to return the highest level in the party that would be great.
     
    Thanks!
    That's an interesting thread.
    I've worked out how to get all my trainers to roughly the level of the player using the weighted mean of the party script.
    It's working well enough for the moment as the weighted mean counts higher level pokemon much more than lower levels.
    If anyone does know the command to return the highest level in the party that would be great.
    Code:
    def highestLevelInParty
    ret=0
    for pokemon in $Trainer.pokemonParty
      ret=pokemon.level if pokemon.level>ret
    end
    return ret

    Call highestLevelInParty
     
    Code:
    def highestLevelInParty
    ret=0
    for pokemon in $Trainer.pokemonParty
      ret=pokemon.level if pokemon.level>ret
    end
    return ret

    Call highestLevelInParty

    Hey,
    where do I have to put this in excatly?
     
    Last edited:
    Code:
    def highestLevelInParty
    ret=0
    for pokemon in $Trainer.pokemonParty
      ret=pokemon.level if pokemon.level>ret
    end
    return ret

    Call highestLevelInParty

    Hi there, would you please tell me what file I have to edit and copy this to make it works? I really don't have experience in this, I'm new here.
     
    Hi there, would you please tell me what file I have to edit and copy this to make it works? I really don't have experience in this, I'm new here.
    Open the script menu. Copy the first code on a new script section above "main". After this, follow this thread. But, instead of 'pbBalancedLevel($Trainer.party)', use 'highestLevelInParty'.

    I aren't sure if this code is still working, since it is an old code.
     
    Last edited:
    It's giving me a syntax error. Does that mean it doesn't work?

    If you are copying what FL posted, he just forgot to put an 'end' into the final of code, that is why you got the error:
    Code:
    def highestLevelInParty
      ret=0
      for pokemon in $Trainer.pokemonParty
        ret=pokemon.level if pokemon.level>ret
      end
      return ret
    end
     
    Thank you so much. It was very kind of you to reply to such an old thread that I honestly did not expect to get a response from. I tried it with the new code and this time I was allowed in the game but as soon as I got into an encounter this message popped up.
    ---------------------------
    Pokemon Essentials
    ---------------------------
    [Pokémon Essentials version 17.2]
    Exception: NoMethodError
    Message: undefined method `pbhighestLevelInParty' for nil:NilClass
    PField_EncounterModifiers:24
    PField_EncounterModifiers:20:in `call'
    EventHandlers:54:in `trigger'
    EventHandlers:49:in `each'
    EventHandlers:49:in `trigger'
    PField_Encounters:365:in `pbGenerateWildPokemon'
    PField_Battles:88:in `pbWildBattle'
    PField_Field:387:in `pbBattleOnStepTaken'
    PField_Field:368:in `pbOnStepTaken'
    Game_Player:461:in `update_old'

    If you have any ideas on how to fix this it would be greatly appreciated.
     
    Message: undefined method `pbhighestLevelInParty' for nil:NilClass
    If you read your error is just because the script didn't find 'def pbhighestLevelingParty'. Maybe you need to add 'pb' before 'highestLevelingParty'. Double check what FL posted anyway.

    Code:
    Open the script menu. Copy the first code on a new script section above "main". After this, follow [url=https://www.pokecommunity.com/showthread.php?t=309204&highlight=happiness]this thread[/url]. But, instead of 'pbBalancedLevel($Trainer.party)', use 'highestLevelInParty'.
    
    I aren't sure if this code is still working, since it is an old code.
     
    Ya I made the mistake of not removing ($Trainer.party) when adding the code. Thank you sooo much for taking the time out of your day to help me. I have been working on this problem for like 3 weeks now.
     
    Back
    Top