Ekuipment's Skill Damage ACE
Ekuipment's Skill Damage ACEIntended for Custom Damage Formulae
by Kyonides
Introduction
This scriptlet allows you to alter your item's or skill's damage formula in some interesting way, by setting a custom note in the equipment's notebox, and a target statistic that will serve as some item or skill damage modifier.
NOTES
If the target battler is an enemy, it has to include a given note tag in its notebox or else it will return 0. The note tag could be anything like <has weapon> or <wields sickle> or anything else.
You can pass either a :symbol representing a stat OR a number as the second parameter.
Instructions
[*]First you'd have to include this scriptlet in your script editor as a brand new script.
[*]Then read the embedded comments in my script. They're right there for a darn good reason!
[*]Finally, you can use the new script call in your damage formulae at will.
Here I'll leave the same example I included in those comments.
Ruby:
b.atk - b.equip_skill_dmg("<weakened>", :atk)
b.matk - b.equip_skill_dmg("<test>", :mdef, 25)
Here I gotta admit that the first example would always return 0 as your the skill damage for an obvious reason, he, he.
You may have noticed that it does not include a third argument like the second example does. What it means is that it gets the default value (100%) instead.
The Script
Ruby:
# * Ekuipment's Skill Damage ACE
# - Intended for Custom Damage Formulae
# Scripter : Kyonides
# v0.5.0 - 2025-03-14
# This scriptlet allows you to alter your item's or skill's damage formula in
# some interesting way, by setting a custom note in the equipment's notebox
# and a target statistic that will serve as some item or skill damage modifier.
# If the target battler is an enemy, it has to include a given note tag in
# its notebox or else it will return 0. The note tag could be anything like
# <has weapon> or <wields sickle> or anything else.
# * About the Damage Formula Box * #
# a represents an attacker, while b stands for a defender.
# * Damage Formula * #
# b.atk - b.equip_skill_dmg(note, stat)
# b.atk - b.equip_skill_dmg(note, stat, some %)
# - Usage Examples:
# b.atk - b.equip_skill_dmg("<weakened>", :atk)
# b.atk - b.equip_skill_dmg("<weakened>", :matk, 25)
# * Script Calls * #
# - Non-Damage-Formula Use Cases:
# $game_actors.equip_skill_dmg("note", :atk)
# $game_party.members.equip_skill_dmg("note", :matk, 50)
class Game_Actor
def equip_skill_dmg(equip_note, stat, percent=100)
result = equips.compact.any? {|e| e.note }
result ? send(stat) * percent / 100 : 0
end
end
class Game_Enemy
def equip_skill_dmg(equip_note, stat, percent=100)
@note ? send(stat) * percent / 100 : 0
end
end
Terms & Conditions
Free for use in ANY VX ACE game.
Just include my nickname in the credits.
That's it!
本贴来自国际rpgmaker官方论坛作者:kyonides处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/ekuipments-skill-damage-ace.176246/
页:
[1]