Skip to content

AI condensing/rework - #5494

Draft
MistakeNot4892 wants to merge 1 commit into
NebulaSS13:devfrom
MistakeNot4892:rework/ai
Draft

MistakeNot4892 wants to merge 1 commit into
NebulaSS13:devfrom
MistakeNot4892:rework/ai

Conversation

@MistakeNot4892

@MistakeNot4892 MistakeNot4892 commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Description of changes

  • Condenses and centralises AI behavior onto /datum/mob_controller, separated by flags rather than types.
  • Moves various phases of logic onto /decl/mob_controller_stance.
  • Moves various AI commands into /decl/mob_command.
  • Unifies business checking and AI activity.

Why and what will this PR improve

Makes much more complex AI behavior available/possible. Not benchmarked. and I don't know if the flag checking offsets any benefits, but should be less overhead in general now without redundant calls to get_target(), stop_automove() etc.

TODO

  • Coarse conversion into stance-encapsulated and flag-based system.
  • Convert spider behaviors into either commands or a stance/activity.
  • Consider /decl/mob_activity to replace activity values/behaviors.
  • Formalise state transitions in FSM extension rather than using bespoke logic in /decl/mob_controller_stance.
  • Update all flags/configuration on mob AI datums to behave as expected.
  • Refine behavior - ranged attackers swapping to melee if forced, avoiding hitting their friends, etc.
  • Test all mob commands.
  • Test mob fleeing behavior.
  • Test mob combat behavior.
  • Test spider building and nesting behavior.

Authorship

Myself.

Changelog

🆑
tweak: Massive AI rewrite; keep an eye out for strange behavior from NPCs.
/:cl:

@MistakeNot4892 MistakeNot4892 added work in progress This PR is under development and shouldn't be merged. has dependencies This PR should not be merged prior to any PRs linked in body or comments. labels Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

has dependencies This PR should not be merged prior to any PRs linked in body or comments. work in progress This PR is under development and shouldn't be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant