- Joined
- Feb 5, 2014
- Messages
- 184
- Reaction score
- 31
- First Language
- English
- Primarily Uses
So I have successfully and quite easily (thanks to Yanfly's script design) added a variable controlling bar that the player can set in Yanfly's System Options script.
I have altered the calculation of the number of steps until the next encounter as well.
My question is whether it is possible for the alteration of the variable to cause a change immediately.
To explain what I mean:
Let's say my equation to calculate encounter is: n + $game_variables[x]
n = the default average set up on the map
x = the variable that is being controlled in Yanfly's System Options.
Once the player enters a map or finishes a battle. n is established.
By default the value of variable x = 0.
Let's say the map rolls n = 5.
5 steps later a battle will occur and n will be rerolled. Let's say to 7 this time.
If the player thinks that is too frequent they can go to the system options and change variable x.
Let's say the player sets the value of x to 20.
The problem is that n has already been rolled to be 7 and the count has already been set.
The changes applied in the menu will not take effect until there is another rolling of n.
The reroll won't happen again until a battle or a new screen, then the variable will be considered.
Is there any way to have it so that the encounter rate is rerolled when the setting for variable x is changed in the System Options Screen and it take effect immediately.
In the above example, I would want the 7 that rolled after the encounter to be rerolled and recalculated to something around 26. (reroll n = 6 + x value = 20).
Sorry for the long and probably over elaborate explanation. I hope someone has some ideas. Maybe a parallel process? But even then I wouldn't know how best to approach it. Thanks in advance for any ideas.
~ Dinhbat
I have altered the calculation of the number of steps until the next encounter as well.
My question is whether it is possible for the alteration of the variable to cause a change immediately.
To explain what I mean:
Let's say my equation to calculate encounter is: n + $game_variables[x]
n = the default average set up on the map
x = the variable that is being controlled in Yanfly's System Options.
Once the player enters a map or finishes a battle. n is established.
By default the value of variable x = 0.
Let's say the map rolls n = 5.
5 steps later a battle will occur and n will be rerolled. Let's say to 7 this time.
If the player thinks that is too frequent they can go to the system options and change variable x.
Let's say the player sets the value of x to 20.
The problem is that n has already been rolled to be 7 and the count has already been set.
The changes applied in the menu will not take effect until there is another rolling of n.
The reroll won't happen again until a battle or a new screen, then the variable will be considered.
Is there any way to have it so that the encounter rate is rerolled when the setting for variable x is changed in the System Options Screen and it take effect immediately.
In the above example, I would want the 7 that rolled after the encounter to be rerolled and recalculated to something around 26. (reroll n = 6 + x value = 20).
Sorry for the long and probably over elaborate explanation. I hope someone has some ideas. Maybe a parallel process? But even then I wouldn't know how best to approach it. Thanks in advance for any ideas.
~ Dinhbat
Last edited by a moderator:

