space-station-14
space-station-14 copied to clipboard
NPC refactor
- Prototypes everywhere
- More ECS
- Better debugging tools (TBC cough)
TODO:
- [ ] Docs on the dev wiki
- [ ] Enums instead of strings for the blackboard.
Alright so utility AI replaced with HTN. It's essentially just a tree of primitive tasks (nodes) and compound tasks (leaves). From a root compound task it gets expanded upon trying to find the first valid "plan". Compound tasks get expanded further and further until we only have primitive tasks remaining (a "plan"). A compound task can have N branches and each branch can have N sequential tasks. Each primitive task has an "operator" (the actual code that gets run) attached to it.
I've tried to move as much as I can to prototypes which also means it should be more re-usable (as exemplified by the linecount going down a lot... plus the removal of the old blackboard).
Plan A is considered better than plan B if it expands earlier (branch traversal record / method traversal record).
I moved the blackboard (AKA how the NPC thinks about data when planning) to just 1 class with an internal dictionary. It's kinda scuffed but I also couldn't think of anything easier as I need to be able to represent data changing during planning.
This also includes rudimentary dedicated melee + steering systems that will be built upon later. The reason they're in their own systems and not operators is because they'll require more detailed co-operation between NPCs (e.g. to avoid stacking) and it's just easier to do it in a dedicated system.
Pathfinding is largely untouched for now but it will be the first thing I come back to after my next PR after I suss out recast.
Requires: https://github.com/space-wizards/RobustToolbox/pull/3103
:cl:
- tweak: Pets will no longer try to run away when buckled or pulled.
This pull request has conflicts, please resolve those before we can evaluate the pull request.
This pull request has conflicts, please resolve those before we can evaluate the pull request.
This pull request has conflicts, please resolve those before we can evaluate the pull request.
This pull request has conflicts, please resolve those before we can evaluate the pull request.
RSI Diff Bot; head commit 63733158e73ced51303d82de87a77eb1af349b71 merging into 138e328c046603250a0b5fbbcc16cb328cfd1423 This PR makes changes to 1 or more RSIs. Here is a summary of all changes:
Resources/Textures/Objects/Weapons/Guns/turrets.rsi
State | Old | New | Status |
---|---|---|---|
syndie_broken | ![]() |
Added | |
syndie_lethal | ![]() |
Added | |
syndie_off | ![]() |
Added | |
syndie_stun | ![]() |
Added |
This pull request has conflicts, please resolve those before we can evaluate the pull request.
Just needs the collision avoidance split out and dev docs and then it's good for review (the line count is mostly just the debug map).
This pull request has conflicts, please resolve those before we can evaluate the pull request.
This pull request has conflicts, please resolve those before we can evaluate the pull request.
Clicking the link to the docs in the PR description gives me: "Unauthorized You cannot create the page." Has this moved elsewhere?