Modding Reference: DFU Quest Actions and Conditions in 0.11.4

For all talk about quest development - creation, testing, and quest system.
Post Reply
User avatar
Kab the Bird Ranger
Posts: 123
Joined: Tue Feb 23, 2021 12:30 am

Modding Reference: DFU Quest Actions and Conditions in 0.11.4

Post by Kab the Bird Ranger »

I've added quite a few quest actions/conditions in 0.11.4, some not even listed in the patch notes. While these will be available in the next release of TheLacus DFTemplate extension for Visual Studio Code, I thought it would be useful to give folks an overview of what's available and how to use it.

For the classic quest actions and conditions, you can still refer to: https://www.dfworkshop.net/static_files ... -docs.html

If you were already familiar with writing quests in 0.11.3, here's the short version of the actions and conditions that were added in 0.11.4:
  • weather <weather type> (Trigger Condition)
  • season <season type> (Trigger Condition)
  • climate <climate type> (Trigger Condition)
  • climate base <base climate type>(Trigger Condition)
  • train pc <skill type> (End Quest Action)
  • pc at any <building type> (Trigger Condition)
  • promptmulti <message id> <button id 1> <task 1> ... (Action)
Where:
  • weather type: sunny|cloudy|overcast|fog|rain|thunder|snow
  • season type: fall|summer|spring|winter
  • climate type: desert|desert2|mountain|mountainwoods|rainforest|ocean|swamp|subtropical|woodlands|hauntedwoodlands
  • base climate type: desert|mountain|temperate|swamp
  • building type: see Quests-Places.txt, with p1=0
For a reference on climates per region in TES2, see Ralzar's Climate & Calories reference image
Spoiler!
Image

Next post, we will start going through all the extension actions in detail.

User avatar
Kab the Bird Ranger
Posts: 123
Joined: Tue Feb 23, 2021 12:30 am

Re: Modding Reference: DFU Quest Actions and Conditions in 0.11.4

Post by Kab the Bird Ranger »

Reference:

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

Code: Select all

    change foe <foe symbol> infighting true
    change foe <foe symbol> infighting false
Ex:

Code: Select all

    change foe _hunter_ infighting false
ChangeFoeTeam
Changes a foe's team (ie: what other foes they will fight with).

Code: Select all

    change foe <foe symbol> team <mobile team name>
    change foe <foe symbol> team <mobile team id>
Ex:

Code: Select all

    change foe _hunter_ team KnightsAndMages
    change foe _hunter_ team 19
See: ClickedFoe
Handles player clicking on Foe (ie: MobileEnemy). The Foe has to be declared in the quest as a Foe resource.

Code: Select all

    clicked foe <foe name> say <message id>
    clicked foe <foe name> say <message name>
    clicked foe <foe name>
Where:
  • message name: see Quests-StaticMessages.txt
Ex:

Code: Select all

    clicked foe _foe_ say 1014
    clicked foe _foe2_ say RumorsDuringQuest
Climate
Trigger condition that triggers when the player is at a location with the right climate.

Code: Select all

    climate <climate type>
    climate base <base climate type>
Where:
  • climate type: desert, desert2, mountain, mountainwoods, rainforest, ocean, swamp, subtropical, woodlands, hauntedwoodlands
  • base climate type: desert, mountain, temperate, swamp
Ex:

Code: Select all

_desert_ task:
    climate base desert
    
_other_ task:
    when _desert_
    end quest
Enemies
Makes all foes hostile, or clears (removes) them all.

Code: Select all

    enemies makehostile
    enemies clear
JournalNote
Adds a text entry to the player journal as a note.

Code: Select all

    journal note <message id>
Ex:

Code: Select all

    journal note 1014
KillFoe
Kills a specified foe instantly.

Code: Select all

    kill foe <foe name>
Ex:

Code: Select all

    kill foe _fargoth_
PayMoney
Take an amount from player, and start a task depending on if they could pay.

Code: Select all

    pay <amount> money do <task name> otherwise do <task name>
    pay <amount> gold do <task name> otherwise do <task name>
If using "pay gold", only gold pieces will be considered. Otherwise, other sources of currency (ex: letters of credit) will also be considered.

Ex:

Code: Select all

    pay 50000 gold do _reward_ otherwise do _fight_
PlaySong
Plays a song from MIDI.BSA using SongFiles enum.

Code: Select all

    play song <song name>
Ex:

Code: Select all

    play song song_5strong
See: PromptMulti
Prompt which displays a dialog with 2-4 buttons that each execute a different task based on user selection.

Code: Select all

    promptmulti <message id> <button1 id> <button2 id> ...
Note: Each button id can be followed by ":" and an arbitrary label - use this for readability!

See: Ex:

Code: Select all

    promptmulti 1072 4:noChoice _dirRand_ 24:south _headS_ 25:west _headW_ 28:swest _headSW_
Season
Trigger condition that triggers when the calendar has the specified season.

Code: Select all

    season <season name>
Season names are "fall", "summer", "spring", and "winter".

Ex:

Code: Select all

_summer_ task:
    season summer
    
_other_ task:
    when _summer_
    end quest
SetPlayerCrime
Sets a player's crime. In Daggerfall, players only have one active crime at a time.

Code: Select all

    setplayercrime <crime type>
See: Ex:

Code: Select all

    setplayercrime Criminal_Conspiracy
SpawnCityGuards
Spawns city guards. If immediate, they will immediately rush to attack the player. Otherwise, they will have to detect the player first.

Code: Select all

    spawncityguards
    spawncityguards immediate
TrainPc
Shows the quest completion message, then trains the player in the specified skill and ends the quest. Intended as a quest reward.

Code: Select all

    train pc <skill name>
Ex:

Code: Select all

    train pc CriticalStrike
UnrestrainFoe
Unrestrains a foe restrained by RestrainFoe.

Code: Select all

    unrestrain foe <foe symbol>
Ex:

Code: Select all

    unrestrain foe _badman_
Weather
Trigger condition that triggers when the weather at the current location matches the condition.

Code: Select all

    weather <weather type>
The weather types are: sunny, cloudy, overcast, fog, rain, thunder, snow.

Note: Cloudy is not implemented in DFU.

Ex:

Code: Select all

_rain_ task:
    season rain
    
_other_ task:
    when _rain_
    end quest
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.

Code: Select all

    worldupdate location at <location id> in region <region id> variant <variant name>
    worldupdate locationnew named <location name> in region <region id> variant <variant name>
    worldupdate block <block name> at <location id> in region <region id> variant <variant name>
    worldupdate blockAll <block name> variant <variant name>
    worldupdate building <block name> <record id> at <location id> in region <region id> variant <variant name>
    worldupdate buildingAll <block name> <record id> variant <variant name>
For more info, see viewtopic.php?f=22&t=2857

Ex:

Code: Select all

    worldupdate building ARMRAM03.RMB 14 at 240 in region 52 variant _master
Last edited by Kab the Bird Ranger on Thu Aug 19, 2021 5:13 pm, edited 7 times in total.

User avatar
Kab the Bird Ranger
Posts: 123
Joined: Tue Feb 23, 2021 12:30 am

Re: Modding Reference: DFU Quest Actions and Conditions in 0.11.4

Post by Kab the Bird Ranger »

DFU extensions to classic actions

Certain actions have a more permissive behavior in DFU than what is traditionally allowed in TES2. I will attempt to cover these here. These aren't easy to find, so send them my way if you know of any­.

PcAt
Normally, this condition triggers when the PC is at a specific place specified in the quest. Since 0.11.4, DFU supports this new syntax:

Code: Select all

    pc at any <building type> do <task name>
    pc at any <building type> do <task name> saying <message id>
For building types, consult Quests-Places.txt. The building types have p1=0 (ex: "magery, 0, 11, 40").

Note: Due to a bug, "magery" and "fighters" are equivalent to "guildhall" in 0.11.4. This should be fixed in 0.11.5

Ex:

Code: Select all

    pc at any bookstore
    say 1014
Last edited by Kab the Bird Ranger on Thu Jun 10, 2021 11:35 pm, edited 1 time in total.

User avatar
Jay_H
Posts: 4061
Joined: Tue Aug 25, 2015 1:54 am
Contact:

Re: Modding Reference: DFU Quest Actions and Conditions in 0.11.4

Post by Jay_H »

Very happy to see some documentation for these actions, thank you :) You might have noticed I started using "weather" in my Random Little Quests pack. Very handy, thank you for adding it and the others!

What would you think about my moving this to the Quest Development forum? If modders can use this topic I have no objection, but I thought that would be the most relevant section.

User avatar
Kab the Bird Ranger
Posts: 123
Joined: Tue Feb 23, 2021 12:30 am

Re: Modding Reference: DFU Quest Actions and Conditions in 0.11.4

Post by Kab the Bird Ranger »

What would you think about my moving this to the Quest Development forum?
Totally missed this. I'm not used to these forums yet. I'd be happy to see it moved to the right category by a moderator.

User avatar
Jay_H
Posts: 4061
Joined: Tue Aug 25, 2015 1:54 am
Contact:

Re: Modding Reference: DFU Quest Actions and Conditions in 0.11.4

Post by Jay_H »

All done, a simple task :) Thanks for setting this up!

User avatar
Kab the Bird Ranger
Posts: 123
Joined: Tue Feb 23, 2021 12:30 am

Re: Modding Reference: DFU Quest Actions and Conditions in 0.11.4

Post by Kab the Bird Ranger »

Alright, that should cover DFU extensions to the quest actions, as of 0.11.4

If I'm missing anything, let me know.

If you have suggestions to improve formatting, or if you've spotted any typos or errors, do let me know!

User avatar
Hazelnut
Posts: 3015
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: Modding Reference: DFU Quest Actions and Conditions in 0.11.4

Post by Hazelnut »

It would be good for the promptmulti action to link to my topic on multi buttons I think.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

Post Reply