- 1,402
- Posts
- 10
- Years
- Age 35
- Seen today
Not a typo, I just forgot to add a check in case the track is a string instead of an audio file.Find a typo(maybe a typo) in [003]Deluxe Battle Rules. Line 177 should be track instead of track&.name.
Not a typo, I just forgot to add a check in case the track is a string instead of an audio file.Find a typo(maybe a typo) in [003]Deluxe Battle Rules. Line 177 should be track instead of track&.name.
I see.Not a typo, I just forgot to add a check in case the track is a string instead of an audio file.
Theyre written within their own battle rule. You can look at one of the example battles provided in the guide to see what this looks like.Hello! I apologize in advance if I'm bothering you, I just need a little help with the midbattlescript. I've tried to follow the explanations as closely as possible, but I don't understand much, probably because English isn't my first language and I haven't been coding in a game for long. I mainly want to understand where I should write the scripts for battles.. (I hope I don't sound like an idiot by asking this question.)
Only one variable is coded into the script. However, you can always just use the regular $game_variables in a hardcoded script if you wanna do something more elaborate.Hello! I've been playing around with this script, and have been absolutely loving it so far. I was curious if there was a way to have multiple mid-battle variables during one battle (ex. Using one to track the number of player's misses with moves, and another to track the number of items used by the player); would I be able to add a temporary variable to a hardcoded script, or would I have to manually edit the Midbattle Overwrites script to add more mid-battle variables?
Thank you for the update! I've encountered another problem, unfortunately; when I try to use the hardcoded script version of "setSpeaker" to set the speaker to a Trainer Type, it crashes with this error:Only one variable is coded into the script. However, you can always just use the regular $game_variables in a hardcoded script if you wanna do something more elaborate.
Well, what does the code look like?Thank you for the update! I've encountered another problem, unfortunately; when I try to use the hardcoded script version of "setSpeaker" to set the speaker to a Trainer Type, it crashes with this error: View attachment 158362
Am I doing something wrong, or is this a bug?
Right, sorry about that. Here's the code:Well, what does the code look like?
MidbattleHandlers.add(:midbattle_scripts, :demo_Kasa_Paradox_Ditto,
proc { |battle, idxBattler, idxTarget, trigger|
scene = battle.scene
battler = battle.battlers[idxBattler]
case trigger
when "RoundStartCommand_1_foe"
battle.pbAnimation(:TRANSFORM, battler, battler)
battler.pbChangeForm(1, "Kasa's Ditto used the PDX-RB Fossil to transform!")
battler.damageThreshold = 4
battler.moves = [:THUNDERCLAP, :DISCHARGE, :DRAGONPULSE, :SNARL]
scene.pbStartSpeech(:ELITEFOUR_Agatha)
scene.pbShowSpeakerWindows("Kasa")
battle.pbDisplayPaused("Excellent job, Ditto!")
battle.pbDisplayPaused("Now, use your newfound power to DESTROY THEM!")
scene.pbForceEndSpeech
when "BattlerReachedHPCap_foe"
battle.pbAnimation(:TRANSFORM, battler, battler)
battler.pbChangeForm(0, "Kasa's Ditto lost its concentration and reverted!")
case $game_variables[26]
when 2
scene.pbStartSpeech(:ELITEFOUR_Agatha)
scene.pbShowSpeakerWindows("Kasa")
battle.pbDisplayPaused("Hrgggh...")
battle.pbDisplayPaused("...No matter, that wasn't the only Fossil I aquired!")
scene.pbForceEndSpeech
battle.pbAnimation(:TRANSFORM, battler, battler)
battler.pbChangeForm(2, "Kasa's Ditto used the PDX-GF Fossil to transform!")
battler.pbRecoverHP(battler.totalhp)
battler.damageThreshold = 4
battler.moves = [:BURNINGBULWARK, :HEATCRASH, :DRAGONCLAW, :STOMPINGTANTRUM]
scene.pbStartSpeech(:ELITEFOUR_Agatha)
scene.pbShowSpeakerWindows("Kasa")
battle.pbDisplayPaused("Prepare to be crushed!")
scene.pbForceEndSpeech
when 1
scene.pbStartSpeech(:ELITEFOUR_Agatha)
scene.pbShowSpeakerWindows("Kasa")
battle.pbDisplayPaused("...Bah, fine!")
battle.pbDisplayPaused("Behold, my final fossil!")
scene.pbForceEndSpeech
battle.pbAnimation(:TRANSFORM, battler, battler)
battler.pbChangeForm(3, "Kasa's Ditto used the PDX-WW Fossil to transform!")
battler.pbRecoverHP(battler.totalhp)
battler.damageThreshold = 4
battler.moves = [:SCALD, :DRAGONPULSE, :FLAMETHROWER, :MUDSHOT]
scene.pbStartSpeech(:ELITEFOUR_Agatha)
scene.pbShowSpeakerWindows("Kasa")
battle.pbDisplayPaused("No more holding back!")
battle.pbDisplayPaused("Ditto, ANNIHILATE THEM!")
scene.pbForceEndSpeech
when 0
scene.pbStartSpeech(:ELITEFOUR_Agatha)
scene.pbShowSpeakerWindows("Kasa")
battle.pbDisplayPaused("...")
battle.pbDisplayPaused("I'm... all out of fossils...")
scene.pbForceEndSpeech
end
$game_variables[26] -= 1 if $game_variables[26] > 0
when "BattleEndWin"
scene.pbStartSpeech(:ELITEFOUR_Agatha)
scene.pbShowSpeakerWindows("Kasa")
battle.pbDisplayPaused("Impossible...")
battle.pbDisplayPaused("Even with the power of the PDX Fossils...")
battle.pbDisplayPaused("...My Ditto was defeated...?")
scene.pbForceEndSpeech()
end
}
)
I'm assuming the only reason you're usingRight, sorry about that. Here's the code:
Spoiler:
Ruby:MidbattleHandlers.add(:midbattle_scripts, :demo_Kasa_Paradox_Ditto, proc { |battle, idxBattler, idxTarget, trigger| scene = battle.scene battler = battle.battlers[idxBattler] case trigger when "RoundStartCommand_1_foe" battle.pbAnimation(:TRANSFORM, battler, battler) battler.pbChangeForm(1, "Kasa's Ditto used the PDX-RB Fossil to transform!") battler.damageThreshold = 4 battler.moves = [:THUNDERCLAP, :DISCHARGE, :DRAGONPULSE, :SNARL] scene.pbStartSpeech(:ELITEFOUR_Agatha) scene.pbShowSpeakerWindows("Kasa") battle.pbDisplayPaused("Excellent job, Ditto!") battle.pbDisplayPaused("Now, use your newfound power to DESTROY THEM!") scene.pbForceEndSpeech when "BattlerReachedHPCap_foe" battle.pbAnimation(:TRANSFORM, battler, battler) battler.pbChangeForm(0, "Kasa's Ditto lost its concentration and reverted!") case $game_variables[26] when 2 scene.pbStartSpeech(:ELITEFOUR_Agatha) scene.pbShowSpeakerWindows("Kasa") battle.pbDisplayPaused("Hrgggh...") battle.pbDisplayPaused("...No matter, that wasn't the only Fossil I aquired!") scene.pbForceEndSpeech battle.pbAnimation(:TRANSFORM, battler, battler) battler.pbChangeForm(2, "Kasa's Ditto used the PDX-GF Fossil to transform!") battler.pbRecoverHP(battler.totalhp) battler.damageThreshold = 4 battler.moves = [:BURNINGBULWARK, :HEATCRASH, :DRAGONCLAW, :STOMPINGTANTRUM] scene.pbStartSpeech(:ELITEFOUR_Agatha) scene.pbShowSpeakerWindows("Kasa") battle.pbDisplayPaused("Prepare to be crushed!") scene.pbForceEndSpeech when 1 scene.pbStartSpeech(:ELITEFOUR_Agatha) scene.pbShowSpeakerWindows("Kasa") battle.pbDisplayPaused("...Bah, fine!") battle.pbDisplayPaused("Behold, my final fossil!") scene.pbForceEndSpeech battle.pbAnimation(:TRANSFORM, battler, battler) battler.pbChangeForm(3, "Kasa's Ditto used the PDX-WW Fossil to transform!") battler.pbRecoverHP(battler.totalhp) battler.damageThreshold = 4 battler.moves = [:SCALD, :DRAGONPULSE, :FLAMETHROWER, :MUDSHOT] scene.pbStartSpeech(:ELITEFOUR_Agatha) scene.pbShowSpeakerWindows("Kasa") battle.pbDisplayPaused("No more holding back!") battle.pbDisplayPaused("Ditto, ANNIHILATE THEM!") scene.pbForceEndSpeech when 0 scene.pbStartSpeech(:ELITEFOUR_Agatha) scene.pbShowSpeakerWindows("Kasa") battle.pbDisplayPaused("...") battle.pbDisplayPaused("I'm... all out of fossils...") scene.pbForceEndSpeech end $game_variables[26] -= 1 if $game_variables[26] > 0 when "BattleEndWin" scene.pbStartSpeech(:ELITEFOUR_Agatha) scene.pbShowSpeakerWindows("Kasa") battle.pbDisplayPaused("Impossible...") battle.pbDisplayPaused("Even with the power of the PDX Fossils...") battle.pbDisplayPaused("...My Ditto was defeated...?") scene.pbForceEndSpeech() end } )
:ELITEFOUR_Agatha
instead of a battler index is because you want to use a different sprite from the the trainer sprite? If that's not the case, you should just use an index, it's much simpler.scene.pbStartSpeech(0)
scene.pbShowSpeakerWindows("Kasa", 1)
scene.pbShowSpeaker(:ELITEFOUR_Agatha)
There's gotta be more to this error you aren't showing.