Bide type skill activating multiple times/too early?

Discussion in 'Javascript/Plugin Support' started by Captain_Joshua, Oct 12, 2019.

  1. Captain_Joshua

    Captain_Joshua Veteran Veteran

    Messages:
    41
    Likes Received:
    3
    First Language:
    English
    Primarily Uses:
    RMMV
    I am trying to create a skill resembling the pokemon Bide skill, in which the user takes damage for 3 turns before doing the damage they took times three to their target.
    The skill applies a special state to the user in which they cannot move/attack/do anything. After three turns they´re supposed to automatically activate the second hidden "bide 2" skill that then causes the damage to the enemies. This is the code I have in the states notetag

    <Custom Apply Effect>
    // Upon applying Bide, set the Bide damage to 0.
    user._bide = 0;
    </Custom Apply Effect>

    <Custom Respond Effect>
    // Check if the target took any HP damage.
    if (target.result().hpDamage > 0) {
    // If the target did, raise the Bide damage by the HP damage taken.
    target._bide += target.result().hpDamage;
    }
    </Custom Respond Effect>

    <Custom Remove Effect>
    if ($gameParty.inBattle()) {
    // ID of skill to use
    var skill = 71;
    // Queue skill for use
    BattleManager.queueForceAction(user, skill, -2);
    }
    </Custom Remove Effect>


    The state is supposed to last for 3 turns in which the user cannot act, which works fine for the first 2 turns, however in the third one the user will for some reason use "Bide 2" despite still having the state applied to them, so they should be incapable of actually doing anything. In addition the animation for "Bide 2" does not play properly.

    This is the "Bide 1" notetag
    <setup action>
    display action
    </setup action>
    <target action>
    motion chant: user
    animation 84: user
    wait for animation
    add state 35: user
    </target action>

    This is the "Bide 2" notetag
    <setup action>

    display action

    immortal: targets, true

    </setup action>
    <target action>
    </target action>
    <whole action>
    motion chant: user
    wait: 10
    animation 80: user
    wait for animation
    animation 81: user
    wait for animation
    wait: 10
    move user: point, 250, 450
    float user: 250, 30
    wait for float
    motion swing: user
    float user: 0, 20
    animation 82: target
    animation 83: user
    action effect
    wait for animation
    wait for movement
    wait for float
    wait for animation
    </whole action>
    however the Bide 2 that plays a turn early does not move the actor in any way from their normal position, simply playing the animations.

    It should be noted that the "Bide 2" skill stil activates as intended once the state runs out. Is there any way to stop it from weirdly activating a turn early?

    If this is the wrong subforum I apologize and will move it to the right subforum if you tell me which one that is.
     
    #1
  2. Oddball

    Oddball Veteran Veteran

    Messages:
    1,545
    Likes Received:
    390
    First Language:
    English
    Primarily Uses:
    N/A
    The turn the state is applied, the removal thing ticks down by one (It counts the turn the state is applied in otherwords). Try increasing the removal thing by 1. This will work

    Edit: If you have an impared movment option on the state, that could be what's causing impaired movment. I don't know how to fix that
     
    #2
  3. caethyril

    caethyril ^_^ Veteran

    Messages:
    1,178
    Likes Received:
    723
    Location:
    UK
    First Language:
    English
    Primarily Uses:
    RMMV
    Pretty sure force action bypasses the Cannot Move restriction, no problem there. Your state notetags look OK and seem to work correctly for me. I wonder if you have your state set to remove on Action End rather than Turn End (though in that case it should still only play once). Some ideas:
    • Does it work correctly if you remove the action sequence tags from your Bide skills?
    • Could you screenshot the database pages for your two Bide skills and the associated state?
    • Might it be another state or something causing a different force action that you are mistaking for Bide 2? :kaoswt:
     
    #3
    Captain_Joshua likes this.
  4. Captain_Joshua

    Captain_Joshua Veteran Veteran

    Messages:
    41
    Likes Received:
    3
    First Language:
    English
    Primarily Uses:
    RMMV
    Going through this one by one,

    • Does it work correctly if you remove the action sequence tags from your Bide skills?
    Unfortunately that did not cause it to work correctly. This simply caused the actor to simply do the standart skill use motion (the motion where they have both hands stretched out), followed by the enemy taking damage.

    • Could you screenshot the database pages for your two Bide skills and the associated state?
    See attachment. "Patience" was "Bide 1" before being renamed, which is ment to simply activate the state while Revenge is "Bide 2". The not fully visible notetag for Revenge is noted in the OP as Bide 2s notetag.
    • Might it be another state or something causing a different force action that you are mistaking for Bide 2?
    Having kept this in mind, I chose to rename both skills earlier to something that I´ve named no other skill. Unfortunately it does not seem to be the case of me simply mistaking them.

    Please tell me if there is any other information you require.
     

    Attached Files:

    #4
    caethyril likes this.
  5. caethyril

    caethyril ^_^ Veteran

    Messages:
    1,178
    Likes Received:
    723
    Location:
    UK
    First Language:
    English
    Primarily Uses:
    RMMV
    Yea, I didn't expect the action sequence to affect things... :kaoslp:

    Strange! I'm guessing it's a plugin issue, since your screenshots all look OK. :kaoswt:

    A couple more ideas:
    1. Compatibility check: does it work correctly if you temporarily turn off all plugins except Buffs & States Core, Battle Engine Core, and the Action Sequence Packs? (You can quickly turn off all plugins by shift-clicking or Ctrl+A to select all plugins in the Plugin Manager, then right-click > Turn OFF. This will retain the plugins' settings and you can turn them on again afterwards in a similar way.)
      Also, remember to save your project before testing! :kaohi:

    2. Load order check: are your Yanfly plugins up-to-date and in the recommended order? http://www.yanfly.moe/wiki/Category:Yanfly_Engine_Plugins
     
    #5
    Captain_Joshua likes this.
  6. Captain_Joshua

    Captain_Joshua Veteran Veteran

    Messages:
    41
    Likes Received:
    3
    First Language:
    English
    Primarily Uses:
    RMMV
    I did as you recommended, turning of all plugins except for the noted ones.


    While the result...looked a little awkward, it did in fact fix my issue with the skill. The actor waited for 3 turns as intended and then used the move.
    I then proceeded to turn all plugins back on except for one: Olivia_BattlesysOTB. It still proceeded to work. However with the battle system on the game proceeded to do the exact same "actor does nothing as intended for 1 turn and then uses the skill twice while the state is still active despite them not being able to move before using the skill the right way once the state runs out".

    How do I go about the skilla ctually doing what it´s supposed to without having to completly redo the battle system?
     

    Attached Files:

    #6
    caethyril likes this.
  7. caethyril

    caethyril ^_^ Veteran

    Messages:
    1,178
    Likes Received:
    723
    Location:
    UK
    First Language:
    English
    Primarily Uses:
    RMMV
    Oh so it's Olivia's Order Turn Battle plugin that's responsible? Sorry, I don't have that plugin so I don't know precisely what might be going on there (safe to assume it's related to turn counts, though). Not sure whether Olivia offers support for this kind of stuff, but I guess it could be worth asking? Otherwise I think you'll have to wait for someone who's familiar with that plugin to respond. :kaoswt:
     
    #7
  8. Captain_Joshua

    Captain_Joshua Veteran Veteran

    Messages:
    41
    Likes Received:
    3
    First Language:
    English
    Primarily Uses:
    RMMV
    That is most inconvenient...do you happen to know how I could contact olivia about this matter? I was thinking about using her email that is given on her plugin itch.io page, however that link seems to be broken. Alternatively, since I have run into trouble a few times already with this system... is there an alternative system that is somewhat similar to it I could switch to without having to re-do a ton of work? the yanfly Charge Turn battle system seems somewhat similar.



    Edit: I have in fact tried the CTB yanfly system to see if it goes similarly. The user still uses the Bide 1 skill, then proceeds to charge up with the state displaying 3 turns. Then they use the skill at the end of the first turn (?) for absolutely no reason, even despite them being at the very end of the action order, they just suddenly decide it´s their turn to use the skill they aren´t ment to use yet.
     
    Last edited: Oct 16, 2019 at 9:05 PM
    #8
  9. caethyril

    caethyril ^_^ Veteran

    Messages:
    1,178
    Likes Received:
    723
    Location:
    UK
    First Language:
    English
    Primarily Uses:
    RMMV
    The email link seems OK to me, though I haven't attempted to send an email. I'll message you the plaintext email address to avoid spambots. :p

    That said, I think I may have found the problem! Yanfly's Battle Engine Core has a set of parameters under "Tick-Settings". Here you can set "Timed States" and "Timed Buffs" to true (required for a tick-based system). There's also a "Turn Time" parameter, which should probably be set equal to that of your battle system: Yanfly's CTB has a "Full Turn" parameter, I assume Olivia's OTB has something similar~

    I tested with BEC's "Turn Time" = 200 and CTB's "Full Turn" = 200, with BEC's "Timed States" = true, and it definitely seemed better. :kaopride:
     
    #9
    Captain_Joshua likes this.
  10. Captain_Joshua

    Captain_Joshua Veteran Veteran

    Messages:
    41
    Likes Received:
    3
    First Language:
    English
    Primarily Uses:
    RMMV
    Thank you for the email adress, however your fix unfortunately does not seem to apply here. After checking the plugin (see attachment) it seems that there is no "tick" anything in the olivia plugin.

    After doing what you recommended with the ticks (turning on the tick things in the battle engine core plugin and setting them to 200) I was able to have the bide skill not activate 2 turns in for some reason and then get repeated like 3 times. It simply activated after it actually ran out. However there were 2 rather odd things

    1. It takes about a good 3~5 seconds for the CTB plugin to choose the next actor. Is this normal for the plugin or is something messed up? This happens no matter if I activate the bide skill or not
    2. The user is stuck at the very back for all 3 turns, which is much, much more thanks to the CTB plugin. Every other actor (and enemy) seems to get 2+ turns per turn compared to the bide actor, making the 3 turns they are supposed to wait feel more like 6+. Is there some way to avoid this /is there a guide on how to properly balance the CTB system?
     

    Attached Files:

    #10

Share This Page