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

Conditional Events

har

24
Posts
13
Years
  • Seen Jan 10, 2019
Hey everyone, I'm working on a Pokemon game that has a lot of the original ideas and concepts from the games but I'm also tweaking the game quite a bit. Hopefully this is in the right section.

Everything is straight forward until you make it past the second gym. Beyond that, the player can travel to any city they wish to travel to. This means that the player pretty much has one of three options to take.

Option 1 - Gym Leader Challenge, the player defeats the remaining gym leaders.
Option 2 - Complete the Story, the player continues to follow the plot of the game.
Option 3 - Pokemon Collecting, the player simply goes exploring to capture the Pokemon that are available in the game.

My problem is that if the player follows option 1, 2, or 3, that means that the player's Pokemon will grow their party. I don't want to the player to go through the plot and fight Gym Leader number 3 with legendary Pokemon at level 75 when the gym leader is at 30.

My solution is to find a means for the game to take the average of the player's Pokemon levels. Then create ranges that the average level can fall within and that calculation will pick out the appropriate leveled version of that trainer or gym leader. Yes I know this is difficult and extensive but that's the only way I know how to do this.

What is want is basically this:

IF
Player's Average Party Level >10 & <20 Trainer's Party Level Range will be from 13 - 18
Player's Average Party Level >20 & <30 Trainer's Party Level Range will be from 23 - 28
Player's Average Party Level >30 & <40 Trainer's Party Level Range will be from 33 - 38
Player's Average Party Level >40 & <50 Trainer's Party Level Range will be from 43 - 48
Player's Average Party Level >50 & <60 Trainer's Party Level Range will be from 53 - 58
Player's Average Party Level >60 Trainer's Party Level Range will be from 63 - 68

If someone would please help me out with setting up how the event would work, I would be most appreciative.
 
21
Posts
10
Years
  • Age 26
  • Seen Nov 28, 2022
This command:

Code:
pbBalancedLevel($Trainer.pokemonParty)

Returns the weighted mean of the levels of all Pokémon in the player's party (ignoring eggs), plus 2. Can be used to modify the levels of wild Pokémon to keep them challenging.

You can check others and know more in the Manipulating_Pokémon page on the official Pokémon Essentials Wiki, can't post the link at the time.

GL!
 

har

24
Posts
13
Years
  • Seen Jan 10, 2019
Forgive me for my ignorance but I am not quite sure how to use this. Can someone please post a picture of an event's page that is using this so that I can replicate it? I'm a bit of a newbi when it comes to the scripts of the game.
 
Back
Top