About comments in the QBN section

For all talk about quest development - creation, testing, and quest system bug diagnosis.
Post Reply
haloterm
Posts: 101
Joined: Sat Feb 16, 2019 5:21 am

About comments in the QBN section

Post by haloterm » Tue Feb 04, 2020 10:42 am

I've stumbled again upon something I don't quite understand.

The following code is running fine (it's used in a quest that will practically never expire, so the item given by the quest will stick with the player):

Code: Select all

Clock _Infinity_ 10000.00:00
start timer _Infinity_
give pc _BHCIssue_ notify 1020
start quest MDBHC001

-- our very long timer just exists; it does nothing
_Infinity_ task:
The following variant (where I simply added some comments ) not -- the quest does simply not start when I start it in the console:

Code: Select all

Clock _Infinity_ 10000.00:00
start timer _Infinity_

-- give player the Black Horse Courier issue
give pc _BHCIssue_ notify 1020

-- start the first real quest in the questline
start quest MDBHC001

-- our very long timer just exists; it does nothing
_Infinity_ task:
I was assuming that a line beginning with a "-" is a comment and that I can add such a comment anywhere in the file.

Apparently not. The quest does start when I remove the new comments.

Can somebody explain why this is the case?

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

Re: About comments in the QBN section

Post by Interkarma » Tue Feb 04, 2020 11:31 pm

Comment lines are ignored, but empty line breaks are used to determine when a task block ends. For example, the following is one task block:

Code: Select all

give pc _BHCIssue_ notify 1020
start quest MDBHC001
And the following ends after only one instruction as it reaches an empty line break:

Code: Select all

give pc _BHCIssue_ notify 1020

start quest MDBHC001
At this point, The parser will discard everything after the empty line break and scan for the next task/variable header. I'm not able to test right now, but I believe the following might work (no empty line break):

Code: Select all

-- give player the Black Horse Courier issue
give pc _BHCIssue_ notify 1020
-- start the first real quest in the questline
start quest MDBHC001
Empty line breaks are also used to end text blocks. Rather than just whitespace, think of them as part of the TEMPLATE syntax.

haloterm
Posts: 101
Joined: Sat Feb 16, 2019 5:21 am

Re: About comments in the QBN section

Post by haloterm » Tue Feb 04, 2020 11:36 pm

Interkarma wrote:
Tue Feb 04, 2020 11:31 pm
empty line breaks are used to determine when a task block ends.
Ah, I see! Thank you! :)

Making good progress with my little quest line on the Black Horse Courier's attempts to expand from Cyrodiil to the Iliac Bay. I have finished the 4th quest today (plus 2 other quest files for initialization purposes).

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

Re: About comments in the QBN section

Post by Interkarma » Wed Feb 05, 2020 1:14 am

Awesome, keep at it. Can never have too many new quests to play. :)

haloterm
Posts: 101
Joined: Sat Feb 16, 2019 5:21 am

Re: About comments in the QBN section

Post by haloterm » Wed Feb 05, 2020 1:32 am

Interkarma wrote:
Wed Feb 05, 2020 1:14 am
Awesome, keep at it. Can never have too many new quests to play. :)
My goal with the quests is to give reasons to visit certain towns or regions, and to stay there for a while, to get to know the places better / make them less anonymous. The Black Horse Courier quests focus mostly on Daggerfall, and often even just on the city.

Later, I want to create questlines for other areas as well, to give players a reason to stay there a bit longer. Today I found a beautiful little farm near the eastern border of the Dragontail mountains; the area looks awesome with the Distant Terrain mod, and maybe my next questline (if my first gets finished) will play there.

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

Re: About comments in the QBN section

Post by Hazelnut » Wed Feb 05, 2020 11:43 pm

haloterm wrote:
Wed Feb 05, 2020 1:32 am
Interkarma wrote:
Wed Feb 05, 2020 1:14 am
Awesome, keep at it. Can never have too many new quests to play. :)
My goal with the quests is to give reasons to visit certain towns or regions, and to stay there for a while, to get to know the places better / make them less anonymous. The Black Horse Courier quests focus mostly on Daggerfall, and often even just on the city.

Later, I want to create questlines for other areas as well, to give players a reason to stay there a bit longer. Today I found a beautiful little farm near the eastern border of the Dragontail mountains; the area looks awesome with the Distant Terrain mod, and maybe my next questline (if my first gets finished) will play there.
If you need help targetting specific locations let me know. You will need to extend the places table for this to work which means you will need to release a dfmod package and not just a questpack for this to work. My Roleplay & Realism mod has a quest that does this, so see that for an example. For the time being while developing the quests you can just edit your local the StreamingAssets/tables/placesTable.txt file - that's what I did until I was ready to release my quest.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

haloterm
Posts: 101
Joined: Sat Feb 16, 2019 5:21 am

Re: About comments in the QBN section

Post by haloterm » Thu Feb 06, 2020 12:33 am

Hazelnut wrote:
Wed Feb 05, 2020 11:43 pm
haloterm wrote:
Wed Feb 05, 2020 1:32 am
Interkarma wrote:
Wed Feb 05, 2020 1:14 am
Awesome, keep at it. Can never have too many new quests to play. :)
My goal with the quests is to give reasons to visit certain towns or regions, and to stay there for a while, to get to know the places better / make them less anonymous. The Black Horse Courier quests focus mostly on Daggerfall, and often even just on the city.

Later, I want to create questlines for other areas as well, to give players a reason to stay there a bit longer. Today I found a beautiful little farm near the eastern border of the Dragontail mountains; the area looks awesome with the Distant Terrain mod, and maybe my next questline (if my first gets finished) will play there.
If you need help targetting specific locations let me know. You will need to extend the places table for this to work which means you will need to release a dfmod package and not just a questpack for this to work.
Hm, so far I just think about using farms, shacks and shrines -- I was hoping that I can use these to place NPCs, items and foes in the usual way. Or does this not work? I do not plan to add new places at this time.

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

Re: About comments in the QBN section

Post by Hazelnut » Thu Feb 06, 2020 5:01 pm

You can use the places to do all that stuff, but most quests only allow you to select a type of place randomly from the region. So if you wanted a specific farm location rather than just a random farm from the region which is what I was talking about from what I thought you had said.
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: 3151
Joined: Tue Aug 25, 2015 1:54 am

Re: About comments in the QBN section

Post by Jay_H » Thu Feb 06, 2020 5:11 pm

Shrines don't allow NPC placement normally. I'm not sure about shacks; I know house1-4 have been using them as locations but I don't know if you can target them using a parameter.
Come join Lysandus' Tomb, a Daggerfall Unity fan Discord.
See the Daggerfall Unity Wiki on the UESP.

Post Reply