(Solved) Multiple actions, states, and programming eloquence

Discussion in 'RPG Maker MV' started by marbeltoast, Dec 5, 2018.

Thread Status:
Not open for further replies.
  1. marbeltoast

    marbeltoast Your future fish emporer Veteran

    Messages:
    58
    Likes Received:
    18
    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.
     
    #1
  2. Grunwave

    Grunwave Veteran Veteran

    Messages:
    460
    Likes Received:
    118
    First Language:
    English
    How do they obtain the status effect initially?
     
    #2
  3. NinjaKittyProductions

    NinjaKittyProductions Professional Murder Hobos Veteran

    Messages:
    254
    Likes Received:
    187
    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.
     
    #3
    marbeltoast likes this.
  4. marbeltoast

    marbeltoast Your future fish emporer Veteran

    Messages:
    58
    Likes Received:
    18
    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: Dec 5, 2018
    #4
  5. Grunwave

    Grunwave Veteran Veteran

    Messages:
    460
    Likes Received:
    118
    First Language:
    English
    What turn battle system is in your project?
     
    #5
  6. marbeltoast

    marbeltoast Your future fish emporer Veteran

    Messages:
    58
    Likes Received:
    18
    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.
     
    #6
  7. Grunwave

    Grunwave Veteran Veteran

    Messages:
    460
    Likes Received:
    118
    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:
     
    #7
  8. marbeltoast

    marbeltoast Your future fish emporer Veteran

    Messages:
    58
    Likes Received:
    18
    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...

    ...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.
     
    #8
  9. slimmmeiske2

    slimmmeiske2 Little Red Riding Hood Moderator

    Messages:
    5,417
    Likes Received:
    4,086
    Location:
    Belgium
    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.

     
    #9
Thread Status:
Not open for further replies.

Share This Page