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
260
Reaction score
65
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
260
Reaction score
65
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,769
Reaction score
935
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


Currently working on the second protagonist's story and her companion, making good progress. But I am looking forward to return to my other protagonist and continue his story and have him joined by a new companion. :)
mlogan wrote on alltheyuriz's profile.
Please be aware that our Status rules ask members not to make more than 2 status updates in 24 hours.
rux
Just 80% of my motivation on game making lmao, anyone got tips on how to not be unmotivated?
I've signed up for a job training program for people with Asperger's Syndrome. I went to a "test run" today so they could see how well I did with simple jobs, and I amazed them. Most new people do it in 30+ minutes, while I finished in a mere 15 minutes. Gives me time to work on a screenplay for Studio MDHR...

Forum statistics

Threads
105,470
Messages
1,013,928
Members
137,109
Latest member
Springy120
Top