USING THE DEFEND COMMAND WITH CTB OR ATB

Posts

Pages: 1
unity
You're magical to me.
12540
Hello again! I'm trying to get my battle system working, and I've only hit one snag: the Defend command just won't behave.

I've wanted a CTB (or an ATB if I can't get a CTB to work) since the beginning of the project, so I used Formar's Customisable ATB/CTB/Stamina Based Battle System (set to CTB, of course) and it worked great. Except when it came to the defend command, which didn't seem to want to keep the character defending until their next action and instead only applied 'defend' for a short time.

I've also tried Yami's Predicted Charge Turn Battle and Classical Active Time Battle and they seem to have the same problem. I'm not sure if I'm not setting an option correctly or if Defend just works differently in a CTB/ATB system, or maybe if I'm missing something else.

If Defend isn't an option, I suppose I could change it to some sort of Charge command that restores TP, but being able to defend would be great for when an opponent telegraphs a powerful attack. I suppose I could also make "defend" apply a state that wears off after a turn and maybe that would work.

Any and all help would be greatly appreciated :D
Marrend
Guardian of the Description Thread
21806
If you're using VX Ace (I think you might have posted that in another thread?), then the Defend command automatically applies a "Defend" state. The state lasts a turn, and the "Gaurd" property that it has reduces any incoming damage by half, if memory serves me right. That's the default behavior. Saying that, I have no idea how long "a turn" is in relation to CTB/ATB systems.

If you're not using VX Ace, feel free to ignore this comment!
unity
You're magical to me.
12540
Yeah, I'm using VX Ace! Completely forgot to say that ^^;;

I think my problem is that the defend technically lasts until the end of the turn, but I need it to last until the character's next action. After they choose to defend, the turn ends, they lose the defend, and are vulnerable before their next action comes. Seeing as the Status Effect "Stun" ends when the afflicted character acts, that made me think that maybe a status effect could do the trick.
unity
You're magical to me.
12540
I think I may have found the solution. By putting the "Auto-removal Timing" of the State "Guard" to "Action End," it seems to work properly!
unity
You're magical to me.
12540
Hmmm... maybe not. Now the character will defend until their next turn, but the fast character will keep defending even on their next turn (I think because their speed gives them another action before the turn technically ends)...
LockeZ
I'd really like to get rid of LockeZ. His play style is way too unpredictable. He's always like this too. If he ran a country, he'd just kill and imprison people at random until crime stopped.
5958
ATB and CTB systems tend to redefine the definiton of a "turn" to be a certain amount of time, since battle events also run on the number of "turns" that have passed, and lasting a certain amount of time instead of a certain number of actions for almost any status except Defend. For everything else, if a character is twice as fast, you want them to be able to get in twice as many actions before the status ends.

The workaround I used was to get a script that lets you create actions that add or remove states from the user, instead of the target, since in RMXP at least you can normally only add or remove states from the target of a skill. And then I edited that script a little to make it always remove the Defend state from the user when doing any action at all.
unity
You're magical to me.
12540
Yeah, I think VX Ace has a similar problem (or I'm using it wrong XD ) because I tried having the Attack action remove Defend state, and seeing as the character was still defending, I'm assuming that it meant it tried to remove Defend from the target of the attack.

I found a script which might do the trick, which is Yanfly's "Lunatic States" which seems to allow greater control over states, and has a "<while effect: string> - Occurs after performing an action." If I could plug in "Remove defend after performing an action" maybe that would work. Unfortunately, I'm pretty script-dumb and that script is for advanced users. I will have to research on how to actually getting it to work. If I can't figure it out, I'll probably make a post in the Programming & Plugins part of the forums.
You need Lunatic Objects, LOP Destruction and use this line <after effect: remove state 2> in the notebox of a skill. The number is the state you wish to remove.
unity
You're magical to me.
12540
EDIT: Thanks alot, Byah! That' works perfectly! :DDD
Pages: 1