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

[Scripting Question] Event Encounters Customization

It's easy but you need to register a partner at some point (but it's not even scripting at this point). See the docs for more information.
So I tried with partner but partner is not appearing in the boss battle no matter whether gmax and dynamax are true or false .

I suggest you start by making new items / abilities first, then moves. It will teach you to look at the right places, to take inspiration from existing items / abilities / moves and you will progressively learn how the battle system works.
Thank you for the help. I will definetly try it .
 
One more thing can you give an example on how to use this code
Code:
def pbMaxRaidBattleSimple(species, lvl, gmax)
  # species = PBSpecies constant (of the form: PBSpecies::KABUTOPS for example)
  # lvl = Pokémon level (will be converted to a rank level).
  # gmax = boolean
  pbResetRaidSettings
  setBattleRule("canLose")
  setBattleRule("cannotRun")
  setBattleRule("noPartner")
  setBattleRule(sprintf("%dv%d",MAXRAID_SIZE,1))
  
  s = pbGetSpeciesFromFSpecies(species)
  # f,g = pbGetMaxRaidForm(s[0],rand(10),nil,nil)
  s, r = pbGetMaxRaidSpecies(species,1,nil)
  
  $game_switches[MAXRAID_SWITCH] = true 
  $game_variables[MAXRAID_PKMN] = [s[0], s[1], s[2], lvl,gmax]
  pbWildBattleCore(species, lvl)
  pbResetBattle
  pbResetRaidSettings
  $PokemonTemp.clearBattleRules
  for i in $Trainer.party; i.heal; end
end
 
So I tried with partner but partner is not appearing in the boss battle no matter whether gmax and dynamax are true or false .
What did you try exactly?
I forgot Dynamax battles don't work with partner, because it was too much of a pain to implement it lol.

One more thing can you give an example on how to use this code
Code:
def pbMaxRaidBattleSimple(species, lvl, gmax)
  # species = PBSpecies constant (of the form: PBSpecies::KABUTOPS for example)
  # lvl = Pokémon level (will be converted to a rank level).
  # gmax = boolean
  pbResetRaidSettings
  setBattleRule("canLose")
  setBattleRule("cannotRun")
  setBattleRule("noPartner")
  setBattleRule(sprintf("%dv%d",MAXRAID_SIZE,1))
  
  s = pbGetSpeciesFromFSpecies(species)
  # f,g = pbGetMaxRaidForm(s[0],rand(10),nil,nil)
  s, r = pbGetMaxRaidSpecies(species,1,nil)
  
  $game_switches[MAXRAID_SWITCH] = true 
  $game_variables[MAXRAID_PKMN] = [s[0], s[1], s[2], lvl,gmax]
  pbWildBattleCore(species, lvl)
  pbResetBattle
  pbResetRaidSettings
  $PokemonTemp.clearBattleRules
  for i in $Trainer.party; i.heal; end
end

Paste the code somewhere (a new script for example) and then just call
Code:
pbMaxRaidBattleSimple(PBSpecies::RILLABOOM, 50, true)
in an Event to trigger a Max Raid Battle against a Gmax Rillaboom.
 
What did you try exactly?[\QUOTE]
What about boss battle in which dmax amd gmax are false , can't we fight with partners trainers in them ?
I forgot Dynamax battles don't work with partner, because it was too much of a pain to implement it lol. [\QUOTE]
Ohk Can we change the player's battlers size ?they are always three .

Paste the code somewhere (a new script for example) and then just call
Code:
pbMaxRaidBattleSimple(PBSpecies::RILLABOOM, 50, true)
in an Event to trigger a Max Raid Battle against a Gmax Rillaboom.
Thanks I tried this but when the battle ends it gives the error . So I read the error message and removed that pbResetBattle and now everything is workimg fine .
 
Last edited:
Ohk Can we change the player's battlers size ?they are always three .
Yes, change the value of MAXRAID_SIZE in ZUD_MaxRaid_01_Battle.
Be careful though, you will need the Essentials Modular Battle if you want more than 3 Pokémons on your side.

Thanks I tried this but when the battle ends it gives the error . So I read the error message and removed that pbResetBattle and now everything is workimg fine .
Nice :)
 
Ultra-Burst is something you activate by using a specific Z-move. You can force a battle against the Ultra-Burst Necrozma though.

As for Dynamax and Gigantamax, it would add a few parameters to the function. Here is the result:
(EDIT: My code had some issues, now it works).

Spoiler:

Can we do something like this for essentials v19.1
 
Back
Top