Custom quest support

For all talk about quests. Creating, testing, bugs, and development progress.
User avatar
Interkarma
Posts: 4295
Joined: Sun Mar 22, 2015 1:51 am

Re: Custom quest support

Post by Interkarma » Tue Jan 01, 2019 11:30 pm

It could be that hide and restore aren't being rearmed properly as parent task stops and starts. I've also noticed a bug with state serialisation for hide/restore that I ran into during vampire quest testing that's on my internal list. Does saving game at night, then restarting game fix it? In any case, I'll take a look soon.

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

Re: Custom quest support

Post by Jay_H » Wed Jan 02, 2019 12:16 am

Just tested; saving and loading was enough to make the NPC appear when I was in the residence.
Come join the Unofficial Daggerfall Unity Discord.
Try the first Daggerfall Unity Quest Pack with roughly 210 all-new quests.
I write quests but have no technical knowledge.

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

Re: Custom quest support

Post by Interkarma » Wed Jan 02, 2019 2:01 am

Great! It should be fixed when I address that serialization bug then. :)

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

Re: Custom quest support

Post by Jay_H » Wed Jan 02, 2019 3:15 am

Thanks for the answer :) I'm sure it'll work great when it's fixed.

In another quest, I'm trying to use the "When Repute WIth" condition with the Mages Guild. I got this error:

Code: Select all

Parsing quest JHPQ041 FAILED!
WhenReputeWith: NPC The_Mages_Guild with FactionID 40 is not an individual NPC
Does the condition only work with NPCs? I could move it over to the Archmagister instead, since that's an NPC.
Come join the Unofficial Daggerfall Unity Discord.
Try the first Daggerfall Unity Quest Pack with roughly 210 all-new quests.
I write quests but have no technical knowledge.

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

Re: Custom quest support

Post by Interkarma » Wed Jan 09, 2019 12:16 am

Yeah, WhenReputeWith only works for individual named NPCs. That was my understanding of the quest action at time of writing. Although it seems like it would be more useful to work with other factions as well.

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

Re: Custom quest support

Post by Jay_H » Wed Jan 09, 2019 12:25 am

Sounds good! There are always enough allied factions to make it work.
Come join the Unofficial Daggerfall Unity Discord.
Try the first Daggerfall Unity Quest Pack with roughly 210 all-new quests.
I write quests but have no technical knowledge.

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

Re: Custom quest support

Post by Interkarma » Wed Jan 09, 2019 1:07 am

Jay_H wrote:
Wed Dec 05, 2018 10:51 pm
I now have a save to illustrate. The quest below is wired to trigger with a dungeon location, but it uses cities just as easily.

Code: Select all

_enter_ task:
    when pc enters dungeon
I've looked into this further, and issue is actually with the quest (sorry). :)

The problem is that "dungeon" is an invalid type for WhenPcEntersExits action. These only support p1=2 type exterior locations. You can use the following items from Quest-Places with this action and nothing else. The reason this is firing is that "dungeon" has a p2=-1 value, which is equal to "anywhere" in list below.

Code: Select all

---
---	Exterior location types
---	NOTE: Exteriors do not contain quest or item markers so cannot be used to "place item", "place foe", "place npc"
---
labyrinth,          2, 4,  0
keep,               2, 7,  0
ruin,               2, 10, 0
graveyard,          2, 12, 0
coven,              2, 13, 0
farmhome,           2, 3,  0
wealthyhome,        2, 8,  0
poorhome,           2, 11, 0
tavernhome,         2, 6,  0
templehome,         2, 5,  0
cult,               2, 9,  0
city,               2, 0,  0
hamlet,             2, 1,  0
village,            2, 2,  0
anywhere,           2, -1, 0
If you'd like to detect any dungeon exterior, something like the following should do the trick:
Edit: On second thoughts, this won't work as other "when pc enters" will conflict. I'll see what I can do instead to support any dungeon and any town. :)

Code: Select all

_enter_ task:
    when pc enters labyrinth
    when pc enters keep
    when pc enters ruin
I will add a new exception to throw an error when an invalid p1 table type is used,

Jay_H wrote:
Sat Nov 24, 2018 4:09 am
I think some wires are crossed with regards to "city" and "village." I have a quest that runs when the PC enters a village:
I'm not sure about the "city" and "village" issue. These both have a unique location type read from MapTableData in MAPS.BSA. I'd need a repro save to look into this one further.

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

Re: Custom quest support

Post by Interkarma » Wed Jan 09, 2019 1:47 am

Jay_H wrote:
Tue Jan 01, 2019 9:59 pm
I'm trying the "restore" action for the first time and running into some difficulty. This is the code:

Code: Select all

--	Quest start-up:
    place npc _nec_ at _nhome_

_day_ task:
    daily from 5:30 to 20:00
    hide npc _nec_

_night_ task:
    when not _day_
    restore npc _nec_
During the _night_ task the NPC doesn't appear. Is there something else I should do to trigger it?
I believe this one is fixed now. I tested with a custom quest using the above structure and NPC now hides/restores as expected. Problem was a silly mistake on my end.

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

Re: Custom quest support

Post by Jay_H » Wed Jan 09, 2019 2:24 am

Thanks for looking into these :)
Interkarma wrote:
Wed Jan 09, 2019 1:07 am
The problem is that "dungeon" is an invalid type for WhenPcEntersExits action. These only support p1=2 type exterior locations. You can use the following items from Quest-Places with this action and nothing else. The reason this is firing is that "dungeon" has a p2=-1 value, which is equal to "anywhere" in list below.
***
I will add a new exception to throw an error when an invalid p1 table type is used.
No worries. It's just as easy to alter the quest, so I have no problem if you leave this one alone. Having that exception and knowing how to avoid the problem is good enough :)
I'm not sure about the "city" and "village" issue. These both have a unique location type read from MapTableData in MAPS.BSA. I'd need a repro save to look into this one further.
Darn! I'll have to see how I can make it happen again.
Come join the Unofficial Daggerfall Unity Discord.
Try the first Daggerfall Unity Quest Pack with roughly 210 all-new quests.
I write quests but have no technical knowledge.

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

Re: Custom quest support

Post by Jay_H » Sat Jan 19, 2019 2:19 am

I'm running my most recent quest pack version in 0.7.32. I did about 3 custom quests, met Brisienna, and then for some reason the Mages Guild quest dispenser is now completely failing to offer any. There's no "hired a spellsword" message, the game just refuses the click on "Get Quest," and I can exit or talk normally. If I remove the quest pack everything works well. Player log shows this:

Code: Select all

NullReferenceException: Object reference not set to an instance of an object
  at DaggerfallWorkshop.Game.Questing.QuestListsManager.GetGuildQuest (GuildGroups guildGroup, MembershipStatus status, Int32 factionId, Int32 rep, Int32 rank) [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterfaceWindows.DaggerfallGuildServicePopupWindow.GetQuest () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterfaceWindows.DaggerfallGuildServicePopupWindow.ServiceButton_OnMouseClick (DaggerfallWorkshop.Game.UserInterface.BaseScreenComponent sender, Vector2 position) [0x00000] in <filename unknown>:0 
  at (wrapper delegate-invoke) DaggerfallWorkshop.Game.UserInterface.BaseScreenComponent/OnMouseClickHandler:invoke_void__this___BaseScreenComponent_Vector2 (DaggerfallWorkshop.Game.UserInterface.BaseScreenComponent,UnityEngine.Vector2)
  at DaggerfallWorkshop.Game.UserInterface.BaseScreenComponent.MouseClick (Vector2 clickPosition) [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterface.BaseScreenComponent.Update () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterface.Panel.Update () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterface.Button.Update () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterface.Panel.Update () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterface.Panel.Update () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterface.Panel.Update () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterface.UserInterfaceWindow.Update () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterfaceWindows.DaggerfallBaseWindow.Update () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterfaceWindows.DaggerfallPopupWindow.Update () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.DaggerfallUI.Update () [0x00000] in <filename unknown>:0 
This is the quest list:

Code: Select all

schema: *name, group, membership, minReq, flag, notes

JHMG001, MagesGuild, M, 0, 0, a quest to slay a shapeshifting mage in a dungeon
JHMG002, MagesGuild, M, 3, 0, a quest to convince a scholar to leave a dungeon via quiz
JHMG003, MagesGuild, M, 4, 0, a quest to slay a necromancer in a residence
JHMG004, MagesGuild, M, 0, 0, a quest to assist a researcher in slaying an atronach
JHMG005, MagesGuild, M, 1, 0, a quest to test a trapped warping trinket
JHMG006, MagesGuild, M, 1, 0, a quest to take an unidentifiable magical item to a scholar in a dungeon
JHMG007, MagesGuild, M, 2, 0, a quest to get teleported to a dungeon to find a criminal
JHMG008, MagesGuild, M, 0, 0, a quest to retrieve a scholar's stolen notes
JHMG009, MagesGuild, M, 0, 0, a quest to deliver a manuscript after certain days
JHMG010, MagesGuild, M, 5, 0, a quest to slay a necromantic colleague
JHMG011, MagesGuild, M, 0, 0, a quest to guide students to locations
JHMG012, MagesGuild, M, 5, 0, a quest to stop a powerful former member
JHMG013, MagesGuild, M, 1, 0, a quest to bring a wandering atronach home
JHMG014, MagesGuild, M, 4, 0, a quest to obtain a report on vampirism
JHMG015, MagesGuild, M, 1, 0, a quest to defend a shapeshifted member
JHMG016, MagesGuild, M, 2, 0, a quest to rescue an ambitious experimenter
JHMG017, MagesGuild, M, 0, 0, a quest to identify a document
JHMG018, MagesGuild, M, 0, 0, a quest to purify and deliver a poisoned liquid
JHMG019, MagesGuild, M, 2, 0, a quest to root out a necromancer
JHMG020, MagesGuild, M, 9, 1, an attempt on your life
JHNCA00, Necromancers, P, 0, 0, entry into JHNCA01
JHNCA01, Necromancers, P, 0, 0, build reputation with Necromancers
Other quest givers such as the Fighters Guild and temples are not affected. What other information should I give?
Attachments
Quest failing.zip
(126.03 KiB) Downloaded 14 times
Come join the Unofficial Daggerfall Unity Discord.
Try the first Daggerfall Unity Quest Pack with roughly 210 all-new quests.
I write quests but have no technical knowledge.

Post Reply