States over time! --- Help ---

ASUG0

Annihilation Special Unit Generation 0
Member
Joined
Jul 16, 2020
Messages
29
Reaction score
9
First Language
German
Primarily Uses
RMMZ
The Story so far:
I'm working on a game with an ATB Battle System and hit a dead end. I need to find a way to deal damage to a target over a certain amount of time unrelated to the number of the targets actions.

What I want:
A way to make states last for a period of time unrelated to the battlers AGI. E.g I want poison to deal damage to its target every 2 seconds instead of on the battlers turn end.


Concluding thoughts:
A way to make this happen would be to make a variable that counts up every second the state is applied until a certain value is reached and the state is removed. The catch would be to find a way to count properly. I however would prefer a better solution to this problem.

I beg for your help/advice/a plugin

Cheers!
 
Last edited:

Zerothedarklord

Veteran
Veteran
Joined
Jun 25, 2013
Messages
262
Reaction score
69
First Language
English
Primarily Uses
RMMV
ragretably, I know nothing of MZ, however, I do this in MV, as that is the battle system I use, and it works amazingly well! I do hope you get it figured out in MZ.
 

ASUG0

Annihilation Special Unit Generation 0
Member
Joined
Jul 16, 2020
Messages
29
Reaction score
9
First Language
German
Primarily Uses
RMMZ
ragretably, I know nothing of MZ, however, I do this in MV, as that is the battle system I use, and it works amazingly well! I do hope you get it figured out in MZ.
:frown:
Do you know of a plugin that makes states stackable (applying the same state mulltiple times on a target)?

Ur help would be appreciated, UwU
 

Zerothedarklord

Veteran
Veteran
Joined
Jun 25, 2013
Messages
262
Reaction score
69
First Language
English
Primarily Uses
RMMV
:frown:
Do you know of a plugin that makes states stackable (applying the same state mulltiple times on a target)?

Ur help would be appreciated, UwU
of course, there's a few for MV, but again, I know nothing about MZ, so if that's what you're using, I really can't help.
 

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,771
Reaction score
937
First Language
Chinese
Primarily Uses
N/A
What I want:
A way to make states last for a period of time unrelated to the battlers AGI. E.g I want poison to deal damage to its target every 2 seconds instead of on the battlers turn end.
Cheers!
You may want to try these plugins:
DoubleX_RMMZ_TPBS_Countdown_States
DoubleX RMMZ State Triggers
The state trigger notetag can be something like this:
Code:
<state triggers turn val script: true, x>
And the script event command for setting the game variable with id x for the poison to deal y damage per state turn counter update can be something like this:
JavaScript:
$gameVariables.setValue(x, `
    this._result.clear();
    this._result.used = this._result.success = true;
    this._result.hpAffected = true;
    this.gainHp(-y);
    this.onDamage(y);
    this.startDamagePopup();
    if (this._hp <= 0) {
        this.addState(this.deathStateId());
        BattleManager._logWindow.displayChangedStates(this);
    }
`);
Finally, the TPBS countdown state notetag can be something like this(it only works in TPBS):
<countdown states interval val val: true, z>
This makes the state turn counter to be updated(and thus the regen to be triggered) every z seconds :)
 

ASUG0

Annihilation Special Unit Generation 0
Member
Joined
Jul 16, 2020
Messages
29
Reaction score
9
First Language
German
Primarily Uses
RMMZ
You may want to try these plugins:
DoubleX_RMMZ_TPBS_Countdown_States
DoubleX RMMZ State Triggers
The state trigger notetag can be something like this:
Code:
<state triggers turn val script: true, x>
And the script event command for setting the game variable with id x for the poison to deal y damage per state turn counter update can be something like this:
JavaScript:
$gameVariables.setValue(x, `
    this._result.clear();
    this._result.used = this._result.success = true;
    this._result.hpAffected = true;
    this.gainHp(-y);
    this.onDamage(y);
    this.startDamagePopup();
    if (this._hp <= 0) {
        this.addState(this.deathStateId());
        BattleManager._logWindow.displayChangedStates(this);
    }
`);
Finally, the TPBS countdown state notetag can be something like this(it only works in TPBS):
<countdown states interval val val: true, z>
This makes the state turn counter to be updated(and thus the regen to be triggered) every z seconds :)

Thank u UwU



Edit: DoubleX_RMMZ_TPBS_Countdown_States doesn't seem to work for me. Perhaps its due to compatibility problems with other scripts...
 
Last edited:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Just finished composing a boss battle theme!
Scripted a multi-variable weather system that randomizes wind speed, cloudiness, rain, fogginess, etc, while attempting to realistically account for interactions between them (e.g. wind speed affects fogginess, cloudiness affects rain, etc), the current weather pattern, and the player's biome e.g. swamp, beach, etc. Now I "just" have to tie visuals and sounds to the variables so stuff actually happens...
I'm having a headache balancing the combat using flat defense so I'm gonna use percentual armor, in this pic, Simon has 16 on Defense which means all the incoming damage will be reduced by 16% this will ease my burden a bit.
!Have a nice day everybody¡
SO glad they patched outer worlds for switch! I can finally play it! Weird that other peeps are still having issues. I know it was really chugging on my lite when it first came out.

Forum statistics

Threads
105,555
Messages
1,014,619
Members
137,231
Latest member
anjing_gila
Top