Custom quest support
- Interkarma
- Posts: 7247
- Joined: Sun Mar 22, 2015 1:51 am
Re: Custom quest support
This one seems like Hazelnut's wheelhouse. Just let me know if I'm needed at all.
- Jay_H
- Posts: 4072
- Joined: Tue Aug 25, 2015 1:54 am
- Contact:
Re: Custom quest support
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.
- Interkarma
- Posts: 7247
- Joined: Sun Mar 22, 2015 1:51 am
Re: Custom quest support
The error itself is happening in the following line because oneTimeQuestsAccepted is null and the code is trying to access its members.
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.
Code: Select all
if ((!quest.adult || DaggerfallUnity.Settings.PlayerNudity) && !(quest.oneTime && oneTimeQuestsAccepted.Contains(quest.name)))
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.
- Hazelnut
- Posts: 3016
- Joined: Sat Aug 26, 2017 2:46 pm
- Contact:
Re: Custom quest support
Oh, sorry Interkarma - been so focussed on my performance work/fun that I forgot all about this because it wasn't in bugs forum.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods
- Interkarma
- Posts: 7247
- Joined: Sun Mar 22, 2015 1:51 am
Re: Custom quest support
S'right! Was a 5 minute fix and I'm happy to have been able to help.
- Jay_H
- Posts: 4072
- Joined: Tue Aug 25, 2015 1:54 am
- Contact:
Re: Custom quest support
Yeeeahh! Thank you
EDIT: I see you already mentioned a hotfix build so I deleted my request Reading!
EDIT: I see you already mentioned a hotfix build so I deleted my request Reading!
- Jay_H
- Posts: 4072
- Joined: Tue Aug 25, 2015 1:54 am
- Contact:
Re: Custom quest support
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.
- Interkarma
- Posts: 7247
- Joined: Sun Mar 22, 2015 1:51 am
Re: Custom quest support
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.
Will still get a hotfix up soon, just have a few PRs to finish testing.
- Hazelnut
- Posts: 3016
- Joined: Sat Aug 26, 2017 2:46 pm
- Contact:
Re: Custom quest support
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
- Jay_H
- Posts: 4072
- Joined: Tue Aug 25, 2015 1:54 am
- Contact:
Re: Custom quest support
Edited out
Last edited by Jay_H on Fri Feb 01, 2019 1:01 am, edited 1 time in total.