Decimal Variables?

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:
Spoiler
(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
For anyone wondering, it's based on the FF7 attack formula.

Action Sequence:
Spoiler
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

So does anyone know if there is a way I could make the game store variables as decimals?

Thanks in advance.
Couldn't you just increase a variable by 1 each time someone attacks? And once that variable goes to 10 the damage increases by 1?
Maybe you could store your variable as whole numbers (1-10) and then divide it by 10 in your formula to get the decimal value that you want.
Maybe you could store your variable as whole numbers (1-10) and then divide it by 10 in your formula to get the decimal value that you want.
If I understand you correctly I don't think that will work as each weapon has it's own variable for the additional "proficiency". E.G Sword v[62], Staff v[63] etc... That's why I set it to v[31] as a global variable. That way I can setup all the individual variables for each weapons "power" and then just drag those numbers to v[31] for the damage formula.

Thanks for trying to help though. 🙂
just do
((v[31]/100)*(512-b.def)* (a.atk+((a.atk+a.level)/32)*((a.atk*a.level)/32)) /(16*512)) * (3841 + Math.floor(Math.random() * 256))/4096

I'm assuming each of you're weapon powers are whole numbers, so for example if the weapon power of a sword is 30, then in the formula it would be 30/100 or 0.3.
And contiue form their, so a 1000 power sword in the formula would be 1000/100 or 10.0.

Original thread: https://forums.rpgmakerweb.com/threads/decimal-variables.79507/