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

I am using plugin(v20), and understand how to create a new function. However, how do i assign this function to a specific battle that i want?
 
Error keeps happening where the Trainer won't go away after speaking.
Error Video
[Pokémon Essentials version 21.1]
[v21.1 Hotfixes 1.0.9]

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

Backtrace:
[Mid Battle Dialogue] MBD.rb:1368:in `createProcesses'
193:Battle_Scene_BaseAnimation:12:in `initialize'
[Mid Battle Dialogue] MBD.rb:1362:in `initialize'
[Mid Battle Dialogue] MBD.rb:1304:in `new'
[Mid Battle Dialogue] MBD.rb:1304:in `pbHideOpponent'
[Mid Battle Dialogue] data.rb:59:in `block in <module:DialogueModule>'
[Mid Battle Dialogue] MBD.rb:1174:in `display'
[Mid Battle Dialogue] MBD.rb:1028:in `block in pbSendOutBattlers'
[Mid Battle Dialogue] MBD.rb:1027:in `each'
[Mid Battle Dialogue] MBD.rb:1027:in `pbSendOutBattlers'
 
Error keeps happening where the Trainer won't go away after speaking.
Error Video
[Pokémon Essentials version 21.1]
[v21.1 Hotfixes 1.0.9]

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

Backtrace:
[Mid Battle Dialogue] MBD.rb:1368:in `createProcesses'
193:Battle_Scene_BaseAnimation:12:in `initialize'
[Mid Battle Dialogue] MBD.rb:1362:in `initialize'
[Mid Battle Dialogue] MBD.rb:1304:in `new'
[Mid Battle Dialogue] MBD.rb:1304:in `pbHideOpponent'
[Mid Battle Dialogue] data.rb:59:in `block in <module:DialogueModule>'
[Mid Battle Dialogue] MBD.rb:1174:in `display'
[Mid Battle Dialogue] MBD.rb:1028:in `block in pbSendOutBattlers'
[Mid Battle Dialogue] MBD.rb:1027:in `each'
[Mid Battle Dialogue] MBD.rb:1027:in `pbSendOutBattlers'
Just to be sure, what is the code used for the battle? Its probably caused by old code that was not updated properly, and I need it for the diagnosis
 
Just to be sure, what is the code used for the battle? Its probably caused by old code that was not updated properly, and I need it for the diagnosis
Code for Character
Ruby:
Expand Collapse Copy
  IntRat= Proc.new{|battle|
      battle.scene.pbShowOpponent(0)
      battle.scene.disappearDatabox
      battle.scene.appearBar
      pbMessage"The Argent Region is home to pretty much any Pokemon in existance!"
      battle.scene.disappearBar
      battle.scene.appearDatabox
      battle.scene.pbHideOpponent(0)
      }
 
Code for Character
Ruby:
Expand Collapse Copy
  IntRat= Proc.new{|battle|
      battle.scene.pbShowOpponent(0)
      battle.scene.disappearDatabox
      battle.scene.appearBar
      pbMessage"The Argent Region is home to pretty much any Pokemon in existance!"
      battle.scene.disappearBar
      battle.scene.appearDatabox
      battle.scene.pbHideOpponent(0)
      }
it's pbHideOpponent instead of pbHideOpponent(0). You don't need to specify who disappears as it's erasing the sprite currently on screen
 
Note for Android compatibility: If you download the plugin and put it in directly in the plugins folder, this will cause many people on Joiplay to crash as soon as they enter a battle.

Here's how to solve this: Before you make an Android version, move this plugin's files out of your plugins folder (probably just put them in a zip file for safe keeping or put them somewhere else so you don't lose them). The game will still run with the plugins because it imports them into PluginScripts.rxdata and will run the latest imported version of the plugin from there. This will work fine on Android. However, if the plugin is in the plugins folder, the game will try to load it from there when people play, which will crash it. So, they just can't be there.

Anyway, I'd highly recommend people do this because there are a lot of Android players out there and many won't be able to play your game otherwise.
 
Last edited:
My apologies for the double-post:

The above post has been edited to currently be correct. Previously, I had recommended copy-pasting the plugin into the game files, but this does nothing (and editing mid-battle dialogue there will not be read by the game). If you read my previous instructions with the screenshot prior to May 3, know that was incorrect and the current instructions above for Joiplay compatibility are now correct.
 
Back
Top