Jay_H's quest writing tutorial

For all talk about quest development - creation, testing, and quest system.
Post Reply
User avatar
RH666
Posts: 48
Joined: Mon Feb 12, 2018 6:07 am
Location: Koegria

Re: Jay_H's quest writing tutorial

Post by RH666 »

Yup! Notepad++ seems to work, thanks!

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

Re: Jay_H's quest writing tutorial

Post by Jay_H »

I'm having some trouble with the QuestList step in the tutorial. When I ask to receive a quest, the Get Quest button is unresponsive. Here's what the player log says:

Code: Select all

NPC offers guild service: Quests
 
(Filename: /home/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

rep: 100 high#: 1 low#: 0 new rank: 1
 
(Filename: /home/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

DaggerfallBillboard [TEXTURE.182, Index=20] (UnityEngine.Transform)
 
(Filename: /home/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

DFTFU 1.7.2: RegisterQuestList: /home/USERNAME/Downloads/Daggerfall Unity 103/DaggerfallUnity_Data/StreamingAssets/QuestPacks/QuestList-TESTING.txt
 
(Filename: /home/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

QuestList already registered. /home/USERNAME/Downloads/Daggerfall Unity 103/DaggerfallUnity_Data/StreamingAssets/QuestPacks/QuestList-TESTING.txt
 
(Filename: /home/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

Exception: Schema not found in source table.
  at DaggerfallWorkshop.Utility.Table.LoadTable (System.String[] lines) [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Utility.Table..ctor (System.String[] lines) [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.Questing.QuestListsManager.LoadQuestList (System.String questListFilename, System.String questsPath) [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.Questing.QuestListsManager.LoadQuestList (System.String questList) [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.Questing.QuestListsManager.LoadQuestLists () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.Questing.QuestListsManager..ctor () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.GameManager.get_QuestListsManager () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterfaceWindows.DaggerfallGuildServicePopupWindow.GetQuest () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterfaceWindows.DaggerfallGuildServicePopupWindow.ServiceButton_OnMouseClick (DaggerfallWorkshop.Game.UserInterface.BaseScreenComponent sender, Vector2 position) [0x00000] in <filename unknown>:0 
  at (wrapper delegate-invoke) DaggerfallWorkshop.Game.UserInterface.BaseScreenComponent/OnMouseClickHandler:invoke_void__this___BaseScreenComponent_Vector2 (DaggerfallWorkshop.Game.UserInterface.BaseScreenComponent,UnityEngine.Vector2)
  at DaggerfallWorkshop.Game.UserInterface.BaseScreenComponent.MouseClick (Vector2 clickPosition) [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterface.BaseScreenComponent.Update () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterface.Panel.Update () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterface.Button.Update () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterface.Panel.Update () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterface.Panel.Update () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterface.Panel.Update () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterface.UserInterfaceWindow.Update () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterfaceWindows.DaggerfallBaseWindow.Update () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterfaceWindows.DaggerfallPopupWindow.Update () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.DaggerfallUI.Update () [0x00000] in <filename unknown>:0 
 
(Filename:  Line: -1)

Unloading 1 Unused Serialized files (Serialized files now loaded: 1)

Unloading 752 unused Assets to reduce memory usage. Loaded Objects now: 2236.
Total: 337.858002 ms (FindLiveObjects: 0.716000 ms CreateObjectMapping: 0.217000 ms MarkObjects: 333.045990 ms  DeleteObjects: 3.877000 ms)
Here's my setup:

Image
Image

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: Jay_H's quest writing tutorial

Post by Interkarma »

Do you have your "schema:" define as the very first (non-comment) line of the table document? Just double check it matches the schema format of the other quest tables.

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

Re: Jay_H's quest writing tutorial

Post by Jay_H »

Ha, ha, ha :D That was the precise problem. Now it's working perfectly. Thanks Interkarma.

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: Jay_H's quest writing tutorial

Post by Interkarma »

No problems, glad I was able to help. :)

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

Re: Jay_H's quest writing tutorial

Post by Hazelnut »

Probably should add that to the instructions, sorry i overlooked that. Thanks for checking.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

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

Re: Jay_H's quest writing tutorial

Post by Jay_H »

Part Seven: Item Usage; make item permanent

Code: Select all

Quest: TESTING6
DisplayName: Usage
-- Message panels
QRC:

QuestorOffer:  [1000]
<ce> _object_ is working well.

RefuseQuest:  [1001]
<ce> No dice.

AcceptQuest:  [1002]
<ce> Go test it in _res_.

QuestFail:  [1003]
<ce> 

QuestComplete:  [1004]
<ce> Told you it works.

Message:  1020
<ce> The _object_ has worked.
All standard dialogue pieces.

Code: Select all

QBN:
Item _object_ mythic

Person _qgiver_ group Questor male

Clock _timer_ 01:00

Place _res_ local tavern
This is the start of the QBN section.

Code: Select all

--	Quest start-up:
	start timer _timer_
	get item _object_
    pc at _res_ do _inside_

The "get item" command silently puts the defined object into the PC's inventory.

The "pc at" quest task was defined in part 3.

Code: Select all

_inside_ task:
    _object_ used do _effect_
In order for a quest item to do an effect, this condition has to be planted inside a previous task. That previous task must be active at the time you want the effect to be possible.

What we've said here is, when the _inside_ task is lit up on the left side of the screen, the _object_ thing can now do its effect.

The item usage we speak of is when we go into the inventory (F6) and we click on the "Use" button, and then click on the inventory item with the green background. This is rarely used in classic, but it has a lot of potential.

Code: Select all

_effect_ task:
    say 1020
And this is that effect: it'll state message 1020 on the screen.

Code: Select all

_qgclicked_ task:
	clicked npc _qgiver_ 

_pcgetsgold_ task:
	when _qgclicked_ and _effect_ 
    give pc nothing
    make _object_ permanent
	end quest

_clearclick_ task:
	when _qgclicked_ and not _effect_ 
	clear _qgclicked_ _clearclick_
	
_timer_ task:
    end quest
We're using a new quest action here, "make _object_ permanent". This allows us to alter quest items so they last beyond the end of the quest. Without this, items introduced during the quest will disappear once the quest ends. "make _object_ permanent is not needed when using "give pc _reward_" triggers, since they automatically assume permanency.

Once that effect has been produced, we click on the questgiver to end the quest. The effect will not play anywhere except inside the selected tavern, and the questgiver will not end the quest until the effect is played. So how does mine turn out?

Image
Image
Image
Image
Image

If yours is different, post about it. The "mythic" object class will choose among various fantasy objects so that'll be different each time, but the mechanics of the quest should reproduce as shown here. You can also try using the quest item outside of the given location to see how ineffective it is.

james2k
Posts: 9
Joined: Wed Dec 04, 2019 8:16 pm

Re: Jay_H's quest writing tutorial

Post by james2k »

Where can I find a list of enemy IDs?

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

Re: Jay_H's quest writing tutorial

Post by Jay_H »

In DaggerfallUnity_Data/StreamingAssets/Tables/Quests-Foes.txt.

james2k
Posts: 9
Joined: Wed Dec 04, 2019 8:16 pm

Re: Jay_H's quest writing tutorial

Post by james2k »

Jay_H wrote: Mon Dec 23, 2019 2:48 pm In DaggerfallUnity_Data/StreamingAssets/Tables/Quests-Foes.txt.
Cheers. BTW is it possible to set up a non-foe as a killable enemy in a dungeon? I wanna spawn a noble you have to kill along with his guards. The guards I can set as knights or whatever, but what should I do for him?

Post Reply