I want to make "mark" type skill, which increases not percent, but adds flat amount of damage to your attacks. So, if this increase is 10, then attack for 5 damage would deal 15, and attack for 100 damage would deal 110.
How to make state that increases received damage by FLAT amount?
RPG Maker MZ SupportHeya!
You use Visustella battle core and such, correct? This can be achieved pretty easily via the 'Pre-Damage' JS notetag on the skill assuming you do!
You'd want something like in the skill note box:
Where value is the original damage value that's going to be applied to the enemy, and then you're adding the value of the attack, plus the flat rate of 10 that you wanted--which can be adjusted to your liking.
Edit: Oops--I noticed you wanted it to be a state, rather than applying to the skill itself. (That's what I get for jumping into a thread right after waking up, haha.) I think the general theory should work there, but the JS notetag would change. Let me quickly see if I can amend things.
Edit 2: Okay, yeah, basically the same thing for states, just do it as:
You use Visustella battle core and such, correct? This can be achieved pretty easily via the 'Pre-Damage' JS notetag on the skill assuming you do!
You'd want something like in the skill note box:
Code:
<JS Pre-Damage>
value = value +10
</JS Pre-Damage>
Where value is the original damage value that's going to be applied to the enemy, and then you're adding the value of the attack, plus the flat rate of 10 that you wanted--which can be adjusted to your liking.
Edit: Oops--I noticed you wanted it to be a state, rather than applying to the skill itself. (That's what I get for jumping into a thread right after waking up, haha.) I think the general theory should work there, but the JS notetag would change. Let me quickly see if I can amend things.
Edit 2: Okay, yeah, basically the same thing for states, just do it as:
Code:
<JS Pre-Damage as User>
value = value +10
</JS Pre-Damage as User>
Thanks, it worked perfectly! Just had to replace User with Target (on a side note, is this pure knowledge of code like this, or there is database somewhere, where I can find examples like these? I think this could be useful later)
Ah right, apologies, I went with the assumption the state was on the user attacking rather than on the target--my bad, I should have realised that given it's a mark state, haha. Glad you were able to amend it either way!
Aside from the Battle Core wiki, most of my limited knowledge comes from stitching things together from various Yanfly tips and tricks, most of which have been graciously converted over to MZ by Trihan, which give a lot of ideas of how things can be used:
How to implement every possible Yanfly Tips & Tricks effect in MZ with VisuStella plugins
Hi all. This is by far one of the biggest topics I've seen people asking about, to the point where I've been commissioned twice to make an MZ project containing all of the T&T effects. So I figured I'd make a topic about how to implement them all yourselves. If no other plugins are specified...
forums.rpgmakerweb.com
Oh, thanks, I will give it a look later
Wait, one more question. Is it possible to make states like this stack? So if I have ability to apply this state two times in a row, it will not just reapply, but actually stack, so it will be +20 flat damage?
youll have to turn your state to something like this
Code:
<JS Pre-Damage as Target>
value += 10 * target._marks;
</JS Pre-Damage as Target>
<JS On Add State>
target._marks = target._marks + 1 || 1;
</JS On Add State>
<JS On Erase State>
delete target._marks;
</JS On Erase State>
Ooooh, that works! Man, that's epic, thanks you a lot
Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-state-that-increases-received-damage-by-flat-amount.163288/