Skip to content

Customize the keep-target-range of attackmove#2081

Open
TaranDahl wants to merge 2 commits intoPhobos-developers:developfrom
TaranDahl:AttackMoveKeepRange
Open

Customize the keep-target-range of attackmove#2081
TaranDahl wants to merge 2 commits intoPhobos-developers:developfrom
TaranDahl:AttackMoveKeepRange

Conversation

@TaranDahl
Copy link
Contributor

@TaranDahl TaranDahl commented Feb 4, 2026

Customize the keep-target-range of attackmove

  • In vanilla, the range of keep target in attackmove is determined by the range of weapon, or the range of the secondary weapon with NeverUse=yes.
  • Now you can directly specify this distance by setting the following flag to a non-negative value.
    • AttackMove.KeepTargetRange is used to directly specify this distance. It takes effect when this flag is not less than 0.
    • AttackMove.KeepTargetRangeMultiplier and AttackMove.KeepTargetRangeAddend are used to automatically calculate this distance based on the guard range. It takes effect when the multiplier is not less than 0.
      • The final distance is guard range * multiplier + addend.

In rulesmd.ini:

[General]
AttackMove.KeepTargetRangeMultiplier=-1.0   ; float
AttackMove.KeepTargetRangeAddend=0.0        ; float, range in cell

[SOMETECHNO]                                ; TechnoType
AttackMove.KeepTargetRange=-1.0             ; float, range in cell
AttackMove.KeepTargetRangeMultiplier=       ; float
AttackMove.KeepTargetRangeAddend=           ; float, range in cell

@TaranDahl TaranDahl added Tested ⚙️T1 T1 maintainer review is sufficient ❓Unhardcoding / Customization Make something more tweakable labels Feb 4, 2026
@github-actions
Copy link

github-actions bot commented Feb 4, 2026

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.

@TaranDahl
Copy link
Contributor Author

TODO: Set it to be a multiple of GuardRange-Range plus a constant

@TaranDahl TaranDahl marked this pull request as draft February 5, 2026 04:16
@TaranDahl

This comment was marked as outdated.

code

docs

update
@TaranDahl TaranDahl force-pushed the AttackMoveKeepRange branch from 4f087ee to 29f4c8a Compare February 5, 2026 17:16
@TaranDahl TaranDahl marked this pull request as ready for review February 5, 2026 17:20
@TaranDahl
Copy link
Contributor Author

Bounty: 10 CNY for the 1st reviewer who gives valid review
image

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

Labels

Bounty available ⚙️T1 T1 maintainer review is sufficient Tested ❓Unhardcoding / Customization Make something more tweakable

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments