• 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!
Mid Battle Dialogue/ Scripted Battles

Resource Mid Battle Dialogue/ Scripted Battles v1.8

Golisopod User

Elite Trainer
Member
Joined
May 11, 2020
Posts
322
Golisopod User submitted a new resource:

Mid Battle Dialogue/ Scripted Battles - Simple and Powerful way display to Display Dialouge Mid Battle, and much more!

https://*/762140736031817762/774646094415659058/Example_Gif_3.gif https://*/762140736031817762/774646098496847882/Example_Gif_1.gifhttps://*/762140736031817762/774646097578688562/Example_Gif_2.gif

Mid Battle Dialogue/Scripted Battles

Overview:
The main aim of this script was to recreate...

Read more about this resource...
 
this is the exact thing i needed please get out of my head

this is probably the coolest add on for essentials in a while and i really appreciate you
 
Is it only supposed to have one additional TrainerDialogue within the battle event itself? Whatever I try I get the first one to work, but the second line will never happen, even when conditions are met.

Also I am getting undefined "z" when I am using the item line or last Pokemon of opponent thing. Any help?
 
Last edited:
When using stuff like lastOpp, are the Trainers supposed to be talking before they throw out the PokeBall?
Nope. They always will speak after the Pokeball is thrown.
 
Huh, sometimes it triggers before the ball is sent out. Any idea as to how to fix it? (Example vid, occurs at 19:50: )

It triggers before the ball is sent out if you don't switch, I think. The way I made it avoid doing that is like this example

Helpful example:
Expand Collapse Copy
"Function" = Proc.new{|battle|
                BattleScripting.set("turnEnd#{battle.turnCount+0}",Proc.new{|battle|
                  battle.scene.appearBar
                  battle.scene.pbShowOpponent(0)
                  pbMessage("Message")
                  battle.scene.pbHideOpponent
                  battle.scene.disappearBar
                })
              }
 
With this script, would it be possible to recreate the little dance Barry does at the beginning of battles?

download.gif
 
With this script, would it be possible to recreate the little dance Barry does at the beginning of battles?

View attachment 2293
There's a section for animating trainer sprites, but I think that's just during battle-
# For changing/animating Trainer Sprites. Works with any sprite in the Trainers Folder
TrainerDialogue.changeTrainerSprite(["trainer024","trainer024_1","trainer024_2","trainer024_2"],battle.scene,delay=5)
# Here the trainer024,trainer024_1..... are sprites in my Graphics/Trainers folder. The delay is the amount of frames to wait before changing the sprite.
 
With this script, would it be possible to recreate the little dance Barry does at the beginning of battles?
Oh I'm working on a different script for that.
 

Attachments

  • 3IUiwrpYL1.mp4
    200.5 KB
Is there a part of the script that sets the position of the text boxes? The dialogue for me appears at the top of the screen, but I think that might be because I have Marin's Poketch script installed. I don't want to have to delete this script because it's really good.

Capture.PNG
 
Is there a part of the script that sets the position of the text boxes? The dialogue for me appears at the top of the screen, but I think that might be because I have Marin's Poketch script installed. I don't want to have to delete this script because it's really good.
Begin all your text commands with \\wd (or \wd if \\wd doesn't work)
 
Hello!
Updated to the newest version , but the "BattleScripting.setTrainerAce(6)" script command didnt worked. My opponent still sent out his ace pokemon as third , when it was the best type matching agains me.

FIXED: looks like the numbers go from 0 to 5 and not from 1 to 6
 
Last edited:
Hi, I had a problem with calling the pbreducehp method. If your pokemon is fainted by this method, the turn keep going anyways without making the fainting animation and changing your pokemon. So here is my solution, I hope it can help (I just copied a part of u-turn code):

Laser= Proc.new{|battle|
TrainerDialogue.changeTrainerSprite(["trainer092"],battle.scene)
battle.scene.pbShowOpponent(0)
pbMessage("\\bYveltal, erase your enemy!")
battle.pbAnimation(getID(PBMoves,:HYPERBEAM),battle.battlers[1],battle.battlers[0])
battle.battlers[0].pbReduceHP(battle.battlers[1].totalhp)
if battle.battlers[0].fainted?
battle.battlers[0].pbFaint
newPkmn = battle.pbGetReplacementPokemonIndex(battle.battlers[0].index) # Owner chooses
return if newPkmn<0
battle.pbRecallAndReplace(battle.battlers[0].index,newPkmn)
battle.moldBreaker = false
battle.battlers[0].pbEffectsOnSwitchIn(true)
battle.scene.pbHideOpponent
end
}
 
Last edited:
I have problem

I do everything like in the Thundaga tutorial, but I get this error
I will add that I use mkxp


Error:
Expand Collapse Copy
[Pokémon Essentials version 18.1.dev]
Exception: RuntimeError
Message: Script error within event 1 (coords 16,7), map 33 (Camp):
Exception: NameError
Message: undefined local variable or method `battleStart' for #<Interpreter:0xe552f10>

***Full script:
BattleScripting.set(battleStart,Yeah!)


Backtrace:
001_Interpreter.rb:197:in `pbExecuteScript'
001_Interpreter.rb:1458:in `eval'
001_Interpreter.rb:197:in `pbExecuteScript'
001_Interpreter.rb:1458:in `command_355'
001_Interpreter.rb:359:in `execute_command'
001_Interpreter.rb:155:in `update'
001_Interpreter.rb:102:in `loop'
001_Interpreter.rb:102:in `update'
002_Scene_Map.rb:162:in `update'
002_Scene_Map.rb:160:in `loop'


Backtrace:
001_Interpreter.rb:246:in `pbExecuteScript'
001_Interpreter.rb:1458:in `command_355'
001_Interpreter.rb:359:in `execute_command'
001_Interpreter.rb:155:in `update'
001_Interpreter.rb:102:in `loop'
001_Interpreter.rb:102:in `update'
002_Scene_Map.rb:162:in `update'
002_Scene_Map.rb:160:in `loop'
002_Scene_Map.rb:160:in `update'
002_Scene_Map.rb:229:in `main'
 
Back
Top