Need help creating a skill similar to the Level 5 death or Level 3 Flare skills from Final Fantasy 5.

Joined
Sep 7, 2019
Messages
74
Reaction score
35
First Language
English
Primarily Uses
RMVXA
Is there any way for me to replicate skills similar to the Level 5 Death or Level 3 Flare skills from Final Fantasy 5?
If you dont know, the Level skills work by only targeting those who's levels are multiples of the number listed.
So Level 5 Death would inflict death if the target is Level 5, 10, 15, 20, 25, etc. And Level 3 Flare would damage targets
whos levels are 3, 6, 9, 12, 15, 18, etc.

I also want the player to be able to gain this skill when the enemy casts it on them. Similar to how it would work in the original game. Im Using Yanfly's Blue Magic code for skills to be learn this way. http://www.yanfly.moe/wiki/Blue_Magic_(MV_Plugin_Tips_&_Tricks)

Since the player would be using this skill, enemies would also have Levels so i am also using Yanlfy's Enemy Level Plugin.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
5,809
Reaction score
5,653
First Language
English
Primarily Uses
RMMZ
You can do L5 Death pretty easily with a <custom execution> tag on the skill. Just check that the level % 5 === 0 and if so add the death state to the target.

For L3 Flare it's even easier; in the damage formula just do

JavaScript:
b.level % 3 === 0 ? damagevalue : 0;
 
Joined
Sep 7, 2019
Messages
74
Reaction score
35
First Language
English
Primarily Uses
RMVXA
You can do L5 Death pretty easily with a <custom execution> tag on the skill. Just check that the level % 5 === 0 and if so add the death state to the target.

For L3 Flare it's even easier; in the damage formula just do

JavaScript:
b.level % 3 === 0 ? damagevalue : 0;
i put in the level 3 flare code as this which i assume is the correct way:
3500 + a.mat * 2 - b.level % 3 === 0 ? damagevalue : 700;
but it hits actors who are level 3. Am i doing somthing wrong?
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
5,809
Reaction score
5,653
First Language
English
Primarily Uses
RMMZ
i put in the level 3 flare code as this which i assume is the correct way:
3500 + a.mat * 2 - b.level % 3 === 0 ? damagevalue : 700;
but it hits actors who are level 3. Am i doing somthing wrong?
Why have you added parts to the formula that I never included in my post? ^_^ "damagevalue" wasn't a variable reference, it's a placeholder for where you put the damage value when the target's level is 3. 0 wasn't a placeholder, it's a literal 0 because not being level 3 shouldn't do any damage.

What you have currently is "if (3500 + twice attacker's mat - target's level mod 3) is equal to 0, then the damage should be a nonexistent variable called damagevalue, otherwise do 700 damage". The if statement is pretty much never going to be true and even if it is the variable doesn't exist so it'll error and default to 0 damage.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
7,086
Reaction score
4,895
First Language
English
Primarily Uses
RMMV
Not to pile up on you, but you might also want to make sure you don't rush too much when posting :wink:

but it hits actors who are level 3. Am i doing somthing wrong?
This means it's doing exactly what you want it to.

We can guess from the fact that you're asking the question you actually mean it's hitting characters who aren't level 3, but that's kind of a big difference.
 
Joined
Sep 7, 2019
Messages
74
Reaction score
35
First Language
English
Primarily Uses
RMVXA
You can do L5 Death pretty easily with a <custom execution> tag on the skill. Just check that the level % 5 === 0 and if so add the death state to the target.

For L3 Flare it's even easier; in the damage formula just do

JavaScript:
b.level % 3 === 0 ? damagevalue : 0;
I put the code for the flare skill like this

3500 + a.mat * 2 - b.level % 3 === 0 ? damagevalue : 700;
Not to pile up on you, but you might also want to make sure you don't rush too much when posting :wink:


This means it's doing exactly what you want it to.

We can guess from the fact that you're asking the question you actually mean it's hitting characters who aren't level 3, but that's kind of a big difference.
ment to say aren't right there
my bad
 
Joined
Sep 7, 2019
Messages
74
Reaction score
35
First Language
English
Primarily Uses
RMVXA
Why have you added parts to the formula that I never included in my post? ^_^ "damagevalue" wasn't a variable reference, it's a placeholder for where you put the damage value when the target's level is 3. 0 wasn't a placeholder, it's a literal 0 because not being level 3 shouldn't do any damage.

What you have currently is "if (3500 + twice attacker's mat - target's level mod 3) is equal to 0, then the damage should be a nonexistent variable called damagevalue, otherwise do 700 damage". The if statement is pretty much never going to be true and even if it is the variable doesn't exist so it'll error and default to 0 damage.

Oh, sorry, i assumed i had to put the code after the the a.mat part. Im kinda new to these kinds of damage formulas so i kinda mess things up sometimes... Sorry if i made you mad or something.
 
Last edited:

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
5,809
Reaction score
5,653
First Language
English
Primarily Uses
RMMZ
Oh, sorry, i assumed i had to put the code after the the a.mat part. Im kinda new to these kinds of damage formulas so i kinda mess things up sometimes... Sorry if i made you mad or something.
I'm not mad at all! It just amuses me when I give people the exact literal code they need to do something and they feel like there's something missing from it, so they make it not work by adding things that shouldn't be there. :p

I'm assuming that 3500 + a.mat * 2 is your damage calculation, and if their level isn't a multiple of 3 it will do 700 damage, based on what you originally had. In which case all you need to do is put your calculation where I had damagevalue and 700 where I had 0:

JavaScript:
b.level % 3 === 0 ? 3500 + a.mat * 2 : 700;
 
Joined
Sep 7, 2019
Messages
74
Reaction score
35
First Language
English
Primarily Uses
RMVXA
I'm not mad at all! It just amuses me when I give people the exact literal code they need to do something and they feel like there's something missing from it, so they make it not work by adding things that shouldn't be there. :p

I'm assuming that 3500 + a.mat * 2 is your damage calculation, and if their level isn't a multiple of 3 it will do 700 damage, based on what you originally had. In which case all you need to do is put your calculation where I had damagevalue and 700 where I had 0:

JavaScript:
b.level % 3 === 0 ? 3500 + a.mat * 2 : 700;
Fixed up the code and it works fine now Thanks!
 

Latest Threads

Latest Posts

Latest Profile Posts

I am doing the evaluation of the feedback from the students who played my game and the comments are killing me. "it was good, we just did not have any smart trains of thought" xD
My goal this month will be to get back to organizing assets and make a prototype scene with multiple airships hovering or flying over the world map.
Having a hard time getting playtesters for one of my Unity games. No one seems to be interested. :/
I fiddled around a little with a layout for some kind of character cards to accompany the what the MZ RTP is missing so people can see at first glance which characters have which graphics. Just not sure if I really wanna do and maintain that for all the characters xD
card.png
Example is Kasey who is all RTP and some emos by 冷やっこ

Forum statistics

Threads
128,524
Messages
1,195,202
Members
169,115
Latest member
Lucifer821
Top