MV Creating a Weapon that boosts Damage Dealt based on Enemies Slain with it

I apologise in advance for any potential misplacement of this thread. I myself am unsure exactly where to place it, but given I'm working with the full Collection of the Yanfly Engine, I feel this may be appropriate enough, as Yanfly's Plugins may very well be the Key to solving my conundrum. The "How" is what eludes me.


I'll cut to the chase and describe Exactly what I am trying to create.

This weapon I am trying to create has a "Soul Steal" Gimmick: What do I mean by this? First off, it obviously involves slaying enemies with it-And keeping track of each and every single one that was slain by the Weapon in question-and "Storing" them inside it. Each enemy(Or Soul, if you'd prefer to use this term) would contribute to the Weapon "getting stronger" with each enemy it successfully kills. How does the weapon "Get stronger"? By increasing the damage you deal with it on a percentile basis. Percentile calculated with a formula that uses the amount of enemies slain with the weapon-instead of bumping its stats up a notch.

It sounds daunting, yes, it daunts me to the point of exhaustion, but it's a concept I'm not really any willing to give up on. It can be game-breaking, but honestly, It fails to come close to bothering me even a little. If a player's willing to kill thousands if not millions of enemies for an extra percent of damage, that's on the player for overgrinding.

Moving on to the more practical parts.

Now that I have the weapon defined in my Database, I just need to figure which notetags are required to achieve this effect. And that in itself is the problem at hand as my skill with Javascript is sorely lacking: The best I can do is comprehend the code to some degree, but not replicate any kind of function on my own. I've looked around multiple threads and the best solution that's come to my mind is to use Yanfly's Action Sequences: The question becomes, "Which Notetag will allow me to affect the Damage Formula of all Physical Attacks? If it were to be done for Magic Attacks, what would I need to do differently? Worse yet, how do I pull up the Action's Formula and its result, to modify it after calculations, but right before it's applied?"

That's why I'm here, to ask anyone obviously more experienced than I(Not a difficult challenge nor is it one to be smarter than I, believe me!) for advice or information on how to recall other information from the Database itself.

(Quick note: I'm using Yanfly's Armor Scaling Plugin. That's one of the main reasons I'd like to alter the Damage Formulae's results before any reduction from Armor is applied.)

My thanks in advance for taking time out of your schedules to read about my 5AM Conundrum.

~Noel Ardiens
you can use yanfly's passives to create the effect. since you wanted to affect the damage as a percentage, you dont have to interact with the actual damage calcualtion. you can just directly change the end value.
youd have a passive state thatll look something like this:
Code:
<Custom Confirm Effect>
if (this.isPhysical() && this.isDamage())
  value = Math.ceil(value * (1+$gameVariables.value(Some Variable ID)/100);
<Custom Confirm Effect>

<Custom Conclude Effect>
if (this.isPhysical() && this.isDamage() && target.hp == 0 && !target.isStateResist(1))
  $gameVariables.setValue(Some Variable ID, $gameVariables.value(Same Variable ID)+1);
</Custom Conclude Effect>

attach it to your weapon with the <Passive State: x> tag, and it should add to a variable for every kill via a physical skill while equipped, and then boost the damage of all physical skills by 1% per kill.

EDIT: didnt notice the note at the end. i dont know how the damage scaling plugin works, but depending on how aggressive it scales up/down damage, it might be better to directly increase the weapon's atk parameter
Well, I'll be.

I've tried it, I've tested it, I've tinkered with it, I've messed with it. It's actually working like a charm to the point I can see its effect mid-battle against large troops. Even with a 7% Boost, the increase mid-battle was significant enough so I'm feeling confident it'll end up working quite well. Maybe I just need to tweak its effectiveness a little to make sure it doesn't go overboard too quick...

My thanks, compliments and awe to thee for the splendid solution. I expected it to be a lot harder to make work, a lot more obscure and vexing. It wasn't any of these at all.

Original thread: https://forums.rpgmakerweb.com/threads/creating-a-weapon-that-boosts-damage-dealt-based-on-enemies-slain-with-it.162370/