startquest for chaining quests in .dfmod vs. loose files

Discuss modding questions and implementation details.
Post Reply
haloterm
Posts: 194
Joined: Sat Feb 16, 2019 5:21 am

startquest for chaining quests in .dfmod vs. loose files

Post by haloterm »

Sorry for asking so much lately, but it is not always easy to gather necessary information from dozens of threads with varying contexts... Here's first a bit context for my question; the question itself is at the end:

In my Black Horse Courier package, I offer quests to the player, but all of these are offered under certain conditions, they are (so far) not offered by NPCs. They are instead chained by "start quest" commands.

As long as the quests of my Black Horse Courier package were a "questpack", i.e. loose files, I was using the following questlist:

Code: Select all

MDBHCSTART, InitAtGameStart, M, 0, 0, Initializes the Black Horse Courier main quest
Simple. The MDBHCSTART quest was started at game start, and other quests where started by this and subsequent quests using the "start quest" command.

Now, when I converted everything to a .dfmod file, I noticed this does not work anymore. I noticed that quests not listed in the questlist are not found by DFU, so even in the console I can't start them.

In my C# file, I have the following part:

Code: Select all

if (!QuestListsManager.RegisterQuestList("BlackHorseCourier"))
                throw new Exception("Quest list name is already in use, unable to register BlackHorseCourier quest list.");
which, as far as I understand, simply makes the quests from my questlist available to the game.

Okay, so I tried to simply add all my other quests to the questlist. But what should I write for the guild (i.e. 2nd column of the list)? And how to avoid that the quests are offered by NPCs (which they shouldn't)?

Well, tried with commoners and wrote "M" for members, hoping that no "commoner" NPC would ever offer the quest to the player (since the player is not a member of this group).

Code: Select all

MDBHCSTART, InitAtGameStart, M, 0, 0, Initializes the Black Horse Courier main quest
MDBHC000, Commoners, M, 0, 1, The dying reporter
Now the game finds the quest; quest MDBHCSTART can start MDBHC000.

However, I assume that by this method there is still the risk that commoner NPCs will offer that quest, which they shouldn't.

So I had a look at Jay's QP1 with his Cartographer's quests, which work somewhat similar. I noticed that he is not using "Commoners" and "M" as group, but "NonMemberGuild" and "P".

Thinking that this might be the correct way, I tried that, but then DFU does not find my quests anymore.

So in the end I still do not know how to make my quests reliably availabe in the .dfmod file while at the same time avoiding NPCs offering the quests:

1. Without questlist, the quests are not recognized by DFU when in .dfmod
2. With questlist, the quests can only be started with "startquest" if I have them in a questlist with a group like Commoners, but not with the NonMemberGuild entry I saw in Jay's cartographer quests.

So, HOW do I do what I want -- including quests in my .dfmod that are only started from within other quests with "start quest", but NOT offered by NPCs?

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

Re: startquest for chaining quests in .dfmod vs. loose files

Post by haloterm »

Further thinking...

Would it help if I write something like this:

MDBHC000, Commoners, M, 999, 0, The dying reporter

i.e. setting conditions the player can never meet (being member (M) of the group and having an insanely high reputation with them?)

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

Re: startquest for chaining quests in .dfmod vs. loose files

Post by Hazelnut »

yes, that will work. I would suggest using a guild rather than a social group and using P or a rep of >100 to prevent them being given out. It may be worth me coming up with a better way of having quests that can be started by name, but for now this will have to do. I did it myself with the 2nd & 3rd quest scripts that form the Mountain Rumors quest in R&R mod.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

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

Re: startquest for chaining quests in .dfmod vs. loose files

Post by haloterm »

Thanks for confirming! I guess then I have now everything working and can focus on my story again :)

User avatar
TheLacus
Posts: 1266
Joined: Wed Sep 14, 2016 6:22 pm
Contact:

Re: startquest for chaining quests in .dfmod vs. loose files

Post by TheLacus »

Hazelnut wrote: Fri Oct 02, 2020 7:06 pm yes, that will work. I would suggest using a guild rather than a social group and using P or a rep of >100 to prevent them being given out. It may be worth me coming up with a better way of having quests that can be started by name, but for now this will have to do. I did it myself with the 2nd & 3rd quest scripts that form the Mountain Rumors quest in R&R mod.
A quest starting another quest is a core feature of the quest system, i don't think it should require any workaround like this. Quests are seeked in loose files by filename, it would be simple to do the same for mods. I looked at QuestListManager and this is actually pretty much what's happening already, it seems to be a minor change to always query the mod system if all other options fail. Are you aware of any reason against this?
Mod System documentation - Learn how to create mods for Daggerfall Unity.
Modder Discussion - General help and discussion for the mod system.
Github Issues - Submit a bug report for the game, including the mod system.

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

Re: startquest for chaining quests in .dfmod vs. loose files

Post by Hazelnut »

No, I just need to spend some time to make the changes and be sure I am not missing anything. The issue is more for the loose files not looking through all the folders and possibly grabbing .txt files that are not quests. Meant to come back to it for packaged files, just never did and now I am time and energy limited.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

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

Re: startquest for chaining quests in .dfmod vs. loose files

Post by haloterm »

Hazelnut wrote: Fri Oct 02, 2020 7:06 pm I would suggest using a guild rather than a social group and using P or a rep of >100 to prevent them being given out.
Okay, can do that. Just for my understanding: What is the advantage of guild vs. social group here (and P vs. M)?

Post Reply