Skip to content

Convert quest unlock logic into a tree #58

@WaitingIdly

Description

@WaitingIdly

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 } } }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions