• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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
    8
    Years



    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:
    This looks really good and it's probably gonna become a cornerstone script in PE games, it's like eventing inside battles.
    Good job!
     
    This is a very stupid question but... where do you set up the commands? in the script? in the event via call script?.
     
    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.
     
    Thanks! i didn't see the event in the map! Now the things are clear to me! 😁
     
    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.
     
    Im having an error using the turnStart0 command
    [PokeCommunity.com] Mid Battle Dialogue/Scripted Battles
    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:
    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:
    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.
     
    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!
     
    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.
     
    Incredible! this will be very useful to my project (i just being messing around with HUDs and menu graphics). Thanks a lot
     
    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.
     
    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?
     
    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