I am knowledgeable on coding but when I look at the code for RPGMaker MZ I get extremely overwhelmed...
My idea is similar to VisuStella's ETB but it stores the actions and executes everything (both enemy and ally actions) after the user has spent all EP. Unlike VisuStella's which executes immediately and separates actions by enemy/ally turn.
I know the pipeline I want. It's basically
1. User uses EP to select actions (EP is either set by user in plugin settings or obtained from the number of party members)
2. Actions are stored in a queue (and using the cancel button uses queue.pop to obtain the cost and return it, as well as removing the action from the list)
3. Once user has used all EP, enemy actions are calculated and stored in the queue. All actors without an action are automatically set to default.
4. Actions in the queue are sorted by speed (descending)
5. Actions are executed in order of speed
6. New turn starts, EP goes up by 1 (until it reaches max)
Seems simple enough but I am just completely unaware of what functions I should override or cancel to properly do this.
I know I can get party number with $gameParty.members().length and I know I can generate enemy actions with $gameTroop.makeActions(). I assume I can set it so if makeActions() doesn't use all EP with a loop that generates more actions until EP is all used. And I can store the EP cost of actions in the queue along with the actual action so I can refund it if the user selects to undo a command.
So my questions are the following:
1. What function(s) do I override or modify so when the user selects an action, it stores it and the EP cost?
2. What function(s) do I override or modify so that it loops over the queue and executes actions until the queue is empty?
3. What do I modify so using the cancel button pops the last value in the queue during the input phase? And when EP is at max (no actions selected), go back to the party menu? (I assume it's a simple check to see if EP is current turn's max but I'm unsure how to make code that goes back to the party menu. Don't really know what does that.)
4. What do I modify so using the left and right buttons switches between actors in the party so the user can input their desired actions regardless of party actor order?
Sorry if this is too much, I'm just very new to this. I find it hard to find time to sit down and look at documentation. I want to code it myself since VisuStella might not be compatible with other plugins I want to use.
Thank you for reading even if you can't answer the question 🙂
My idea is similar to VisuStella's ETB but it stores the actions and executes everything (both enemy and ally actions) after the user has spent all EP. Unlike VisuStella's which executes immediately and separates actions by enemy/ally turn.
I know the pipeline I want. It's basically
1. User uses EP to select actions (EP is either set by user in plugin settings or obtained from the number of party members)
2. Actions are stored in a queue (and using the cancel button uses queue.pop to obtain the cost and return it, as well as removing the action from the list)
3. Once user has used all EP, enemy actions are calculated and stored in the queue. All actors without an action are automatically set to default.
4. Actions in the queue are sorted by speed (descending)
5. Actions are executed in order of speed
6. New turn starts, EP goes up by 1 (until it reaches max)
Seems simple enough but I am just completely unaware of what functions I should override or cancel to properly do this.
I know I can get party number with $gameParty.members().length and I know I can generate enemy actions with $gameTroop.makeActions(). I assume I can set it so if makeActions() doesn't use all EP with a loop that generates more actions until EP is all used. And I can store the EP cost of actions in the queue along with the actual action so I can refund it if the user selects to undo a command.
So my questions are the following:
1. What function(s) do I override or modify so when the user selects an action, it stores it and the EP cost?
2. What function(s) do I override or modify so that it loops over the queue and executes actions until the queue is empty?
3. What do I modify so using the cancel button pops the last value in the queue during the input phase? And when EP is at max (no actions selected), go back to the party menu? (I assume it's a simple check to see if EP is current turn's max but I'm unsure how to make code that goes back to the party menu. Don't really know what does that.)
4. What do I modify so using the left and right buttons switches between actors in the party so the user can input their desired actions regardless of party actor order?
Sorry if this is too much, I'm just very new to this. I find it hard to find time to sit down and look at documentation. I want to code it myself since VisuStella might not be compatible with other plugins I want to use.
Thank you for reading even if you can't answer the question 🙂