Three specific questions about States and how to implement them

DHL15

Villager
Member
Joined
Sep 2, 2017
Messages
16
Reaction score
0
First Language
English
Primarily Uses
RMVXA
Hello all! I'm back with two specific questions that I don't think Google could help me solve;

Question 1: I'm trying to implement a system, in which the enemy would charge up a move. And if you weren't guarding, AND didn't have a certain state applied, then the enemy would inflict a state on you, which would promptly kill the actor.

Example: The enemy is charging up a super secure "Grab" state. And if the single actor in battle doesn't Guard, and have an evasive state up, the enemy "Grabs" them, leading to a one hit ko. Whereas if they ARE guarding, and have a specific state applied, then the "Grab" state, the enemy would try to inflict, would be nullified.

Question 2; I'm trying to implement a state that increases your magic, or attack power by 250% UNTIL you use ANY attack that uses your ATK stat, or magic stat. Basically it's a state that increases a specific state until a move that uses that stat is used, in which case, the state goes away.

Example; The actor will "Power Charge", so that the next move that uses their ATK state, is more than doubled. They can wait however long they want to, UNTIL they use a skill that is based on their ATK stat. In which case, the damage is more than double for that attack, and the state goes away.

Question 3: How would I go about making a state, where it slowly decreases your HP, or MP, and after a specific amount of time, kills the actor?

Example; The actor is inflicted with a "Sluggish" state. Turns 1-3 with it inflicted, will take away 1% of their MP and prevent them from doing anything. After the fourth turn, the state straight up KO's the actor.

Thank you all to whoever attempts to help.
 

Harosata

Dramatic Lightning's BFF
Veteran
Joined
Aug 20, 2015
Messages
246
Reaction score
70
First Language
English
Primarily Uses
RMVXA
1. Thankfully, Guard applies a Guard state (which in turn applies a Guard flag). I use a custom formula module, but hopefully can fit this in Grab:

if b.state?(Guard) and b.state?(Evade); 0; else; b.add_state(GRAB); end

---

2. Hm, I would probably try the formula again:
c = damage; a.remove_state(ATKDouble); c

or

a.state?(ATKDouble) ? (a.remove_state(ATKDouble); damage * 2.5) : damage

---

3. That, I would recommend Himeworks' Progressive State script.
 
Last edited:

DHL15

Villager
Member
Joined
Sep 2, 2017
Messages
16
Reaction score
0
First Language
English
Primarily Uses
RMVXA
I'll go ahead and test these out right now, Thank you!

For Number 1, that goes into the skill Formula box, correct?
 

Harosata

Dramatic Lightning's BFF
Veteran
Joined
Aug 20, 2015
Messages
246
Reaction score
70
First Language
English
Primarily Uses
RMVXA
Yeah. Hopefully.
 

DHL15

Villager
Member
Joined
Sep 2, 2017
Messages
16
Reaction score
0
First Language
English
Primarily Uses
RMVXA
Yeah. Hopefully.
Alright so I just tried it, and it doesn't appear to work.

I replaced (Guard) (Evade) and (Grab) with their respective State numbers, and the enemy still seems to inflict the "Grab" state on the single actor during battle.

Here's what it looks like(it being the formula);
 

Harosata

Dramatic Lightning's BFF
Veteran
Joined
Aug 20, 2015
Messages
246
Reaction score
70
First Language
English
Primarily Uses
RMVXA
I'll have to remember to test that out later. In theory, it should do no damage if the target (b) has Guard AND Evade.

...Out of curiosity, are we both using AND correctly? Because this is what I translate from your post:

-if Guard and Evade, 0, meaning that both states must be present.
-if Not Guard and Not Evade, KO, meaning both states must be absent.

Alternatively, we could do:
!b.state?(9) and !b.state?(127) ? b.add_state(135) : 0
which means "add grab if target doesn't have both states".
 

DHL15

Villager
Member
Joined
Sep 2, 2017
Messages
16
Reaction score
0
First Language
English
Primarily Uses
RMVXA
Alright, so I went ahead and used your Alternative code;

!b.state?(9) and !b.state?(127) ? b.add_state(135) : 0

So whenever I have Guard, and the Evasive State up, no state is applied to me.

The problem is, I tested it by just applying "Guard" to the actor, and the "Grab" state, wasn't applied.
 

Harosata

Dramatic Lightning's BFF
Veteran
Joined
Aug 20, 2015
Messages
246
Reaction score
70
First Language
English
Primarily Uses
RMVXA
From what you say:
Guard + Evade = 0
Guard = 0

And from that code:
No Guard and No Evade = Grab
Guard and No Evade = 0
Guard and Evade = 0

Considering you find fault in one of the results, you're aiming for...
Guard + Evade = 0
Guard = Grab
Evade = Grab
Misc = Grab

---

Okay, here's a quick lesson to find out what we're looking for:
AND returns true if all conditions are true
OR returns true if at least one of them is true

So there's probably two ways to get the results we're looking for...hopefully:

b.state?(9) and b.state?(127) ? 0 : b.add_state(135)
!b.state?(9) or !b.state?(127) ? b.add_state(135) : 0

The first one should return 0 with both states and return grab for any other combinations. The second should return a state unless both states are active which will then return a zero. Both mean the same thing...
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,434
Reaction score
7,713
First Language
German
Primarily Uses
RMMV
The selection of which skill an enemy uses is done in its attack pattern, it can not be done in the skill itself. The code above is needed to check if the target is guarding and give different results, but the enemy charging before using a skill needs to be done by attack pattern and attack conditions there.
 

DHL15

Villager
Member
Joined
Sep 2, 2017
Messages
16
Reaction score
0
First Language
English
Primarily Uses
RMVXA
The selection of which skill an enemy uses is done in its attack pattern, it can not be done in the skill itself. The code above is needed to check if the target is guarding and give different results, but the enemy charging before using a skill needs to be done by attack pattern and attack conditions there.
So basically, the code above wouldn't work at all?

What would be an appropriate code to do how I want with Question 1?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,434
Reaction score
7,713
First Language
German
Primarily Uses
RMMV
The code works for the target side, it just can't do anything in the skill selection side for the enemy. You'll need both.

The "enemy charge turn" needs to be a skill that applies a state "charged for x" to the enemy itself, that will use up one turn for charging and provides a condition that can be used in the attack pattern.

In the enemy attack pattern have the powerskill be conditioned to only work when that state is in the enemy, and use the rating numbers to set the correct probabilities for that dass.
 

DHL15

Villager
Member
Joined
Sep 2, 2017
Messages
16
Reaction score
0
First Language
English
Primarily Uses
RMVXA
Sorry for the long and delayed response from me.

So basically, what I'm unsure of is, what formula would I put into the specific skill itself, that would detect the singular actor's states?
 

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

Latest Threads

Latest Posts

Latest Profile Posts

On my journey of character rework: I had this character, she was meant to be just a princess that joins your party. And at long term she was just uninteresting... So I tweaked her to be a rebel agaisn't the royalty before meeting up with the party.

Quick tip for any other ametuer pixel artists! When trying to create a colour palette, enabling Antialiasing can speed up the process of creating different shades! Just place your lightest colour and your darkest colour next to each other, select both pixels, and stretch it out!
Revolutionizing the JRPG Industry: Knocking on Doors.

Take that, murderhobos.
Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.

Forum statistics

Threads
106,054
Messages
1,018,580
Members
137,843
Latest member
Betwixt000
Top