jackken123

Veteran
Veteran
Joined
Aug 24, 2017
Messages
81
Reaction score
8
First Language
Chinese
Primarily Uses
RMMV
Hello,
May I ask how to change turn to time?

For example,
I want 5 sec to be a turn.

Anyone know the script?

Thank you.
 
Last edited:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
32,516
Reaction score
8,147
First Language
German
Primarily Uses
RMMV
Please explain in more detail what you want to change how.
As it stands how, the solution depends on what exactly you want.

That said however, no matter what you want you'll probably need a full plugin instead of just a few script lines, because there is no time in the default engine.
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,657
First Language
Czech
Primarily Uses
RMMV
Exactly. You have to completely reprogram the battle system, because there is no time in the battle system.
 

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
6,003
Reaction score
5,644
First Language
English
Primarily Uses
RMVXA
If all you are trying to do is track turns by time, rather than change the way that battlers take action from turns to time, then it would be fairly easy to do, and would involve the Time.now() command.

I assume that you are trying to change the way that battler actions happen, though, so I won't go into detail on the above, and instead I would encourage you to search for an ATB (Active Time Battle) plugin. Yanfly's is the most popular, but there are several different ones out there.
 

jackken123

Veteran
Veteran
Joined
Aug 24, 2017
Messages
81
Reaction score
8
First Language
Chinese
Primarily Uses
RMMV
If all you are trying to do is track turns by time, rather than change the way that battlers take action from turns to time, then it would be fairly easy to do, and would involve the Time.now() command.

I assume that you are trying to change the way that battler actions happen, though, so I won't go into detail on the above, and instead I would encourage you to search for an ATB (Active Time Battle) plugin. Yanfly's is the most popular, but there are several different ones out there.
Can you tell me how to track turn by time.
 

jackken123

Veteran
Veteran
Joined
Aug 24, 2017
Messages
81
Reaction score
8
First Language
Chinese
Primarily Uses
RMMV
Please explain in more detail what you want to change how.
As it stands how, the solution depends on what exactly you want.

That said however, no matter what you want you'll probably need a full plugin instead of just a few script lines, because there is no time in the default engine.
I want to use for ABS.
Just for state turn.
Because in action battle there is no turn so I wonder can I add 1 turn by time.
Than I can just set turn duration and the state will disappear in some time.
So if you know how MV define turn than I'd like to set a timer and add 1 turn every specific second.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
32,516
Reaction score
8,147
First Language
German
Primarily Uses
RMMV
In such cases, the time setting is determined by the ABS choosen and not by the engine itself.
If you already have an ABS Plugin then link us to it and we can try to find where in it that time is set.
 

jackken123

Veteran
Veteran
Joined
Aug 24, 2017
Messages
81
Reaction score
8
First Language
Chinese
Primarily Uses
RMMV
In such cases, the time setting is determined by the ABS choosen and not by the engine itself.
If you already have an ABS Plugin then link us to it and we can try to find where in it that time is set.
I use Chrono Engine.
And just can't find the time for turn.
 

jackken123

Veteran
Veteran
Joined
Aug 24, 2017
Messages
81
Reaction score
8
First Language
Chinese
Primarily Uses
RMMV
I did it with this.

Code:
Game_Battler.prototype.addState = function(stateId) {
    if (this.isStateAddable(stateId)) {
        if (!this.isStateAffected(stateId)) {
            this.addNewState(stateId);
            this.refresh();
        }
        this.resetStateCounts(stateId);
        this._result.pushAddedState(stateId);
    }
    var AutoTime = $dataStates[stateId].meta.R;
    var time = Number(AutoTime)*1000;
    var THIS = this;
    setTimeout(function(){
        THIS.removeState(stateId)},time);
};
 

Latest Threads

Latest Profile Posts


I'm proud of what I have achieved with my project. Don't mind with the Spanish, Ill add more languages.
Our garage has been so full since moving we haven't been able to get our car in. Storm night before last (no hail), storms forecast for last night & today. I convinced hubby we should clean out the garage and we managed to get it done and get the car in. Hail last night! Just in time!
Taller RTP Characters, Rewrite Dialogues w/ AI, & Simple Event AI & Shooting | RPG Maker News #37


No water this time, just trying for a majestic cliffside... The cave snuck in because I liked it. Now I guess I need a mini cave map or "secret" for it. :kaoswt:

Forum statistics

Threads
111,278
Messages
1,059,843
Members
144,576
Latest member
spewalien
Top