Weapon lowers enemy stat on hit?

TriceratopsX

Veteran
Veteran
Joined
May 2, 2016
Messages
264
Reaction score
404
First Language
English
Primarily Uses
RMMV
Hello, I was wondering how (or if) I could have a weapon lower the targets stats (specifically Def) upon each hit, I looked around for a bit and I didn't see any questions that were similar, I also didn't see how to do it in the maker itself (as the traits tab in the database only effects the one wielding it) What I was wanting to do is have a sword that when equipped each physical attack lowers the enemies' (that were hit with the attack(s)) defense by 5%

As always any and all help is appreciated!
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,960
First Language
English
Primarily Uses
RMMV
Edit: I gave you a solution that will reduce it by 5% but won't stack, let me think about it a bit and I'll see if I can come up with something that does what you're asking for.
 
Last edited:

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,639
First Language
Czech
Primarily Uses
RMMV
Since the OP wants to have it upon each hit, they need to use Custom Establish Effect, not Custom Respond Effect.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,960
First Language
English
Primarily Uses
RMMV
Okay, got it.

You'll need Yanfly's Buffs & States Core (http://yanfly.moe/2015/12/25/yep-50-buffs-states-core/) and Auto Passive States (http://yanfly.moe/2015/10/17/yep-13-auto-passive-states/) for this.

Create a new state with the following tag:

Code:
<custom establish effect>
target.addParam(3, -(target.def * 0.05));
</custom establish effect>
Then on the weapon, add the tag

Code:
<passive state: x>
Where X is the ID of the state you created.

Then when the wielder of that weapon attacks something and successfully hits, its defence will be reduced by 5% of its current def (meaning there will be diminishing returns on it, which I assume is what you were going for). It'll be slightly different if you always want it reduced by 5% of its base.
 

TriceratopsX

Veteran
Veteran
Joined
May 2, 2016
Messages
264
Reaction score
404
First Language
English
Primarily Uses
RMMV
Ack! I thought I had it set to notify me of replies! :o

Thank you @Trihan & @Poryg so much for helping me with this, I greatly appreciate it (Now my blade can eat through ANY defense albeit with a diminishing return)
And the diminishing return on the ability should be fine, I don't want the ability TOO good after all (I'll just increase it to something slightly above 5% :p)

EDIT: Probably a stupid question but what would I change to make it effect magic defense too? :hswt:
 

sciencewarrior

Overzealous Technician
Member
Joined
Oct 15, 2017
Messages
22
Reaction score
7
First Language
Portuguese
Primarily Uses
RMMV
EDIT: Probably a stupid question but what would I change to make it effect magic defense too? :hswt:
You can add a second call in the same notetag to change magical defense:

Code:
<custom establish effect>
target.addParam(3, -(target.def * 0.05));
target.addParam(5, -(target.mdf * 0.05));
</custom establish effect>
 

sciencewarrior

Overzealous Technician
Member
Joined
Oct 15, 2017
Messages
22
Reaction score
7
First Language
Portuguese
Primarily Uses
RMMV
You're welcome. :smile: I keep this post bookmarked to look up parameters.
 

TriceratopsX

Veteran
Veteran
Joined
May 2, 2016
Messages
264
Reaction score
404
First Language
English
Primarily Uses
RMMV
Ah fascinating! Do you start counting parameters at 0? That'd be where I got confused (Probably) I really need to learn more about this stuff.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

I should realize that error was produced by a outdated version of MZ so that's why it pop up like that
Ami
i can't wait to drink some ice after struggling with my illness in 9 days. 9 days is really bad for me,i can't focus with my shop and even can't do something with my project
How many hours have you got in mz so far?

A bit of a "sparkle" update to the lower portion of the world map. :LZSexcite:
attack on titan final season is airing tomorrow, I'm excited and scared at the same time!

Forum statistics

Threads
105,882
Messages
1,017,231
Members
137,607
Latest member
Maddo
Top