States over time! --- Help ---

ASUG0

Annihilation Special Unit Generation 0
Veteran
Joined
Jul 16, 2020
Messages
41
Reaction score
11
First Language
German
Primarily Uses
RMMV
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
322
Reaction score
96
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
Veteran
Joined
Jul 16, 2020
Messages
41
Reaction score
11
First Language
German
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.

: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
322
Reaction score
96
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,803
Reaction score
950
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
Veteran
Joined
Jul 16, 2020
Messages
41
Reaction score
11
First Language
German
Primarily Uses
RMMV
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:

Latest Threads

Latest Posts

Latest Profile Posts

Aaaaannd published my game's tech demo. :D

Feel free to download and play it. And give feedback!
Hey everyone, we know that the edit bar is missing. We're working on it. You can talk about it in the announcement here: https://forums.rpgmakerweb.com/index.php?threads/forum-errors-missing-edit-bar-etc.132715/
So, explain why we can no longer use BBC code or smilies in our posts? This sparks much sadness...
Are we now stuck with WYSIWYG ? I cannot revert back my posts to good old raw text ?
I'm wondering if I may be putting too many things into one map. A story, within a story, within a story . . . it's fun, but I can't shake the feeling that it may be better to scrap some of it, and use it for another map. I'm not sure what to do.

Forum statistics

Threads
107,794
Messages
1,032,249
Members
139,939
Latest member
nachteulen
Top