How does speed determine turn order?
Moderators: marionline, SDHawk
- Hedera
- Slime Knight
- Posts: 175
- Joined: Tue May 17, 2011 11:38 am
- Location: a dying forest (all forests are dying)
How does speed determine turn order?
How exactly does the speed stat determine the turn order in battle, for both the default battle system and also for turn-based? I know that for the default system, it determines the rate at which the time bar fills, with a starting amount of time that's randomized, but how exactly is it calculated? For that matter, how does it work with the turn-based system?
In the Active-Time-Battle (the standard OHR battle system), the speed of the bars isn't randomized. It fills the bars up constantly. There is a bitset however to randomize their starting point at the beginning of the battle. Under "Edit General Game Settings" --> "Battle System" --> "Battle preference bitsets", there is an option "Randomize initial ready meters".
With a stopwatch you will recognise it. Old computers from 1999 are processing the battles slower, but the enemy has to use the slowness too, so it's a fair game.
If more than one ready-meter is full, you can choose between characters by pressing the ESC key quickly.
Wasn't the Turn-Based-Battle similar? If the speed stat is twice as high, you can strike twice before the enemy gets his turn?
With a stopwatch you will recognise it. Old computers from 1999 are processing the battles slower, but the enemy has to use the slowness too, so it's a fair game.
If more than one ready-meter is full, you can choose between characters by pressing the ESC key quickly.
Wasn't the Turn-Based-Battle similar? If the speed stat is twice as high, you can strike twice before the enemy gets his turn?
- FnrrfYgmSchnish
- Metal Slime
- Posts: 741
- Joined: Thu Jun 18, 2009 4:37 am
- Location: Middle of Nowhere
Turn-based mode is pretty much like in the NES Final Fantasy games (before ATB was introduced in FF4) or Pokémon. Every hero and enemy gets one turn each round, no matter how fast they are, because speed just determines who goes first in each round.
In ATB mode you can definitely make a character (or enemy) so fast they act multiple times before slower characters get a chance to do anything, though.
In ATB mode you can definitely make a character (or enemy) so fast they act multiple times before slower characters get a chance to do anything, though.
FYS:AHS -- Working on Yagziknian NPC walkabout sprites
In active-time battles, the ready meters count up to 1000, and increase by the attack's speed every tick. (18 ticks per second). So Speed 10 means 100 ticks, which is about 5.5 seconds. If "Don't randomize battle ready meters" is off then at the beginning of battle the ready meter starts randomly at 0-500.
In turn-based battles, everyone is sorted by their speed to determine the turn order. Ties between anyone with the same speed are broken randomly. However, after everyone has picked their attacks that order is then modified according to the attack delays ("Delay/Advance Attack") on the selected attacks. Quoting the source code:
In addition to this are chained attacks, possibly chained from previous rounds.
In turn-based battles, everyone is sorted by their speed to determine the turn order. Ties between anyone with the same speed are broken randomly. However, after everyone has picked their attacks that order is then modified according to the attack delays ("Delay/Advance Attack") on the selected attacks. Quoting the source code:
Code: Select all
'Delays specify how many places forwards or backwards in the queue an attack should
'be moved, but if two attacks want to move to the same place, the most delayed one
'should happen last, and the most advanced one first. E.g:
' 0, 1, 2, 3 <-- Attacks in initial order (the initiative order)
' 0, 1, 0, 0 <-- Delays: attack 1 should move back one place
' \->
'There is a tie for the 3rd place, should be broken as:
' 0, 2, 1, 3 <-- Final attack order
'If we add an extra delay to attacks 1 and 2:
' 0, 1, 2, 3 <-- Initial attack order
' 0, 2, 1, 0 <-- Delays
' \--\==>
'Then, adjusting the previous result, by moving both attacks 1 place, the result should be
' 0, 3, 2, 1
'This shows the most delayed attack should happen last in case of tie
Last edited by TMC on Sun Sep 27, 2020 11:28 pm, edited 1 time in total.
Yes, though most of it should already be on the wiki and in the help pages, and it was maybe more detail than anyone cares about.
One more detail: in turn-based battles, random tie-breaking of combatants with the same speed happens anew every round.
One more detail: in turn-based battles, random tie-breaking of combatants with the same speed happens anew every round.
Last edited by TMC on Tue Sep 29, 2020 2:37 pm, edited 1 time in total.