• 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 Mid battle dialogue for v20+ 3.0

CelestialFearow

Venipede User
Member
Joined
Jul 24, 2020
Posts
200
The game say "PBMoves" don't exist.

"battle.pbAnimation(getID(PBMoves,:HOWL),battle.battlers[1],battle.battlers[0])"

Also I think this don't work.

battle.battlers[1].pbOwnSide.effects[PBEffects::Safeguard] = 99
 
Last edited:

grogro

Cooltrainer
Member
Joined
Mar 6, 2021
Posts
120
The game say "PBMoves" don't exist.

"battle.pbAnimation(getID(PBMoves,:HOWL),battle.battlers[1],battle.battlers[0])"
You are right for this one, it's something I left and forgot to remove. The correct synthax is
battle.pbAnimation(:HOWL,battle.battlers[1],battle.battlers[0])

But the second one works for me (It doesn't throw any message, that's normal)
 

CelestialFearow

Venipede User
Member
Joined
Jul 24, 2020
Posts
200
You are right for this one, it's something I left and forgot to remove. The correct synthax is
battle.pbAnimation(:HOWL,battle.battlers[1],battle.battlers[0])

But the second one works for me (It doesn't throw any message, that's normal)

Ok thanks!
 

TheSheikahScholar

How do I change this? :P
Member
Joined
Aug 28, 2020
Posts
55
I ran this script command in a trainer battle event
Code:
Expand Collapse Copy
BattleScripting.set("lastOpp","text"=>"So, it's come down to this...")
and the dialogue and trainer sprite appeared as expected, but then after the trainer disappeared, this error popped up:

MBDError.png


After I clicked "OK", the battle continued, but the databoxes were gone.

MBD_PostError.png
 

grogro

Cooltrainer
Member
Joined
Mar 6, 2021
Posts
120
interesting, to be honest, I didn't test the single line commands like this.
Until a solution is found, you can comment this line. (line 1107 where the game crash) Idk why it's here and how to properly solve it yet

Replace line 1107 (or 1106 for you, Idk why I have one more line in the new version) by
scene.sprites["trainer_1"].setBitmap(GameData::TrainerType.front_sprite_filename(battle.opponent[0].trainer_type)) if !battle.wildBattle?

The download has been updated with the corrected version
 
Last edited:

grogro

Cooltrainer
Member
Joined
Mar 6, 2021
Posts
120
grogro updated Mid battle dialogue for v20 (actually in maintenance) with a new update entry:

bugfixes+new features

  • Changed pbreducehp to pbLowerhp. If you were using it on an ally Pokémon, please replace it with the new synthax
  • Added bossprotect effect that prevent status, stat drops, and negates tricky moves.
  • Added health threshold the boss cannot fall below while they are active. More information in the thread.
  • Updated the user guide (finally!)

Read the rest of this update entry...
 

Galaxia349

Rookie
Member
Joined
Jan 10, 2023
Posts
5
Hi there,
I'm trying to get mid-battle dialogue working but no matter what condition or data I type, it always comes back with this same error.
I have the graphics in the graphics/battle animations/ folder and the scripts in the /plugins/mid battle scripts_v20/ folder.

1673360170638.png
 
Last edited:

grogro

Cooltrainer
Member
Joined
Mar 6, 2021
Posts
120
idk why I didn't get this error myself if it's broken. Try redownloading the plugin, I changed something. If it doen't work, try changing the pbcalltitle function in the main section in your RPGmaker scripts by this:
Code:
Expand Collapse Copy
def pbCallTitle
  $PokemonTemp=PokemonTemp.new()
  return Scene_DebugIntro.new if $DEBUG
  return Scene_Intro.new
end
We will see if it's the problem. It looks like something is not initialized properly. Probably another plugin has the priority here. If nothing works, try starting a battle without dialogue just to confirm the problem.
 
Last edited:

Galaxia349

Rookie
Member
Joined
Jan 10, 2023
Posts
5
Ok so, I tried multiple methods that should've fixed it but to no avail. I'm not sure what the issue is. I re-downloaded the new version and included what you said in the main script inside RPG Maker. I also completely removed every other plugin I had and left this plugin alone by-itself. The battles start perfectly fine without calling this plugin/script. The problems seem to occur with any ".set" command. I tried your example ".setInScript" and it also threw out an error for that too.
1673554732885.png
 

grogro

Cooltrainer
Member
Joined
Mar 6, 2021
Posts
120
ok I found the problem. The setinscript command looks for a function in your data file. If you just want to display some text, just do
TrainerDialogue.set("turnStart0","This is cool.")
At least I now know that it returns this error
 

Galaxia349

Rookie
Member
Joined
Jan 10, 2023
Posts
5
Well.. the hope was good while it lasted xD
I didn't know about the TrainerDialogue.set command so I was for sure thinking that was the problem, but alas there is still an issue with the ".set" function. Same line (1010) in MBD. I really do want this plugin to work because all the other mid-battle dialogue options have other functionalities I do not want in my game. I really do appreciate the assistance! Please let me know if you need additional information.
1673658835672.png
 

grogro

Cooltrainer
Member
Joined
Mar 6, 2021
Posts
120
That's weird, it's working on my vanilla essentials version.
Ok next test! Can you run this dialogue? If it doesn't, show me your event.
BattleScripting.setInScript("turnStart0",:Tdamage)
 

Galaxia349

Rookie
Member
Joined
Jan 10, 2023
Posts
5
Ok so I feel confused but happy at the same time. I got curious myself too, so I started my own vanilla v20.1 essentials and plopped in your plugin. To my delight, it worked perfectly with even the commands I said earlier that didn't work. I did more investigating, removed every plugin again from my testing version and this time started a new game. To my surprise, it worked! This led me to believe that whenever I said I removed all my plugins, I must not have restarted my save.

This was good news, but I needed to figure out what plugin would be causing the issue. For anyone's future reference... this plugin is NOT compatible with Luka's Scripting Utilities v19. I was using that version for the Modular Title Screen only. At the time it wasn't an issue, but the scripting utilities must change more things than I thought. Everything works perfectly now without those 2 plugins. Thank you soooo much for the help grogro!!
 

grogro

Cooltrainer
Member
Joined
Mar 6, 2021
Posts
120
Yeah, the plugin probably won't work with things like EBDX (when it's out) or the ZUD plugin (which has it's own small things for dialogue). Anyways, if you need help I'm here for that and I will add small things to the guide after progressing in my own game
 

Galaxia349

Rookie
Member
Joined
Jan 10, 2023
Posts
5
Yeah, the plugin probably won't work with things like EBDX (when it's out) or the ZUD plugin (which has it's own small things for dialogue). Anyways, if you need help I'm here for that and I will add small things to the guide after progressing in my own game
All good. That sounds great, looking forward to it!
 

GaticadesS

Rookie
Member
Joined
Nov 18, 2022
Posts
5
When I use the Text action the Following Error message continues to appear:

[Pokémon Essentials version 20.1]
[v20.1 Hotfixes 1.0.7]

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

Backtrace:
[Essentials Deluxe] Battle_Scene.rb:81:in `createProcesses'
193:Battle_Scene_BaseAnimation:12:in `initialize'
[Essentials Deluxe] Battle_Scene.rb:76:in `initialize'
[Essentials Deluxe] Battle_Scene.rb:95:in `new'
[Essentials Deluxe] Battle_Scene.rb:95:in `pbHideOpponent'
[Mid Battle Dialogue] MBD.rb:1141:in `block in display'
[Mid Battle Dialogue] MBD.rb:1140:in `each'
[Mid Battle Dialogue] MBD.rb:1140:in `display'
[Mid Battle Dialogue] MBD.rb:770:in `pbReduceHP'
[ZUD Mechanics] Battler_Overrides.rb:57:in `pbReduceHP'

It triggers as it should and the Scripted message appear, but the error message appears as well. The game and battle continues after you close up the message, however, the opponent trainer continues to stay on screen and the opponent Pokemon suddenly is automatically beat. Here's the code I used:

BattleScripting.set("halfHPOpp","text"=>"IT WORKED!")

Im new to this script so sorry if this is a dumb mistype, but I had tried to fix it in multiple ways and I haven't figured it out yet.
 

Lucidious89

Champion
Member
Joined
Nov 12, 2020
Posts
1,222
When I use the Text action the Following Error message continues to appear:

[Pokémon Essentials version 20.1]
[v20.1 Hotfixes 1.0.7]

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

Backtrace:
[Essentials Deluxe] Battle_Scene.rb:81:in `createProcesses'
193:Battle_Scene_BaseAnimation:12:in `initialize'
[Essentials Deluxe] Battle_Scene.rb:76:in `initialize'
[Essentials Deluxe] Battle_Scene.rb:95:in `new'
[Essentials Deluxe] Battle_Scene.rb:95:in `pbHideOpponent'
[Mid Battle Dialogue] MBD.rb:1141:in `block in display'
[Mid Battle Dialogue] MBD.rb:1140:in `each'
[Mid Battle Dialogue] MBD.rb:1140:in `display'
[Mid Battle Dialogue] MBD.rb:770:in `pbReduceHP'
[ZUD Mechanics] Battler_Overrides.rb:57:in `pbReduceHP'

It triggers as it should and the Scripted message appear, but the error message appears as well. The game and battle continues after you close up the message, however, the opponent trainer continues to stay on screen and the opponent Pokemon suddenly is automatically beat. Here's the code I used:

BattleScripting.set("halfHPOpp","text"=>"IT WORKED!")

Im new to this script so sorry if this is a dumb mistype, but I had tried to fix it in multiple ways and I haven't figured it out yet.
Its very unlikely that MBD and Essentials Deluxe are compatible. They kinds do similar things, so I imagine they must step on each others toes a bit. I havent really looked into it.
 
Back
Top