- summary: A fighter's turn starts: whose turn it is and how much of it remains.
- area: Game.Fight
A fighter's turn starts: whose turn it is and how much of it remains.
Kind event · Area Game.Fight
Opens one fighter's turn.
WHAT TO DO WHEN YOU RECEIVE IT
1. Record FightTurnEvent.character_id as the fighter whose turn it is. Every
turn-scoped thing that follows (actions, the turn end) is about this fighter.
2. If it is your character, it is your turn: you may act until the server closes
the turn with FightTurnEndEvent. Do not act on another fighter's turn.
3. Work out how long the turn lasts: FightTurnEvent.wait_time +
FightTurnEvent.extra_time, in deciseconds (the client multiplies the sum
by 100 to get milliseconds). wait_time is the fighter's base turn time;
extra_time is the time it banked by ending its previous turn early (the
FightTurnEndEvent.extra_time of that turn).
4. If FightTurnEvent.remaining_time is present, the turn is already under way
(you joined or reconnected mid-turn): it is what is left of the turn, in
deciseconds. When it is absent the turn starts now.
WHAT THE CLIENT DOES. The battle message handler logs "Start turn for entity", stores the fighter id as the current turn's fighter, refreshes the playable entity, cancels any pending turn timer and publishes a turn-start notification carrying the fighter id, the length in milliseconds and the remaining time in milliseconds. The fight UI's buffs panel and the fight-turn service listen to the same message.
FROM 3.7 the message also carries FightTurnEvent.order, the fighter's place in
the round, and an optional FightTurnEvent.additional_id; the client files both
in its turn value with the current round.
THE CURRENT ROUND NUMBER is also on the wire (captures: it equals the last FightNewRoundEvent's round), in one of two int32 members the client never reads. Nothing in the client tells it from the other one, so it stays unnamed here.
NOTHING IS SENT IN REPLY. The answer the server waits for comes later, at the end of
the turn (FightIsTurnReadyEvent -> FightTurnReadyRequest).
When you may send it
- Requires
character_loadedinferred
Related messages
- Unsolicited - nothing you send causes this the server starts each turn on its own once the previous one is closed; no request asks for it
Fields
| # | Field | Type | Meaning | You set it |
|---|---|---|---|---|
| 1 | remaining_time | int32 | What is left of a turn already under way, sent when you join or come back mid-turn. Explicit presence: absent is not the same as zero. (deciseconds) Absent when the turn starts now. The client multiplies it by 100 to get milliseconds. | never |
| 2 | wait_time | int32 | The fighter's base turn time, before any banked extra time. (deciseconds) Observed: 300Constant per kind of fighter in captures: 300 for a character, 290 for a monster, 150 for a summon, 10 for a dead fighter. The client only ever adds it to FightTurnEvent.extra_time. | never |
| 3 | character_id | int64 | The fighter whose turn starts. (entity id) | never |
| 4 | extra_time | int32 | Time this fighter banked by ending its previous turn early, added to this turn. (deciseconds) Observed: 211Equals the FightTurnEndEvent.extra_time of the fighter's previous turn in every capture; 150 at a first turn.Same name as that field. The client adds it to FightTurnEvent.wait_time and also hands it on its own to the turn-start notification. | never |
| 5 | additional_id | string | An optional extra identifier of the turn (3.7 and later). Explicit presence: absent is not the same as zero. Named after the additionalId parameter of the client's FightTurn(round, order, additionalId) constructor, which receives it on 3.7. Its meaning beyond that is not proven here. | never |
| 6 | order | int32 | The fighter's position inside the current round (3.7 and later). Named after the order parameter of the client's FightTurn(round, order, additionalId) constructor, which receives it on 3.7. Not read before 3.7. | never |