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

Resource Mid Battle Dialogue/ Scripted Battles v1.8

Golisopod User

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

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

Example_Gif_3.gif
Example_Gif_1.gif
Example_Gif_2.gif


Mid Battle Dialogue/Scripted Battles

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

Read more about this resource...
 

TANGOCOYO

coyote tango
Member
Joined
Nov 27, 2014
Posts
16
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
 

Golisopod User

Elite Trainer
Member
Joined
May 11, 2020
Posts
319

SebastiaanZ

Trainer
Member
Joined
Jun 5, 2019
Posts
60
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:

Golisopod User

Elite Trainer
Member
Joined
May 11, 2020
Posts
319
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.
 

Mashirosakura

With my wishes frozen in time and long forgotten
Discord Mod
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
                })
              }
 

Zygoat

Mimikyu enjoyer
Member
Joined
Dec 21, 2020
Posts
163
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.
 

Golisopod User

Elite Trainer
Member
Joined
May 11, 2020
Posts
319
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

Zygoat

Mimikyu enjoyer
Member
Joined
Dec 21, 2020
Posts
163
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
 

Golisopod User

Elite Trainer
Member
Joined
May 11, 2020
Posts
319
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)
 

Golisopod User

Elite Trainer
Member
Joined
May 11, 2020
Posts
319

Golisopod User

Elite Trainer
Member
Joined
May 11, 2020
Posts
319

rhaidor

Novice
Member
Joined
Aug 7, 2020
Posts
25
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:

grogro

Cooltrainer
Member
Joined
Mar 6, 2021
Posts
120
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:

Ozander

Ozander
Member
Joined
Jul 28, 2020
Posts
101
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