NoPiessadface

Veteran
Veteran
Joined
Feb 7, 2019
Messages
130
Reaction score
35
First Language
english
Primarily Uses
RMVXA
how do i make a weapon that can damage or kill the user much like devil weapons from fire emblem
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
3,788
Reaction score
2,936
First Language
English
Primarily Uses
RMMZ
Can you describe how the devil weapons from Fire Emblem work for the benefit of those who aren't familiar with them?
 

Tiamat-86

old jrpg gamer
Veteran
Joined
Dec 5, 2017
Messages
973
Reaction score
434
First Language
english
Primarily Uses
RMMV
this would probably require passive states and buff state core plugins.
weapon gives user a state, state has a custom confirm effect that checks if doing a physical attack before damages the user.
(im not good with this stuff so someone correct me if get syntax wrong)

<Custom Establish Effect>
if (this.isPhysical()) {
var heal = Math.floor(user.mhp * 0.1);
user.gainHp(-heal);
}
</Custom Establish Effect>

Can you describe how the devil weapons from Fire Emblem work for the benefit of those who aren't familiar with them?
weapons with higher base stats but hurt the user when they land a hit.
 
Last edited:

NoPiessadface

Veteran
Veteran
Joined
Feb 7, 2019
Messages
130
Reaction score
35
First Language
english
Primarily Uses
RMVXA
Can you describe how the devil weapons from Fire Emblem work for the benefit of those who aren't familiar with them?
they can backfire damage to the user for ex. 10 hp dmg whenever they hit but they deal large damage
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
2,299
Reaction score
1,241
First Language
English
Primarily Uses
RMMV
You should be able to just do this inside the damage formula. If you want a 15% chance to deal 10 damage to the user, put:
Code:
if (Math.randomInt(100)<15) a.gainHp(-10);
then the rest of your damage formula.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
33,998
Reaction score
8,631
First Language
German
Primarily Uses
RMMV
this would probably require passive states and buff state core plugins.
no, something as simple as affecting the user whenever the skill hits can be done completely without a plugin, just by damage code.
backfire damage to the user for ex. 10 hp dmg whenever they hit
That is even simpler than ATT_Turan's example above

Code:
a.gainHP(-10); 4* a.atk - 2* b.def
This damage formula would do normal damage and deal 10 HP damage to the skill user on each target hit.
 

Tiamat-86

old jrpg gamer
Veteran
Joined
Dec 5, 2017
Messages
973
Reaction score
434
First Language
english
Primarily Uses
RMMV
issue im seeing with damage formula approach is could have 4 weapon types each type having 1 "devil" weapon and several normal weapons.
the devil weapon is meant to have this effect for "all" weapon attack skills, not just 1 specific skill.
could use damage formula instead of buff/state notetag. but the formula for every weapon attack skill would still need to check for a devil weapon marker.
 
Last edited:

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
2,299
Reaction score
1,241
First Language
English
Primarily Uses
RMMV
That, or use something like Yanfly's Weapon Unleash to replace the Attack skill with a version that uses the above damage formula when equipping a devil weapon.

Code:
if ($dataWeapons[a.equips()[0].itemId()].meta["devil"]) a.gainHp(-10);

in front of your damage formula should make it do 10 damage to you if you put the <devil> notetag in your weapon.
 
Last edited:

Latest Threads

Latest Posts

Latest Profile Posts

It does sometimes get a little embarrassing that I often come here to ask for help with something and seldom have anything to actually show for it. If there is one thing though I can commend myself for, it's for sticking with an idea I've been tinkering with for this long now and gradually making headways. Even though I've been reserved about my progress, I can say I'm farther now than where I initially started.
I'm gonna put my project on pause for a tiny bit so I can explore the engine outside of it... Winging it can only get you so far LMFAO
Have seen some of my favorite people here posting and helping others with questions today -- love to see it!
Haven't been on here actively in awhile, project is going strong my biggest issue is the STORY, i'm refining the plot and learning so much i decided to take a writers class to improve even more but the programming and functionality of the game is stepping up nicely!

Forum statistics

Threads
116,127
Messages
1,096,003
Members
151,549
Latest member
nbayoungboy
Top