RMMV Damage Formula - ideas and help

GammaVD

Veteran
Veteran
Joined
Oct 29, 2015
Messages
70
Reaction score
3
First Language
English
From what I know it uses only the most effective element, if you want to add an element to an attack you can use target.elementRate(elementId) but this won't fix the problem if the elements are attached to the weapon, you are going to need a plugin that allows for multiple elements
 

HasuHasi

Learning every day
Veteran
Joined
Aug 15, 2014
Messages
48
Reaction score
3
First Language
English
Primarily Uses
From what I know it uses only the most effective element, if you want to add an element to an attack you can use target.elementRate(elementId) but this won't fix the problem if the elements are attached to the weapon, you are going to need a plugin that allows for multiple elements
That is my understanding as well, but I wasn't sure if I got it right. You can even change how the restistances and weaknesses are calculated with yanfly's element core, in a way that resistances are added or multiplied or averaged. Which sadly isn't what I was looking for. So I'll just discard the idea of weapons with different elements for now, since I don't want the element rate to be averaged or anything like that.


Thank you very much for helping me develop a clear understanding! 
 
Last edited by a moderator:

Shikuroshi

Artist
Member
Joined
Mar 14, 2012
Messages
29
Reaction score
1
First Language
English
Primarily Uses
I'm using yanfly's crit control to add my character's luck into the formula for a critical strike but it doesn't seem to be helping and I'm not sure what the issue is. I have my characters luck stat at 532 for testing purposes and in about 50 attacks I haven't landed a single crit. against default bat enemies


rate = user.cri + user.luc * (1 - target.cev);


This is the formula I put into the plugin parameters. Is there a step I am missing that only applies to crits, or is my formula bad? Any help would be greatly appreciated. 
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,224
Reaction score
13,770
First Language
English
Primarily Uses
RMVXA
@Shikuroshi: Check the enemy's CEV. By that formula, if the CEV is 100%, it will cancel out the effect of luck, as the (1 - target.cev) line becomes 0, and anything times 0 is zero.
 

Shikuroshi

Artist
Member
Joined
Mar 14, 2012
Messages
29
Reaction score
1
First Language
English
Primarily Uses
I changed it down to %1 and it doesn't seem to effect it. Unless I am unlucky, or totally misinterpreted and the higher the number the more likely a crit will happen.

bat stats.png



battler stats.png
 
Last edited by a moderator:

YoraeRasante

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,636
Reaction score
417
First Language
Portuguese
Primarily Uses
RMMV
You can put them in a spoiler (the eye button).


and yeah, misinterpreted. The problem. Those change the critical evasion upwards, which in your formula's case makes your user's luck decrease critical rate. And only by 1 to 5 percent, so it is not very visible.


You should put the user.cri + user.luk inside parentesis, since without them the multiplication is calculated first.


I personally would suggest using a formula more like 


rate = (user.cri + user.luk) * (1 - target.cev - target.luk);


It is affected by both's luck.
 
Last edited by a moderator:

Shikuroshi

Artist
Member
Joined
Mar 14, 2012
Messages
29
Reaction score
1
First Language
English
Primarily Uses
 I liked your formula a lot better, I didn't consider using the enemiy's luck in this situation and I thank you for that.


But I changed the formula and after a bit of testing I still don't seem to be getting any crits at all. The only change I made was the formula into the one you posted. 

Code:
 rate = (user.cri + user.luc) * (1 - target.cev - target.luk);
 

YoraeRasante

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,636
Reaction score
417
First Language
Portuguese
Primarily Uses
RMMV
Ok, just checked and I know the problem.


The formula I sent you is wrong. You see, the formula to calculate if it is a critical is Math.random() < this.itemCri(target). Notice the <. The way the formula is, it would never be so. The values are too big.


Try this one:


rate = (user.cri + user.luk / 1000) * (1 - target.cev - target.luk / 1000);


I'm not saying it would work like we want (I'll use it in my own game, hope you don't mind :p) but it should at least work.
 
Last edited by a moderator:

Shikuroshi

Artist
Member
Joined
Mar 14, 2012
Messages
29
Reaction score
1
First Language
English
Primarily Uses
Hey if it works go for it! c: It's not like I came up with the concept of adding luck into your crit chance. I'll test out this formula and get back with my findings. 


Edit: This worked lovely. I got a crit 85% of the time and that is fine by me! Now I can go about the rest of my life. Thanks friend. 
 
Last edited by a moderator:

emelian65

Veteran
Veteran
Joined
Sep 13, 2015
Messages
190
Reaction score
50
First Language
Spanish
Primarily Uses
EDIT:


Hello RPG Maker!


I need some help with this formula.


Ok I managed to edit the formula for it to work, here it is.


if (b.isStateAffected(26)) { 0; } else { if (b.isStateAffected(27)) {((a.atk * 4) - (b.def * 2) + (a.level * 10)) * 0.50;} else {(a.atk * 4) - (b.def * 2) + (a.level * 10);}; }




But know I have found myself with one problem, 


<Custom HP Life Steal Rate>
if (target.isStateAffected(27))
{rate = -1.50;}
else
{rate = 0.75;}
</Custom HP Life Steal Rate>


This code here should make the skill steal 75% of HP with each hit, and if the target has state 27 they should suffer damage (I already have the Negative HP steal enabled in the plugin in, but it doesn't seem to work, It deals half the damage but doesn't return back the damage it shoul.
 
Last edited by a moderator:

YoraeRasante

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,636
Reaction score
417
First Language
Portuguese
Primarily Uses
RMMV
did you try putting -1.50 between parentheses? (-1.50)?
 

emelian65

Veteran
Veteran
Joined
Sep 13, 2015
Messages
190
Reaction score
50
First Language
Spanish
Primarily Uses
Try it already, the skill deals half the damage but the user of the attack doens't recive any damage.
 
Last edited by a moderator:

YoraeRasante

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,636
Reaction score
417
First Language
Portuguese
Primarily Uses
RMMV
hmm... and is it recovering when not under the state?


Did you check it in a new skill of normal damage to see if it works there?
 

emelian65

Veteran
Veteran
Joined
Sep 13, 2015
Messages
190
Reaction score
50
First Language
Spanish
Primarily Uses
Yes it works, the skill absorbs 75% if the enemy is not affected by the state, if the enemy has state 26, the enemy doesn't recive any damage and the skill doesn't absorb, when the enemy has state 27, it recieves half the damage, but the user doens't recive the damage that is supposed to be the absorbtion.


I haven't test the negative drain effect alone, and for the time being I cannot.
 

YoraeRasante

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,636
Reaction score
417
First Language
Portuguese
Primarily Uses
RMMV
why can't you for now? it seems this is the problem.


Just make a separate skill just to "negative drain" something, and give it to a character. just for the battle test.
 

emelian65

Veteran
Veteran
Joined
Sep 13, 2015
Messages
190
Reaction score
50
First Language
Spanish
Primarily Uses
Cause I'm on my phone right now...
 

YoraeRasante

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,636
Reaction score
417
First Language
Portuguese
Primarily Uses
RMMV
well, do it when you can.
 

emelian65

Veteran
Veteran
Joined
Sep 13, 2015
Messages
190
Reaction score
50
First Language
Spanish
Primarily Uses
Yeah, didn't work alone.


In fact, neither the over heal nor the negative heal, work with the <Custom Hp Life Steal Rate>.


I had to use Yanfly, Black Blood potion tips and tricks video to recreate the effect. So I suppose you could say problem solved?
 

Crimson Dragon Inc.

Crimson Dragon
Veteran
Joined
Aug 8, 2012
Messages
925
Reaction score
135
First Language
english
Primarily Uses
RMMV
Yeah, didn't work alone.


In fact, neither the over heal nor the negative heal, work with the <Custom Hp Life Steal Rate>.


I had to use Yanfly, Black Blood potion tips and tricks video to recreate the effect. So I suppose you could say problem solved?


have you tried utilizing yanfly's life steal plug in?
 

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

Latest Threads

Latest Posts

Latest Profile Posts

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? :)
Things I thought would never happen but just did: I needed to use my snow shovel. In August. In the Northern Hemisphere.
So I finished Cupcake, now I need to figure out my next project!
Do I pick up one of my incomplete games?
Do I start something entirely new???
The possibilities are endless!

Forum statistics

Threads
100,682
Messages
978,380
Members
132,307
Latest member
secasus
Top