public

Rpg Maker Developers Group

Simple enough for a child, powerful enough for a developer

2 Followers

Yanfly Skill Core | Adding Variable on Skill Use Depending on Weapon

BMM Archive · July 15, 2026

Preserved forum archive. This topic stores the original first post and locally mirrored RPG Maker Web attachments when available. It is posted by the BMMPlay archive account, not by the original creator.

Original Source

  • Original title: Yanfly Skill Core | Adding Variable on Skill Use Depending on Weapon
  • Original author: fallenlorelei
  • Original date: November 18, 2016
  • Source thread: https://forums.rpgmakerweb.com/threads/yanfly-skill-core-adding-variable-on-skill-use-depending-on-weapon.71176/
  • Source forum path: Game Development Engines > RPG Maker Javascript Plugins > Javascript/Plugin Support

Summary

So I hope you guys can help figure this out with me. My plan is to add 1 to a variable every time a skill ("Attack") is used, depending on their weapon. If they have "this weapon," then "add 1" to "variable ID 1." If they have "this other weapon," then "add 1" to "variable ID 2." And so on. There are 4 weapons. I tried using a simple common event that was called on every time they used "Attack." This didn't do anything. { "lightbox_close": "Close",

Archived First Post

So I hope you guys can help figure this out with me. My plan is to add 1 to a variable every time a skill ("Attack") is used, depending on their weapon. If they have "this weapon," then "add 1" to "variable ID 1." If they have "this other weapon," then "add 1" to "variable ID 2." And so on. There are 4 weapons.


I tried using a simple common event that was called on every time they used "Attack." This didn't do anything.


Protected download


So then I thought I'd use Yanfly's Lunatic mode. This is the script I came up with for the Attack notetag:


<Custom Execution>
if ($gameActors.actor(1).equips().contains($dataWeapons[1])
{
$gameVariables.setValue(1, $gameVariables.value(1) + 1);
}
else {
}
</Custom Execution>


This is giving me an error. SyntaxError: Unexpected token { {stack: (...), message: "Unexpected token {"}


Any ideas? 

Downloads / Referenced Files

Log in to download

Log in, then follow the RPG Maker Developers Group to see these download links.

Log in to download

Referenced Images / Attachments

rpgmaker-variables1.PNG
rpgmaker-variables1.PNG
Creator Claims / Removal

If you are the original creator and want this listing reassigned, edited, or removed, join BMMPlay and contact the moderators with proof that matches the original RPG Maker Web profile, linked GitHub, itch.io page, or another public creator identity.

#039#rpg-maker-archive#js-support

Replies (0)

No replies yet.

0 replies 1 view

Log in to reply.

User Avatar