Weapon Attack Replace

Last Updated: 2011.12.17
Download Link
Github Link

By default, RPG Maker VX Ace sets all normal attacks to call upon Skill #1 to do all of the basic attack functions. While this is a great idea, it also meant that all weapons would share the same basic attack damage formula and effects. With this script, you can set different weapon types to use any skill for its basic attack.

This script is also originally made by Shanghai, but ported over to RPG Maker VX Ace. The difference here is, this script does not randomize any attack skills if multiple skill ID’s were to exist in its pool. That will come later in another script.

Place this notetag in the Weapons notebox:

<attack skill: x>

This sets the worn weapon’s attack skill to x. Note that if an actor is dual wielding, the attack skill of the first weapon will take priority over the second weapon.

If placed in an actor or class’s notebox, this sets the actor’s default attack (if no weapon is equipped) to be x. The actor’s custom attack skill will take priority over a class’s custom attack skill, which will take priority over the default attack skill (skill #1).

And that’s all, folks!

56 comments on “Weapon Attack Replace

  1. Pingback: Ps Vita,Persona 4 Golden >.<" « Klaine's Zone

  2. This isn’t exactly to do with this script, but is it possible to set the basic attack as a different skill for individuals or classes? I haven’t been able to figure it out yet (maybe when the full translation is done it’ll be easier to figure out).

  3. Pingback: YSA Battle Add-on – Team Combo « Yami World

  4. Pingback: RBS 1.0 is finally OUT! « Ramiro + RMVXA = ♥

  5. I found out, it does. However, I have a new question if I may?
    Is there a way I could have weapons that use a skill (like normal) but the skill is determined by a variable. So, having a Magi Staff equipped and using a ‘Sun Drop’ would change variable 1: 23, so that the Magi Staff now uses skill 23 to attack.
    Is that something I can ask here, or should I do a script request elsewhere?

  6. Is there any way to disable the mp cost of the skill when you use it this way?

    Otherwise this script kind of loses its entire point for me ^^;

  7. Dual, Double and Triple Attacks are not affected by the changed damage formula.
    I think the script would gain much usefulness, if it could replace multiple skills, when equipping a weapon.
    If the character would for example equip a magic staff, the Skills 1,2 and 4 would be replaced with 6,7 and 9.

    That would be an awesome addition.

  8. Cool! I like this script! It would be awesome though if you also could make it that if you add more than one “” then it would activate those skills on a row… And maybe adding it to a skill notes makes it that other skills are played after that skill… Hehe, just a silly idea…

  9. Pingback: Script de combat de Jet+Yanfly+Yami fix « Blog of Chaos17

  10. founds the bug/glitch.
    I’m using all attack weapon or random attack weapon.
    When I got confuse states, i only attack one enemy.

  11. I seem to be running into a wall using this script. I slapped on for one weapon, for a huntress character using a slicer, and it worked fine. Then, I attempted to do the same for a harp weapon for a bard character, and when I battle test it, the attack command is greyed out. Ideas?

  12. do any item equipped to the bard have trait that seal that skill you assign in harp weapon?

    skill cost not met also possibility

  13. Pingback: SBS de Jet – utilisation de sprite « Ressources Rpg maker

  14. Hi Yanfly

    I want to ask you if Is it possible to make a skill turn into another depending on the weapon that the actor’s equiped?

    for example
    skill: draw out skill id 150

    actor id 1 is equiped with weapon id 37
    then skill id 53 will cast skill id 32

    actor 1 is equiped with weapon id 46
    then skill id 53(draw out) cast skill id 34

    thanks ^^

  15. Hello,
    When I try to insert the damage formula: a.atk * a.luk – b.def
    I get the error:
    “Script ‘Game_Battler’ line 352: SyntaxError occurred.
    unexpected tIDENTIFIER, expecting $end
    a.atk * a.luk – b. def”

    When I remove this script, that formula works correctly, don’t know why this script is preventing it from processing.

    Thoughts? Thank you in advance.

  16. This script isn’t working for me at all.. I’m testing it in the troops section of the Data
    and the basic attack still only hits one enemy.. even after I put in
    which is a heavy hitting AoE.

  17. They way I typed in the script is the same way it is shown just instead of x I put 127 ..
    I put it in the notes of the weapon and it still didn’t work :/

  18. so

    in the notetag of the weapon…check
    weapon is equipped….check

    wait…that troops test? Does the scripts even work in there, try making an event set for random combat and see if it works there, sometimes I cannot get certain scripts to run in the ‘test’

    • Bump, for I’m experiencing the exact same problem.

      Tried to make a whip/chain weapon that attacks all enemies by default (like in the Dragon Quest/Dragon Warrior games if you remember those), but it still only attacks 1 enemy.

      Anyone have any thoughts?
      (***I followed the directions exactly as stated, and triple-checked everything***)

    • Actually I figured it out! Works perfectly!

      *****AdampoTheBean: You have to download the Yanfly Engine Ace. Here’s the link:

      Ace Battle Engine

      Put this script in the same area as the weapon replace script, but right above it. This should make it work.

    • I want a shield or weapon that can replace the guard skill, I wanted that the guard skill when using certain magic wand to protect all allies too.

  19. Hi Yanfly!
    Congratulations for the work.

    I would like two simple modifications.
    1- I would like the name to appear to be the class type of the weapon (“Sword”, self contained sword of which are using).
    2- I like it when wore two weapons, both skills were called, one after another.

    How could I do this?
    Thanks in advance.

    • ^ 2- When two weapons are used, can this not instead call both skills one after the other? I am looking for the same exact thing.

  20. Hello, I want to know if this makes the Actor like use an animation where he swings his sword, if not where can I get such thing and what exactly does this does? Does I makes the basic attack animation another besides just stepping right to the front and hits enemy then steps back?

    • This replaces the skill used for basic attacks, to another one. By default, skill one is the basic attack. Now it sounds to me you are using a side view battle system, in which case there may be something you need to put into the notebox. Which side view you using?

  21. Hello, I’ve been trying to use this script to replace the normal attack animation with a skills animation.
    I placed the script in the correct area, under materials.
    I’ve put in the note box of the actor and replaced x with the skill number, but i can’t get it to work. It keeps using the normal attack animation.

    any help?

    I’m making a power rangers rpg and i want the unarmed attack of each ranger to be the correct ranger attacking. I’m not using a side battle view, i’m trying to doit like Phantasy star and animate them running up and striking the enemy.

  22. I have some weapons where skill#1 wouldn’t make sense, so I would love to try this script.

    That said, I previously ran into an error with a similar script. Said error crashed my game, and seems to have been caused by the game trying to read an enemy’s weapon slot (which of course doesn’t exist) while said enemy is under a state with restrictions besides “none” and “cannot act”.

    Call it paranoia, but I would like to be absolutely sure the same won’t happen with this script before I include it in my game.

  23. Great script! I’m using this for firearms in my game which each use different types of ammo (Thanks to the Skill Cost Manager). However when I equip a dual wielding character two guns, he just uses the first skill and the second weapon is never fired.

    Is there anyway to fix that?
    Thanks.

  24. Is there a way for me to apply this to a state? so for example, if i have a certain buff on me, my attack skill will be different from normal, and when that buff is gone, my attack skill will be back to 1?

  25. Hi. I’m using this script to make my weapon give the user 1MP per hit. When I attack, it says on screen +1MP but my char gets no MP from it. Any idea why? Also, in the Terms section of the database I’ve set MP to MND, yet it still displays MP on screen instead of MND. Any help would be appreciated!

  26. I seem to keep bumping into an issue when starting up to test my game after adding the script.

    Get ‘undefined method two swords_style for class game_actor’ on line 533.

    I have messed with the class_id and alias but still no luck. Any help would be appreciated on getting this set right.

  27. Hey! I’m wondering if there’s a way, when choosing the skill for a weapon, to have it choose a random skill within a range? I have a character who wields a weapon that is essentially the Caster from Outlaw Star (A gun that shoots shells filled with magic spells).

Leave a comment