Win64 #118 Guard quest bug [RESOLVED]

Cadrach2
Posts: 4
Joined: Wed Jun 06, 2018 10:17 pm

Win64 #118 Guard quest bug [RESOLVED]

Post by Cadrach2 »

Hi,

First, thanks a lot for a great remastering of Daggerfall, it is really awesome to play this game again!

Got a bug while doing a guarding quest for the Mage Guild. Spent my time loitering inside for the timer to reach 0, but then nothing happens.

When I talk to the quest giver, I have the usual popup but when I click on "get quest" it does not do anything.

Thanks a lot,
Cad
Attachments
2018-06-07 07_20_20-Daggerfall Unity.png
2018-06-07 07_20_20-Daggerfall Unity.png (558.47 KiB) Viewed 2485 times

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

Re: Win64 #118 Guard quest bug

Post by Jay_H »

Welcome to the forums!

Hmm, I'm looking at the timer and it's erroneously written to begin with. I forgot to fix that. I'll have to.

In the past there's sometimes been some difficulty getting some quest actions to fire while loitering. The action here is:

Code: Select all

_S.02_ task:
	daily from 00:00 to 03:00 
	pc at _magesguild_ set _S.03_ 

_S.03_ task:
	create foe _F.00_ every 83 minutes 1 times with 100% success 
	create foe _F.00_ every 100 minutes 1 times with 100% success 
	create foe _F.00_ every 85 minutes 1 times with 100% success 
	create foe _F.00_ every 82 minutes 1 times with 100% success 
So if there were some delay in making the enemy appear, and loitering caused an unpredictable spawning pattern, then the entire matter could fail to happen. Does that sound plausible Interkarma? I believe recent changes in "create foe" now spawn enemies at the end of the appointed time rather than the beginning, which I think would be a factor here.

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

Re: Win64 #118 Guard quest bug

Post by Interkarma »

Probably a few problems could happen here to break this quest. Not saying any one of these are responsible individually in this case, but these are ways it could have gone wrong. I'll document for myself and chase up when I can.
  • Yes, "create foe every nn minutes" timer triggers at end of interval. This means if player enters guild at 02:00 in the morning and loiters for one hour then none of the tasks are active long enough before the "daily from" task shuts down the S.03 task again.
  • Rest ticks in 60 minute increments at a time (rather than 1-minute increments internally), which again means the time resolution might skip past time window of quest.
  • There's a problem where pending spawns don't break rest properly. Same can happen with random spawns.
My feeling is most likely one of the first two. I'll get to this when I can and improve things.

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

Re: Win64 #118 Guard quest bug

Post by Interkarma »

I've changed the rest window time resolution so it ticks internally at 10-minute intervals while rest still counts down in hours total. This gives quest machine 6x the time resolution internally while resting. I've set this up so I can reduce internal resolution even further if required.

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

Re: Win64 #118 Guard quest bug

Post by Interkarma »

I've taken another pass at the "create foe" interval startup. Originally this would spawn foe the moment action started. Later, I changed this so it would only trigger once a full interval had passed.

I now initialise timer plus a random warm-up value between 0 and spawn interval. This means "create foe" might trigger initial spawn the moment action begins, at the end of the first interval, or somewhere in between. Subsequent spawns will trigger on interval as per quest script. I feel this adds a little element of unpredictability to action startup.

I also fixed a problem where timer was initialised at compile time, which could be several game hours (or weeks/days) before the action becomes active. This could also result in instant spawn. I've changed this so the init plus warm-up happens when action first becomes active instead.

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

Re: Win64 #118 Guard quest bug

Post by Interkarma »

For the third issue, I've made changes so that enemy spawns will break rest immediately. This also ensures you don't wake up to several enemies at once.

I will now see if I can pass N0B10Y03 normally or if other fixes are required to quest emulation or quest script itself.

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

Re: Win64 #118 Guard quest bug [RESOLVED]

Post by Interkarma »

Success! With the changes above for higher resolution quest ticks during rest, randomised initial spawn, and properly breaking rest on spawn, I was able to pass this quest with no other changes needed. Everything executed cleanly and the flow felt just like classic.

guild-protection.jpg
guild-protection.jpg (89.5 KiB) Viewed 2422 times

I understand from one of Jay's earlier comments the bodies are supposed to be removed once quest is complete. Is that right, Jay?

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

Re: Win64 #118 Guard quest bug [RESOLVED]

Post by Jay_H »

As far as I remember, that is how classic works. I won't have time to verify it for now but I'm fairly certain it is so.

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

Re: Win64 #118 Guard quest bug [RESOLVED]

Post by Jay_H »

I just made some time to test it, and yes, enemy corpses definitely disappear once the quest ends in classic. I tried it on the "Ensorcelled Mage" quest for the Mages Guild.

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

Re: Win64 #118 Guard quest bug [RESOLVED]

Post by Interkarma »

Cheers Jay, much appreciated. I don't have the support for this right now (as in the bodies aren't linked to quest in any way). I've added this to my low priority queue and will link this up later.

Locked