Fatigue hitting 0 bugs out

Post here if you need help getting started with Daggerfall Unity or just want to clarify a potential bug. Questions about playing or modding classic Daggerfall should be posted to Community.
Post Reply
User avatar
Ralzar
Posts: 2211
Joined: Mon Oct 07, 2019 4:11 pm
Location: Norway

Fatigue hitting 0 bugs out

Post by Ralzar »

This was discovered in using my Climates & Cloaks mod, but seems to be happening without it as well. Or at least Tedious Travel also triggers it.

If you hit 0 Fatigue and faint, you can then hit 0 Fatigue again without the fainting triggering.

viewtopic.php?p=35961#p35961

In Unity I tested this with Tedious Travel where I could see the game get some kind of object reference error. I did not test in just pure DFU though. It seems to happen with several different mods though, which implies it is not really mod related?

Edit:

It might be related to this?

viewtopic.php?f=5&t=2918

(Sorry, I deleted the savegame I linked to in that thread.)

Jeoshua
Posts: 153
Joined: Tue Nov 26, 2019 7:25 am

Re: Fatigue hitting 0 bugs out

Post by Jeoshua »

I could reliably cause this state by using the older version of Cloaks and Climate along with Tedious Travel. Just travel in the cold until Stamina was zero and BOOM.

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

Re: Fatigue hitting 0 bugs out

Post by Hazelnut »

Seems my encumbrance stuff in Roleplay and Realism mod has issues when resting too if player is carrying too much. Seems to depend on order of execution, and the bit in PlayerEntity at line 514 where the is resting flag is reset to false. I didn't realise this but has been this way since Allofich added monster spawns during resting back in March 2018.

Looks like PlayerEntity.IsResting is pretty useless as a property because it will only be true for part of the time a player is resting. That's not obvious, but not really too sure what to do about it. I certainly don't want to start changing the rest mob spawning system as I have no knowledge of it.

Interkarma, what do you think about this? I was using this in my mod to not incur fatigue loss due to carried weight when resting - I assume the player puts their load down and lays on the floor. Is there some other mechanism for diserning if the player is resting that I missed? If not then I think we may need to have two flags, one internally used for the mob spawning and the other which actually stays true while player rests.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

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

Re: Fatigue hitting 0 bugs out

Post by Hazelnut »

I cannot reproduce this tonight. :(

Maybe I was wrong last night?
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

Post Reply