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

Convert quest unlock logic into a tree #58

Open
WaitingIdly opened this issue Jul 29, 2022 · 0 comments
Open

Convert quest unlock logic into a tree #58

WaitingIdly opened this issue Jul 29, 2022 · 0 comments

Comments

@WaitingIdly
Copy link
Collaborator

Developers frequently want to create a quest that requires A && (B || C) (multiple examples can be found in Nomifactory). Currently, to do this you have to create an intermediary quest.
The current layout is a single array, preRequisites of type questID[], with a tasklogic of type taskType (AND/OR/NAND/NOR/XAND/XOR) governing how to unlock the quest.
I suggest that this be changed to a preRequisites of type taskType[tasks], with tasks being of type taskType[questID|tasks].

A few examples of how this system would look:
0 && 1 = and: { 0, 1 }
0 && (1 || 2) = and: { 0, or: { 1, 2 } }
(0 || 1) && (2 || 3) = and: { or: { 0, 1 }, or: { 2, 3 } }
0 || (1 && (2 || 3)) = or: { 0, and: { 1, or: { 2, 3 } } }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant