## About The Pull Request We currently have 2 types of xenos in the codebase, simple animal and carbon. I'd like to unite them both under basic, and I thought I should go for simple animal first since it's more of a conversion than a remake. This helps set a base for a future basic-only xeno, which would require the following: - Basic mobs (or just anything than Carbon) to have Organs, which we can then use for things like referring to their plasma sac for egg-laying, etc. - All xeno types having a basic mob variant, preferably with an AI so they would work without a player. - Something be done about larva, either we'd split basic xenos into "larva" and "adult" (like carbon) or have it be a separate path that can also have organs so they can still have hivemind. Everything else seems to have been done overtime as simple animals have been converted to basic (HUDs and holding things now seem possible, etc.) Even if this doesn't work out, at least this cuts off a good chunk of the remaining simple animals to convert to basic. Sprites used (for mapping helpers): Fire medkit Toxin medkit Oingo Boingo punch face (i tried to shrink it down) ## Why It's Good For The Game This helps advance us move away from simple animals, and helps move carbon xenos to basic mob later too if that's what we want to go for. ## Changelog 🆑 refactor: Xenomorphs (Lavaland & Oldstation ones) are now basic mobs. /🆑
AI controllers
Introduction
Our AI controller system is an attempt at making it possible to create modularized AI that stores its behavior in datums, while keeping state and decision making in a controller. This allows a more versatile way of creating AI that doesn't rely on OOP as much, and doesn't clutter up the Life() code in Mobs.
AI Controllers
A datum that can be added to any atom in the game. Similarly to components, they might only support a given subtype (e.g. /mob/living), but the idea is that theoretically, you could apply a specific AI controller to a big a group of different types as possible and it would still work.
These datums handle both the normal movement of mobs, but also their decision making, deciding which actions they will take based on the checks you put into their SelectBehaviors proc.
If behaviors are selected, and the AI is in range, it will try to perform them. It runs all the behaviors it currently has in parallel; allowing for it to for example screech at someone while trying to attack them. As long as it has behaviors running, it will not try to generate new plans, making it not waste CPU when it already has an active goal.
They also hold data for any of the actions they might need to use, such as cooldowns, whether or not they're currently fighting, etcetera this is stored in the blackboard, more information on that below.
Blackboard
The blackboard is an associated list keyed with strings and with values of whatever you want. These store information the mob has such as "Am I attacking someone", "Do I have a weapon". By using an associated list like this, no data needs to be stored on the actions themselves, and you could make actions that work on multiple ai controllers if you so pleased by making the key to use a variable.
AI Behavior
AI behaviors are the actions an AI can take. These can range from "Do an emote" to "Attack this target until he is dead". They are singletons and should contain nothing but static data. Any dynamic data should be stored in the blackboard, to allow different controllers to use the same behaviors.
Guides:
Making Your AI: Quickly runs through how to make an ai controller for anything with a step by step development of one.