• 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

Resource SOS Battles None

The new Enhanced UI plugin is causing errors during an SOS battle. The culprit is 'pbUpdateTargetIcons' I think.
That's not something in SOS Battles, but I could try and cook up a patch?

Looking at it, I'll talk to Lucidious about it, but I am not sure.

Can you send the exact error you got?
 
That's not something in SOS Battles, but I could try and cook up a patch?

Looking at it, I'll talk to Lucidious about it, but I am not sure.

Can you send the exact error you got?
This is the error:

[2022-10-07 22:35:42 -0400]
[Pokémon Essentials version 20.1]
[v20.1 Hotfixes 1.0.4]

Exception: NoMethodError
Message: undefined method `pokemon=' for nil:NilClass

Backtrace:
[Enhanced UI] [001] Enhanced UI.rb:316:in `block in pbUpdateTargetIcons'
[Enhanced UI] [001] Enhanced UI.rb:313:in `each'
[Enhanced UI] [001] Enhanced UI.rb:313:in `pbUpdateTargetIcons'
[Essentials Deluxe] Fight Menu.rb:291:in `pbHideMoveInfo'
[Essentials Deluxe] Fight Menu.rb:380:in `block in pbFightMenu'
[Essentials Deluxe] Fight Menu.rb:324:in `loop'
[Essentials Deluxe] Fight Menu.rb:324:in `pbFightMenu'
[Essentials Deluxe] Fight Menu.rb:219:in `pbFightMenu'
155:Battle_CommandPhase:222:in `block (2 levels) in pbCommandPhaseLoop'
155:Battle_CommandPhase:213:in `loop'

=================
Edit: just edited the enhanced UI plugin to skip stuff under pbUpdateTargetIcons if the no SOS battle switch is off as a temporary fix.
 
The error is basically occuring because the Enhanced UI plugin is trying to draw the icon of a species in a specific slot (to show the move effectiveness), but there is no species in that slot. So its trying to draw something that doesnt exist, hence the error.

This is probably due to the fact that the Enhanced UI plugin sets up the number of icons it will need based on the size of the opponent's field at the moment the battle is initialized. But if the opponent's field changes size mid-battle (which should never be possible normally, but I assume that's what this plugin does), then its going to break because it never set up icons for the new slots.

Im sure there's a way to set it up more efficiently to account for the possibility of this happening, but id have to study the code for a bit.
 
The error is basically occuring because the Enhanced UI plugin is trying to draw the icon of a species in a specific slot (to show the move effectiveness), but there is no species in that slot. So its trying to draw something that doesnt exist, hence the error.

This is probably due to the fact that the Enhanced UI plugin sets up the number of icons it will need based on the size of the opponent's field at the moment the battle is initialized. But if the opponent's field changes size mid-battle (which should never be possible normally, but I assume that's what this plugin does), then its going to break because it never set up icons for the new slots.

Im sure there's a way to set it up more efficiently to account for the possibility of this happening, but id have to study the code for a bit.

From what I am testing, something similar seems to be occurring with Focus Meter as well.
 
Tha
From what I am testing, something similar seems to be occurring with Focus Meter as well.
That would make sense, since that plugin functions in the same way to draw icon sprites for the focus panel.
 
Does anyone know why I get this error?

Screenshot_2.png


Thanks
 
Hello, how does this script handle regional forms?
I set up the rate like this:
:ZIGZAGOON=>10,
And the species they can call like this:
:ZIGZAGOON=>[:ZIGZAGOON,:ZIGZAGOON,:ZIGZAGOON,:ZIGZAGOON,:LINOONE,:LINOONE],

When I encounter a Galarian Zigzagoon, they do call for help, but it's a regular Zigzagoon or Linoone
 
Hello, how does this script handle regional forms?
I set up the rate like this:
:ZIGZAGOON=>10,
And the species they can call like this:
:ZIGZAGOON=>[:ZIGZAGOON,:ZIGZAGOON,:ZIGZAGOON,:ZIGZAGOON,:LINOONE,:LINOONE],

When I encounter a Galarian Zigzagoon, they do call for help, but it's a regular Zigzagoon or Linoone
Try ZIGZAGOON_1 instead of ZIGZAGOON, I THINK that's how you call specific forms in this context.
 
Hello, how does this script handle regional forms?
I set up the rate like this:
:ZIGZAGOON=>10,
And the species they can call like this:
:ZIGZAGOON=>[:ZIGZAGOON,:ZIGZAGOON,:ZIGZAGOON,:ZIGZAGOON,:LINOONE,:LINOONE],

When I encounter a Galarian Zigzagoon, they do call for help, but it's a regular Zigzagoon or Linoone
For me it wasn't working, even with the XXX_1, it just called the base form pokemon, so what i did is:
in line 123 it reads:
ally=pbGenerateSOSPokemon(GameData::Species.get(mon).species,alevel)
I just added in line 124:
ally.form=caller.form
and this way if the pokemon is alolan it will call alolan, if it's normal it will call normal, just by putting :RATTATA=>[:RATTATA] in the white list.
There probably is a better or cleaner version to do this (by calling the map metadata of where you are at the moment) but this way it works with calling the same form as the caller has.
 
For me it wasn't working, even with the XXX_1, it just called the base form pokemon, so what i did is:
in line 123 it reads:
ally=pbGenerateSOSPokemon(GameData::Species.get(mon).species,alevel)
I just added in line 124:
ally.form=caller.form
and this way if the pokemon is alolan it will call alolan, if it's normal it will call normal, just by putting :RATTATA=>[:RATTATA] in the white list.
There probably is a better or cleaner version to do this (by calling the map metadata of where you are at the moment) but this way it works with calling the same form as the caller has.
I'll add that when I have some time! Thanks!
 
Thank you!

Does this one still keep the chaining for shinies and guaranteed ivs?
 
It wa
It's exactly how Vendily had it in earlier versions, so if they had added that, it should be here, if they didn't, I can see about adding it.
It was there before, anyway, thank you.


As this is super useful, allowing to get perfect Ivs Dittos.

I just hope it doesnt has problem with the link club script.
 
I tried adding the plugin and when I chose a move, it shows this error, then seemingly passed the turn without using any moves.

edit: The battle is using a Essentials DX wild battle with a rule set to prevent running, then in a test with a normal wild battle, my pokemon acted its turn and then the error appears. Since the scripted wild battle has +6 speed in the beginning of the battle, I figured that the error only happens during the wild pokemon's action.
[Pokémon Essentials version 20.1]
[v20.1 Hotfixes 1.0.7]

Exception: TypeError
Message: no implicit conversion of Symbol into Integer

Backtrace:
[SOS Battles] SOS Battles.rb:293:in `pbCanCall?'
[SOS Battles] SOS Battles.rb:340:in `pbProcessTurn'
[ZUD Mechanics] Raid_Battle_Overrides.rb:19:in `pbProcessTurn'
156:Battle_AttackPhase:128:in `block (2 levels) in pbAttackPhaseMoves'
156:Battle_AttackPhase:124:in `each'
156:Battle_AttackPhase:124:in `block in pbAttackPhaseMoves'
156:Battle_AttackPhase:110:in `loop'
156:Battle_AttackPhase:110:in `pbAttackPhaseMoves'
[Essentials Deluxe] Battle.rb:199:in `pbAttackPhase'
148:Battle_StartAndEnd:339:in `block (2 levels) in pbBattleLoop'
 
Last edited:
Hi! This is a really neat plugin, but I'm encountering an error. Note that I do have other plugins installed, so that may be causing the issue, but I wanted to reach out and see if you knew how I could potentially fix this.

Ruby:
Expand Collapse Copy
[Pokémon Essentials version 20.1]
[v20.1 Hotfixes 1.0.7]

Exception: NoMethodError
Message: undefined method `+' for nil:NilClass

Backtrace:
[Generation 9 Pack] Battle.rb:19:in `addBattlerHit'
[Generation 9 Pack] Battler.rb:571:in `pbEffectsOnMakingHit'
[ZUD Mechanics] Battler_Overrides.rb:255:in `pbEffectsOnMakingHit'
[Generation 9 Pack] Battler.rb:487:in `block in pbProcessMoveHit'
[Generation 9 Pack] Battler.rb:485:in `each'
[Generation 9 Pack] Battler.rb:485:in `pbProcessMoveHit'
[Generation 9 Pack] Ability Shield Changes.rb:728:in `block in pbUseMove'
[Generation 9 Pack] Ability Shield Changes.rb:726:in `times'
[Generation 9 Pack] Ability Shield Changes.rb:726:in `pbUseMove'
[ZUD Mechanics] Battler_Overrides.rb:102:in `pbUseMove'

This error occurs whenever my Pokemon tries to attack the called Pokemon (not the originally encountered Pokemon), and when I exit out of the error, the game continues as normal and repeats the attack until the called Pokemon faints. This could very easily be an issue with the Generation 9 Pack or the ZUD Plugin, looking at the error backtrace, so please let me know if this is something I can fix! :)
 
I was trying to use a limited version of this plugin to combine with mid battle dialogue. But, in v21, the AI changed and you need to initialize an AI for the called pokemon. If someone has a solution, I looked a bit in the essentials code, but idk what to put as parameters
 
I was trying to use a limited version of this plugin to combine with mid battle dialogue. But, in v21, the AI changed and you need to initialize an AI for the called pokemon. If someone has a solution, I looked a bit in the essentials code, but idk what to put as parameters
Worked a bit on making it compatible with 21.1, It's working with this (I'm recreating AI objects when a SOS Pokémon is called). This may not be the best solution, I'm kinda bad at scripting. I don't know if it's gonna work with mid battle dialogue thought.
 

Attachments

  • gfcgfcgcv.PNG
    gfcgfcgcv.PNG
    7.9 KB · Views: 61
Oh I forgot I asked here. I had a similar thing that did the job and yes it works perfectly with mid battle dialogue
 
Back
Top