Hi All.
I've got a damage formula that utilises a variable which I have setup in my Action sequence (Yanfly's). So each weapon has a different "Power". As I've literally got 10 weapons in my game (one of each type with no increase to basic stats), I'd like to add in a power creep on each of the weapons. So for each attack I'd like the "Proficiency" of each weapon to increase by 0.1 so that when the character attacks 10 times the "Power" goes from 36 to 37.
I've tested this out and it doesn't work since RMMV Variables will not store decimals. I'll give you an example below to show you what I mean.
Attack Formula:
For anyone wondering, it's based on the FF7 attack formula.
Action Sequence:
So does anyone know if there is a way I could make the game store variables as decimals?
Thanks in advance.
I've got a damage formula that utilises a variable which I have setup in my Action sequence (Yanfly's). So each weapon has a different "Power". As I've literally got 10 weapons in my game (one of each type with no increase to basic stats), I'd like to add in a power creep on each of the weapons. So for each attack I'd like the "Proficiency" of each weapon to increase by 0.1 so that when the character attacks 10 times the "Power" goes from 36 to 37.
I've tested this out and it doesn't work since RMMV Variables will not store decimals. I'll give you an example below to show you what I mean.
Attack Formula:
(v[31]*(512-b.def)* (a.atk+((a.atk+a.level)/32)*((a.atk*a.level)/32)) /(16*512)) * (3841 + Math.floor(Math.random() * 256))/4096
Action Sequence:
IF user.isStateAffected(44) // Weapon Passive State ID
change variable 31 = $gameVariables.value(61);
change variable 61 += 0.1
move user: point, 900, 450, 15
wait for movement
motion chant: user
animation 1: user
animation wait: 35
PERFORM ACTION
animation 2: target
wait for animation
action effect: enemies
END
change variable 31 = $gameVariables.value(61);
change variable 61 += 0.1
move user: point, 900, 450, 15
wait for movement
motion chant: user
animation 1: user
animation wait: 35
PERFORM ACTION
animation 2: target
wait for animation
action effect: enemies
END
So does anyone know if there is a way I could make the game store variables as decimals?
Thanks in advance.