Raijinn

YEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEET
Veteran
Joined
May 20, 2017
Messages
261
Reaction score
252
First Language
Bahasa, English
Primarily Uses
N/A
I am currently in the middle of making a game, and I thought of everything, from battle systems to the story.
Now, there's something I want to have in battle. Kinda dumb but.....

I want elemental weaknesses to gives states. An example of this is from the Persona series, when the enemy is hit with it's weakness it gives them the state "Down." How do I achieve that in RMMV?

If there's a plugin for this, would you send me the link? I've looked everywhere but still no luck

Thanks
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
32,848
Reaction score
8,235
First Language
German
Primarily Uses
RMMV
you can do this by damage coding - in the damage formula you need to add a condition that checks if the target is weak against that skills element, and if yes add the state.
 

Raijinn

YEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEET
Veteran
Joined
May 20, 2017
Messages
261
Reaction score
252
First Language
Bahasa, English
Primarily Uses
N/A
you can do this by damage coding - in the damage formula you need to add a condition that checks if the target is weak against that skills element, and if yes add the state.
Tell me how, please? I'm kind of a noob in this ;D
 
Last edited:

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
6,042
Reaction score
5,705
First Language
English
Primarily Uses
RMVXA
This thread contains the answer for how to do it with code in Ace (so that you don't need to do a long check in every single formula), so you might find some hints there about how to make the change in MV. Of course, you'll need different syntax in MV, and the method will probably have a slightly different name.
 

Raijinn

YEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEET
Veteran
Joined
May 20, 2017
Messages
261
Reaction score
252
First Language
Bahasa, English
Primarily Uses
N/A
This thread contains the answer for how to do it with code in Ace (so that you don't need to do a long check in every single formula), so you might find some hints there about how to make the change in MV. Of course, you'll need different syntax in MV, and the method will probably have a slightly different name.

Okay, thanks Wavelength! But y'know, I don't really know anything about coding, help me out please? ;D
 

padr81

Guy whose game is taking too long.
Veteran
Joined
Apr 26, 2013
Messages
739
Reaction score
757
First Language
english
Primarily Uses
N/A
your quickest method to get an answer to this would probably be on the javascript boards.
 

Raijinn

YEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEET
Veteran
Joined
May 20, 2017
Messages
261
Reaction score
252
First Language
Bahasa, English
Primarily Uses
N/A
your quickest method to get an answer to this would probably be on the javascript boards.
Thanks, I'll try posting in the javascript section. Wait, is that allowed though? Won't it be treated as spam?
 

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
6,042
Reaction score
5,705
First Language
English
Primarily Uses
RMVXA
You can post questions like this on "Learning JavaScript". It's not spam to do so, you're fine.

P.S. - I do know JS, but I'd have to dig through the code base to figure out exactly what the correct changes would be in MV, which would take me a while to do. Some people at the Learning JS board are likely to know the answer offhand, which is why I'd prefer you get your answer there. But if you ask and you haven't gotten an answer within a week or two, feel free to PM me and I will find the answer for you.
 

Raijinn

YEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEET
Veteran
Joined
May 20, 2017
Messages
261
Reaction score
252
First Language
Bahasa, English
Primarily Uses
N/A

padr81

Guy whose game is taking too long.
Veteran
Joined
Apr 26, 2013
Messages
739
Reaction score
757
First Language
english
Primarily Uses
N/A
stick it in the quick javascript thread as opposed to making a new one.

https://forums.rpgmakerweb.com/inde...ons-that-dont-deserve-their-own-thread.46341/

Most the scripters and guys who are good with js will check that more often than here.
Your damage formula code will look something like.. my js is terrible but something like the following.

if (b.elementRate(1) > 1) { //here the (1) is the number of the element. so 1 might be fire, than if fire rate > 1 do
(100 + a.mat * 2 - b.mdf * 2) //regular magic damage plus
b.addState(10); 100} // add state (10) - add state 10, with 100% chance of landing.
else { // else basically means if the top statment is not greater than 1
100 + a.mat * 2 - b.mdf * 2} //just do basic magic damage formula.
 

Raijinn

YEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEET
Veteran
Joined
May 20, 2017
Messages
261
Reaction score
252
First Language
Bahasa, English
Primarily Uses
N/A
stick it in the quick javascript thread as opposed to making a new one.

https://forums.rpgmakerweb.com/inde...ons-that-dont-deserve-their-own-thread.46341/

Most the scripters and guys who are good with js will check that more often than here.
Your damage formula code will look something like.. my js is terrible but something like the following.

if (b.elementRate(1) > 1) { //here the (1) is the number of the element. so 1 might be fire, than if fire rate > 1 do
(100 + a.mat * 2 - b.mdf * 2) //regular magic damage plus
b.addState(10); 100} // add state (10) - add state 10, with 100% chance of landing.
else { // else basically means if the top statment is not greater than 1
100 + a.mat * 2 - b.mdf * 2} //just do basic magic damage formula.

Thanks dude, you've been a great help!
 

padr81

Guy whose game is taking too long.
Veteran
Joined
Apr 26, 2013
Messages
739
Reaction score
757
First Language
english
Primarily Uses
N/A
@Raijinn - I figured it out for you that code is almost correct. heres a working version.

if (b.elementRate(2) > 1) {100 + a.mat * 2 - b.mdf * 2 + b.addState(4); 100} else {100 + a.mat * 2 - b.mdf * 2}

On that line it says if targets element rate for fire (fire) is over 100% than do damage and add poision (state 4)
else just do regular damage.

Just change the elementRate(x) to whatever elemet you want, and change the addState(y) to the state id number, you can also change the ;100 to any number to change the odds. Eg.. 50 will make it a 50/50 chance, 75 will make it 3 outta 4 times etc..
 

Latest Threads

Latest Posts

Latest Profile Posts

Bluh... glad this present heatwave is coming to a close...
Look what I found, it was my first ABS.

This project was never completed because I had lost the computer where it was stored.
Character Creator for RPGM 2000, VX, XP, & LPC Style Sprites | RPG Maker News #72

Is there any way to get more than 8 enemies in a troop in RMMV or is that limit pretty much hardcoded into the engine?
Stream will be live shortly with some game development! Feel free to drop by!

Forum statistics

Threads
112,273
Messages
1,066,994
Members
145,888
Latest member
Congo1977
Top