Enemy Action Patterns with a State condition not working properly.

Little Paw

Veteran
Veteran
Joined
May 5, 2013
Messages
707
Reaction score
294
First Language
English
Primarily Uses
Or... I assume that they aren't supposed to work this way...?

So, seeing as that my previous plans failed due to script incompatibility issues, I decided to try a new strategy for my super secret boss.

Every 3 turns, he's supposed to "change classes". This is done by using a Troop event which calculates a random number into a variable and then, based on which number is chosen, changes him to a specific class (which is a state). Here's the event in question.



(This is just a shortened version. Once I've got the kinks worked out, I'll add the rest of the classes).

Now, once our enemy has gained his new class, his attack patterns change. I have his skills set up so that only Black Magic is used when he's in the Black Mage state/class, and only Knight skills are enabled when he's a Knight. Problem is... it doesn't seem to be working correctly...

For example, I've seen him use Armor Break after having switched to Black Mage... which should not be possible... The Action Patterns clearly specify that, for example, Blizzard, is only set to be used when the boss is afflicted with the Black Mage state. So what's the deal? Am I doing something wrong?
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
post a pic of the skill set-up too...
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
it can be that the action is already decided before the class happens... to verify, does it happen only right after the change?
 

Little Paw

Veteran
Veteran
Joined
May 5, 2013
Messages
707
Reaction score
294
First Language
English
Primarily Uses
it can be that the action is already decided before the class happens... to verify, does it happen only right after the change?
Well, I'm using Yami's Charge Turn Battle system, which handles turns a bit strangely. To this system, a "Turn" is a single act by any character or enemy, so for example, Poison will tick every single time anyone acts instead of just when the person afflicted with it acts. An "Action" is someone's actual turn being taken.

When the enemy's turn comes up, in this case, the state popups for +(Class 1) and -(Class 2) appear, and then an action is taken, but that, for all I know, could just be on a visual scale and the calculations could come in the opposite order. I do not know when the battle system determines an enemy's action, whether it be JUST before they act, or at some point beforehand.

Also, speaking of the opposite order, I've also tried having it erase the existing class before applying the new one, but the problem still persists.
 

Espon

Lazy Creator
Veteran
Joined
Mar 20, 2012
Messages
1,810
Reaction score
192
First Language
Gibberish
Primarily Uses
RMMV
I think enemies choose what they're going to do before the turn begins, so if a troop event changes its "class" at the start of the turn, it's still going to do what its already decided.
 

Little Paw

Veteran
Veteran
Joined
May 5, 2013
Messages
707
Reaction score
294
First Language
English
Primarily Uses
I think enemies choose what they're going to do before the turn begins, so if a troop event changes its "class" at the start of the turn, it's still going to do what its already decided.
So is there another way I can try triggering this so it will work?
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
I agree with Espon, based from the situation, I think it's safe to assume that it happens before the turn starts...

Since your state application is only after 1 + 3*X turns, we can verify this...

See if he only uses the wrong ability at the first "turn" that the state is changed... if yes, then it verifies our assumption...

And yes, you can edit it... I think it's just a matter of method call relocation... like if the call is being made before turn start, just put it after turn start...
 
Last edited by a moderator:

Espon

Lazy Creator
Veteran
Joined
Mar 20, 2012
Messages
1,810
Reaction score
192
First Language
Gibberish
Primarily Uses
RMMV
Try setting it to "End of Turn" in the troop settings and see if it does what it's supposed to on the next turn.  You would have to push it back a turn but it shooouuld play out similarly.  Might not display states correctly if you use a script that displays states, though.

Alternately, try finding a script that changes up how the battle is processed.
 

Little Paw

Veteran
Veteran
Joined
May 5, 2013
Messages
707
Reaction score
294
First Language
English
Primarily Uses
I agree with Espon, based from the situation, I think it's safe to assume that it happens before the turn starts...

Since your state application is only after 1 + 3*X turns, we can verify this...

See if he only uses the wrong ability at the first "turn" that the state is changed... if yes, then it verifies our assumption...

And yes, you can edit it... I think it's just a matter of method call relocation... like if the call is being made before turn start, just put it after turn start...
Nope. At the start, he switched to Knight.

His first change, he switched to Black Mage. During this period, he only used Victory Blade and Judgment, the skills he can use as any class.

His second change, a few turns later, he went back to White Mage. Still only Victory Blade and Judgment.

His third change, he went back to Knight. And used Inferno, which should only happen as a Black Mage.

Try setting it to "End of Turn" in the troop settings and see if it does what it's supposed to on the next turn.  You would have to push it back a turn but it shooouuld play out similarly.  Might not display states correctly if you use a script that displays states, though.

Alternately, try finding a script that changes up how the battle is processed.
Setting it to end of turn, both with and without the Turn No. condition cause him to never change states at all.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
oh wait, in each of his turns, he changes right? then we cannot validate the assumption... we can only do this if his transformation lasts for at least two of his turns...

so in that case...

And yes, you can edit it... I think it's just a matter of method call relocation... like if the call is being made before turn start, just put it after turn start...
 
Last edited by a moderator:

Little Paw

Veteran
Veteran
Joined
May 5, 2013
Messages
707
Reaction score
294
First Language
English
Primarily Uses
oh wait, in each of his turns, he changes right? then we cannot validate the assumption... we can only do this if his transformation lasts for at least two of his turns...

so in that case...
Well like I said, the battle system calculates turns strangely. He can change states even when it's not his turn to take action, since it's based on the passage of EVERYONE'S turns and not just his own.

If I could make it call for Action End instead of Turn End, then this would probably be much simpler...
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
then you'd just need to edit the part where the actions are chosen...
 

Little Paw

Veteran
Veteran
Joined
May 5, 2013
Messages
707
Reaction score
294
First Language
English
Primarily Uses
then you'd just need to edit the part where the actions are chosen...
You mean like... edit the actual script?

Because I haven't the faintest idea about script-editing.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
yeah... I don't have Yami's CTB so I cannot check it out for you (in case Yami overrode the time the action selection method is run)...
 
Last edited by a moderator:

Little Paw

Veteran
Veteran
Joined
May 5, 2013
Messages
707
Reaction score
294
First Language
English
Primarily Uses

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
Well like I said, the battle system calculates turns strangely. He can change states even when it's not his turn to take action, since it's based on the passage of EVERYONE'S turns and not just his own.


If I could make it call for Action End instead of Turn End, then this would probably be much simpler...
I think I found your main misunderstanding in this.
There is no "HIS" turn, there is only a single turn in which every actor has one action.


In default (without CTB), all enemy actions are determined and set before the first action happens, because the skill use does change the order in which the enemies and actors have their actions.


That means in default, all enemy actions are set before the first enemy can make its action - and most probably the troop event is processed after the skills are selected but before the skills are executed. I don't know that for sure, but everything I've seen so far indicates that this assumption is correct. it's especially vital do to it in this way because otherwise the "force action" command would not work - if the skill is selected after the event, it would override the force action.


Now a lot depends on how Yami's CTB script works (I don't know it). Most probably (because it's easier that way) it keeps the troop event at front and only replaces the action sequence with a CTB, and uses it's own call for skill selection. That would still mean that the state application/event processing is outside the action processing, creating a lot of problems with sequences such as you want.


To solve your problem, I think there might be several ways - none easy.


1)Find a CTB script or an add-on to a CTB that processes events at the beginning of each action. That basically means that you need new event triggers for those troop events. There are some scripts that add new triggers to troop events, but compatibility is extremely critical (and not likely, but you can try).


2)Don't use action patterns, but force-action the boss. In that part of your event where the state is changed, add another random check for a force action to the skill you want the boss to use (you might even remove the states if they have no other use than the selection). Depending on how Yami's CTB works, you might have to do the force action every action/turn.
 

Little Paw

Veteran
Veteran
Joined
May 5, 2013
Messages
707
Reaction score
294
First Language
English
Primarily Uses
I think I found your main misunderstanding in this.

There is no "HIS" turn, there is only a single turn in which every actor has one action.

In default (without CTB), all enemy actions are determined and set before the first action happens, because the skill use does change the order in which the enemies and actors have their actions.

That means in default, all enemy actions are set before the first enemy can make its action - and most probably the troop event is processed after the skills are selected but before the skills are executed. I don't know that for sure, but everything I've seen so far indicates that this assumption is correct. it's especially vital do to it in this way because otherwise the "force action" command would not work - if the skill is selected after the event, it would override the force action.

Now a lot depends on how Yami's CTB script works (I don't know it). Most probably (because it's easier that way) it keeps the troop event at front and only replaces the action sequence with a CTB, and uses it's own call for skill selection. That would still mean that the state application/event processing is outside the action processing, creating a lot of problems with sequences such as you want.

To solve your problem, I think there might be several ways - none easy.

1)Find a CTB script or an add-on to a CTB that processes events at the beginning of each action. That basically means that you need new event triggers for those troop events. There are some scripts that add new triggers to troop events, but compatibility is extremely critical (and not likely, but you can try).

2)Don't use action patterns, but force-action the boss. In that part of your event where the state is changed, add another random check for a force action to the skill you want the boss to use (you might even remove the states if they have no other use than the selection). Depending on how Yami's CTB works, you might have to do the force action every action/turn.
While that is all very informative, that doesn't really explain the core problem - why can the enemy still use skills SEVERAL turns later that should be prohibited? It would be one thing if it were only one or two actions later, since the previous "turn"'s troop event may still be in effect, but this was many turns later...
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
While that is all very informative, that doesn't really explain the core problem - why can the enemy still use skills SEVERAL turns later that should be prohibited? It would be one thing if it were only one or two actions later, since the previous "turn"'s troop event may still be in effect, but this was many turns later...
Could it be that the CTB completely redefines the turn mechanic?
Try the following test: add a common event to each skill that checks the state at the moment of completion, and have the common event for the state change record and display how often and when it's processed. Then count the number of actions from that boss to check if they correspont to the turns displayed.


If the turn mechanic is redefined, it might be that the internal turn number is not the same as the numbers of attacks. I'm experimenting with CTB/ATB myself to create skills that need different times, allowing two or three uses of fast skills in the same time as a use of a slow skill - if Yami's CTB (which I haven't tested yet) allows the same function, "turns" might have become undefined...
 

Little Paw

Veteran
Veteran
Joined
May 5, 2013
Messages
707
Reaction score
294
First Language
English
Primarily Uses
Could it be that the CTB completely redefines the turn mechanic?

Try the following test: add a common event to each skill that checks the state at the moment of completion, and have the common event for the state change record and display how often and when it's processed. Then count the number of actions from that boss to check if they correspont to the turns displayed.

If the turn mechanic is redefined, it might be that the internal turn number is not the same as the numbers of attacks. I'm experimenting with CTB/ATB myself to create skills that need different times, allowing two or three uses of fast skills in the same time as a use of a slow skill - if Yami's CTB (which I haven't tested yet) allows the same function, "turns" might have become undefined...
I'm not sure I understood those instructions...
 

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

Latest Threads

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD

Forum statistics

Threads
105,868
Messages
1,017,072
Members
137,578
Latest member
JamesLightning
Top