1. First of all, I would like to know if you can have more than one condition statement in a damage formula and if so, how to structure such a formula.
2. How do you add state durations in the damage formula section?
3. How do I add a buff state (eg. ATK UP) to my character when I damage a target?
1. I'm not sure exactly what you're asking here, but let me try to answer what I think you're asking: It's possible for a skill to add a state simply by selecting the state to add and the rate at which to add that particular state. If you are trying to do something else while a state is active (like say if you have an "Oiled" state and you want to be able to set the target on fire... Or you want a burning state to add more damage to a fire spell...) you can simply assign a variable to that particular state. I'm not for certain at the moment, but I think you can make it a common event to track states as variables. Once you have those variables, you can include that in the formula to do more damage or what-have-you. If you hover over the "Formula" field, it tells you what you can use in the formulas.
2. State durations are handled in the "States" tab and not in the "Skills" tab where you are finding the damage formula sections. Tab over to this area and you can customize how long states last or even how they can be broken.
3. I know of no way to add a buff state to yourself for simply hitting "Attack" in the battle screen. Perhaps there is a script somewhere that allows you to do it? As for simply adding a buff state for a hit with a skill... It's all handled right there in the Skills menu. In the "Effects" box of a Skill, simply right click, go to "Buff" and then select the buff you would get as well as the duration.
I hope all of that helps you out.
Thanks guys. I've been looking into what i need further and there is something a little more specific that I require now. Its going to be a fairly common mechanic in my game.
I need a formula that can do the following:
When a state is removed from the target (or user), something different happens. For example, I have a formula already that does what I would like it to but I don't know how to add the other mechanic to it.
HP Damage
a.state?(39)? r = a.mhp*0.25: r = a.hp*0.25; r - b.def
What I need to add to it now is -- if the user is under this state, it also consumes the state.
EDIT: Also is there a way to formulate -- If target is under 2 specified states, do X effect.?
there is no trigger to indicate loosing a state, so you can't have a state follow another in default. However, there are several script that allow you to define "follow-up"-states (states that are triggered when a previous state runs out). You have to search for those scripts in the master script list and add one of them to your game.
The add-state-function in the damage formula is not for general use, but for use under specific conditions - because there is another, much easier way to add states that should be used first, with the function in the damage formula only for those cases where that is impossible.
Each skill has a target, and the feature "add state" applies that state to the target of the skill. If you have a fire sword that adds a burning state to the enemy on attacking then you use that option.
The a.add_state(x) in the damage formula is used in those cases when you want to add a state to the skill user in addition to the target. for example a group heal skill that leaves the healer weakened or an attack skill that adds a defence state to the attacker or something like that.
That said, you can use any ruby function in the damage formula as long as the limited space of that line is enough to contain all commands. that includes chained conditions as well as calling script functions for those parts that are too long for the damage field itsel . but if you increase the complexity of the damage formula you need to know how to program ruby to prevent everything from breaking under the restraints of the damage formula field.