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

Status
Not open for further replies.
Joined
Jun 29, 2019
Messages
35
Reaction score
2
First Language
Italian
Primarily Uses
RMMV
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
Veteran
Joined
Mar 5, 2013
Messages
32,345
Reaction score
8,078
First Language
German
Primarily Uses
RMMV
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
 
Joined
Jun 29, 2019
Messages
35
Reaction score
2
First Language
Italian
Primarily Uses
RMMV
Mul... Now I see it.

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

Aerosys

Veteran
Veteran
Joined
Apr 23, 2019
Messages
512
Reaction score
486
First Language
german
Primarily Uses
RMMZ
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
 

cabanas_ds

Veteran
Veteran
Joined
Aug 13, 2020
Messages
94
Reaction score
25
First Language
english
Primarily Uses
RMMV
can you show us the window of where you pulled this off? I need help setting this up still.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
41,867
Reaction score
14,520
First Language
English
Primarily Uses
RMMV

@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 Threads

Latest Profile Posts

When you don't find any time to work... :kaocry:
First Ten Minutes of my Caretaker inspired game

Finally, I got a good Gmail message [from smg5urded]
"This game does look a bit plain, but, I'm sure this does not destroy the experience as a whole. Monsters fit your style of game-play, mapping looks crude but I'm sure you can make it better if you do a remake of Forgotten Eclipse"
Going to start a new project today. OMG, it will be on RPGMaker MV. :D
Paid material WIP~
EysZO9cVEAEWy9W

This is Alchemy pack.
I decided to add more witch elements.

Now we have wooden props, candles, pots, and potion bottles.
We also want to add herbs, kettles, fireplaces, etc.

Forum statistics

Threads
110,397
Messages
1,052,952
Members
143,454
Latest member
pinhapower
Top