Battle starting test command?

Discussion in 'RPG Maker MV' started by 22pepperjack, Aug 12, 2018.

Thread Status:
Not open for further replies.
  1. 22pepperjack

    22pepperjack Veteran Veteran

    Messages:
    236
    Likes Received:
    72
    Location:
    Northwest Arkansas
    First Language:
    English
    Hopefully this is the right forum, and hopefully a fairly quick problem to fix.

    I'm trying to put together a common event that runs the moment a battle is initiated, whether that be randomly or by force. However since a conditional branch for "is battle processing?" doesn't exist, I'm not sure how I could test for this. Does anyone know of a script-call that could be used in the conditional branch of a common event to test for and run the moment a battle is initiated? Also, if one exists for the moment a battle is done processing that would be nice too, as I don't want the common event to run through the entire battle if set to parallel. only once when it starts. (If a script-call exists for leaving battle then I could use a switch to turn off the parallel battle test until the battle is over.)

    Thanks in advance! :)
     
    #1
  2. Andar

    Andar Veteran Veteran

    Messages:
    28,004
    Likes Received:
    6,327
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    All parallels and autoruns are automatically stopped on all screens, and that includes the battlescreen.
    Only troop events will run during battle, or a non-triggered common event called by a troop event.

    This can be used to get you the second part - simply have the common event on parallel but triggered by a switch that is turned on by a troop event, and the common event will run directly after the battle but not a second sooner.

    If this is not enough for you, then please describe what you want to do instead of how you want to do it, because as said parallels are i possible during battle.
     
    #2
  3. 22pepperjack

    22pepperjack Veteran Veteran

    Messages:
    236
    Likes Received:
    72
    Location:
    Northwest Arkansas
    First Language:
    English
    it might be possible to do it that way, albeit a bit tedious. im using Yanfly's Row formation script. and via this script im attempting to have a front line and a back line, however instead of using the Row formation menu command i was going to simplify it to work in tandem with the formation menu that is already in place. my plan was to force party members in slot 1&2 into the front line, and party memebers in slot 3&4 into the backline and lock them there, however, i cant allow use of the formation menu in battle since it would allow party member swapping and would break combat. so i intend to allow the row formation menu to be accessible during combat but the party formation menu elsewhere.

    with this in mind, i need to check which characters are in party positions 1&2 and positions 3&4 either everytime the menu is closed, or at the start of every battle to applied any adjustments made and force party members to their respective rows. which is where my original question arose from. the second issue ill have is in the row formation menu when in battle, it allows you to put all party members in the back line or front line, etc. i want it limited to at least one person in the front line, and no more than 2 people in the back line. but i feel like ill probably need a custom script for that endeavor.

    putting that second issue aside, any ideas on when/where/how i could check for what position a party member is in and apply a row tag to them (done through state notetags i beleive) to tell them where to stand once the battles start? cuase the only solution i can think of would be to have EVERY troop start on turn 1 with a check position script being run to apply that. but that would be really tedious to do for every single troop...

    i apologize if none of that made sense, ive never been good at having things follow a logical chain of events.
     
    #3
  4. Andar

    Andar Veteran Veteran

    Messages:
    28,004
    Likes Received:
    6,327
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    As said, that needs to be done with troop events, and since troop events only run in battle there is no need to check if it is a battle or not - it is automatically in battle.
    You can either use a plugin to have that troop event in a base troop to prevent the need to copy it into every troop, or you can have a troop event in every troop call a common event that has no trigger.

    And the check for party position is inside the control variable command, under game data.
     
    #4
  5. 22pepperjack

    22pepperjack Veteran Veteran

    Messages:
    236
    Likes Received:
    72
    Location:
    Northwest Arkansas
    First Language:
    English
    oh a script exists for that? that actually sounds like it would fix my issue, got any links to an appropriate script? (gonna google search anyways, but just in case i have trouble finding one) also, thanks a ton for your help Andar!

    Nevermind, just found the yanfly script that does this, thanks a ton!!!
     
    Last edited: Aug 13, 2018
    #5
  6. Kes

    Kes Global Moderators Global Mod

    Messages:
    20,169
    Likes Received:
    10,324
    First Language:
    English
    Primarily Uses:
    RMVXA

    This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

     
    #6
Thread Status:
Not open for further replies.

Share This Page