Go Back   The PokéCommunity Forums > Creative Discussions > Game Development > Pokémon Essentials

Notices
For all updates, view the main page.

Pokémon Essentials All questions and discussion about Pokémon Essentials, the Pokémon game kit for RPG Maker XP, go in here. Also contains links to the latest downloads and the Essentials Wiki.



Reply
 
Thread Tools
  #1    
Old March 28th, 2012 (05:30 PM).
pokemonmasteraaron's Avatar
pokemonmasteraaron
The blind Pokémon Master!
 
Join Date: Jan 2011
Location: In the forest of an undiscovered region
Age: 18
Gender: Male
Nature: Relaxed
Send a message via Skype™ to pokemonmasteraaron
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?
__________________
Game developer.
Not nearly as active on here as I used to be.
Still like meeting and talking to pokemon fanatics like myself.
Reply With Quote
  #2    
Old March 29th, 2012 (09:28 AM).
Maruno's Avatar
Maruno
Lead Dev of Pokémon Essentials
 
Join Date: Jan 2008
Location: England
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]
      level=pbBalancedLevel($Trainer.party)-2+rand(5)
      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.
__________________
Reply With Quote
  #3    
Old March 29th, 2012 (11:24 AM).
pokemonmasteraaron's Avatar
pokemonmasteraaron
The blind Pokémon Master!
 
Join Date: Jan 2011
Location: In the forest of an undiscovered region
Age: 18
Gender: Male
Nature: Relaxed
Send a message via Skype™ to pokemonmasteraaron
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.
__________________
Game developer.
Not nearly as active on here as I used to be.
Still like meeting and talking to pokemon fanatics like myself.
Reply With Quote
  #4    
Old March 29th, 2012 (12:04 PM).
Maruno's Avatar
Maruno
Lead Dev of Pokémon Essentials
 
Join Date: Jan 2008
Location: England
In that case, make the code look like this:

Code:
    for poke in trainer[3]
      species=poke[0]
      level=poke[1]
      level=pbBalancedLevel($Trainer.party)-2+rand(5) if $game_switches[500]
      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.
__________________
Reply With Quote
  #5    
Old March 30th, 2012 (04:09 PM). Edited March 30th, 2012 by pokemonmasteraaron.
pokemonmasteraaron's Avatar
pokemonmasteraaron
The blind Pokémon Master!
 
Join Date: Jan 2011
Location: In the forest of an undiscovered region
Age: 18
Gender: Male
Nature: Relaxed
Send a message via Skype™ to pokemonmasteraaron
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.
__________________
Game developer.
Not nearly as active on here as I used to be.
Still like meeting and talking to pokemon fanatics like myself.
Reply With Quote
Reply
Quick Reply

Sponsored Links
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Minimum Characters Per Post: 25



All times are UTC -8. The time now is 07:57 AM.