Skip to content

Veteran Elite Sight Range - #506

Open
JoyfulShush wants to merge 15 commits into
OpenTS-Developers:mainfrom
JoyfulShush:veteran-elite-sight
Open

JoyfulShush wants to merge 15 commits into
OpenTS-Developers:mainfrom
JoyfulShush:veteran-elite-sight

Conversation

@JoyfulShush

Copy link
Copy Markdown
Contributor

Fixes #338

Should be reviewed only after #505 is merged, as it is based on that branch.

Adds support for VeteranSight and EliteSight, and adjusts functions that determine where to look to use those values when relevant.

@github-actions

github-actions Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Development builds of 832e245:

The links work without a GitHub account. Artifacts expire after 90 days, and this comment follows the latest successful build.

@ZivDero

ZivDero commented Oct 27, 2026

Copy link
Copy Markdown
Member

Needs a rebase/merge.

@JoyfulShush

Copy link
Copy Markdown
Contributor Author

Merged master, should be good to go now.

@ZivDero

ZivDero commented Nov 14, 2026

Copy link
Copy Markdown
Member

So the code itself is alright, but an AI review brought up an important gameplay consequence. Prevously many places used just Sight= without applying the various bonuses. And crucially one of them is SightIncrease which is set based on height. It is usually updated in TechnoClass::Look but aircraft do not call the base version, so if you Unlimbo and aircraft up high it might up up with like a x2-x3 sight range.

It may be a good idea to make one getter that simply fetches the raw value (what used to be TClass->SightRange but now just with 3 versions), and then one with multiplers.

@JoyfulShush

Copy link
Copy Markdown
Contributor Author

Good catch. It gave sight increases that are more than just sight range in some cases. I refactored the logic accordingly, so logic that needs just the sight range gets it without multipliers.

Techno and Aircraft have Look(), which by design includes a multiplier for sight if the have the SIGHT ability. Aircraft ignores height multiplier calculations, while other technos on the ground take it into account.

The docs were also updated to match this change, as well as mark the change for the next release (0.3.0).

This branch has not been deployed

No deployments
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.

Configure veteran and elite sight ranges per type

2 participants