I can't figure out how Attack Times+ works

● ARCHIVED · READ-ONLY
Started by Darkbeetlebot 8 posts View original ↗
  1. So I've been trying to get the Attack Times + option in the weapon effects to work properly with my current attack system, but it seems to only work with one of the normal attack skills, and it's NOT the default one.
    Screenshot_6.png
    To be clear, I'm using Yanfly Battle Command List to replace the normal attack option with a skill menu that gives you multiple types of normal attacks. I only noticed this happening when I used one of the weapons that has the multiple attacks: the Albino Fan.
    It also gives the player an attack skill called "Hex Attack" which is basically just a normal skill that originally replaced the normal attack while the weapon was equipped.
    Screenshot_5.png Screenshot_8.png Screenshot_9.png Screenshot_10.png
    For some reason, it's the only skill that actually works with multiple hit attacks. I tried using the ID 1 normal attack, but for some reason it didn't appear in the menu when I converted the command into a list. May need to manually teach the player the attack, then I'll move it. However, the problem extends further than that. I need a way to make ALL of the normal attack types hit multiple times if the weapon properties specify that. That includes the light and heavy attack, and the physical hex attack. Plus any future ones that I add. This is essential to a particular weapon class (daggers) which uses multi-attacks as its unique property.
    It's baffling, because all I did was literally copy over the original normal attack to a different ID. Even kept the "add state: Normal Attack 100%" effect and applied it to the light and heavy attacks. It still didn't work, and I still can't figure out why. Same thing for the phys hex attack.
    Screenshot_7.png Screenshot_12.png
    This is how I've the important parts of the actor notetags and properties set up:
    Screenshot_11.png
    Skill type 9 is the normal attacks. That works fine. Skill 007 is Rest. This is the menu that pops up when I go into a test battle with the Albino Fan equipped:
    Screenshot_13.png

    Edit: I thought I fixed it, but somehow the code didn't work properly. Thanks to Rinobi for the actual working code.
    vy8Ts95
  2. None of your images are showing up. Can you repost them?
  3. bgillisp said:
    None of your images are showing up. Can you repost them?

    Should be fixed now. I can't seem to get rid of that last tag, but the rest is there.
  4. Uh... based on your images, the only attacks that should work with Atk Times+ are skill 5 when equipped with the Albino Fan, and skill 1 when not equipped with that particular weapon. If you want the Atk Times+ feature to work with any other skills, you need to have a weapon equip that designates those skills as a normal attack via notetag.

    If that doesn't suite your needs, modifying the behavior of Atk Times+ so that it's less picky is another potential option.
  5. Rinobi said:
    Uh... based on your images, the only attacks that should work with Atk Times+ are skill 5 when equipped with the Albino Fan, and skill 1 when not equipped with that particular weapon. If you want the Atk Times+ feature to work with any other skills, you need to have a weapon equip that designates those skills as a normal attack via notetag.

    If that doesn't suite your needs, modifying the behavior of Atk Times+ so that it's less picky is another potential option.

    The problem with the former suggestion is that I need multiple skills. The script I was using as an attack replacer can only register one skill as the attack skill. In that case, I'll be forced to modify the core behavior. Question is now, how do I do that?
  6. If you're unable to write the script yourself, you'd generally make a script request in the appropriate forum.
    Luckily, this happens to be quite easy for me to code, so try this out and let me know if it works for you.

    Code:
    module RINOBI module MultiNormAtk
    #==============================================================================
    # # Multiple Normal Attacks
    # -----------------------------------------------------------------------------
    # 1.0 [07/08/2017] Completed
    #-
    # Allows more than one normal attack to exist.
    #==============================================================================
    # # SETTINGS
    # -----------------------------------------------------------------------------
    # The skill IDs within the array below will be treated as normal attacks.
    
      Normal_Attacks = [1, 3, 4, 5, 823, 824, 825]
     
    end end
    #==============================================================================
    # ** IMPORT SCRIPT
    #------------------------------------------------------------------------------
    $imported = {} if $imported.nil? ; $imported[:RIN_MultNormAtk] = true
    #==============================================================================
    # ** Game_Action
    #------------------------------------------------------------------------------
    #  This class handles battle actions. This class is used within the
    # Game_Battler class.
    #==============================================================================
    class Game_Action
      #--------------------------------------------------------------------------
      # * Overwrite Method: Normal Attack Determination
      #--------------------------------------------------------------------------
      def attack?
        skill_array = RINOBI::MultiNormAtk::Normal_Attacks
        skill_array.push(subject.attack_skill_id)
        skill_array.any? {|skill_id| item == $data_skills[skill_id]}
      end
    end
  7. Rinobi said:
    If you're unable to write the script yourself, you'd generally make a script request in the appropriate forum.
    Luckily, this happens to be quite easy for me to code, so try this out and let me know if it works for you.

    [snip]

    That works perfectly, better than what I came up with. Thanks for that.
    This thread can be closed now.
  8. @Darkbeetlebot When you want a thread closed, please Report your opening post and ask for it to be closed. Mods might not see a post, but will see a Report.

    [closed]IgnoreMe[/closed]