forked from Funwayguy/BetterQuesting
-
Notifications
You must be signed in to change notification settings - Fork 25
Convert quest unlock logic into a tree #58
Copy link
Copy link
Open
Description
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 } } }
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels