Enchanted Armor

Keegan

Villager
Member
Joined
Jan 14, 2018
Messages
9
Reaction score
3
First Language
Indonesian
Primarily Uses
RMMV
How I can make an armor that will increase player damage?
for example: I want to make an armor that will increase 20% sword damage, so if the player is using the armor his damage will
increase by 20% (but only for Sword type weapons). if the player isn't use sword type weapons, then the damage won't increase.
is it possible to do that?
I am sorry I know it's kinda big request, but I think it's pretty cool damage system


np: I use TES V: Skyrim as a reference
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
About the only way is to use a plug-in. You might be able to do it by getting cute with the damage formula but it would get long and complicated fast as far as I know.

I'll move this to plug-in request, and if someone can come up with a way to do it without a plug-in, that will be a bonus then.

Moved to Plug-in Requests

 

Llareian

Jack of All Trades, Master of None
Veteran
Joined
Jan 26, 2017
Messages
604
Reaction score
1,421
First Language
English
Primarily Uses
RMMV
@Keegan I have a feeling you could do this with Hime's State Damage Modifiers by using the armor to apply a state to the user, and having an attacker modifier on that state. I'm not near a computer at the moment so I can't test it, but I think the notetag would look like this, where n is replaced by the weapon type id for swords:
Code:
<state damage modifier: attacker>
if (a.isWtypeEquipped(n)) {
    return d * 1.2;
} else {
    return d;
}
</state damage modifier>
Edit: note this would increase ALL damage for ALL skills. There'd be another conditional if you only wanted it to increase damage for certain skills.
 

Keegan

Villager
Member
Joined
Jan 14, 2018
Messages
9
Reaction score
3
First Language
Indonesian
Primarily Uses
RMMV
@Keegan I have a feeling you could do this with Hime's State Damage Modifiers by using the armor to apply a state to the user, and having an attacker modifier on that state. I'm not near a computer at the moment so I can't test it, but I think the notetag would look like this, where n is replaced by the weapon type id for swords:
Code:
<state damage modifier: attacker>
if (a.isWtypeEquipped(n)) {
    return d * 1.2;
} else {
    return d;
}
</state damage modifier>
Edit: note this would increase ALL damage for ALL skills. There'd be another conditional if you only wanted it to increase damage for certain skills.
Where I should put that notetag?
 

Keegan

Villager
Member
Joined
Jan 14, 2018
Messages
9
Reaction score
3
First Language
Indonesian
Primarily Uses
RMMV
@Keegan I have a feeling you could do this with Hime's State Damage Modifiers by using the armor to apply a state to the user, and having an attacker modifier on that state. I'm not near a computer at the moment so I can't test it, but I think the notetag would look like this, where n is replaced by the weapon type id for swords:
Code:
<state damage modifier: attacker>
if (a.isWtypeEquipped(n)) {
    return d * 1.2;
} else {
    return d;
}
</state damage modifier>
Edit: note this would increase ALL damage for ALL skills. There'd be another conditional if you only wanted it to increase damage for certain skills.
I have discovered how to apply it, and it works!!! thank you very much for your help!
 

Keegan

Villager
Member
Joined
Jan 14, 2018
Messages
9
Reaction score
3
First Language
Indonesian
Primarily Uses
RMMV
@Keegan I have a feeling you could do this with Hime's State Damage Modifiers by using the armor to apply a state to the user, and having an attacker modifier on that state. I'm not near a computer at the moment so I can't test it, but I think the notetag would look like this, where n is replaced by the weapon type id for swords:
Code:
<state damage modifier: attacker>
if (a.isWtypeEquipped(n)) {
    return d * 1.2;
} else {
    return d;
}
</state damage modifier>
Edit: note this would increase ALL damage for ALL skills. There'd be another conditional if you only wanted it to increase damage for certain skills.
I tried it and the damage dealt is 207.01828390192 or 45.12391293, can i get rid of those unnecessary number? and make it into integers like 207 or 45
 

Llareian

Jack of All Trades, Master of None
Veteran
Joined
Jan 26, 2017
Messages
604
Reaction score
1,421
First Language
English
Primarily Uses
RMMV
Ah, yes, I forgot the rounding function.

Code:
<state damage modifier: attacker>
if (a.isWtypeEquipped(n)) {
    return Math.floor(d * 1.2);
} else {
    return d;
}
</state damage modifier>
 

Keegan

Villager
Member
Joined
Jan 14, 2018
Messages
9
Reaction score
3
First Language
Indonesian
Primarily Uses
RMMV
t
Ah, yes, I forgot the rounding function.

Code:
<state damage modifier: attacker>
if (a.isWtypeEquipped(n)) {
    return Math.floor(d * 1.2);
} else {
    return d;
}
</state damage modifier>
Thank you guys, it really helps
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Are we allowed to post about non-RPG Maker games? And, if so, would any of you be interested in a short, proof of concept type non-euclidian puzzle game?
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:

Forum statistics

Threads
105,883
Messages
1,017,232
Members
137,607
Latest member
Maddo
Top