OpalWysty

Mainly scared and confused
Member
Joined
Dec 3, 2021
Messages
4
Reaction score
4
First Language
English
Primarily Uses
RMMV
I have a skill that should remove a random negative state from an actor. Like a "cure".

I've been playing around with the program but can't seem to find the answer. Do I have to use a plugin?
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
3,193
Reaction score
1,890
First Language
English
Primarily Uses
RMMV
Yes, because in the default engine there's no such thing as a "negative" state, there are just states. You can use something like Yanfly's State Categories to add positive and negative labels, and then manipulate those with skills.
 

pawsplay

Veteran
Veteran
Joined
Mar 29, 2012
Messages
389
Reaction score
136
First Language
English
Primarily Uses
RMMV
If you already know the states you want to remove, you can just a random number.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
3,193
Reaction score
1,890
First Language
English
Primarily Uses
RMMV
True, you could create an array of the IDs of your states that you consider to be negative, check if the target has each one and make a new array (presuming you want it to be guaranteed to remove a negative status if possible)...it's getting a bit complicated for a damage formula, and you'd have to manually add to the list every time you make a new state that should be negative.

But, for example...
var negStates=[5, 21, 33, 56]; var targStates=[]; for (var i=0; i<negStates.length; i++) {if (b.isStateAffected(negStates[i]) targStates.push(negStates[i]);}; if (targStates.length>1) b.removeState(targStates[Math.randomInt(targStates.length)]); Your healing formula here

And you replace the numbers listed in the brackets after negStates= with all of the IDs of negative states you want the skill to be able to remove.

If I typed that mess out correctly, that should remove a random negative state that the target has before healing them.
 

Latest Threads

Latest Profile Posts

SF_People3_5 added!
index.php

Marketing seems to be about reducing dependence on luck to sell a product, as well as expanding the number of avenues in which luck can play a role in selling a product.
So, I've been wanting to do this randomized logic puzzle in my game for years now. I finally figured out how to do it by using arrays and a few small script calls. It's based on the Einstein Fish Puzzle! :D Though, I have no idea how to actually have the player put in answers.... might start a thread about it.

The projectiles shown in this video are as follows:
1, Basic Triple
2, 30-Degree Arc
3, Randomized Blast Wave
4, 8-way
5, 8-way Double
6, 8-way Slowness
7, 120-Degree Arc Repetitive
8, Projective Triple
9, Split 8-way
10, 2-way Split Randomized Arc
11, HP-MP Split Arc
12, Split Laser
13, Shock
14, Cosine
Drop shadows and water reflections tests in RPG Maker VX Ace


BgI3F80.png

Forum statistics

Threads
118,626
Messages
1,117,427
Members
155,714
Latest member
Teamadoration
Top