# How can I increase or decrease the value of a variable by a percentage value?

Status
Not open for further replies.

#### Ravens_Key_Games

##### Veteran
Hi.
I'll explain.
I created an event that simulates a bank account.
Now I just want every 7 days with a common event, which I will set on Sunday, to add a percentage value to the account variable, for example 5%.
Something like: if it's Sunday: add 5% on variable 14.
I guess I need a script, but I've never used one.

#### Andar

##### Veteran
no, control variable and mathematical knowledge is all you need.

adding 5% is mathematically the same as multiplying by 1.05, and that can be done by control variable

#### Ravens_Key_Games

##### Veteran
Mul... Now I see it.

Ah.... I going to delete this topic.
Time for say you thanks.

#### Aerosys

##### Veteran
I think you can calculate %-values with the variable operations the RMMV already has:

x = account value
x *= 5 <-- 5%
x /= 100
account value += x

#### Ravens_Key_Games

##### Veteran
I think you can calculate %-values with the variable operations the RMMV already has:

x = account value
x *= 5 <-- 5%
x /= 100
account value += x
Thanks. Done.

#### cabanas_ds

##### Veteran
can you show us the window of where you pulled this off? I need help setting this up still.

#### Shaz

##### Global Moderators

@cabanas_ds , please refrain from necro-posting in a thread. Necro-posting is posting in a thread that has not had posting activity in over 30 days. You can review our forum rules here. Thank you.

This is also someone else's thread. If you need help, please post your own thread, showing what you have tried, and saying what the results are.

Status
Not open for further replies.

### Latest Profile Posts

A sketch of a character for an upcoming chapter. I am pre-preparing the heck out of this one and future chapters, don't want to spend time figuring the story out again.
Today *Fix the game UI
RMMZ maxRows make me tired.
The game supports real-time language switching (really interesting).

Swag collecting in the new randomly generated area. Now the mini map also shows the randomly generated features... And even illustrates the whole "bubble" system" that I made to manage memory... Though that part's inadvertent. We'll just call that "the fog of war"... Yes, that's what we'll do. Nobody will be the wiser!
not me being not lazy for 5 seconds and drawing another char portrait (her name is hazel)
Been a while since the last time I made a song remix. Had a blast making this