Show / Hide Table of Contents

Namespace DaggerfallWorkshop.Game.Questing

Classes

ActionTemplate

Base class template for all quest actions and conditions used by tasks. Handles some of the boilerplate of IQuestAction. This class can be used to test and factory new action interfaces from itself. Actions belong to a task and perform a specific function when task is active and conditions are met. An action will persist until task terminates. Think of actions as objects with a lifetime rather than a simple unit of one-shot execution. For example, the "vengeance" sound played in nighttime Daggerfall is an action that persists until Lysandus is put to rest. Currently still unclear on when actions get reset (e.g. when does "play sound 10 times" counter get reset?).

AddAsQuestor

Incomplete. Just stubbing out action for now so quest will compile.

AddDialog

add dialog command used in quests to make talk options available.

CastEffectDo

Executes target task when player readies a spell containing a single specific effect. Matches effect by key, so should support custom effects from mods.

CastSpellDo

Executes target task when player readies a spell containing specific effects. Classic only accepts standard versions of spell, not custom spells created by player. Daggerfall Unity makes no distinction between standard or custom spells and will instead match by effects.

CastSpellOnFoe

Queues a spell to be cast on a Foe resource. Can queue multiple spells at once or at different stages of quest. If the Foe has not been spawned: All spells currently in queue will be cast on Foe the moment they spawn. If the Foe has been spawned: The next spell(s) added to queue will be cast on spawned Foes on next quest tick. This allows quest author to cast spells on Foe both before and after spawn or at different stages of quest (e.g. after foe injured). Notes: -As spells have durations recommend casting spells on "place foe" dungeon foes after being injured or spell will likely expire by the time player locates foe. -For "create foe" foes spell can be queued at any time as spell is cast when foe is directly spawned near player.

ChangeFoeInfighting

Changes whether or not a quest foe is attackable by other NPCs.

ChangeFoeTeam

Changes a foe's team.

ChangeReputeWith

Changes reputation with an NPC by specified amount.

ClickedFoe

Handles player clicking on Foe.

ClickedItem

ClickedNpc

Handles player clicking on NPC. NOTES:

  • Will clear click after handling if player clicks NPC.
  • If used in combination with TotingItemAndClickedNpc on same NPC elsewhere in quest, always call TotingItemAndClickedNpc check BEFORE ClickedNpc.

Clock

A clock is an alarm that that executes a task with the same symbol name. Clock must be started and stopped by quest actions. Clock runs down in game-time (default is 12x real-time). This also means timer is paused when game is paused.

CreateFoe

Spawn a Foe resource into the world.

DailyFrom

Raise or lower task state based on time of day. Time must be in 24-hour time 00:00 to 23:59.

DestroyNpc

NPC will be be soft destroyed (permanently removed from world but othwerwise available for macro resolution). This is different to classic that will return BLANK once NPC is destroyed (probably beause resource is hard deleted). If there are any emulation issue with soft destruction then will change to hard destruction instead.

DialogLink

dialog link command used in quests.

DropAsQuestor

Incomplete. Just stubbing out action for now so quest will compile.

Enemies

Makes all foes hostile, or clears (removes) them all.

Foe

A quest Foe defines an enemy for player to fight as part of a quest. Foes are a 1-to-many resource (1 Foe resource to many entities). For example, a quest might send waves of giants at the player.

HaveItem

Starts a task when player has a particular item resource in their inventory. This task continues to run and will start task when item present

Item

A quest item is something used or granted during quest execution. Can contain tags, for example to show a message when used.

ItemUsedDo

Condition that fires when player equips an Item or clicks "Use" on item in inventory window. Seen in Sx006 when player equips the robe or in Sx017 when player uses painting.

LegalRepute

Legal repute modifies player legal reputation in current region.

LevelCompleted

Triggers when player has reached specified level or higher.

MakePermanent

Converts a quest item into a permanent item.

Message

A message stores text for popups, journal, letters, rumours, etc.

MuteNpc

NPC will no longer respond to mouse clicks once muted.

Parser

Reads a quest source file and generates new quest object. Final step of parsing may be handed off to components as text at construction time. This allows parser to handle high-level structure while components take care of their own specific needs.

Person

Defines an NPC involved in a quest.

Place

A site involved in a quest. Can be a random local/remote location or a fixed permanent location.

PlaySong

Plays a song from MIDI.BSA using SongFiles enum.

Quest

Contains live state of quests in play. Quests are instantiated from text source and executed inside quest machine. Each quest is assigned a unique id (UID) as its possible for same question to be instantiated multiple times, such as a basic fetch quest to two different dungeons. The name of quest cannot not be used for unique identification. Child resources generally will not care about quest UID, but this is used by quest machine.

QuestListsManager

Manager class for Quest Lists and Quest scripts

Quest lists are tables of quest names and metadata. They are discovered and loaded at startup time. (although loaded at runtime in editor) The files must be named: QuestList-{name}.txt

Quest scripts sit alongside list and must be uniquely named. They are loaded at runtime.

Get quests by calling one of these methods: GetQuest() GetGuildQuest() GetSocialQuest()

QuestMachine

Hosts quests and manages their execution during play. Quests are instantiated from a source text template. It's possible to have the same quest multiple times (e.g. same fetch quest from two different mage guildhalls). Running quests can perform actions in the world (e.g. spawn enemies and play sounds). Or they can provide data to external systems like the NPC dialog interface (e.g. 'tell me about' and 'rumors'). Quest support is considered to be in very early prototype stages and may change at any time.

QuestMachine.QuestMachineData_v1

QuestResource

All quest resources hosted by a quest must inherit from this base class. Symbol will be set by inheriting class after parsing source text.

QuestResourceBehaviour

Helper behaviour to pass information between GameObjects and Quest system. Used to trigger resource events in quest systems like ClickedNpc, InjuredFoe, KilledFoe, etc.

ReputeExceedsDo

Executes a task when reputation with NPC exceeds value. This is not a trigger condition and will not trigger parent task. Owning task must be made active before this action starts checking condition each tick.

RevealLocation

Reveals location on travelmap

RumorMill

add dialog command used in quests to make talk options available.

RunQuest

Starts another quest and waits for its termination, then sets task for success or failure. Sets failure task immediately if target quest is not found. Will ensure that target quest is also terminated if still running when parent quest ends.

Season

DFU extension action. Triggers when the calendar is at the right season

SetPlayerCrime

Sets a player's crime.

SpawnCityGuards

Spawns city guards using PlayerEntity.SpawnCityGuards().

StartQuest

Starts another quest. Classic 'start quest' can only start Sx000 value quests. Likely to create a Daggerfall Unity specific start quest variant that can start any named quest. In canonical quests always lists same quest index twice, e.g. "start quest 1 1". This implementation only uses first index, purpose of second index currently unknown.

Symbol

Manages a text symbol used by quest system. Symbols are used by resources, tasks, and text replacement.

Task

Tasks are executed by other tasks, clock timeouts, etc. Somewhat like a subroutine. Tasks can contain conditions at start that if not met appear to prevent further execution of task. Task name can also be used as a symbol to query if task has been triggered or not. Provided conditions are met, commands under a task usually run once then end. Repeating tasks execute (i.e. each command stays alive) until target task/variable completed. Variables are a special task with no conditions or actions, just set/unset.

TeleportPc

Partial implementation. Teleport player to a dungeon for dungeon traps, or as part of main quest. Does not exactly emulate classic for "transfer pc inside" variant. This is only used in Sx016.

UnrestrainFoe

Unrestrains a foe restrained by RestrainFoe

WhenAttributeLevel

Triggers when character reaches minimum value for specified attribute.

WhenNpcIsAvailable

Triggers when player clicks on an individual NPC that is not currently assigned to another quest. This is only used in a small number of canonical quests which refer to special individuals. Examples are King Gothryd, Queen Aubk-i, Prince Lhotun, etc.

WhenReputeWith

Triggers when player reputation with a special named NPC equals or exceeds a minimum value. This is only used in a small number of canonical quests which refer to special individuals. Examples are King Gothryd, Queen Aubk-i, Prince Lhotun, etc.

WhenSkillLevel

Triggers when player has reached specified skill level or higher.

WhenTask

Handles a when|when not task performed condition chain.

WorldUpdate

Updates the world data system to use a specific variant for a given place (location, block, building) either for all instances or for a particular location. Specify a single dash for variant to remove any existing variant.

Structs

ActionTemplate.ActionSaveData_v1

AddAsQuestor.SaveData_v1

AddDialog.SaveData_v1

CastEffectDo.SaveData_v1

CastSpellDo.SaveData_v1

CastSpellOnFoe.SaveData_v1

ChangeFoeInfighting.SaveData_v1

ChangeFoeTeam.SaveData_v1

ChangeReputeWith.SaveData_v1

ClickedFoe.SaveData_v1

ClickedItem.SaveData_v1

ClickedNpc.SaveData_v1

Clock.SaveData_v1

CreateFoe.SaveData_v1

DailyFrom.SaveData_v1

DestroyNpc.SaveData_v1

DialogLink.SaveData_v1

DropAsQuestor.SaveData_v1

Enemies.SaveData_v1

Foe.SaveData_v1

HaveItem.SaveData_v1

Item.SaveData_v1

ItemUsedDo.SaveData_v1

LegalRepute.SaveData_v1

LevelCompleted.SaveData_v1

MakePermanent.SaveData_v1

Message.MessageSaveData_v1

Message.MessageVariant

MuteNpc.SaveData_v1

Person.SaveData_v1

Place.SaveData_v1

PlaySong.SaveData_v1

Quest.LogEntry

Stores active log messages as ID only. This allows text to be linked/unlinked into log without duplication of text. Actual quest UI can decide how to present these messages to user.

Quest.QuestorData

Quest.QuestSaveData_v1

Quest.TaskState

Basic information about a single task

QuestData

QuestMachine.StoredException

Stores information about an exception that would result in quest termination. This is stored permanently with save data to help with troubleshooting.

QuestResource.ResourceSaveData_v1

QuestResourceBehaviour.QuestResourceSaveData_v1

ReputeExceedsDo.SaveData_v1

RevealLocation.SaveData_v1

RumorMill.SaveData_v1

RunQuest.SaveData_v1

Season.SaveData_v1

SetPlayerCrime.SaveData_v1

SpawnCityGuards.SaveData_v1

StartQuest.SaveData_v1

Task.TaskSaveData_v1

TeleportPc.SaveData_v1

UnrestrainFoe.SaveData_v1

WhenAttributeLevel.SaveData_v1

WhenNpcIsAvailable.SaveData_v1

WhenReputeWith.SaveData_v1

WhenSkillLevel.SaveData_v1

WhenTask.Evaluation

WhenTask.SaveData_v1

WorldUpdate.SaveData_v1

Interfaces

IQuestAction

Interface to a quest action.

Enums

MembershipStatus

Place.Scopes

QuestMachine.QuestMessages

Fixed quest message constants.

Task.TaskType

WhenTask.Operator

Delegates

QuestMachine.OnQuestEndedEventHandler

QuestMachine.OnQuestErrorTerminationEventHandler

QuestMachine.OnQuestStartedEventHandler

QuestMachine.OnRegisterCustomActionsEventHandler

QuestMachine.OnTickEventHandler

QuestResourceBehaviour.OnGameObjectDestroyHandler

In This Article
Back to top Generated by DocFX