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,224
Reaction score
13,770
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
603
Reaction score
1,412
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
603
Reaction score
1,412
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

Finally did a test of sorts for the opening of my game... ... including this shot here.
My current status!?
It might be... QUAKE!!! :o
At least that was true several hours ago. :p
Quexp wrote on Shaz's profile.
I absolutely love your profile/pic! :kaoluv:
Stream will be live shortly with some Darkest Dungeon! Feel free to drop by!
I made a battle results screen for my minigame.. any feedback? :)

Forum statistics

Threads
100,686
Messages
978,416
Members
132,310
Latest member
hnhat
Top