(Solved) Multiple actions, states, and programming eloquence

Status
Not open for further replies.

marbeltoast

Your future fish emporer
Veteran
Joined
Nov 11, 2018
Messages
80
Reaction score
28
First Language
English
Primarily Uses
RMMV
Hey all! Fair warning: this one gets a little complicated.


Using Yanfly's instant cast plugin, I have created a system where characters can do two things each turn: use a "quick skill", and perform their normal action. It should be noted that the turn ends if the player uses their normal action before the "quick skill". One of these "quick skills" (let's call it "X" for simplicity) is intended to allow the player an aditional normal action on the turn after it is used, at the cost of the "quick skill" for that turn.

Here's the problem:

My current method is to give the player a status effect that allows them to act twice on a turn which wears off after their next turn, but because the plugin allows the player to use "X" and carry on with their turn as normal, and the status effect is applied instantly, this means the player would be able to perform two normal actions this turn as well as next turn, and we don't want that. (I don't have any problems with preventing users from using "quick skills" on either of the two turns, so no need to mention that.)

Here's what I've come up with so far:

I could use a combination of a bolean and the event pages in combat to add the effect at the end of the turn rather than during it, but the problem is that I have a great many different battles in my game (300+, I've yet to make them all but there's going to be a lot) and even if I use a common event to handle the code with each battle page redirecting to the common event, that's still a whole hell of a lot of copy pasting to do.


I feel like there's got to be a more eloquent solution. If you can think of anything, do let me know, and thank you for reading!

Note to moderators: I'm not sure whether this one should belong in this forum or in the plugin support forum, because even though the issue is caused by a plugin, the proposed solution is almost entirely a programming matter.
 

Grunwave

Veteran
Veteran
Joined
Feb 4, 2017
Messages
586
Reaction score
158
First Language
English
How do they obtain the status effect initially?
 

NinjaKittyProductions

Professional Murder Hobos
Veteran
Joined
Jul 9, 2013
Messages
484
Reaction score
467
First Language
English
Primarily Uses
RMMV
Have you tried using the 'action end' instead of 'turn end' on the custom state? If the quick skill gives an extra normal action, setting the state to action end 2-2 should end the state after the character takes 2 normal actions.
 

marbeltoast

Your future fish emporer
Veteran
Joined
Nov 11, 2018
Messages
80
Reaction score
28
First Language
English
Primarily Uses
RMMV
Grunwave The skill named X gives it to them.

Kamuipsyus I certainly could do that, but my desire is to make the extra action apply to the next turn and only the next turn. With your proposed solution they could use "X" and then both of the other actions on the first turn, which is what I am trying to avoid.
 
Last edited by a moderator:

Grunwave

Veteran
Veteran
Joined
Feb 4, 2017
Messages
586
Reaction score
158
First Language
English
What turn battle system is in your project?
 

marbeltoast

Your future fish emporer
Veteran
Joined
Nov 11, 2018
Messages
80
Reaction score
28
First Language
English
Primarily Uses
RMMV
Grunewave Basically the default system. You pick what you want to do for all teammates one at a time and then all living actors and enemies do their turn all at once in order of agility.
 

Grunwave

Veteran
Veteran
Joined
Feb 4, 2017
Messages
586
Reaction score
158
First Language
English
I use CTB from yanfly and use Agility as my speed calculator.

If you want to use a CTB system, you temporarily raise Agility by a certain number to get two turns back-to-back.

This might accomplish what you are after too:
 

marbeltoast

Your future fish emporer
Veteran
Joined
Nov 11, 2018
Messages
80
Reaction score
28
First Language
English
Primarily Uses
RMMV
Grunwave Thanks for the help, but I'm not sure this would do what I'm looking to do. I'll be honest, I'm starting to think that this way of doing it...

Have you tried using the 'action end' instead of 'turn end' on the custom state? If the quick skill gives an extra normal action, setting the state to action end 2-2 should end the state after the character takes 2 normal actions.
...would just work better than my original idea anyway. Also, it's a solution that is proven to work, and that's more than I can offer.

At any rate, thank you both for your time and assistance.
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
7,842
Reaction score
5,227
First Language
Dutch
Primarily Uses
RMXP

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

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

Latest Threads

Latest Profile Posts

I should realize that error was produced by a outdated version of MZ so that's why it pop up like that
Ami
i can't wait to drink some ice after struggling with my illness in 9 days. 9 days is really bad for me,i can't focus with my shop and even can't do something with my project
How many hours have you got in mz so far?

A bit of a "sparkle" update to the lower portion of the world map. :LZSexcite:
attack on titan final season is airing tomorrow, I'm excited and scared at the same time!

Forum statistics

Threads
105,882
Messages
1,017,230
Members
137,607
Latest member
Maddo
Top