About comments in the QBN section

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

About comments in the QBN section

Post by haloterm »

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: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: About comments in the QBN section

Post by Interkarma »

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.

User avatar
haloterm
Posts: 391
Joined: Sat Feb 16, 2019 5:21 am

Re: About comments in the QBN section

Post by haloterm »

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: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: About comments in the QBN section

Post by Interkarma »

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

User avatar
haloterm
Posts: 391
Joined: Sat Feb 16, 2019 5:21 am

Re: About comments in the QBN section

Post by haloterm »

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: 3015
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: About comments in the QBN section

Post by Hazelnut »

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

User avatar
haloterm
Posts: 391
Joined: Sat Feb 16, 2019 5:21 am

Re: About comments in the QBN section

Post by haloterm »

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: 3015
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: About comments in the QBN section

Post by Hazelnut »

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: 4062
Joined: Tue Aug 25, 2015 1:54 am
Contact:

Re: About comments in the QBN section

Post by Jay_H »

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.

Post Reply