Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Graph Viewer (GOAP) shows invalid connection scenarios when multiple conditions are used #314

Closed
whiteferret76 opened this issue Nov 28, 2024 · 0 comments · Fixed by #317
Labels

Comments

@whiteferret76
Copy link

Describe the bug
The Graph Viewer (GOAP) shows invalid branches when multiple conditions are used on actions.
If an action has multiple conditions ( Condition A and Condition B) and previously executed actions in the chain will make one condition true (A) and make the other condition false (B) the branch will show in the graph, even though the branch is invalid and would never execute.

Steps to Reproduce
Steps to reproduce the behavior:

  1. Create an action (Action 0) with two conditions A & B.
  2. Create 5 additional actions:
    • Action 1) Makes condition A true and has an .Effect that makes condition B false.
    • Action 2) Makes condition B true and has an .Effect that makes condition A false,
    • Action 3) Makes condition A & B true.
    • Action 4) Makes condition A true and has a condition C requirement
    • Action 5) Makes condition B true and has a .Effect that make condition C true
  3. Make Action 0 a requirement for a goal.
  4. Create an agent and a capability to allow for the actions to be assigned to the agent.
  5. Observe the agent's graph in the Graph Viewer. Notice the construction of invalid branches.

Expected behavior
Invalid branches would not appear in the Graph Viewer and would not be available to resolver.

Screenshots
image
image

Unity Version
2022.3.16f1

Unity.Collections Version
Please mention the Unity.Collections version you are using.

Package Version
GOAP version 3.0.24

Additional context
Refer to Discord conversation for images and conversation refresher.

crashkonijn added a commit that referenced this issue Dec 5, 2024
…ns-with-conflicting-effects

Fix: Prevent connecting actions with conflicting effects #314
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant