Skip to content

Attached animation draw offset customizations#1854

Open
Starkku wants to merge 1 commit intoPhobos-developers:developfrom
Starkku:feature/attached-anim-drawoffset
Open

Attached animation draw offset customizations#1854
Starkku wants to merge 1 commit intoPhobos-developers:developfrom
Starkku:feature/attached-anim-drawoffset

Conversation

@Starkku
Copy link
Copy Markdown
Contributor

@Starkku Starkku commented Sep 11, 2025

Draw offset customization

  • YDrawOffset.ApplyBracketHeight makes Y axis position follow it's owner object's selection bracket height (for buildings, this is based on Height and Foundation, for others it is influenced by PixelSelectionBracketDelta) if it is attached to one.
    • By default this will only apply if the bracket position is negative e.g it is moved upwards from the object center. If YDrawOffset.InvertBracketShift is set to true, the opposite is true and negative shift is ignored.
    • The bracket-based shift can be further adjusted with offset from YDrawOffset.BracketAdjust, overridden by YDrawOffset.BracketAdjust.Buildings for buildings only.

In artmd.ini:

[SOMEANIM]                            ; AnimationType
YDrawOffset.ApplyBracketHeight=false  ; boolean
YDrawOffset.InvertBracketShift=false  ; boolean
YDrawOffset.BracketAdjust=0,0         ; X,Y, pixels relative to default
YDrawOffset.BracketAdjust.Buildings=  ; X,Y, pixels relative to default

AttachEffect animation-specific

  • Animation.DrawOffsetN (where N is integer starting from 0) can be used to define draw offset rules for the animation. These are parsed starting from index 0 until offset with value 0,0 is encountered.
    • Animation.DrawOffsetN.RequiredTypes contains list other AttachEffectTypes that need to be attached on the same techno as the current one for the draw offset rule to apply.

In rulesmd.ini:

[SOMEATTACHEFFECT]                                 ; AttachEffectType
Animation.DrawOffsetN=0,0                          ; X,Y, pixels relative to default
Animation.DrawOffsetN.RequiredTypes=               ; List of AttachEffectTypes

@github-actions
Copy link
Copy Markdown

github-actions bot commented Sep 11, 2025

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.

@Starkku Starkku force-pushed the feature/attached-anim-drawoffset branch from c354691 to ada5b05 Compare November 9, 2025 12:57
@TaranDahl TaranDahl added ⚙️T1 T1 maintainer review is sufficient ❓Unhardcoding / Customization Make something more tweakable labels Nov 26, 2025
@Starkku Starkku force-pushed the feature/attached-anim-drawoffset branch 2 times, most recently from b7e32d4 to 7f560f7 Compare December 4, 2025 17:33
@Starkku Starkku force-pushed the feature/attached-anim-drawoffset branch from 7f560f7 to 78384de Compare December 12, 2025 11:01
@Starkku Starkku force-pushed the feature/attached-anim-drawoffset branch 2 times, most recently from 2bbf9ed to 3b6fb40 Compare January 18, 2026 16:05
@Starkku Starkku force-pushed the feature/attached-anim-drawoffset branch 5 times, most recently from 470f9a1 to cc02778 Compare February 13, 2026 09:45
- Also optimize AE animation drawing logic update
@Starkku Starkku force-pushed the feature/attached-anim-drawoffset branch from cc02778 to 8856643 Compare February 13, 2026 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs testing ⚙️T1 T1 maintainer review is sufficient ❓Unhardcoding / Customization Make something more tweakable

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants