Skip to content

Customizable infantry sequence rates - #2376

Merged
Coronia merged 5 commits into
Phobos-developers:developfrom
DeathFishAtEase:SequenceSpeed
Sep 2, 2026
Merged

Coronia merged 5 commits into
Phobos-developers:developfrom
DeathFishAtEase:SequenceSpeed

Conversation

@DeathFishAtEase

@DeathFishAtEase DeathFishAtEase commented Aug 29, 2026

Copy link
Copy Markdown
Collaborator

What kind of change is this?

  • New feature, vanilla bugfix or enhancement of a released feature - changelog, docs and credits entries are needed.
  • Improvement to a new (unreleased) feature - docs and credits entries are needed; no changelog entry (Skip Changelog).
  • Bugfix to a new (unreleased) feature - credits entry is needed; no changelog or docs entries (Skip Changelog, Skip Docs).
  • Bugfix to an old (released) feature - changelog and credits entries are needed; no docs entry (Skip Docs).
  • Completely minor change (e.g. a typo fix) - no entries are needed (Skip Changelog, Skip Docs, Skip Credits).

Description

In vanilla, the number of game frames each animation frame of the infantry sequence stays (i.e., its playback rate) is hardcoded. Now it can be customized for each sequence in each infantry's sequence section.

  • <Sequence>Rate defines the number of game logic frames that 1 animation frame stays; 0 means still, for example, the Ready and Guard sequences in vanilla are still.
  • <Sequence>Normalized defines whether the playback rate is affected by game speed, for example, the Idle1, Idle2, WetIdle1, WetIdle2, Hover, and Cheer sequences in vanilla are affected by game speed.
The effective rate of a normalized sequence is `rate` adjusted by the game speed:

- `rate < 5`: from the table below (`rate` row, `GameSpeed` column).
- `rate >= 5`: `rate * 8 / (GameSpeed + 1)`.

| Rate \ GameSpeed | 0 | 1 | 2 | 3 | 4 | 5 | 6 |
| ---------------- | - | - | - | - | - | - | - |
| 1                | 2 | 2 | 1 | 1 | 1 | 1 | 1 |
| 2                | 3 | 3 | 3 | 2 | 2 | 2 | 1 |
| 3                | 5 | 4 | 4 | 3 | 3 | 2 | 2 |
| 4                | 7 | 6 | 5 | 4 | 4 | 4 | 3 |

`GameSpeed` goes from `0` (fastest) to `6` (slowest).

In rulesmd.ini:

[AudioVisual]
Sequence.<Sequence>.DefaultRate=0         ; integer
Sequence.<Sequence>.DefaultNormalized=no  ; boolean
| Name            | DefaultRate | Normalized |
|-----------------|-------------|------------|
| Ready           | 0           | false      |
| Guard           | 0           | false      |
| Prone           | 6           | false      |
| Walk            | 3           | false      |
| FireUp          | 1           | false      |
| Down            | 1           | false      |
| Crawl           | 1           | false      |
| Up              | 1           | false      |
| FireProne       | 1           | false      |
| Idle1           | 3           | true       |
| Idle2           | 3           | true       |
| Die1            | 1           | false      |
| Die2            | 1           | false      |
| Die3            | 1           | false      |
| Die4            | 1           | false      |
| Die5            | 1           | false      |
| Tread           | 3           | false      |
| Swim            | 1           | false      |
| WetIdle1        | 3           | true       |
| WetIdle2        | 3           | true       |
| WetDie1         | 1           | false      |
| WetDie2         | 1           | false      |
| WetAttack       | 1           | false      |
| Hover           | 2           | true       |
| Fly             | 1           | false      |
| Tumble          | 1           | false      |
| FireFly         | 1           | false      |
| Deploy          | 1           | false      |
| Deployed        | 1           | false      |
| DeployedFire    | 1           | false      |
| DeployedIdle    | 1           | false      |
| Undeploy        | 1           | false      |
| Cheer           | 3           | true       |
| Paradrop        | 1           | false      |
| AirDeathStart   | 3           | false      |
| AirDeathFalling | 1           | false      |
| AirDeathFinish  | 3           | false      |
| Panic           | 4           | false      |
| Shovel          | 6           | false      |
| Carry           | 3           | false      |
| SecondaryFire   | 1           | false      |
| SecondaryProne  | 1           | false      |

In artmd.ini:

[SEQUENCE]                                ; Sequence
<Sequence>Rate=                           ; integer, defaults to [AudioVisual] -> Sequence.<Sequence>.DefaultRate
<Sequence>Normalized=                     ; boolean, defaults to [AudioVisual] -> Sequence.<Sequence>.DefaultNormalized

Tip

The naming of each infantry flag is aligned with [Sequence] -> <Sequence>Sounds= (List of sound entries) (Vanilla flag. It is concatenated by <Sequence> and the suffix Sounds, so the full string is not stored in gamemd.exe, see 0x523FC4.).

@DeathFishAtEase DeathFishAtEase self-assigned this Aug 29, 2026
@DeathFishAtEase DeathFishAtEase added ❓New feature Needs testing ⚙️T1 T1 maintainer review is sufficient ❓Unhardcoding / Customization Make something more tweakable labels Aug 29, 2026
@phoboscn-bot

Copy link
Copy Markdown

To Chinese users:
This pull request has been mentioned on Phobos CN. There might be relevant details there:

致中文用户:
此拉取请求已在 Phobos CN 上被提及。那里可能有相关详细信息:

https://www.phoboscn.top/t/topic/748/1

@github-actions

github-actions Bot commented Aug 29, 2026

Copy link
Copy Markdown

Nightly build for this pull request:

This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build.

@DeathFishAtEase

Copy link
Copy Markdown
Collaborator Author

Tested by: https://www.phoboscn.top/t/topic/748/2?u=noble_fish

image

[GuardianGISequence]
Ready=204,6,6
ReadyRate=1
WalkRate=0

image

[SealSequence]
Ready=340,6,6;0,1,1
Guard=340,6,6;0,1,1

[TanyaSequence]
Ready=410,6,6;0,1,1
Guard=410,6,6;0,1,1
ReadyRate=3
GuardRate=3
TreadRate=0
CheerNormalized=no

Comment thread docs/New-or-Enhanced-Logics.md
@Coronia Coronia added the Will be merged in 24h This PR will be merged in 24 hours if no one has further instructions. label Sep 1, 2026
@Coronia
Coronia merged commit e0d48ec into Phobos-developers:develop Sep 2, 2026
7 checks passed
DeathFishAtEase added a commit to DeathFishAtEase/Phobos that referenced this pull request Sep 2, 2026
@DeathFishAtEase
DeathFishAtEase deleted the SequenceSpeed branch September 2, 2026 08:36
dh381-1 pushed a commit to dh381-1/Phobos that referenced this pull request Sep 9, 2026
<!--
If the changes are solely made to the documentation, please set the
target branch to the pull request named "Weekly Regular Documentation
Revisions", rather than the repository's existing branches.
-->

## What kind of change is this?

<!-- Tick the row that matches your change. It tells the maintainers
which of the changelog, docs and credits checks should run, and which
`Skip` labels to apply for the ones that don't. -->

- [X] **New feature, vanilla bugfix or enhancement of a released
feature** - changelog, docs and credits entries are needed.
- [ ] **Improvement to a new (unreleased) feature** - docs and credits
entries are needed; no changelog entry (`Skip Changelog`).
- [ ] **Bugfix to a new (unreleased) feature** - credits entry is
needed; no changelog or docs entries (`Skip Changelog`, `Skip Docs`).
- [ ] **Bugfix to an old (released) feature** - changelog and credits
entries are needed; no docs entry (`Skip Docs`).
- [ ] **Completely minor change (e.g. a typo fix)** - no entries are
needed (`Skip Changelog`, `Skip Docs`, `Skip Credits`).

## Description


In vanilla, the number of game frames each animation frame of the
infantry sequence stays (i.e., its playback rate) is hardcoded. Now it
can be customized for each sequence in each infantry's sequence section.
- `<Sequence>Rate` defines the number of game logic frames that 1
animation frame stays; 0 means still, for example, the `Ready` and
`Guard` sequences in vanilla are still.
- `<Sequence>Normalized` defines whether the playback rate is affected
by game speed, for example, the `Idle1`, `Idle2`, `WetIdle1`,
`WetIdle2`, `Hover`, and `Cheer` sequences in vanilla are affected by
game speed.

```{note}
The effective rate of a normalized sequence is `rate` adjusted by the game speed:

- `rate < 5`: from the table below (`rate` row, `GameSpeed` column).
- `rate >= 5`: `rate * 8 / (GameSpeed + 1)`.

| Rate \ GameSpeed | 0 | 1 | 2 | 3 | 4 | 5 | 6 |
| ---------------- | - | - | - | - | - | - | - |
| 1                | 2 | 2 | 1 | 1 | 1 | 1 | 1 |
| 2                | 3 | 3 | 3 | 2 | 2 | 2 | 1 |
| 3                | 5 | 4 | 4 | 3 | 3 | 2 | 2 |
| 4                | 7 | 6 | 5 | 4 | 4 | 4 | 3 |

`GameSpeed` goes from `0` (fastest) to `6` (slowest).
```

In `rulesmd.ini`:
```ini
[AudioVisual]
Sequence.<Sequence>.DefaultRate=0         ; integer
Sequence.<Sequence>.DefaultNormalized=no  ; boolean
```

```{dropdown} Default value table
| Name            | DefaultRate | Normalized |
|-----------------|-------------|------------|
| Ready           | 0           | false      |
| Guard           | 0           | false      |
| Prone           | 6           | false      |
| Walk            | 3           | false      |
| FireUp          | 1           | false      |
| Down            | 1           | false      |
| Crawl           | 1           | false      |
| Up              | 1           | false      |
| FireProne       | 1           | false      |
| Idle1           | 3           | true       |
| Idle2           | 3           | true       |
| Die1            | 1           | false      |
| Die2            | 1           | false      |
| Die3            | 1           | false      |
| Die4            | 1           | false      |
| Die5            | 1           | false      |
| Tread           | 3           | false      |
| Swim            | 1           | false      |
| WetIdle1        | 3           | true       |
| WetIdle2        | 3           | true       |
| WetDie1         | 1           | false      |
| WetDie2         | 1           | false      |
| WetAttack       | 1           | false      |
| Hover           | 2           | true       |
| Fly             | 1           | false      |
| Tumble          | 1           | false      |
| FireFly         | 1           | false      |
| Deploy          | 1           | false      |
| Deployed        | 1           | false      |
| DeployedFire    | 1           | false      |
| DeployedIdle    | 1           | false      |
| Undeploy        | 1           | false      |
| Cheer           | 3           | true       |
| Paradrop        | 1           | false      |
| AirDeathStart   | 3           | false      |
| AirDeathFalling | 1           | false      |
| AirDeathFinish  | 3           | false      |
| Panic           | 4           | false      |
| Shovel          | 6           | false      |
| Carry           | 3           | false      |
| SecondaryFire   | 1           | false      |
| SecondaryProne  | 1           | false      |
```

In `artmd.ini`:
```ini
[SEQUENCE]                                ; Sequence
<Sequence>Rate=                           ; integer, defaults to [AudioVisual] -> Sequence.<Sequence>.DefaultRate
<Sequence>Normalized=                     ; boolean, defaults to [AudioVisual] -> Sequence.<Sequence>.DefaultNormalized
```

> [!Tip]
> The naming of each infantry flag is aligned with `[Sequence] ->
<Sequence>Sounds= (List of sound entries)` (Vanilla flag. It is
concatenated by `<Sequence>` and the suffix `Sounds`, so the full string
is not stored in `gamemd.exe`, see `0x523FC4`.).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

❓New feature ⚙️T1 T1 maintainer review is sufficient Tested ❓Unhardcoding / Customization Make something more tweakable Will be merged in 24h This PR will be merged in 24 hours if no one has further instructions.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants