OpenXRay/xray-16
View on GitHub[SUGGESTION] Debug module for stalkers AI (GOAP graph in imgui window)
Open
#1,435 opened on Sep 4, 2023
AIDeveloper ExperienceEnhancementHelp wantedModmaker Experiencegood first issue
Repository metrics
- Stars
- (3,524 stars)
- PR merge metrics
- (PR metrics pending)
Description
What is
Just suggesting adding something similar to weather editor debug window. Usually changing logic (evaluators/actions) and then debugging may be problematic because (1) logs are very noisy, (2) there may be many entities online, (3) mixed build + action log is not the most performant thing. While logging representation is good to track what happened, realtime observation could be few times better and generally faster.
Variant of implementation:
It may be challenging to display whole GOAP declaration at once, but implementation can be started with simple things.
What is needed:
- Some dropdown/search/selector to pick any online stalker object OR optional toggle to display it for latest aim hover target
- GOAP actions path to reach final goal, just few labels with arrows is usually enough to represent it
- Details about current action -> action name, preconditions, state of evaluators, weights etc
- Information about full current GOAP declaration for the object
- Probably some controls to turn on / turn off GOAP graph state logging in mixed version of build
Possible problems:
- Capturing stalkers is handy, but many things may happen in between - unregister/going offline etc -> just needs testing
- Stalkers have script declared GOAP manager for StateManager which is not accessible from C++ side -> state manager is self contained, but having it for debug would be helpful too. Probably some variant of exposing it from scripts would work here
- Still is not perfect if interaction of 2+ objects should be measured. Probably some foldable / stackable elements could help here to observe few objects at once but it is too much for simple debug tool
- Some actions are represented as nested managers (alife, combat, anomaly, danger planners), in this case additional logic is needed to cast action to planner and display information about it. It adds complexity for rendering and should not be ignored