• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
  • The Eevee Expo Game Jam has concluded! 🎉 Head on over to the game jam forum to play through the games.
    Don't forget to come back September 21st to vote for your favorites!
  • Reminder: AI-generated content is not allowed on the forums per the Rules and Regulations. Please contact us if you have any questions!
Resource icon

v21.1 Ivory Battle Type Trainer Check 1

This resource pertains to version 21.1 of Pokémon Essentials.
Pokémon Essentials Version
v21.1 ✅
Also compatible with
  1. v21.1
I recommend the base by TechSkylander1518 Battle Size Options if you want the player to have full control.

My addition merely adds a very simple trainer check that the player can toggle on and off if you allow that option.
Essentially, if you type pbTripleBattleSet before you run the trainer conditional, if the player has 3 or 6 pokemon the NPC will attempt a triple battle. If the conditions are not met however, the trainer will run a single battle.

If you need a simple block of code to run based on trainer version to check this, here is what I've been using. Split it in two and place it in an event, or make your own pbTrainerCheck for it (I'll be releasing my Quick-Trainer-Adjustments plugin later which will include this code, but that won't be for a while).

Ruby:
Expand Collapse Copy
if pbGetMaxPartySize <= 2
   $tr_V = ""
   pbDoubleBattleSet
elsif pbGetMaxPartySize <= 4
   $tr_V = ", 1"
   pbTripleBattleSet
else
   $tr_V = ", 2"
   pbDoubleBattleSet

$tr_type = "LADY"
$tr_img = $tr_type
$tr_name = "Aria"

$tr_ex = $tr_name + $tr_V
end

In my game, I have a code that checks what your alloted max party size is and changes the version based on that, from there each version has a specific number of pokemon (2→3→4 for standard trainers and 2→4→6 for non-optional double battles) so I then run pb?BattleSet based on how many pokemon that version has, and then my conditional contains this script
Ruby:
Expand Collapse Copy
TrainerBattle.start($tr_type, $tr_ex)

If you'd like to run this without having to deal with checking player party you can just set
Ruby:
Expand Collapse Copy
   $tr_V = ", 2"
   pbDoubleBattleSet

And type out the conditional as you normally would only replacing the version part
Credits
Credit if Used
Ivory (Trainer Check code)
Author
Ivory
Downloads
148
Views
1,142
First release
Last update

Ratings

0.00 star(s) 0 ratings

More resources from Ivory

Back
Top