so, I set this "Hide" skill for a rogue which lowers his TGR by 90%, and increases his CRI by 50%.... the idea is that it enables the use of an assassination skill which usually has low CRI.
I want the character to remain in that state as long as he doesn't take any other actions, and I want to remove the state on damage or action.
so, on attack or skill use, he would stop being "hidden" and his TGR would go up again, but if he takes area damage from a party-wide attack, he would also be visible.
the remove-on-damage part works, but the remove-on-action part doesnt.
can something like that be done through the regular state system, or do I need some scripting for that?
Game Mechanics Design is for looking at broad principles of game design, not specific "how to" questions, which belong in the support forum for whichever engine you are using.
You avatar says that you are principally using Ace. I shall, therefore, ask to have this moved to the Ace support forum.
First of all, this is not a Game Mechanics Design question; it should be posted in the appropriate "Support/Help" subforum for the Maker in question (I'm guessing VX Ace?). Don't worry about it - people make this mistake all the time. (Ah. Ninja'd by ksjp.)
There are two ways you could approach this:
1) Have every single action in the game remove the State in the 'Features' box. It works, it doesn't require scripting, it will take you a long time.
2) You can add a simple script in to check whether the user is in this state when they take an action, and if so, remove it. There are a bunch of places you can add this, but in my judgement the smartest way to do it is to alias the item_apply method (which covers attacks, skills, items, and possibly Guarding as well) in Game_Battler:
class Game_Battler < Game_BattlerBase alias :item_apply_with_stealth :item_apply def item_apply(user, item) item_apply_with_stealth(user, item) if user.state?(17) user.remove_state(17) end endendBe sure to replace "17" in both lines with the State ID of the Stealth state.
I've moved this thread to ace support. Please be sure to post your threads in the correct forum next time. Thank you.
yes, well, I was unsure if it was a specific coding matter, that's why I posted in game design.... this is all still a WIP.
I might end up removing the feature altogether if it doesn't work.
ok, so game_battler would point to whomever is taking a turn at the moment and remove the skill if needed?
wouldn't that look for effects also in battlers that are not even supposed to get the effect at all?
can this be a skill-specific thing, and not a character-specific thing? as in, on skill use, it would add a listener to any actions from that character only... if the condition is triggered, then remove the effect.
(I'm trying to find my way around the code... never worked with Ruby before)