• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Mid Battle Dialogue/Scripted Battles

658
Posts
7
Years
  • Example_Gif_3.gif
    Example_Gif_1.gif

    Example_Gif_2.gif


    Mid Battle Dialogue/Scripted Battles

    Important Update

    Overview:
    The main aim of this script was to recreate the feature in BW2 which allowed Trainers to say a line of dialogue when they send out their last Pokemon and when their last Pokemon is at Low HP. This feature was expanded upon in Pokemon SwSh, where an opponent made a statement even when using a move, fainting a Pokemon, before Dynamaxing their Pokemon etc. Its a feature which adds personality to trainers. This script, takes that to the next level, with many more cases to trigger dialogue and with the functionality to run whole chunks of code mid Battle, essentially allowing you to edit every aspect about the battle, the Pokemon in Battle, the battle scene and even stuff in the Overworld. It also allows for Dialogue in Wild Battles. The only limit is your imagination.

    Features:
    1. Displaying dialogue Mid Battle with many options.
    2. Sword/Shield Message Display Animation
    3. Changing BGM Mid Battle
    4. Allowing Dialogue to appear in many different places throughout the battle, not just on sending out the last Pokemon
    5. Usage of code blocks allows manipulation of the battle, the battle scene and the battlers at deep levels which allows highly intricately crafted and unique battle scenarios.
    6. Works with both Trainer as well as Wild Battles

    Example Battles made using this Script:
    Spoiler:


    Download Link

    This script is not compatible with Essentials v17, or with EBS or EBDX. I do not plan to add compatibility for any of them.

    Instructions

    Spoiler:



    Minor Issues:
    Spoiler:


    Credits
    Spoiler:


    Changelog
    Spoiler:
     
    Last edited:
    71
    Posts
    6
    Years
    • Seen May 7, 2024
    This looks really good and it's probably gonna become a cornerstone script in PE games, it's like eventing inside battles.
    Good job!
     
    4
    Posts
    4
    Years
    • Seen Jul 9, 2023
    This is a very stupid question but... where do you set up the commands? in the script? in the event via call script?.
     
    658
    Posts
    7
    Years
  • This is a very stupid question but... where do you set up the commands? in the script? in the event via call script?.
    Just set up the commands anywhere and it'll all be added in the next battle you have. Ideally I'd put it right before the Trainer/Wild Battle Event. It'd be good if you check out the example battles I've set up in the map provided.
     
    4
    Posts
    4
    Years
    • Seen Jul 9, 2023
    Thanks! i didn't see the event in the map! Now the things are clear to me! 😁
     
    49
    Posts
    5
    Years
    • Seen Aug 21, 2021
    Hey guys, can someone hook it up with a .txt of the commands in the event? For some reason I've never been able to resize windows in rpgxp, and when I go to edit in order to copy text, I only get part of it.
     
    658
    Posts
    7
    Years
  • Im having an error using the turnStart0 command
    Screenshot_2020-11-09_102149.png
    What exactly is the error? Did you put turnStart0 in quotation marks?

    Hey guys, can someone hook it up with a .txt of the commands in the event? For some reason I've never been able to resize windows in rpgxp, and when I go to edit in order to copy text, I only get part of it.
    Have you tried using extendtext.exe
     
    Last edited:
    49
    Posts
    5
    Years
    • Seen Aug 21, 2021
    Hey Golisopod, it's something to do with the compatibility settings on my end. I even tried using an external app to resize windows, but it doesn't work. Even in scripts I can't see the full line number.

    P.s. Forgot to answer lol I have tried using extend text, but most of the text is cut off and I can't see it
     
    Last edited:
    658
    Posts
    7
    Years
  • Hey Golisopod, it's something to do with the compatibility settings on my end. I even tried using an external app to resize windows, but it doesn't work. Even in scripts I can't see the full line number.

    P.s. Forgot to answer lol I have tried using extend text, but most of the text is cut off and I can't see it

    I should have seen this coming. I'd actually never written the example battles in the tiny RMXP Script Window. I copied it from a text file which I don't have anymore.

    And any which ways, those scripts are meant to serve as examples for what the script can do. They aren't meant to be copy-pasted. I'd suggest reading the instructions and the examples to try creating your own unique dialogue. And if you still have trouble, I'll try my best to help you out.
     
    49
    Posts
    5
    Years
    • Seen Aug 21, 2021
    No worries, I'll work on it and figure it out. Just thought I'd ask if anyone had them on hand. When I manage to write some I can upload them, although they'll be basic ones from HGSS. Thanks, Golisopod!
     
    18
    Posts
    3
    Years
    • Seen Nov 22, 2023
    Basically every time I encounter the event mon that error shows up. And yes I put turnStart0 in quotes
     
    21
    Posts
    4
    Years
    • Seen Nov 23, 2023
    Hi,
    just a little post to say that, in the example commands in this post, there is a little mistake. Use pbLowerStatStage instead of pbRaiseLowerStage.
     
    8
    Posts
    3
    Years
    • Seen Nov 12, 2023
    Incredible! this will be very useful to my project (i just being messing around with HUDs and menu graphics). Thanks a lot
     
    658
    Posts
    7
    Years
  • Update!
    A new update for the Mid Battle Dialogue/Scripted Battles script has been released with many bugfixes and new features. Be sure to check the updated instructions and changelog.
     
    14
    Posts
    3
    Years
    • Seen May 23, 2022
    when I install this script and the Max reid battle script, when capturing the pokemon after you win the raid, it says q the pokemon died and I don't capture it. Can you solve this problem?
     

    StCooler

    Mayst thou thy peace discover.
    9,301
    Posts
    4
    Years
    • Seen May 5, 2024
    when I install this script and the Max reid battle script, when capturing the pokemon after you win the raid, it says q the pokemon died and I don't capture it. Can you solve this problem?
    This is because both the Max Raid plugin and the Mid Battle Dialog plugin rewrite the function pbFaint() of the class PokeBattle_Battler.
    From what you are saying, I assume you have the Mid Battle Dialog plugin set AFTER the Max Raid plugin. If that's the reverse, DO NOT use my bugfix.

    In the script Mechanic_Compatibility of the Max Raid plugin, find the code of the function pbFaint():
    Code:
      def pbFaint(showMessage=true)
    and copy the whole code of that function.
    Then, in the script BattleScript_Main of the Mid Battle Dialog plugin, find the code of the function pbFaint():
    Code:
      def pbFaint(showMessage=true)
    Comment the whole function (I would strongly advise against deleting the code), and paste the code of the Max raid plugin.
    Then, AFTER the line @battle.pbEndPrimordialWeather and BEFORE the two "end"s:
    Code:
          @battle.pbEndPrimordialWeather
          # < -------- HERE -------- >
        end
      end
    paste the following lines:
    Code:
        if !opposes?
          TrainerDialogue.display("fainted",@battle,@battle.scene)
        else
          TrainerDialogue.display("faintedOpp",@battle,@battle.scene)
        end

    Basically, I am merging the two functions pbFaint().
     
    Back
    Top