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

Resource Essentials Deluxe [v20.1] [DEPRECATED] v1.2.8

Shadow56bomb

Cooltrainer
Member
Joined
Oct 15, 2022
Posts
220
Exception `SyntaxError' at 008:PluginManager:653 - [Essentials Deluxe] Midbattle_Config.rb:277: syntax error, unexpected string literal, expecting '}'
"mega_foe" => {
^
[Essentials Deluxe] Midbattle_Config.rb:278: syntax error, unexpected symbol literal, expecting label or ** or **arg or string literal
:speech => ["It seems I will ...
^
[Essentials Deluxe] Midbattle_Config.rb:279: syntax error, unexpected '}', expecting `end'
[Essentials Deluxe] Midbattle_Config.rb:282: syntax error, unexpected symbol literal, expecting label or ** or **arg or string literal
:speech => ["This isn't good,...
^
[Essentials Deluxe] Midbattle_Config.rb:283: syntax error, unexpected [, expecting local variable or method
:useitem_foe => [:FULLRESTORE]
^
[Essentials Deluxe] Midbattle_Config.rb:284: syntax error, unexpected '}', expecting `end'
[Essentials Deluxe] Midbattle_Config.rb:295: syntax error, unexpected '\n', expecting =>
:UltraBurst_foe
^
[Essentials Deluxe] Midbattle_Config.rb:297: syntax error, unexpected '}', expecting `end'
[Essentials Deluxe] Midbattle_Config.rb:300: syntax error, unexpected symbol literal, expecting label or ** or **arg or string literal
:speech => ["Let's show them ...
^
[Essentials Deluxe] Midbattle_Config.rb:302: syntax error, unexpected '}', expecting `end'
},
^
[Essentials Deluxe] Midbattle_Config.rb:305: syntax error, unexpected symbol literal, expecting label or ** or **arg or string literal
:speech => ["Isn't the light ...
^
[Essentials Deluxe] Midbattle_Config.rb:306: syntax error, unexpected '}', expecting `end'
},
^
What are the errors talking about with this?
 

Mashirosakura

With my wishes frozen in time and long forgotten
Discord Mod
What are the errors talking about with this?
From what I can see, you've written a lot of the functions with incorrect syntax, you've not been ending triggers properly etc. Might want to look at the tutorials again.
 

Shadow56bomb

Cooltrainer
Member
Joined
Oct 15, 2022
Posts
220
SyntaxEditor Code Snippet#-----------------------------------------------------------------------------
# Nagesh Battle 1
#-----------------------------------------------------------------------------
NAGESHFIRST = {
# Midbattle
"superEffective" => {
:speech => ["A Super-Effective hit on my Pokémon, just what I'd expect from the chapion of Otnak!"],
},
#-----------------------------------------------------------------------------
"beforeLast_foe" => {
:speech => ["Well this is unexpected... looks like I only have one more Pokémon."],
}
#-----------------------------------------------------------------------------
"mega_foe" => {
:speech => ["It seems I will need all my power to win this."],
}
#-----------------------------------------------------------------------------
"lowHPLast_foe" => {
:speech => ["This isn't good, heal up Beeheeyem!"],
:useitem_foe => [:FULLRESTORE]
}
}


#-----------------------------------------------------------------------------
# Nagesh Battle 2
#-----------------------------------------------------------------------------
NAGESHLAST = {
# Midbattle
"turnAttack" => {
:speech => ["Necrozma! It's time for Ultra Burst!"],
:UltraBurst_foe
:bgm => "Battle! Ultra Necrozma!"
},
#-----------------------------------------------------------------------------
"turnAttack_2" => {
:speech => ["Let's show them how powerful your light is!"],
:ZMove_foe
},
#-----------------------------------------------------------------------------
"loss" => {
:speech => ["Isn't the light of Ultra Necrozma just wonderful?"]
},
}
 

Lucidious89

Champion
Member
Joined
Nov 12, 2020
Posts
1,222
:Ul
SyntaxEditor Code Snippet#-----------------------------------------------------------------------------
# Nagesh Battle 1
#-----------------------------------------------------------------------------
NAGESHFIRST = {
# Midbattle
"superEffective" => {
:speech => ["A Super-Effective hit on my Pokémon, just what I'd expect from the chapion of Otnak!"],
},
#-----------------------------------------------------------------------------
"beforeLast_foe" => {
:speech => ["Well this is unexpected... looks like I only have one more Pokémon."],
}
#-----------------------------------------------------------------------------
"mega_foe" => {
:speech => ["It seems I will need all my power to win this."],
}
#-----------------------------------------------------------------------------
"lowHPLast_foe" => {
:speech => ["This isn't good, heal up Beeheeyem!"],
:useitem_foe => [:FULLRESTORE]
}
}


#-----------------------------------------------------------------------------
# Nagesh Battle 2
#-----------------------------------------------------------------------------
NAGESHLAST = {
# Midbattle
"turnAttack" => {
:speech => ["Necrozma! It's time for Ultra Burst!"],
:UltraBurst_foe
:bgm => "Battle! Ultra Necrozma!"
},
#-----------------------------------------------------------------------------
"turnAttack_2" => {
:speech => ["Let's show them how powerful your light is!"],
:ZMove_foe
},
#-----------------------------------------------------------------------------
"loss" => {
:speech => ["Isn't the light of Ultra Necrozma just wonderful?"]
},
}
:UltraBurst_foe and :ZMove_foe are neither valid entries as a midbattle trigger, or as a key within a midbattle hash. Im not really sure what youre even trying to accomplish with them, but those are certainly the source of your errors.
 

Shadow56bomb

Cooltrainer
Member
Joined
Oct 15, 2022
Posts
220
I was trying to have them trigger when the opponent used a Z-Move and Ultra Burst instead of the player using them.
 

Lucidious89

Champion
Member
Joined
Nov 12, 2020
Posts
1,222
I was trying to have them trigger when the opponent used a Z-Move and Ultra Burst instead of the player using them.
Then what you want is to use "ultra_foe", and "zmove_foe" then, instead of "turnAttack" and "turnAttack_2". Refer to the tutorial and the ZUD examples in Midbattle_Config for examples of this.
 

Lucidious89

Champion
Member
Joined
Nov 12, 2020
Posts
1,222
Will those still activate right away?
They activate whenever they are triggered. Thats what the triggers do. So "ultra_foe" triggers immediately when the opponent triggers Ultra Burst.
 

Lucidious89

Champion
Member
Joined
Nov 12, 2020
Posts
1,222
What I meant was, will the Ultra Burst transformation still trigger on the first turn?
Nothing about the mechanics are changed, so they follow the same rules they normally would. Ultra Burst is set up so that when used by opposing trainers, it triggers the first possible turn that its available. So if its available turn 1, it will trigger on turn 1. Z-Moves are triggered completely dependent on the opposing trainer's AI (chosen with the same AI logic that their normal moves are), so they are less predictable.

You CAN script these mechanics to trigger at specific times by using the :usespecial command, which can be modified further with the :scriped battle rule. Again, you may refer to the tutorial for more details.
 

Shadow56bomb

Cooltrainer
Member
Joined
Oct 15, 2022
Posts
220
I get this error now, is it similar to the other one?
[Pokémon Essentials version 20.1]
[v20.1 Hotfixes 1.0.7]

Error in Plugin: [Essentials Deluxe]
Exception: SyntaxError
Message: [Essentials Deluxe] Midbattle_Config.rb:277: syntax error, unexpected string literal, expecting '}'
"mega_foe" => {
^
[Essentials Deluxe] Midbattle_Config.rb:278: syntax error, unexpected symbol literal, expecting label or ** or **arg or string literal
:speech => ["It seems I will ...
^
[Essentials Deluxe] Midbattle_Config.rb:279: syntax error, unexpected '}', expecting `end'
[Essentials Deluxe] Midbattle_Config.rb:282: syntax error, unexpected symbol literal, expecting label or ** or **arg or string literal
:speech => ["This isn't good,...
^
[Essentials Deluxe] Midbattle_Config.rb:283: syntax error, unexpected [, expecting local variable or method
:useitem_foe => [:FULLRESTORE]
^
[Essentials Deluxe] Midbattle_Config.rb:284: syntax error, unexpected '}', expecting `end'

Backtrace:
008:PluginManager:653:in `eval'
008:PluginManager:653:in `block (2 levels) in runPlugins'
008:PluginManager:643:in `each'
008:PluginManager:643:in `block in runPlugins'
008:PluginManager:634:in `each'
008:PluginManager:634:in `runPlugins'
390:Main:28:in `mainFunctionDebug'
390:Main:18:in `block in mainFunction'
014:Errors:80:in `pbCriticalCode'
390:Main:18:in `mainFunction'

I already sent the code for this with the other one causing errors.
 

KRLW890

The Beast
Member
Joined
Oct 11, 2022
Posts
61
My game has the Bag Screen with Interactable Party plugin but not the Terastal Phenomenon plugin, and I'm getting a bug that's crashing the game. Occurs when the player uses the last of an item from their bag.

Error Message:
Expand Collapse Copy
[2023-02-12 18:37:44 -0600]
[Pokémon Essentials version 20.1]
[v20.1 Hotfixes 1.0.7]

Exception: NoMethodError
Message: undefined method `is_tera_shard?' for #<GameData::Item>

Backtrace:
[Essentials Deluxe] Interactable Bag Screen.rb:573:in `pbBagUseItem'
[Essentials Deluxe] Interactable Bag Screen.rb:179:in `block in pbChoosePoke'
[Essentials Deluxe] Interactable Bag Screen.rb:147:in `loop'
[Essentials Deluxe] Interactable Bag Screen.rb:147:in `pbChoosePoke'
[Essentials Deluxe] Interactable Bag Screen.rb:324:in `block in pbStartScreen'
[Essentials Deluxe] Interactable Bag Screen.rb:287:in `loop'
[Essentials Deluxe] Interactable Bag Screen.rb:287:in `pbStartScreen'
289:UI_PauseMenu:199:in `block (2 levels) in <main>'
090:MessageConfig:576:in `pbFadeOutIn'
289:UI_PauseMenu:196:in `block in <main>'

The plugins I'm using that are worth mentioning are Deluxe, Interactable Bag Screen, Enhanced UI, and the Gen 9 Pack. Let me know if you want a full list of plugins.
 

Lucidious89

Champion
Member
Joined
Nov 12, 2020
Posts
1,222
I get this error now, is it similar to the other one?
[Pokémon Essentials version 20.1]
[v20.1 Hotfixes 1.0.7]

Error in Plugin: [Essentials Deluxe]
Exception: SyntaxError
Message: [Essentials Deluxe] Midbattle_Config.rb:277: syntax error, unexpected string literal, expecting '}'
"mega_foe" => {
^
[Essentials Deluxe] Midbattle_Config.rb:278: syntax error, unexpected symbol literal, expecting label or ** or **arg or string literal
:speech => ["It seems I will ...
^
[Essentials Deluxe] Midbattle_Config.rb:279: syntax error, unexpected '}', expecting `end'
[Essentials Deluxe] Midbattle_Config.rb:282: syntax error, unexpected symbol literal, expecting label or ** or **arg or string literal
:speech => ["This isn't good,...
^
[Essentials Deluxe] Midbattle_Config.rb:283: syntax error, unexpected [, expecting local variable or method
:useitem_foe => [:FULLRESTORE]
^
[Essentials Deluxe] Midbattle_Config.rb:284: syntax error, unexpected '}', expecting `end'

Backtrace:
008:PluginManager:653:in `eval'
008:PluginManager:653:in `block (2 levels) in runPlugins'
008:PluginManager:643:in `each'
008:PluginManager:643:in `block in runPlugins'
008:PluginManager:634:in `each'
008:PluginManager:634:in `runPlugins'
390:Main:28:in `mainFunctionDebug'
390:Main:18:in `block in mainFunction'
014:Errors:80:in `pbCriticalCode'
390:Main:18:in `mainFunction'

I already sent the code for this with the other one causing errors.
Syntax errors are essentially the coding equivalent of typos. Meaning, you either added something that doesn't need to be there or is in the wrong place, or forgot something that should be there. Just from taking a second look at your code, you have several commas where they don't really need to be there, and missing several where they absolutely need to be. I'm not going to assist with fixing every single syntax error, because that goes beyond the scope of the plugin and is more of a basic coding problem. However, as like before, I will refer you to the tutorial and numerous examples that exist in both the tutorial and plugin itself to act as your guide.
 

Lucidious89

Champion
Member
Joined
Nov 12, 2020
Posts
1,222
My game has the Bag Screen with Interactable Party plugin but not the Terastal Phenomenon plugin, and I'm getting a bug that's crashing the game. Occurs when the player uses the last of an item from their bag.

Error Message:
Expand Collapse Copy
[2023-02-12 18:37:44 -0600]
[Pokémon Essentials version 20.1]
[v20.1 Hotfixes 1.0.7]

Exception: NoMethodError
Message: undefined method `is_tera_shard?' for #<GameData::Item>

Backtrace:
[Essentials Deluxe] Interactable Bag Screen.rb:573:in `pbBagUseItem'
[Essentials Deluxe] Interactable Bag Screen.rb:179:in `block in pbChoosePoke'
[Essentials Deluxe] Interactable Bag Screen.rb:147:in `loop'
[Essentials Deluxe] Interactable Bag Screen.rb:147:in `pbChoosePoke'
[Essentials Deluxe] Interactable Bag Screen.rb:324:in `block in pbStartScreen'
[Essentials Deluxe] Interactable Bag Screen.rb:287:in `loop'
[Essentials Deluxe] Interactable Bag Screen.rb:287:in `pbStartScreen'
289:UI_PauseMenu:199:in `block (2 levels) in <main>'
090:MessageConfig:576:in `pbFadeOutIn'
289:UI_PauseMenu:196:in `block in <main>'

The plugins I'm using that are worth mentioning are Deluxe, Interactable Bag Screen, Enhanced UI, and the Gen 9 Pack. Let me know if you want a full list of plugins.
An oversight. It'll be fixed in the next update.
 

OkunoShio

Cooltrainer
Member
Joined
Oct 22, 2022
Posts
129
One thing I stumbled upon while testing a bit more extensively: when you lose a deluxe battle and rematch the trainer, the "delay" hash seems to be ignored/ is not reset properly (when I fulfilled the "delay" conditions, this delay seems to be saved as "solved" forever). Here is one of my terastallize examples, where terastallization shall only be triggered for Rufflet, which is the last Pokémon:

"turnAttack_repeat" => {
:delay => "afterNextRUFFLET",
:battler => :Opposing,
:usespecial => [:Terastallize, "Don't think I pulled my trump card yet!"]
}

Terastallization is locked in the trainer rules with the "scripted" command. I am pretty sure there is probably also a more efficient way to make sure the correct Pokémon is terastallized.

On the same note, "ignore" hashs seem to be always on as soon as their condition is met once. So if my "ignore" hash is "fainted_foe", the key will not trigger any more after the first foe has fainted, however I only want the key to not trigger when the respective target has fainted. My example looks like this:

"damageTaken_foe_repeat" => {
:delay => ["halfHP_foe", "lowHP_foe"],
:ignore => "fainted_foe",
:speech => "{1}, let the water protect you!",
:effects => [ [PBEffects::AquaRing, true] ]
},

How could I get around this?
 
Last edited:

Lucidious89

Champion
Member
Joined
Nov 12, 2020
Posts
1,222
One thing I stumbled upon while testing a bit more extensively: when you lose a deluxe battle and rematch the trainer, the "delay" hash seems to be ignored/ is not reset properly (when I fulfilled the "delay" conditions, this delay seems to be saved as "solved" forever). Here is one of my terastallize examples, where terastallization shall only be triggered for Rufflet, which is the last Pokémon:

"turnAttack_repeat" => {
:delay => "afterNextRUFFLET",
:battler => :Opposing,
:usespecial => [:Terastallize, "Don't think I pulled my trump card yet!"]
}

Terastallization is locked in the trainer rules with the "scripted" command. I am pretty sure there is probably also a more efficient way to make sure the correct Pokémon is terastallized.

On the same note, "ignore" hashs seem to be always on as soon as their condition is met once. So if my "ignore" hash is "fainted_foe", the key will not trigger any more after the first foe has fainted, however I only want the key to not trigger when the respective target has fainted. My example looks like this:

"damageTaken_foe_repeat" => {
:delay => ["halfHP_foe", "lowHP_foe"],
:ignore => "fainted_foe",
:speech => "{1}, let the water protect you!",
:effects => [ [PBEffects::AquaRing, true] ]
},

How could I get around this?
Ill have to look over this and do some testing. Might be something i have to update, idk.
 

Lucidious89

Champion
Member
Joined
Nov 12, 2020
Posts
1,222
One thing I stumbled upon while testing a bit more extensively: when you lose a deluxe battle and rematch the trainer, the "delay" hash seems to be ignored/ is not reset properly (when I fulfilled the "delay" conditions, this delay seems to be saved as "solved" forever). Here is one of my terastallize examples, where terastallization shall only be triggered for Rufflet, which is the last Pokémon:

"turnAttack_repeat" => {
:delay => "afterNextRUFFLET",
:battler => :Opposing,
:usespecial => [:Terastallize, "Don't think I pulled my trump card yet!"]
}

Terastallization is locked in the trainer rules with the "scripted" command. I am pretty sure there is probably also a more efficient way to make sure the correct Pokémon is terastallized.

On the same note, "ignore" hashs seem to be always on as soon as their condition is met once. So if my "ignore" hash is "fainted_foe", the key will not trigger any more after the first foe has fainted, however I only want the key to not trigger when the respective target has fainted. My example looks like this:

"damageTaken_foe_repeat" => {
:delay => ["halfHP_foe", "lowHP_foe"],
:ignore => "fainted_foe",
:speech => "{1}, let the water protect you!",
:effects => [ [PBEffects::AquaRing, true] ]
},

How could I get around this?
Ok, I've done some testing, and I found the bug with the :delay key (the :ignore key also has the exact same bug, btw). It only ever triggers if the midbattle hash is called as a symbol that you set in Midbattle_Config. It won't happen if you manually write out the whole hash in an event. In any case, I figured it out.

Well, I didn't really "figure it out", because I actually have no idea why it happens. I see WHERE the bug is occurring, but it doesn't make any sense to me WHY it happens. I tried a million different things that SHOULD resolve it on paper, but it just refuses to abide by any logic for some reason. Regardless, I found a work-around "solution" by just bypassing the whole thing from even happening at all. So it'll be fixed, despite me not really understanding why it needs fixing in the first place lol. The next update I release should contain this fix.

As for you question about using the :ignore key, that's pretty much how it's supposed to work. Once the "fainted_foe" trigger activates once, everything below ignore will never trigger again for the remainder of the battle. If you only want this to trigger after a specific Pokemon faints, then you'll have to be more specific with which trigger to set :ignore to. For example, if you want the speech/Aqua Ring effect to stop triggering once the opponent's Squirtle has fainted (and not just after any Pokemon faints), then you would set :ignore to "faintedSQUIRTLE_foe".
 

OkunoShio

Cooltrainer
Member
Joined
Oct 22, 2022
Posts
129
Thanks for looking into it so quickly!

Thanks for clarifying the :ignore key as well - so I currently only have the small issue that the Aqua Ring Effect always triggers, even when my opponent fainted (my current script is not using the :ignore key); that's basically just an inconvenience and a visual glitch (the trainer slides in, trying to give their fainted Pokémon Aqua Ring haha :) ), but how could I get around that? I could set up the Aqua Ring Effect for each Pokémon separately maybe? However, looking at the tutorial, I think the Damage Check Triggers (damageTaken/halfHP etc.) cannot be set up for one particular Pokémon (like "damageTakenSQUIRTLE"), or can they?
 
Last edited:
Back
Top