firestalker

Veteran
Veteran
Joined
Nov 18, 2015
Messages
401
Reaction score
55
First Language
English
Primarily Uses
RMMV
So what I want to do is make a variable that starts out at a number, but have that number change as it's used. Like the PArameter arc in the Hero tab, but something I make using variabes and script calls. Since my game has no levels in it I need a way to have the enemies grow with the heroes.... but I want the growth to slowly fall away as the growth continues.
This is one of many common events I've used to make the enemies stats:
Code:
◆Control Variables:#0122 Combined STATS hp = $gameVariables.value(63) + $gameVariables.value(71)
◆Control Variables:#0123 Combined STATS mp = $gameVariables.value(64) + $gameVariables.value(72)
◆Control Variables:#0124 Combined STATS atk = $gameVariables.value(65) + $gameVariables.value(73)
◆Control Variables:#0125 Combined STATS def = $gameVariables.value(66) + $gameVariables.value(74)
◆Control Variables:#0126 Combined STATS mat = $gameVariables.value(67) + $gameVariables.value(75)
◆Control Variables:#0127 Combined STATS mdf = $gameVariables.value(68) + $gameVariables.value(76)
◆Control Variables:#0128 Combined STATS agi = $gameVariables.value(69) + $gameVariables.value(77)
◆Control Variables:#0129 Combined STATS luk = $gameVariables.value(70) + $gameVariables.value(78)
◆Control Variables:#0183 Atk Modifier [Enemies] = Math.floor($gameVariables.value(122) / 20)
◆Control Variables:#0184 HP Modifier [Enemies] = $gameVariables.value(124) * 18
◆Control Variables:#0128 Combined STATS agi -= 5
◆Script:$gameVariables.setValue(122, Math.min(Math.floor((Math.random() * 60) + 35) + $gameVariables.value(184), 9000));
:      :$gameVariables.setValue(123, Math.min($gameVariables.value(123) + Math.floor((Math.random() * 30) + 10), 6000));
:      :$gameVariables.setValue(124, Math.min(6 + $gameVariables.value(183) + Math.randomInt(2), 75));
:      :$gameVariables.setValue(125, Math.min($gameVariables.value(125) + Math.randomInt(1), 75));
:      :$gameVariables.setValue(126, Math.min($gameVariables.value(126) + Math.randomInt(2), 75));
:      :$gameVariables.setValue(127, Math.min(5 + $gameVariables.value(127) + Math.randomInt(2), 75));
:      :$gameVariables.setValue(128, Math.min($gameVariables.value(128) + Math.randomInt(2), 75));
The variables labelled Combined STATS are just that... The combined stats of the two main playable characters.

As it is now, the growth is steady and then just stops when it hit the max number I set. How can I make the growth more of an arc than a line?
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
2,791
Reaction score
1,638
First Language
English
Primarily Uses
RMMV
How can I make the growth more of an arc than a line?
Sounds like you're looking for a logarithmic progression. MV doesn't provide that functionality directly in the Control Variables math, but you can use script calls that use JavaScript's Math.log(), Math.log10(), etc.

You could look up some samples online, or check out one of the various threads on damage formulae, they'll have examples of equations using Math.log and how you can expect them to function (or just hit F8 while you're playing, go to the console tab, and type in some things to experiment).
 

firestalker

Veteran
Veteran
Joined
Nov 18, 2015
Messages
401
Reaction score
55
First Language
English
Primarily Uses
RMMV
Math.log() seems like it automatically makes a graph. What I was trying to do is make the enemies grow with the player. So if the player raises their HP than the enemies ATK will rise in proportion. What I would like to have happen is that as the player continues to raise the HP the growth of the enemies ATK will gradually stop growing as well. So the Growth will gradually slow until it finally stops all together...

Is there a way to do that using Variables or script calls?
 

Latest Threads

Latest Posts

Latest Profile Posts

"16. Do NOT contact other members by private message, on the forum or status feed, inviting them to put additional tools (such as leaderboards, ads, etc - whether yours or another person's) into their game."
Oh no. Necessity is the mother of invention. Do I want to know what happened?
Early WIP for my next entry. Since it's early you're going to need to wait a little longer than usual. What's that? You'll find out in my next update!
12.PNG
20 festive cards can now be unlocked in BiteMe!

The cards are permanent, but can only be unlocked in December!
Once the year is over, you won't be able to unlock the cards, or to upgrade it.
https://johndoenews.itch.io/biteme-storymodeCard141-160-Ad.png
Finally showing some updates again

Forum statistics

Threads
117,181
Messages
1,105,243
Members
153,307
Latest member
nyhkkbjyek
Top