Tsukihime 1,489 Posted October 21, 2012 (edited) Effect: Active Cost -Tsukihime This script adds "active cost" effect to states. In order for a state to be active, you must pay certain amount of costs at the end of each turn. For example, a particular state may require 40 MP per turn. When you are out of MP the state will disappear. Download Script: Download here Required: Effect Manager Usage Tag a state with <eff: active_cost type amount> Where type is one of hp or mp, and amount is an integer representing how much you lose. Edited March 10, 2016 by Tsukihime 2 Share this post Link to post Share on other sites
Quack 34 Posted November 18, 2012 I think I've found a minor problem. The costs work properly, but even if the maintenace cost for the state is in hp, it will still remove the state if mp is 0. Share this post Link to post Share on other sites
estriole 326 Posted November 19, 2012 (edited) just change this : class Game_Battler < Game_BattlerBase def state_effect_active_cost_turn_end(state, effect) type, value = effect.value1 if type == "hp" self.hp -= value @result.effect_results.push("%s takes away %d HP from %s!" %[state.name, value, self.name]) elsif type == "mp" self.mp -= value @result.effect_results.push("%s takes away %d MP from %s!" %[state.name, value, self.name]) end if type == "mp" && self.mp == 0 remove_state(state.id) @result.effect_results.push("%s's %s has expired" %[self.name, state.name]) end if type == "hp" && self.hp == 0 remove_state(state.id) @result.effect_results.push("%s's %s has expired" %[self.name, state.name]) end end end or you could just insert if self.mp == 0 inside the above ifs Edited November 19, 2012 by estriole Share this post Link to post Share on other sites
Quack 34 Posted November 19, 2012 Yea I know. I only happened to see it in the code as I was looking at it to understand how to write effects for Tsuki's Effect Manager (was writing an effect for using a skill every turn while under the effect of a state). Just thought I would mention it so he could fix it like with any other bug (unless that is how he intended for it to work though I doubt that). Share this post Link to post Share on other sites
Zeireth 0 Posted March 13, 2014 The link to this script has a 404 error. Page does not load from drop box. Share this post Link to post Share on other sites
Tsukihime 1,489 Posted March 13, 2014 Sorry just noticed that I accidentally moved the entire folder somewhere else. Share this post Link to post Share on other sites
Zeireth 0 Posted March 13, 2014 Thank you Tsukihime. Share this post Link to post Share on other sites
Polidoro 104 Posted March 13, 2014 Wooooooooowwwwwwww....... I have a plot-point where, due to certain events, one party member is unable to be violent without it killing him slowly. I had to set the mechanics up in a really messy way that involved 'dummy skills' but caused a lot of problems when leveling up and what not. You just made that whole subsystem extremely polished and way more detailed. Thank you for always thinking outside the box and motivating me towards making progress on my project. I.... I love you... a lot. Share this post Link to post Share on other sites
JonicOokami7 0 Posted January 22, 2018 Is there a way to have the cost take a percentage of the HP/MP then just a set amount? I'm trying to use this with Shapeshift and I'm using it as a way to get around the inability to transform back via knockout. So since the transformations grow with the base form i feel it would help keep balance for the Shapeshift. Share this post Link to post Share on other sites