Press Turn Battle

● ARCHIVED · READ-ONLY
Started by ATT_Turan 91 posts Page 3 of 5 View original ↗
  1. An issue I noticed was that when I tried using the plugin, what ends up happening is that two party members are the only ones able to act, and the first two in the lineup cannot (and if said party members are the only ones present, the game softlocks)
  2. ATT_Turan said:
    I can't duplicate the bug. I took my clean testing project with Yanfly's Core Engine, Battle Engine and my battle plugin.

    I gave an actor a skill which calls a common event that forces them to perform another action.

    View attachment 364677
    View attachment 364678

    He went first, used the skill, did the forced action, and the battle proceeded normally with two other actors taking their turns.

    If you can make a demo project which exhibits the bug that you want to link me to, I'll take a look, but at first blush it appears that it might be an error with something in your events or interaction with another plugin.
    Judging from my testing, it seems like it acts way funkier when the BattleCommonEvents plugin is loaded, but is still buggy without it.
    Without it, the game softlocks *only* the second time an Action is forced (so use the Test skill twice, even across multiple battles, and the game should softlock), and with it, the game softlocks the action *after* any forced action! So that at least explains some of why you can't reproduce the bug.


    I didn't install and configure it to actually test it, but it's a really simplistic plugin. It looks like if you put it beneath my PTB in your plugin manager, it should work just fine.
    I made a test project for this, and it seems like the issue with the BattleCommonEvents plugin is that ActionEnd seems to be triggered at the start of the next Action instead of the end of the Action. I made it play a Dog when the Turn Starts (which never seems to play), a Cow when the turn ends (plays at the end of the enemy turn) and a Buzzer when an action ends (plays at the start of any player action after the first). Notably, the turn after a Forced Action, the plugin plays the Buzzer repeatedly and creates a harsh noise, which seems like it's indicating the game is stuck in a state of constantly ending an action. This doesn't happen if the same skill forces two actions.

    Again, impossible to say without knowing what that plugin is (and I don't want to clutter up this thread with too much other stuff, as opposed to a separate support thread) but anything that adds a command to a window should have a field that determines whether or not that command is active or greyed out.
    The Escape Command plugin is working just fine, the only issue with it is that the Common Event for ActionEnd is triggered at the beginning of the second action rather than the end of the first. I just tried it in my main game, and sure enough. If I stun the enemy on the first action, I can't escape on the second action, but if I guard instead, then I'm able to escape on the third action. So all that needs fixing is making Press Turn Battle compatible with BattleCommonEvents.

    tl;dr: The plugin has a bug on the *second* forced action, and with the BattleCommonEvents plugin it has a bug on the action *after* any forced action

    Hope this helps, thank you for all the work you're doing!
    You would simply put for the active condition
    Code:
    !$gameTroop.aliveMembers.some(enemy => !enemy.isStateAffected(13))
    changing the 13 if you're using a different ID than the default Stun state. No need to constantly run events.
    PS: In case someone else comes to study this in the future, it should be
    Code:
    !$gameTroop.aliveMembers().some(enemy => !enemy.isStateAffected(13))
    The game softlocks on the conditional branch without the parenthesis!

    Here's the test project:
    TestProject

    EDIT: @KichiMitsurugi2 can you show what other plugins you're using? I'm not running into this issue, I'm making a game with only one Party Member and it's working fine aside from the issue reported in this very post.

  3. Sliver10 said:
    PS: In case someone else comes to study this in the future, it should be
    Code:
    !$gameTroop.aliveMembers().some(enemy => !enemy.isStateAffected(13))
    The game softlocks on the conditional branch without the parenthesis!
    You're correct that I missed the parentheses in my first post (I've edited them in), but again there should be no softlocking involved. You should get an error in the console from the incorrect code and life goes on. I wonder if you have something in your project that's causing these softlocks under certain conditions.

    I'll look at the test project you uploaded, but I think this is three different descriptions now of what circumstances cause the error :stickytongue:

    KichiMitsurugi2 said:
    An issue I noticed was that when I tried using the plugin, what ends up happening is that two party members are the only ones able to act, and the first two in the lineup cannot (and if said party members are the only ones present, the game softlocks)
    Without any further information or troubleshooting from you to see how it's interfacing with other plugins, I have nothing I can say to this. I've never seen any such bug, all party members in my test project take their turns normally.
  4. ATT_Turan said:
    You're correct that I missed the parentheses in my first post (I've edited them in), but again there should be no softlocking involved. You should get an error in the console from the incorrect code and life goes on. I wonder if you have something in your project that's causing these softlocks under certain conditions.

    I'll look at the test project you uploaded, but I think this is three different descriptions now of what circumstances cause the error :stickytongue:


    Without any further information or troubleshooting from you to see how it's interfacing with other plugins, I have nothing I can say to this. I've never seen any such bug, all party members in my test project take their turns normally.

    Yes, I was confused about the circumstances because I didn't realize one of them was a plugin incompatibility. The other one still happens otherwise!

    1. Bug: In a project with just the Yanfly Core and Battle Plugins and this Plugin below them, The second time you force an action, the game softlocks. The first time works just fine. This persists across battles, so if I force an action in one battle, win the battle, start another, and force an action, the game will softlock. If I try the PTB Plugin above YE, the enemy takes infinite turns so I'm assuming the intended location is below YE.
    2. Incompatibility: With the combo above but the addition of the BattleCommonEvent Plugin to the end, the game triggers ActionEnd Common Events at the start of the second action instead of the end of the first action. Additionally, this makes the softlock bug even worse, occurring on *any* action after the forced action instead of just a second forced action.
  5. Sliver10 said:
    Yes, I was confused about the circumstances because I didn't realize one of them was a plugin incompatibility. The other one still happens otherwise!
    That's alright - once you said it happened on the second forced action I was able to duplicate it and I've fixed the bug. A corrected version has been uploaded.

    Note that in order for it to be fixed with Yanfly's Battle Engine Core, I basically undid the force action queueing system. If that causes problems for anyone down the road, I can look deeper into the convoluted stuff Yanfly did there; but for the time being, forced actions work correctly in both vanilla and Yanfly's Battle Engine, and the action forced does not consume one of the party's turns.

    Sliver10 said:
    If I try the PTB Plugin above YE, the enemy takes infinite turns so I'm assuming the intended location is below YE.
    Yes, per Yanfly's instructions the Battle Engine Core should always be above all other battle-modifying plugins.

    Sliver10 said:
    2. Incompatibility: With the combo above but the addition of the BattleCommonEvent Plugin to the end, the game triggers ActionEnd Common Events at the start of the second action instead of the end of the first action.
    I'm not inclined to root around in this plugin too much, but you can try moving line 124 down below 127 so the revised function reads:
    Code:
        BattleManager.endAction = function() {
            if (actionEnd > 0){
                $gameTemp.reserveCommonEvent(actionEnd);
            }
            _BattleManagerEndAction.call(this);
        };

    Depending on what exactly you make the common events do, that may cause some wonkiness, but for behind the scenes stuff like you were doing, I think that would work. I personally don't think that's a great way to do what this plugin does, and I would add it to the list of events the action runs instead; but I didn't write it :wink:
  6. Sliver10 said:
    Judging from my testing, it seems like it acts way funkier when the BattleCommonEvents plugin is loaded, but is still buggy without it.
    Without it, the game softlocks *only* the second time an Action is forced (so use the Test skill twice, even across multiple battles, and the game should softlock), and with it, the game softlocks the action *after* any forced action! So that at least explains some of why you can't reproduce the bug.



    I made a test project for this, and it seems like the issue with the BattleCommonEvents plugin is that ActionEnd seems to be triggered at the start of the next Action instead of the end of the Action. I made it play a Dog when the Turn Starts (which never seems to play), a Cow when the turn ends (plays at the end of the enemy turn) and a Buzzer when an action ends (plays at the start of any player action after the first). Notably, the turn after a Forced Action, the plugin plays the Buzzer repeatedly and creates a harsh noise, which seems like it's indicating the game is stuck in a state of constantly ending an action. This doesn't happen if the same skill forces two actions.


    The Escape Command plugin is working just fine, the only issue with it is that the Common Event for ActionEnd is triggered at the beginning of the second action rather than the end of the first. I just tried it in my main game, and sure enough. If I stun the enemy on the first action, I can't escape on the second action, but if I guard instead, then I'm able to escape on the third action. So all that needs fixing is making Press Turn Battle compatible with BattleCommonEvents.

    tl;dr: The plugin has a bug on the *second* forced action, and with the BattleCommonEvents plugin it has a bug on the action *after* any forced action

    Hope this helps, thank you for all the work you're doing!

    PS: In case someone else comes to study this in the future, it should be
    Code:
    !$gameTroop.aliveMembers().some(enemy => !enemy.isStateAffected(13))
    The game softlocks on the conditional branch without the parenthesis!

    Here's the test project:
    TestProject

    EDIT: @KichiMitsurugi2 can you show what other plugins you're using? I'm not running into this issue, I'm making a game with only one Party Member and it's working fine aside from the issue reported in this very post.

    1776599924572.png
    Full plugin list here. It seems that it's slot 1 and 2 that are affected. Another issue I noticed is that if 2 party members die, the other two could not act, so the enemies had infinite turns. I don't think I ended up using BattleAI Core, btw. Also, the BattlePopup plugin is so I can try to find a way to make it clear when a weakness is struck

    Also, pet peeve, why does elemental immunity not make an attack cost 2 press turns? And why is it 2 press turns per miss instead of 2 press turns if a miss happens at all
  7. KichiMitsurugi2 said:
    Full plugin list here.
    You'll have to do some basic troubleshooting yourself (unless Sliver, who asked for the list, also wants to help you narrow it down :stickytongue: ). I have never seen anything like the issue you're reporting when using vanilla MV or Yanfly's Battle Engine Core, so you'll need to test with turning batches of plugins off and on until you can narrow down where the conflict is.

    Once you do, I'll see about making a compatibility patch.

    KichiMitsurugi2 said:
    Also, pet peeve, why does elemental immunity not make an attack cost 2 press turns?
    Because no one's mentioned they ought to. Instead of expressing it as a "pet peeve," you could request the feature.

    KichiMitsurugi2 said:
    And why is it 2 press turns per miss instead of 2 press turns if a miss happens at all
    I don't know that I understand your distinction - you're saying you want only the first miss in a round to trigger the extra consumption? It's doable, of course, but I don't see anything in the battle system description that says that's how it works, for me to include it as a standard feature.
  8. ATT_Turan said:
    You'll have to do some basic troubleshooting yourself (unless Sliver, who asked for the list, also wants to help you narrow it down :stickytongue: ). I have never seen anything like the issue you're reporting when using vanilla MV or Yanfly's Battle Engine Core, so you'll need to test with turning batches of plugins off and on until you can narrow down where the conflict is.

    Once you do, I'll see about making a compatibility patch.


    Because no one's mentioned they ought to. Instead of expressing it as a "pet peeve," you could request the feature.


    I don't know that I understand your distinction - you're saying you want only the first miss in a round to trigger the extra consumption? It's doable, of course, but I don't see anything in the battle system description that says that's how it works, for me to include it as a standard feature.
    Okay, so, basically, if an attack misses, it costs 2 press turns. With AoE, however, there is a problem. More than one miss means more press turns are lost. So if an AoE attack misses on 2 targets, instead of losing 2 press turns, 4 press turns are lost (2 press turns per miss)

    Sorry for coming off as inflammatory over the nulls thing. And sure, I'll try to first turn off all plugins except CoreEngine and BattleEngineCore (and SkillMasteryLevels) and see where it goes. It do be hard trying to emulate modern SMT combat this intricately
  9. KichiMitsurugi2 said:
    Okay, so, basically, if an attack misses, it costs 2 press turns. With AoE, however, there is a problem. More than one miss means more press turns are lost. So if an AoE attack misses on 2 targets, instead of losing 2 press turns, 4 press turns are lost (2 press turns per miss)

    Sorry for coming off as inflammatory over the nulls thing. And sure, I'll try to first turn off all plugins except CoreEngine and BattleEngineCore (and SkillMasteryLevels) and see where it goes. It do be hard trying to emulate modern SMT combat this intricately
    from your list, I also see TWICE YEP_BattleAICore.
    Didn't you got an error from that like a stack error or doing it twice?

    Double check if your YEP plugins are in the correct order as well.
  10. ShadowDragon said:
    from your list, I also see TWICE YEP_BattleAICore.
    Didn't you got an error from that like a stack error or doing it twice?

    Double check if your YEP plugins are in the correct order as well.
    I already removed one of the BattleAICore, and no, this did not work. I also do not know exactly what the order of plugins should be other than CoreEngine and BattleEngineCore at the top
  11. Use Aloe_X_pluginChecker in my signature or check the website.
    it tells if your list is correct or what you have wrong.

    but other than that, I don't know the cause.

    otherwise, see if you can replicate it in a vanilla or turn them on 1 by 1
    to see which interfer with your usage.

    this way, its easier to fix the issue.
  12. ShadowDragon said:
    Use Aloe_X_pluginChecker in my signature or check the website.
    it tells if your list is correct or what you have wrong.

    but other than that, I don't know the cause.

    otherwise, see if you can replicate it in a vanilla or turn them on 1 by 1
    to see which interfer with your usage.

    this way, its easier to fix the issue.
    Right, I will tell you how it goes when I get on my PC
  13. KichiMitsurugi2 said:
    Right, I will tell you how it goes when I get on my PC
    So, good news, I think I found the culprit

    1776685502818.png
    Current plugin order. Turned off PartySystem, since that is what seems to cause the entire softlock

    EDIT: However, if the enemy turn ends with a party member death, what seems to happen is that player turn just ends immediately, so the enemy gets another full set of turns (When testing Mastema, he killed one party member, and since it was with the last press turn, Mastema got to act again (I gave him 3 press turns)

    EDIT 2: Another test, turns out, no, it's when the only party member remaining is the one in the first slot, and it's infinite turns (and attack skills apply their damage twice for some reason when not supposed to in this infinite turn problem), so I wonder why this happens and if it can be fixed

    Also, if the last action to happen before turn switch was prevented due to an ailment, then the action that came before it is repeated. This includes attacks, supports skills, really anything, and should probably be fixed
  14. KichiMitsurugi2 said:
    With AoE, however, there is a problem. More than one miss means more press turns are lost. So if an AoE attack misses on 2 targets, instead of losing 2 press turns, 4 press turns are lost (2 press turns per miss)
    Ah, I understand what you're saying now.

    I've fixed it so attacks that repeat or hit multiple targets will only incur one penalty per action. I also added the functionality that hitting for 0 has the same penalties as a miss (presuming that plugin parameter is enabled).

    I also duplicated the error where the enemy killing an actor caused it to skip the next party turn, and corrected that. I've updated the first post with those changes.

    Aside from that...can you duplicate the other problems you're talking about in a new project with no other plugins?

    I was trying to test the thing you were talking about the actor in the first slot getting infinite turns and I can't duplicate anything like that error.

    I also tested him attacking, giving him stun for a few turns, then removing it, and I didn't see any actions duplicate or extra things happen at all.
  15. ATT_Turan said:
    Ah, I understand what you're saying now.

    I've fixed it so attacks that repeat or hit multiple targets will only incur one penalty per action. I also added the functionality that hitting for 0 has the same penalties as a miss (presuming that plugin parameter is enabled).

    I also duplicated the error where the enemy killing an actor caused it to skip the next party turn, and corrected that. I've updated the first post with those changes.

    Aside from that...can you duplicate the other problems you're talking about in a new project with no other plugins?

    I was trying to test the thing you were talking about the actor in the first slot getting infinite turns and I can't duplicate anything like that error.

    I also tested him attacking, giving him stun for a few turns, then removing it, and I didn't see any actions duplicate or extra things happen at all.
    Good news, the bug fixes did work. I also noticed that the action dupe happens when after an action, whoever is next is unable to act due to an ailment (so if the first party member uses Fatal Sword, and then the next party member cannot act, then Fatal Sword will occur again after the failed action)

    EDIT: When I put <press> on skill 2 (which is the Pass skill for me here), it did not eat up half a press turn, but a full turn, implying that <press> doesn't actually work
  16. This looks like a very interesting plug-in and system. I'm not familiar with the Shin Megami Tensei series though, so can't tell exactly what kinds of benefits and dynamics it adds on top of the vanilla battle system. I get the idea that it makes the battles more strategic, also seems a bit similar to the Shadowrun battle system in the multiple turns per move concept, but are there any other advantages for using this system or particular kinds of games that it works best for?
  17. AnotherDimensionGames said:
    This looks like a very interesting plug-in and system. I'm not familiar with the Shin Megami Tensei series though, so can't tell exactly what kinds of benefits and dynamics it adds on top of the vanilla battle system. I get the idea that it makes the battles more strategic, also seems a bit similar to the Shadowrun battle system in the multiple turns per move concept, but are there any other advantages for using this system or particular kinds of games that it works best for?
    It works best if you actively aim to emulate SMT combat, and your idea is to have most enemies and allies have some sort of weakness. It also can help limit bosses with multiple actions, because you can always set up buffs and debuffs before they start attacking and you aren't at the mercy of predetermined turn order in such a scenario
  18. KichiMitsurugi2 said:
    It works best if you actively aim to emulate SMT combat, and your idea is to have most enemies and allies have some sort of weakness. It also can help limit bosses with multiple actions, because you can always set up buffs and debuffs before they start attacking and you aren't at the mercy of predetermined turn order in such a scenario
    Oh, that sounds like it could be a good fit for a couple of projects I'm working on. Will see if I can play one of the Tensei games to get an idea how it works and check out the demo here. Thanks!
  19. AnotherDimensionGames said:
    Will see if I can play one of the Tensei games to get an idea how it works and check out the demo here. Thanks!
    heads up, not every SMT game uses it. youd be looking at Nocturne, 4, 4A, 5, either Digital Devil Saga, or Metaphor (if you want to count it. its not SMT, but is from Atlus and uses the same press turn system)
  20. I do have a feature request that would be nice! Putting notetags on enemies to give them a non-default amount of press-turns would be nice, if possible. I currently have a decent solution worked up by having them default to using a skill that gives them more turns and giving it a state that puts it on cooldown until the next turn so they don't use it more than once, but it would cut down on the amount of repetitive actions if there was a built in way to make a boss take more Press Turns than default.