Plugin: NeMV - State Resources Version: 1.2 Author: Nekoyoubi Release: April 27th 2016 Download: https://raw.githubusercontent.com/nekoyoubi/NeMV/master/NeMV_StateResources.js Requires: YEP - Buffs & States Core & YEP - Skill Core Introduction This plugin grants the ability to quantify states and use them as resources via YEP - Skill Core-friendly notetags. Features Use states as additional resources (beyond HP/MP/TP) Resource cost tags mimic YEP - Skill Core Assists in building entirely new functional mechanics Bonus feature if you use YEP - Auto Passive States & YEP - Subclass (Subclass passives! Woo!) Example Use Cases Separate resource pools for classes and subclasses (e.g. the initial request post) Build power-up abilities/buffs (e.g. use enough kinetic spells and enter a GOKU!! state) Alter damage formulas (e.g. poisons can stack to do more damage) Demonstration Servidion put together a pretty awesome showing of some of these things in action just a few short comments down. Check out his comments for sure, but here are the videos. How to Use Step 1 Designate your state to be used as a resource via the following notetag: State > Notebox > <RESOURCE INITIALVALUE, [MAXVALUE], [RESOURCENAME]> Below are a few of examples of valid State Resource notetags. <Resource 0, 100, Rage> <resource 10 20 Ammo> <RESOURCE 100, 9999> Note that the last example will attempt to only use the state's icon to show the resource cost. The following notetags can also be used to adjust or set the resources upon starting or exiting a battle. Please note that these tags make use of positive string values (e.g. +10) for increasing the resource, negative values (e.g. -10) for decreasing them, and integers (e.g. 10) for setting the amount explicitly. Also, please be sure that these lines are placed below the initial/setup <Resource> tag. State > Notebox > <RESOURCE PHASE: [+/-]AMOUNT> For example... <Resource BattleStart: 100> <RESOURCE BATTLEEND: 0> <resource battlestart: +10> <resource battleend: -10> In the first example all party members will have their resource set to 100. In the second, the resource will be zeroed out for all party members on the completion of battle. The third example will add 10 to whatever amount (while still being capped to the defined maximum) each individual party member has at the start of a new battle. The last example will force the party members to each lose 10 of the resource (while not falling below zero). Step 2 Add "SR" costs to your Skills with notetags similar to those found in YEP - Skill Core (albeit slightly modified for our case). Skill > Notebox > <SR STATEID COST: AMOUNT[%]> The following examples illustrate a couple of valid Skill notetag uses. <SR 19 Cost: 5> <sr 22 cost: 10%> Step 3 Use the following script commands to retrieve or adjust your current and maximum values of a resource (plugin commands may be added in a future version if wanted/needed). [Actor|Enemy].getSR(state) // Gets the actor's current resource value [Actor|Enemy].setSR(state, amount) // Sets the actor's current resource value [Actor|Enemy].getMaxSR(state) // Gets the actor's max resource value [Actor|Enemy].setMaxSR(state, amount) // Gets the actor's max resource value [Actor|Enemy].adjustSR(state, amount) // Adjusts the actor's current resource Note that the .adjustSR() method's amount can be either positive for adding to the current value (e.g. 10; not +10) or negative to remove from the pool (e.g. -10). This will also constrain the value to a range between zero and the resource's maximum for that actor. Script (external) NeMV on GitHub | SR on GitHub | SR on MV Plugins | SR on Stitch Gaming | >> Download SR << FAQ Q: Does this work with YEP - ______? A: This plugin requires YEP - Buffs & States Core and the YEP - Skill Core to perform its main function. For some extra fun, toss in the YEP - Subclass and YEP - Auto Passive States for extra functionality. Otherwise, I run an almost full YEP stack by default without issue. Q: Is this able to be used in commercial projects? A: Absolutely! Wouldn't that be cool?! Q: If I use this, do I need to say so anywhere? A: If you can make use of my work on any level, then I would absolutely love to know about it, but I make no attribution requirements or the like. NeMV is licensed under the WTFPLv2. Credits & Thanks Yanfly for building such awesome plugins for me to exploit! (Oh, and for still choosing not to shoot me.) Servidion for requesting the plugin in the first place, and letting me visually piggy-back on his use of it in testing. Author's Notes This plugin is the response to a plugin request from Servidion. Thanks to how awesome he is, I was able to not only build exactly the plugin he needed, but also to grow the core concept over the past few days into something that I hope will bring many new opportunities to makers. I hope you get more from it than you expect. Happy stacking!