Skip to content

Visibility and Logic

Joshua Law edited this page Aug 4, 2019 · 4 revisions

Visibility and Logic

A common theme throughout Better Questing is making use of the different ways quests and quest lines can be unlocked, which I refer to as visibility. Quest can also be active or inactive. An active quest is one where the tasks can be completed, where an inactive quest is one that cannot. Active and Inactive is determined by a quest's dependency. If its parent quest is completed, or if it has no parent quest, its active, otherwise, its a child quest and therefore inactive. The image below shows an active parent quest and an inactive child quest.

VISIBILITY

There are 6 visibility rules: NORMAL, COMPLETED, CHAIN, ALWAYS, HIDDEN and UNLOCKED.

NORMAL - Default

A normal quest, either a parent quest or a stand-alone quest, is always active and visible. If a child quest is set to normal, then when its parent is active it will be visible but inactive.

Three NORMAL quests in EDIT MODE, each one a child of the one before:

Those same quests as seen by the player:

The player cannot see the third quest because its parent is not active.

COMPLETED

A completed quest is active, but not visible. It can only be seen once its tasks are completed. This is a great way to include easter eggs and hidden quests with awesome loot.

CHAIN

Chain quests inherit the visibility of their parents. Let's take the example from earlier, but this time we set the log quest as a COMPLETED quest and the rest as CHAIN quests. The player sees:

Because the log quest is a COMPLETED quest, we can't see it until the player completes it. Now the players punches the tree and gathers a log. Now the player sees:

They completed the log quest, so it now shows as completed and all the quests in the chain are now visible. However, the current active quest still respects the child/parent dependencies.

ALWAYS

This quest is ALWAYS visible.

HIDDEN

This quest is ALWAYS not visible.

UNLOCKED

This quest is ONLY visible if its active, meaning its parent has been completed. Back to our example, let's say we make the log quest NORMAL and all the rest UNLOCKED. At first, the player only sees the log quest available. Once they complete the log quest, they see the next quest in the chain, and once they complete it, the next and so on.

LOGIC

Logic is used to determine whether a child quest is inactive or active based on the completion of its parents. There are 6 logic settings: AND, NAND, OR, NOR, XOR, and XNOR.

AND - Default

The child quest becomes ACTIVE if all its parent quests are completed. The picture below shows a quest line to create a piston, which requires cobble, wood, iron and redstone.

You can see that on the left, only two quests were completed and the piston quest was still inactive, while on the right all 4 quests were completed and the piston quest was activated. Quests still have to respect their visibility rules. So if the piston quest was set to UNLOCKED, all 4 parent quests must be completed before the piston quest is visible and active.

NAND

The child quest becomes INACTIVE if all its parent quests are completed.

On the left, all the parent quests were completed and our piston quest became inactive. On the right, one of the parent quests is not completed so the piston quest is active.

How is this useful? When would I use this?

Let's say that instead of a piston, you create a repeatable quest to kill 5 zombies and the reward is 10 iron ore. Then we make it have one parent, a diamond sword. Once the player has a diamond sword, the kill quest de-activates thus allowing some balance in the pack.

OR

The child quest becomes ACTIVE if ANY of the parent quests is completed.

On the left, none of the parent quest have been completed so the piston quest is inactive. Once ANY of the parent quests is completed, the piston quest becomes active. Keep in mind that any of the 4 parents quest can be completed to activate the piston quest.

NOR

The child quest becomes INACTIVE if ANY of the parent quests is completed.

Since none of the parent quest are completed, the piston quest is active. Once any of the parent quest are completed, the piston quest deactivates.

XOR

This is called the exclusive OR. The child quest becomes ACTIVE if ONLY ONE of the parent quests is completed.

You can see that when all parent quests are not completed, the piston quest is inactive, once ONE of the parent quests is completed, the piston quest becomes active. However, if more than one parent quest is completed, the piston quest becomes inactive again.

XNOR

The child quest becomes ACTIVE if ALL BUT ONE of the parent quests is completed.

You can see that in order for the piston quest to activate, all but one of its parent quests must be completed.

EXPERT TIP

This logic also applies to TASK logic. Let's say for example, instead of making 4 quests to gather the materials to make a piston, you make one quest with multiple tasks, as show below.

If you click on the quest to edit it then follow these clicks:

Advanced -> Properties:Object -> betterquesting:Object

You should see the the image below. Indicated in the picture is where you can manually set how to control the task activation and visibility. I typically don't change the visibility, but the logic is helpful. Especially for those quests where you want them to complete 1 task but not all using OR.