[SOLVED] ATB System - Turn duration

Rikifive

Bringer of Happiness
Veteran
Joined
Jun 21, 2015
Messages
1,441
Reaction score
680
First Language
Polish
Primarily Uses
Other
Hello everybody, I don't know if I posted that in the correct place.

I'm using MOG - ATB System (http://www.atelier-r.../ACE_BAT02.html) as well as the other scripts from that site.
The problem is about Turn Duration system.
By default, there is time based turn system which means that poison/regeneration/states etc. acts over time.
What I want is to change that to act when actor's turn starts.
Let's assume that actor has regeneration and blind states for 3 turns. By default these states can act even twice before actor's turn begins (depends on actor's speed and turn duration time settings) and thus making blind state work for 1,5 actor turns. If actor would had much more AGI at high levels these states could work even 10 actor turns, because actor's active time bar would fill much faster than turn duration.
Is there any way to change it? I simply want to regenerate HP etc. based on individual actor's AGI (when his turn starts), so that blind / regeneration state would last ACTOR's three turns instead of some time.
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,355
Reaction score
7,667
First Language
German
Primarily Uses
RMMV
Please do not use red in your texts, as red and blue are reserved moderator colors.

And we do not want script reposts because we do honor the scripter wishes - most of them want only one place where all users look for updates instead of having half a dozen different versions posted on three dozen different forums. And other problems with reposts and looking for manuals as well...
 
Last edited by a moderator:

Rikifive

Bringer of Happiness
Veteran
Joined
Jun 21, 2015
Messages
1,441
Reaction score
680
First Language
Polish
Primarily Uses
Other
Oh, OK. I understand. I'm sorry about that.

@ EDIT

I have read the rules in this subforum, but I forgot to check the main rules, I found that and read - now I see my mistakes.

My apologies. :p

Removed the last line, since it was not needed.

@ EDIT 2

I'm wondering - I used brown color haven't I? =P
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,355
Reaction score
7,667
First Language
German
Primarily Uses
RMMV
no, the color you used appeared as a dark red/orange cross, and especially due to the content (which you now removed yourself) I didn't want it to look similiar to mod rulings...

As for your request: that change will probably require a scripter to be very familiar with the battlescript, so you may have to wait for someone to have time for writing a patch. It isn't as easy as it might sound due to the way how ATB works...
 

Rikifive

Bringer of Happiness
Veteran
Joined
Jun 21, 2015
Messages
1,441
Reaction score
680
First Language
Polish
Primarily Uses
Other
As for your request: that change will probably require a scripter to be very familiar with the battlescript, so you may have to wait for someone to have time for writing a patch. It isn't as easy as it might sound due to the way how ATB works...
I know it will take forever, since I posted that on the other forum and nobody could help me for about a month. :p

I'm ready for waiting *checks bumping resources*.

I tried replacing ATB system, but the HUD messes up. It seems that the MOG stuff needs to be together, so I must rely on help.

Not mentioning I spend few hours on changing stuff in the depths of the script to try to fix that by myself. :p

I fixed many scripts by myself, but I can't handle that one.
 
Last edited by a moderator:

Rikifive

Bringer of Happiness
Veteran
Joined
Jun 21, 2015
Messages
1,441
Reaction score
680
First Language
Polish
Primarily Uses
Other
Preview of my newest game: BUMP The Game!



Here is more info about my problem:

What I want to accomplish is to not have turn progressed by time.

Let's take for example:

ACTOR1 has 600 AGI;

ACTOR2 has 200 AGI;

so actor1 will act 3 times, while actor2 will take only 1 turn.

both actors have blind for 3 turns and base health regeneration;

both actors had turn (1st acted three times; 2nd acted once)

What I want:

1st actor's blind state wears off, and regenerates HP 3 times;

2nd actor still have blind state for 2 more turns and regenerates his HP only one time.

That way, having more AGI will give more advantages, than just acting more frequently.

And of course I want to HP being regenerated when actor's ATB gauge fills up.

For example when actor has poison state, his HP decreases when his turn comes, not after certain amount of time.

That way, I know when I lost/gain HP, when exactly my state will wear off. I can plan what to do, instead of guessing "will this state remain 'till next turn? My actor is fast, maybe there's enough time left until next turn...?"
 
Last edited by a moderator:

Rikifive

Bringer of Happiness
Veteran
Joined
Jun 21, 2015
Messages
1,441
Reaction score
680
First Language
Polish
Primarily Uses
Other
Bump the game major update!

- Nothing changed at all!
 

Rikifive

Bringer of Happiness
Veteran
Joined
Jun 21, 2015
Messages
1,441
Reaction score
680
First Language
Polish
Primarily Uses
Other
Okay I'm done with these gifs (for now >:-D)

This is the biggest problem left in my game, after that, I'll be kinda *really* done with scripting.

I would be really grateful if somebody could fix that for me. :3



[Chair from future]

Yeah right, what about many other problems with scripts! What a lie!
 
Last edited by a moderator:

Rikifive

Bringer of Happiness
Veteran
Joined
Jun 21, 2015
Messages
1,441
Reaction score
680
First Language
Polish
Primarily Uses
Other

Rikifive

Bringer of Happiness
Veteran
Joined
Jun 21, 2015
Messages
1,441
Reaction score
680
First Language
Polish
Primarily Uses
Other
I know it's possible, because I saw that in one game... But I have no idea how to fix that...
 

Rikifive

Bringer of Happiness
Veteran
Joined
Jun 21, 2015
Messages
1,441
Reaction score
680
First Language
Polish
Primarily Uses
Other
I still need help with this...( ͡° ʖ̯ ͡°)
 

Rikifive

Bringer of Happiness
Veteran
Joined
Jun 21, 2015
Messages
1,441
Reaction score
680
First Language
Polish
Primarily Uses
Other
༼ つ ಥ_ಥ ༽つ
 
Last edited by a moderator:

Rikifive

Bringer of Happiness
Veteran
Joined
Jun 21, 2015
Messages
1,441
Reaction score
680
First Language
Polish
Primarily Uses
Other
Sorry for double posting / bumping too soon, but I'd like to make an update here...

---------------------------------

Would it be possible to draw a gauge, that would indicate when the next turn comes? That would be always something...

I think it would be possible, but I'm not sure how to do that.

Any help appreciated.
 

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,787
Reaction score
939
First Language
Chinese
Primarily Uses
N/A
Sorry for double posting / bumping too soon, but I'd like to make an update here...

---------------------------------

Would it be possible to draw a gauge, that would indicate when the next turn comes? That would be always something...

I think it would be possible, but I'm not sure how to do that.

Any help appreciated.
Have you asked Moghunter to do that?

Anyway, if you want to do it yourself instead, then the key is knowing how that ATB script runs the global battle turn counter.

Once you know that, the rest is to use a new sprite/viewport to draw the bitmap storing information about that global battle turn counter.

It can be a bar using current length vs max length to do that, or numbers showing the current counter over the max counter, or both, or something else entirely :)

Edit: This part of that script shows the global battle turn counter:

#-------------------------------------------------------------------------- # ● Update Turn #-------------------------------------------------------------------------- def update_turn force_reset_turn_duration if $game_temp.turn_duration_clear $game_system.atb_turn_duration[0] += 1 unless $game_troop.interpreter.running? if $game_system.atb_turn_duration[0] >= $game_system.atb_turn_duration[1] $game_system.atb_turn_duration[0] = 0 $game_troop.increase_turn execute_event_phase if $game_troop.can_interpreter_running?(true) end end So $game_system.atb_turn_duration[0] is the current global battle turn counter, while $game_system.atb_turn_duration[1] is its max. You'll want to use them to show when the next turn comes :D
 
Last edited by a moderator:

Rikifive

Bringer of Happiness
Veteran
Joined
Jun 21, 2015
Messages
1,441
Reaction score
680
First Language
Polish
Primarily Uses
Other
Of course I e-mailed Moghunter, but he's really busy with his rl and he didn't replied for a long time. Anyway I'm not the only person who mailed him and awaits for his reply.

Hmmm... Yeah that should work, I'll draw a gauge for that, thanks for info! =]
 
Last edited by a moderator:

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,787
Reaction score
939
First Language
Chinese
Primarily Uses
N/A
I think I finally know what you want: You want all states to wear off when a battler's atb become full right?

If that's the case, then the normal way is to refactor all the related parts of the Mog ATB which is quite some work, but I won't do that as Moghunter's still active and he/she's the best scripter to implement that.

I think there's a cheap way to cheat and trick that script to do what you want though -

1. Sets all states to have auto removal timing as none

2. Use this snippet:

class Game_Battler < Game_BattlerBase alias execute_atb_max_effect_rikifive execute_atb_max_effect def execute_atb_max_effect(*argv, &argb) execute_atb_max_effect_rikifive(*argv, &argb) # Added to update all states' turns and remove all those having 0 remaining turns when an battler becomes able to act update_state_turns remove_states_auto(0) # end # execute_atb_max_effectend # Game_Battler
Just be prepared to face new bugs and/or compatibility issues, as it's just an untested quick dirty hack after all, instead of really integrating your request into the script itself :)

P.S.: If you want any decent solution to your request, you'll want to ask Moghunter him/herself for that :D
 
Last edited by a moderator:

Rikifive

Bringer of Happiness
Veteran
Joined
Jun 21, 2015
Messages
1,441
Reaction score
680
First Language
Polish
Primarily Uses
Other
I know Moghunter is the best person to ask, but I did that already and I'm waiting more than a month for response. I heard he is really busy with his rl.

Maybe not to wear off - but act when actor's atb becomes full. (act and decrease duration by 1 turn (eventually wear off)

I added the values, that you pointed me out to the battle scene and now I see better how it works - I noticed, that the states don't act based at the turn end, but it last the turn duration. What I mean is that:

For example when turn duration is set to 120 and let's assume it's 6 seconds, then basically after every 6 seconds the turn goes up, but the thing is - it doesn't affect states, they act after every 6 seconds after state is applied (and that's good)

I mean when a state is applied when the turn is at 60%, then it WILL act each turn when it'll reach 60% again. That means, that the states are based differently on each actor (not the turn end), so I think it should be possible to replace 'turn duration' with 'battler's max ATB value' then it should work am I right? #GoodOneSherlock

lol nope.

Or after more tests I have no idea how it works. It's totally broken. When you apply state at 80% it can act each turn when it's on 40%. What the hell is happening there? - I have absolutely no idea. What is more, when you apply state at 20% and on another character at 80%, then both will act each turn at 40% or even other values.

There's no possibility to work with it, it's just random.

This is the only MOG's script that annoys me.

Also, your snippet doesn't work at all. =P ~or I derp'd something. =P
 

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,787
Reaction score
939
First Language
Chinese
Primarily Uses
N/A
That's probably because there's a serious bug in the original snippet. I forgot to remove the state turn updates upon the global battle turn end lol(facepalmed)

Try this instead:

Code:
class Game_Battler < Game_BattlerBase # Edit  def on_turn_end # Rewrite    @result.clear    regenerate_all    # Removed to update any state's turns only when a battler becomes able to    # act    #    update_buff_turns    # Removed to update any state's turns only when a battler becomes able to    # act    #  end # on_turn_end  alias execute_atb_max_effect_rikifive execute_atb_max_effect  def execute_atb_max_effect(*argv, &argb)      execute_atb_max_effect_rikifive(*argv, &argb)      # Added to update all states' turns and remove all those having 0      # remaining turns when a battler becomes able to act      update_state_turns      remove_states_auto(0)      #  end # execute_atb_max_effectend # Game_Battler
 
Last edited by a moderator:

Rikifive

Bringer of Happiness
Veteran
Joined
Jun 21, 2015
Messages
1,441
Reaction score
680
First Language
Polish
Primarily Uses
Other
It works perfectly! But now, there's something else on my way.

Basically it looks like this:

- Let's assume that turn duration is 100; battlers ATB takes 200 to fill up. Both are filling at the same speed.

TURN 0 - 0/100

Character - 0/200

~ Charging...

TURN 2 - 0/100

Character - 200/200 -> makes move -> Applies poison state on himself, because he's a hardcore man -> Character [PNS 3 turns] - 0/200

~ Charging...

TURN 3 - 0/100

Character [PNS 3] - 100/200 -> Takes damage (because of next turn), PNS duration stays the same. (because he hasn't charged up his ATB)

~ Charging...

TURN 4 - 0/100

Character [PNS 2] - 200/200 -> Takes damage (because, of next turn), PNS duration reduced by 1 (because character charged up his ATB) -> Does some attack

~ Charging...

TURN 5 - 0/100

Character [PNS 2] - 100/200 -> Takes damage (because, of next turn), PNS duration stays the same.

(...)

RESULT: A poison, that lasts 3 turns will 'steal' life from character 6 times or even more if character will be slower. (and still the hp is stolen randomly, let's say at 40% of the turn)

What would be perfect and =3 would be making the poison *and other stuff in general* 'act' like you did with 'removing' states, so that, the poison will hit character 3 times and it'll be removed after these 3 actor's turns. Everything would be wonderful then! (=

I would be sooooo happy, because I'm struggling with it for ~3 months.
 
Last edited by a moderator:

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,787
Reaction score
939
First Language
Chinese
Primarily Uses
N/A
Then use this snippet instead:

class Game_Battler < Game_BattlerBase # Edit def on_turn_end # Rewrite @result.clear # Removed to update any state's turns only when a battler becomes able to # act # update_buff_turns # Removed to update any state's turns only when a battler becomes able to # act # end # on_turn_end alias execute_atb_max_effect_rikifive execute_atb_max_effect def execute_atb_max_effect(*argv, &argb) execute_atb_max_effect_rikifive(*argv, &argb) # Added to update all states' turns and remove all those having 0 # remaining turns when a battler becomes able to act regenerate_all update_state_turns remove_states_auto(0) # end # execute_atb_max_effectend # Game_Battler
If you want the buffs to behave the same say, try this snippet instead:

class Game_Battler < Game_BattlerBase # Edit def on_turn_end # Rewrite @result.clear # Removed to update any state/buff's turns only when a battler becomes able # to act # end # on_turn_end alias execute_atb_max_effect_rikifive execute_atb_max_effect def execute_atb_max_effect(*argv, &argb) execute_atb_max_effect_rikifive(*argv, &argb) # Added to update all states/buffs' turns and remove all those having 0 # remaining turns when a battler becomes able to act regenerate_all update_state_turns update_buff_turns remove_states_auto(0) remove_buffs_auto # end # execute_atb_max_effectend # Game_Battler
P.S.: I'm fairly certain that Moghunter won't "solve" it that way(as it's just duct tape programming after all), so don't expect the snippet to continue to work when he/she updates the atb script lol
 
Last edited by a moderator:

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

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,847
Messages
1,016,972
Members
137,561
Latest member
JaCrispy85
Top