What *exactly* does Luck do?

gvduck10

Quacker Jack
Veteran
Joined
Dec 23, 2012
Messages
322
Reaction score
124
First Language
English
Primarily Uses
N/A
The engine only says "it controls thinks like status effects". Does anyone actually know, definitively, what Luck stat does in VX Ace? This would better help me utilize it in-game properly.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,367
Reaction score
7,676
First Language
German
Primarily Uses
RMMV
OK, here are the basics:

with two exceptions, all main parameters (ATK, DEF, MAT etc) have no hardcoded use at all. They are only there for use in damage formulae and can be replaced there by the developer if he wants to use them in a different way.

The two exceptions are AGI and LUK

Agility is used for determining the action order in the default battlesystem.
Each action gets a number that is : Actor/Enemy-AGI plus skill-SPEED plus random%
After that all actions are executed from highest to lowest action number

Luck is used whenever a skill tries to attach a state to a target.
If the skill is set to "certain hit" luck will be ignored and the state will always be applied
If the target is state-reststant the state will never by applied (which means luck will be ignored as well)
If the skill is set to physical or magical, there is a chance the state will apply or not. This is where luck comes into play.
I don't have the actual formula ready, but the state rate of the skill effect is only the base rate for success. This base rate is multiplied by a percentage that is based on the difference between target-luck and skilluser-luck.
If the skill user has a higher luck than the target of the skill, then that percentage will be increased. If the target is luckier than the chance is decreased.
If you let the state rate stand at the default of 100% when designing the skill, then the target needs to be much luckier than the skill user to have even a small chance for the state to fail.
If you change the state-rate to 50% then the difference in luck can make quite a change in how often the state is applied or not.

However I don't have the formula ready as to how many points of difference there need to be to make a 1% change in the state rate - but it needs to be quite a difference, one or two points of luck are undetectable either way.
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
The formula is something like 1 point of luck increases your chance of a status ailment landing by like 0.05% or so. Its really tiny. You'd need like 1 LUK vs 999 LUK to even really notice the difference in most casts.
 

Another Fen

Veteran
Veteran
Joined
Jan 23, 2013
Messages
564
Reaction score
275
First Language
German
Primarily Uses
The bonus/malus per LUK point should be 0.1% of the original chance, adding up.
So in the extreme, if your state would normally have a 40% application chance, but you have a 1-LUK-actor hitting a 999-LUK-enemy, the chance is reduced to 40% * 0.2% = 0.08%. Vice versa, the enemy has a 40% * 198.8% = 79.92% chance to hit the actor with the same effect in return.

If you want to change this formula for any reason, you can replace the luk_effect_rate method of the Game_Battler class in a new script like this:
Code:
class Game_Battler
  #--------------------------------------------------------------------------
  # * Get Effect Change Rate by Luck
  #--------------------------------------------------------------------------
  def luk_effect_rate(user)
    [1.0 + (user.luk - luk) * 0.001, 0.0].max
  end
end
1.0 equals 100% chance, user would be the attacker here, self (can be omitted) would be the target (I'm sure there are more elaborate scripts out there too if you look around).


In VXAce, the hit type has nothing to do with whether LUK is applied to effect chances (I think that was changed in MV though). Instead LUK applies for specific states if the skill/item is used on an opponent, and in general for debuffs and for some reason "normal attack" states.
 
Last edited:

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
In ACE the luck effect is applied to anything that adds a state that is not certain hit. No idea on MV. But yes, you need a *huge* change in luck to see any significant increase, which is why I changed mine so that every 50 points of increase in LUK doubles your chance of a status ailment landing. Of course, that also works in my game as LUK is usually between 20 - 100 for everyone in the game too.
 

YoraeRasante

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,643
Reaction score
420
First Language
Portuguese
Primarily Uses
RMMV
in mv it is basically the same thing. luck is only used for state effects, and it really is multiplying the chance by "Math.max(1.0 + (a.luk - b.luk) * 0.001, 0.0)" - meaning it can't go bellow 0, but it is still 1 + a thousandth of the difference. meaning an attacker of 999 luck versus a defender of 1 luck would end with a multiplier of 1+(999-1)*0.001=1+998*0.001 = 1+(998*0.001) (multiplication and division always go before addiction and subtraction if not inside something like parenteses) = 1.998. Almost but not even double the value, for the highest possible difference without a plugin - very far from the more common difference you'll have through the game where attackers and defenders have similar values.

so as much as I can I use plugins to change things like hit and crits to use luck too, else it is almost useless. that example almost doubles the result... but one has 999 luck and the other has 1.
 

gvduck10

Quacker Jack
Veteran
Joined
Dec 23, 2012
Messages
322
Reaction score
124
First Language
English
Primarily Uses
N/A
In ACE the luck effect is applied to anything that adds a state that is not certain hit. No idea on MV. But yes, you need a *huge* change in luck to see any significant increase, which is why I changed mine so that every 50 points of increase in LUK doubles your chance of a status ailment landing. Of course, that also works in my game as LUK is usually between 20 - 100 for everyone in the game too.
Would love to know how to change this in my game as well. Even if 1 LUCK = 1% that makes more sense
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,660
Reaction score
563
First Language
English
Primarily Uses
RMVXA
how to change this in my game
The only places that luk is defined is
Game_BattlerBase
def luk; param(7); end # LUK LUcK

and
Game_Battler
def luk_effect_rate(user)
[1.0 + (user.luk - luk) * 0.001, 0.0].max
end


I would assume it is the Game_Battler that is changed as that is a formula.
So playing around with this should do it, but what to change is a guess from me.
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
I did it with this code:
Code:
class Game_Battler
  #--------------------------------------------------------------------------
  # * Get Effect Change Rate by Luck
  #--------------------------------------------------------------------------
  def luk_effect_rate(user)
    [(1.014**(user.luk - luk)), 0.05].max
  end
end
That returns a minimum of 0.05 effect, and makes it so that every point of luck is a 1.4% increase in status ailment applying, multiplicative. If you want 1% delete the 4 in that code.

Post it as a script below all scripts but above main, and name it so you know what it is!
 

hinola

Veteran
Veteran
Joined
Jun 27, 2015
Messages
58
Reaction score
84
First Language
Français
Primarily Uses
RMVXA
You can also, like every other parameters use it on events.
If it's not enough as it is now (And I agree, we could have a better one to take its place) you can make it usefull in your systems

Open a chest, if you are lucky, you have more chance to find 5 more gold
Lockpicking, if you are lucky you have less chance to break your tool
In a romance system, more chance a character is pleased by what you did to him ...
Save the game, if you are lucky you're less likely to corrupt the file

Ok maybe not the last one
Maybe it should only be used as reward to the player and never as punishment.
 

gvduck10

Quacker Jack
Veteran
Joined
Dec 23, 2012
Messages
322
Reaction score
124
First Language
English
Primarily Uses
N/A
You can also, like every other parameters use it on events.
If it's not enough as it is now (And I agree, we could have a better one to take its place) you can make it usefull in your systems

Open a chest, if you are lucky, you have more chance to find 5 more gold
Lockpicking, if you are lucky you have less chance to break your tool
In a romance system, more chance a character is pleased by what you did to him ...
Save the game, if you are lucky you're less likely to corrupt the file

Ok maybe not the last one
Maybe it should only be used as reward to the player and never as punishment.
Well my game is based off Suikoden, so it focuses a lot of recruiting characters. I can totally make one of the recruits only obtainable (or even only appear) if you have over a certain level of luck. THAT would be a twist.
 

YoraeRasante

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,643
Reaction score
420
First Language
Portuguese
Primarily Uses
RMMV
I like to calculate luck's effects a different way, by the way.
Anyone who likes it, feel free to use. Credits appreciated but not neeeded.

((a.luk - b.luk)/(a.luk + b.luk))+1

that would make:
an attacker with 999 and a defender with 1 return ((999-1)/(999+1))+1 = ((998/1000))+1 = (0.998)+1 = 1.998, about 2
an attacker with 1 and a defender with 999 return ((1-999)/(1+999))+1 = ((-998/1000))+1 = (-0.998)+1 = 0.002 almost, but not really, 0.
of course, there are the two extremes. in a real game it would be much closer to
an attacker with 15 and a defender with 10 return ((15-10)/(15+10))+1 = ((5/25))+1 = (0.2)+1 = 1.2, and inverting them we get ((10-15)/(10+15))+1 = (-5/25)+1 = -0.2+1 = 0.8. Same results with 30 and 20 if you do the math.

As you can see, it escalates much better with the difference in luck between the fighters. The one with higher luk still has an advantage, but it is much more noticeable. A bigger difference gives a bigger advantage, but the scale of the difference is the important part, not the numbers themselves.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

People3_5 and People3_8 added!

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.

Forum statistics

Threads
105,868
Messages
1,017,090
Members
137,586
Latest member
Usagiis
Top