HeroRuka 0 Posted April 1, 2017 I posted this in the Editor Support and Discussion side, but it seems that this might require a script. I'll just post here what I put over there. A script that lets you gain more and more SP everytime you use a certain skill. Let's call the skill "Charge" for now. For example: X uses Charge turn 1, gives 2 MP. X uses Charge turn 2, gives 3 MP. X uses Charge turn 3, gives 4 MP. X attacks/does not use Charge this turn. X uses Charge turn 5, gives 2 MP again. If there's a way to do this without a script, that'd be great and maybe better! Share this post Link to post Share on other sites
Harosata 6 Posted April 1, 2017 (edited) Are you sure? By basic definition, you could just use one variable for Charge, Variable 1 for example. Then for Charge, you would do $game_variables[1] += 1; $game_variables[1] + 1 So that if $game_variables start at 0, it becomes 1 and returns 2 MP, then the next time, it becomes 2 and returns 3 MP, etc. The downside is that you would have to put if a.actor? and a.id == 2; $game_variables[1] = 0; end; (your damage here) in every other skills to reset the "Charge". At least you can remove the condition for unique skills. --- Second method instead of using all those formulas, you want to write a new snippet using Scene_Battle's invoke_item or apply_item_effects and insert this if @subject.actor? and actor.id == 2 if item.id = 4 #id of Charge skill $game_variables{1]+= 1 else $game_variables{1] = 0 end end And obviously have only Charge use that variable. --- The two methods I explained is good for one variable, but probably only for one character. If you want multiple characters to have Charge, that means multiple variables...unless you decide to have multiple character access one of their own variables. For this one, we'll just stick attr_accessor :charge inside Game_Battler, probably put self.charge = 2 in the initialize method to give it a starting value. With a variable that works like HP and MP, we can just in our formulas and places we want to change the variable. So pretty much a.charge += 1 would only increase the charge of the user by 1 while leaving everyone else's charge untouched. So yeah, I'd probably suggest the third method, just make a charge accessor variable, increase and return charge for your Charge skill, and reset charge in all other skills. Edited April 1, 2017 by Harosata Share this post Link to post Share on other sites
kurashi 12 Posted April 2, 2017 another thing you could do to reset the charge is to have it done during the damage calculations or something. check to see if the skill being used is charge and if not then set the value back to default. I'm out of practice with to maker so I've forgotten the exact code you'd need to change. Share this post Link to post Share on other sites
HeroRuka 0 Posted April 3, 2017 Thank you! I tried the first option Harosata gave me, and it works like a charm! The character doesn't use a lot of skills to begin with so it's fine! This thread can be closed now! Share this post Link to post Share on other sites
dinhbat3 57 Posted April 5, 2017 (edited) Answered in your other thread since I didn't see this one. I would recommend using a state so you don't need to code anything, and it is self sustainable in a single skill and a single state without needing to ensure all future skills/atks reset the counter. The downside is that you would need a separate variable for each character that uses the skill as mentioned by Harosata. **Edit** If you need more detail, I spelled it out on your other thread Edited April 5, 2017 by dinhbat3 Share this post Link to post Share on other sites