Custom quest support

For all talk about quest development - creation, testing, and quest system.
Post Reply
User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: Custom quest support

Post by Interkarma »

This one seems like Hazelnut's wheelhouse. Just let me know if I'm needed at all. :)

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

Re: Custom quest support

Post by Jay_H »

It's happening with the Fighters Guild too now, with another character I started. Just did one quest (classic) and now it's the same error with them.

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

Re: Custom quest support

Post by Interkarma »

The error itself is happening in the following line because oneTimeQuestsAccepted is null and the code is trying to access its members.

Code: Select all

if ((!quest.adult || DaggerfallUnity.Settings.PlayerNudity) && !(quest.oneTime && oneTimeQuestsAccepted.Contains(quest.name)))
It's just a simple logic error. The oneTimeQuestsAccepted list is only initialised when a one-time quest starts, but the same list is also being used to select a quest before it starts.

I moved the initialisation of oneTimeQuestsAccepted to right before its actually used, and added another safety null check when starting a one-time quest.

Hazelnut might want to refine this one further when he has time, but this will address this specific issue from next round of builds. I'll push out new builds a little sooner to fix this problem so people can play your quests again.

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

Re: Custom quest support

Post by Hazelnut »

Oh, sorry Interkarma - been so focussed on my performance work/fun that I forgot all about this because it wasn't in bugs forum. :oops:
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

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

Re: Custom quest support

Post by Interkarma »

S'right! Was a 5 minute fix and I'm happy to have been able to help. :)

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

Re: Custom quest support

Post by Jay_H »

Yeeeahh! Thank you :D

EDIT: I see you already mentioned a hotfix build so I deleted my request :D Reading!

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

Re: Custom quest support

Post by Jay_H »

I altered the quest lists to remove the 1 values temporarily, so there's no need for an accelerated build. This fix is working fine from what I'm testing.

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

Re: Custom quest support

Post by Interkarma »

Yes, that should do it too, that null collection is only checked for one-time quests. :)

Will still get a hotfix up soon, just have a few PRs to finish testing.

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

Re: Custom quest support

Post by Hazelnut »

Jay, could you recheck this with latest build please. I'll look into it if is still an issue.
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: Custom quest support

Post by Jay_H »

Edited out
Last edited by Jay_H on Fri Feb 01, 2019 1:01 am, edited 1 time in total.

Post Reply