I need help finding out how to do the following:
1. have a character gain a stat buff when an opponent has a certain ailment, ex: DEF up when enemy is paralyzed.
2. day and night cycle.
3. stacking ailment effect, ex: when an enemy is hit by a poison-llike ailment, the ailment stacks like a debuff but deals more damage each turn the more it stacks.
2) you can event it or use a script
For the first one, you need to check if the enemy has a particular state, then add the buff, then do whatever damage you want. So, using state 7 (paralysis) the damage formula would look like this.
b.state ? (7) ? a.add_buff(x, y); a.atk * 4 - b.def * 2
x is the param id; y is the number of turns that the buff should last. I have used the default damage formula as an example, but you do whatever you want.
EDIT
In case you are unsure about the param ids, here they are
0 = mhp
1 = mmp
2 = atk
3 = def
4 = mat
5 = mdf
6 = agi
7 = luk
@ksjp17
how exactly do I apply that buff formula? do I have to apply it through a skill? or common events?
That goes in the damage formula of your skill, so that when the character with that skill attacks an enemy, the skill checks to see if the enemy is afflicted with paralysis. So as you want a DEF up buff, this is what it would look like. I am using the example of the buff lasting 2 turns.
b.state ? (7) ? a.add_buff(3, 2); a.atk * 4 - b.def * 2