Skip to content

Expose value of idle circling with 'attack-any'#7011

Merged
wookieejedi merged 2 commits into
scp-fs2open:masterfrom
wookieejedi:ai-attackany-circle-idle
Sep 3, 2025
Merged

Expose value of idle circling with 'attack-any'#7011
wookieejedi merged 2 commits into
scp-fs2open:masterfrom
wookieejedi:ai-attackany-circle-idle

Conversation

@wookieejedi

@wookieejedi wookieejedi commented Sep 2, 2025

Copy link
Copy Markdown
Member

The attack-any order is extremely useful and utilized order, and there was one aspect that was ripe for exposure to modders: the CHASE_CIRCLE_DIST that was used to determine how big of a circle to fly around while the AI waited for new hostiles to arrive. For ships with high speeds, like FotG and others, the default radius of 200 m was a bit on the small side, which lead to ships flying in tight circles. This was was counterproductive to goals of tuning the AI to have a more cinematic style, such as where AI would fly around in large distances while waiting for enemies to arrive. Fortunately, this value is easy to expose with just a few lines, and overall it allows modders the ability to tune the already useful 'attack-any' order while idling with just a single new ai_profiles value.

Tested and works as expected.

The attack-any order is extremely useful and utilized order, and there was one aspect that was ripe for exposure to modders: the `CHASE_CIRCLE_DIST` that was used to determine how big of a circle to fly around while the AI waited for new hostiles to arrive. For ships with high speeds, like FotG and others, the default radius of 200 m was a bit on the small side, which lead to ships flying in tight circles. This was was counterproductive to goals of tuning the AI to have a more cinematic style, such as where AI would fly around in large distances while waiting for enemies to arrive. Fortunately, this value is easy to expose and allow modders to tune with just a new ai_profiles value.

Tested and works as expected.
@wookieejedi wookieejedi added enhancement A new feature or upgrade of an existing feature to add additional functionality. ai A feature or issue related to the AI algorithms Requested by Active Mod A feature request that has been requested by a mod that is actively in development. labels Sep 2, 2025
Comment thread code/ai/ai_profiles.cpp Outdated
@wookieejedi wookieejedi merged commit 2820532 into scp-fs2open:master Sep 3, 2025
20 checks passed
@wookieejedi wookieejedi deleted the ai-attackany-circle-idle branch September 3, 2025 02:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai A feature or issue related to the AI algorithms enhancement A new feature or upgrade of an existing feature to add additional functionality. Requested by Active Mod A feature request that has been requested by a mod that is actively in development.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants