Skip to content

Conversation

Starkku
Copy link
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

Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant