I made an action point system using Yanfly plugins. Now, not every skill uses this AP system but most does. And what uses it runs the exact same code every time which is
(x is the AP cost)
It works without an issue, I'm just wondering if there's any way I don't have to copy paste this whole thing into every skill notebox and just simply write it similarly to a Javascript function?
I don't have the sufficient coding knowledge to do anything beyond this.
The following plugins are used in this:
(x is the AP cost)
Code:
//Action Point Setup
//This makes the skill not end turn.
<Instant>
//This controls the actual requirement that the game uses to determine if the skill can be used or not.
<Custom Requirement>
if (a.ap >= x) {
value = true;
} else {
value = false;
}
</Custom Requirement>
//This controls what the UI displays next to the skill as a requirement.
<Custom Cost Display>
x
</Custom Cost Display>
//This controls the loss of Action Points after the skill was used.
<Custom Execution>
a.addCParam(0, -x)
</Custom Execution>
It works without an issue, I'm just wondering if there's any way I don't have to copy paste this whole thing into every skill notebox and just simply write it similarly to a Javascript function?
I don't have the sufficient coding knowledge to do anything beyond this.
The following plugins are used in this: