Skip to content

Building turret animations#2170

Merged
Coronia merged 5 commits into
Phobos-developers:developfrom
Starkku:feature/turret-anims
Jun 7, 2026
Merged

Building turret animations#2170
Coronia merged 5 commits into
Phobos-developers:developfrom
Starkku:feature/turret-anims

Conversation

@Starkku

@Starkku Starkku commented Apr 12, 2026

Copy link
Copy Markdown
Contributor

Building turret animations

  • By default building TurretAnim(Damaged) with TurretAnimIsVoxel=false only displays one frame per each of the 32 facings. This can now be increased and there are additional animations available for low power state and firing weapons.
    • The frames in the .shp file should be in the order: IdleFrames, LowPowerIdleFrames, FiringFrames, LowPowerFiringFrames, animations with frame count set to 0 will be skipped / ignored.
    • Note that FiringFrames starts playing when attacking and weapon can fire, it will not stop firing of weapon until it has finished playing nor will anything prevent it from looping multiple times if weapon firing is blocked by delayed firing for longer than there are frames for. Matching delayed firing duration with firing frame count can be used to make pre-firing animation.
    • TurretAnim.IdleRate and TurretAnim.FiringRate can be used to customize animation frame playback rate for idle and firing frames respectively.

In rulesmd.ini:

[SOMEBUILDING]                     ; BuildingType
TurretAnim.IdleFrames=1            ; integer
TurretAnim.LowPowerIdleFrames=0    ; integer
TurretAnim.FiringFrames=0          ; integer
TurretAnim.LowPowerFiringFrames=0  ; integer
TurretAnim.IdleRate=1              ; integer, game frames
TurretAnim.FiringRate=1            ; integer, game frames

@Starkku Starkku force-pushed the feature/turret-anims branch 2 times, most recently from 920a086 to 19404ea Compare April 12, 2026 13:21
@github-actions

github-actions Bot commented Apr 12, 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.

@Fryone

Fryone commented Apr 15, 2026

Copy link
Copy Markdown
Contributor

Actually, there may be a bug, but I can't properly recreate it. It's like AI trying to shoot when lowpowered, despite TurretAnim.LowPowerFiringFrames=0 so it's using shadow frames. But again, so hard to recreate, didn't figured out yet.

@Fryone

Fryone commented Apr 18, 2026

Copy link
Copy Markdown
Contributor
image I think I got it, it's like AI using TogglePower on some turrets

@Starkku Starkku force-pushed the feature/turret-anims branch from 19404ea to cd0089c Compare April 20, 2026 11:35
@Starkku

Starkku commented Apr 20, 2026

Copy link
Copy Markdown
Contributor Author

Potentially fixed the issues with frame calcs, added customization for frame playback rates.

Starkku added 2 commits May 8, 2026 16:03
- Fix issues with frame calcs by verifying frame counts
- Add animation playback rate customization
@Starkku Starkku force-pushed the feature/turret-anims branch from c7413b5 to 9be886b Compare May 8, 2026 13:04
@TaranDahl

Copy link
Copy Markdown
Contributor

@Fryone Maybe you can test this again?

@Fryone

Fryone commented May 8, 2026

Copy link
Copy Markdown
Contributor

The previous problem seems to be fixed, however I have not tested "Idle" part yet.

@Fryone

Fryone commented May 8, 2026

Copy link
Copy Markdown
Contributor

tested on AI player:
TurretAnim.LowPowerIdleFrames
TurretAnim.LowPowerFiringFrames
no issues found

@Coronia Coronia added Tested ⚙️T1 T1 maintainer review is sufficient and removed Needs testing labels Jun 6, 2026
@Coronia Coronia added the Will be merged in 24h This PR will be merged in 24 hours if no one has further instructions. label Jun 6, 2026
# Conflicts:
#	docs/Whats-New.md
#	src/Ext/BuildingType/Body.cpp
@Coronia Coronia merged commit 62f9116 into Phobos-developers:develop Jun 7, 2026
7 checks passed
@Starkku Starkku deleted the feature/turret-anims branch June 7, 2026 08:32
DeathFishAtEase added a commit to DeathFishAtEase/Phobos that referenced this pull request Jun 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⚙️T1 T1 maintainer review is sufficient Tested 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.

4 participants