Stockpile/SpitUp/Swallow for VX Ace.

Alarkus

Veteran
Veteran
Joined
Oct 15, 2016
Messages
78
Reaction score
35
First Language
English
Primarily Uses
RMVXA
Hello.
For RPG Maker MV, Yanfly has a convenient collection of mini-scripts for a Stockpile, Spit Up, and Swallow ability, similar to Pokemon.
For those unfamiliar, a character "stocks up", and then after doing so, can use spit up or swallow and the damage, or HP recovered is based off of how many stocks you have.
I've been able to make an easy workaround for Stockpile by simply using a stack-states script, making Stockpile a state, and have a common event check a variable each time the skill is used to determine how many stocks there are (and if they attempt to use it more than the max it resets)
However, creating the Spit Up and Swallow parts are difficult. I suppose the simplest way would be for there to be a small script that
A. Checks for the designated variable to see how many stocks there are
and
B. Based off of that, adjust the damage (or in Swallow's case healing) formula for that particular skill.
I feel like this should be simple, but my knowledge of Ruby is incredibly amateur.
 

Alarkus

Veteran
Veteran
Joined
Oct 15, 2016
Messages
78
Reaction score
35
First Language
English
Primarily Uses
RMVXA
I managed to figure out a solution and will leave what I did here for future searches by other users:

-Create a Common Event "Stockpile" that simply checks a variable to see if it's at your max stockpile stack rate, if it is, the event resets the variable to 0 (this could also just prevent it from going any higher), if it's not then it adds to the variable.
-Create a Stockpile State that adds to defense and mag. defense and use the Stacking States script by Neon Black to stack it:
https://forums.rpgmakerweb.com/index.php?threads/stacking-states.14110/
-Create a Common Event "Stockpile Reset" that resets the counter and state (This will be applied to skills later)
-Create two "Fake Skills", Spit Up and Swallow
-These two skills will do nothing but activate two common events for each. "Spit Up Check and Swallow Check".
-These two common events will check the stated variable, and if it's 0 give a failure message. If anything else it'll force the ACTUAL Spit up or Swallow skill to occur.
-The ACTUAL Spit Up and Swallow Skill will also activate the previous mentioned Reset Common Event, so the player will lose the state and reset after using the skill.
-In the HP Damage/HP recover section, use the following formulas:

Code:
#For Spit Up
$game_variables[25] * a.mat*4-b.mdf*2 + 150

#For Swallow
$game_variables[25] * a.mat*3 + 100
Adjust the [x] Variable number to whatever your variable is. The formula can also be adjusted as needed.

Finally, you need one last thing...
-Yanfly's "Anti Fail" script, so the "Fake Skills" won't display any text and will just run the common event.
https://yanflychannel.wordpress.com/rmvxa/utility-scripts/anti-fail-message/
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

The video of a psycho chasing people on the streets with a sword before getting subdued is wild. Apparent screenshots of his Twitter feed before it went private reveal a dangerous delusional mindset. I heard there was a bow person too. The crazies are really coming out of the woodworks.
Stream will be live shortly with some Witcher 3, followed by a session of the Interactive Text Adventure! Feel free to drop by!
Managed to find a way to hang a bed cover over my window. So no more being toasted alive in the afternoon!:kaoswt2:
So, uh, has anyone tried buying any resources from KokoroReflections? Because I've been looking for a 'buy' button on the site for like 10 minutes now and can't find one.
Any also thought it's too cringy to put the word "and you" in your credit as a special thanks?
Cause that's what I thought...

Forum statistics

Threads
97,991
Messages
948,384
Members
129,252
Latest member
GameDevJohn
Top