All inner doors sometimes just stop to work.. Broken Stackup Open spell + Broken spell cost/chance

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.
User avatar
Interkarma
Posts: 7247
Joined: Sun Mar 22, 2015 1:51 am

Re: All inner doors sometimes just stop to work..

Post by Interkarma »

You have some corrupted magic state in your save. The Open effect is left running many times over, which is interfering with opening doors normally.

It's possible to fix this one manually. If you can provide a current save, I'd be happy to edit out the bad data for you so doors work normally again. I have already tested this and confirmed on save above.

Edit: Other than mods it could actually be a bug in DFU. In that case, root cause of problem is likely using 3x Open effects in one training spell. That's an edge case I'm not sure the game will handle properly, and I could imagine this causing issues even without mods. Open effect requires interaction with a door to resolve and has be involved with similar bugs in the past. If I help you with a fixed save, best to discontinue using it that way or else you could end up in same situation again.

ruthan
Posts: 52
Joined: Mon Aug 05, 2019 5:28 pm

Re: All inner doors sometimes just stop to work..

Post by ruthan »

I tested it without mods, as i wrote its the same.. Still in theory there are lots of non mod/ no save settings, general game settings too (not this case but..)
Because even if have some vanilla installation beside of modded one, its still using same settings from Windows Users directory, until its added option to use configs inside game folder itseft, instead of shared in Users folder.. Lots of games have such options and it make sense.. or they have some settings file load hierarchy.. look for options settings files locally and if they are not pressed use global ones.
I was even afraid what will happen if start vanilla installation if my custom game setting will not overwritten.

Number of mods - Dream has like 10 or more packages, its all about better graphics, others are about more 3D objects.. After that im using, Basic routes- visible routes and viewable skill progress and More convenient quest log and yeah Basic Magicka regen (that is most invasive).
You have some corrupted magic state in your save. The Open effect is left running many times over, which is interfering with opening doors normally.
Thx, great. So we found root cause that is hard part and it sort of make sense, its door related. Yes i was training in without any doors near me..
It's possible to fix this one manually. If you can provide a current save, I'd be happy to edit out the bad data for you so doors work normally again. I have already tested this and confirmed on save above.
I would prefer if you can describe what to edit, i can edit it by myself and it can help others too in the future. I can still compare some old and new save with Text saves diff tool, now when is now what to look for.. this part of save have some human readable ouput, now just some legion of numbers which is hard to decode..
Simple purge of all active running spell effects would be enough.. Its they are saved in one save section, if not it would be more problematic.. I gave it 15 minutes with old and new safe comparison, but i failed..

That training spell, i used weaker version (till 3x, but lesser chance to success) for quite long time, but i made no far long ago stronger version. If its stack up, maybe also depends if you level or sleep, when open is still stack up..

---
Alternation broken spell cost, i have Alternation 126.. through enchanting, you can see that maximal duration of chance spell has casting price: - 912 of mana (im not fan of that magicka word).
Screenshot 2024-04-18 13.46.35-BrokenElementalSpellCost.jpg
Screenshot 2024-04-18 13.46.35-BrokenElementalSpellCost.jpg (597.55 KiB) Viewed 321 times
------
Other issue which im not 100% sure, but it seems broken is spell chance info, some spell have chance lesser than 100% in description, but it seems they are successful every time, i need more time to look in to it.
Lets say Balyna Balm - change: 1 + 1 chance per level, so 32% chance on my level, but i never saw spell failed message, maybe only these messages arent there and spell still could fail.
It still need a bit qualityOfLife not yet done mods,more 3D models props(in HandmadeMod), 3D enemies not colliding with walls + some alternative Hexen 2 like hack&slash dance mod and it would be a dream. I played Ultima0+, but i know what i want :D

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

Re: All inner doors sometimes just stop to work.. Broken Stackup Open spell + Broken spell cost/chance

Post by Interkarma »

There are dozens of blocks of JSON data that need to be cleaned interleaved among all the other effects. I can't easily describe how to do that as it's somewhat involved. I'm only able to do it because I created the save format and the magic system. :)

I see you PM'd me a link to save. It's bedtime for me here in Australia. I'll process this one tomorrow and send back to you.

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

Re: All inner doors sometimes just stop to work.. Broken Stackup Open spell + Broken spell cost/chance

Post by Interkarma »

I've attached a fixed SaveData.txt in a zip file to this reply. Unzip this and replace the SaveData.txt in the save you sent me. By all means make a backup of your save first.

This problem was most likely triggered by creating a training spell with 3x Open effects. The way this effect works is to try open effect on lock of the next door you interact with then effect will expire. Stacking three together in a single spell has undefined behaviour and I'm confident this is the root cause. Be sure to delete that spell and create something different to train Mysticism.

You had over one hundred of these stuck Open effects. Rather than edit save manually, which is error-prone, I wrote a quick console command to simply purge all active effects from player using the internal spell API. This was the shortest and safest path to clearing all these effects.

This also means any spell effects from items are temporarily removed. They should reapply themselves on the next reroll cycle, or you can unequip-equip those magic items again.

SaveData-Fixed.zip
(66.77 KiB) Downloaded 8 times

ruthan
Posts: 52
Joined: Mon Aug 05, 2019 5:28 pm

Re: All inner doors sometimes just stop to work.. Broken Stackup Open spell + Broken spell cost/chance

Post by ruthan »

Thanks a lot..

Well I'm stubborn and html plain text reverse engineering is my day job :), so:
- i checked my old save and your fixed saved in Total commander text compare tools, there are better text diff tool.. but it was enough.
There is seems to be indeed just active spells effects simple huge block, which you just removed.. I managed to do same with my old save, to test it.

It was quite simple, look for this string:
"isIncumbent": true,
Its only once in the save file, go to end of this block few lines bellow, which is ending with this string:
"$version": "v1"
...
delete everything in this block - in my case - 15k lines to until you reach, this block/ string:
}
],
"crimeCommitted": "None",
// Again crimeCommitted string is unique only once in the whale save file

So final empty / cleaned "active spells block, should look like this:
],
"$version": "v1"
}
],
"crimeCommitted": "None",
Instead of hundreds / thousands of lines of current active spells effects.. Some of those are these broken ones, but delete whole block and reequip items is faster than dig into it in the detail.

Im quite sure that someone than purge it with purge single multiline regex + string replace.. In shh, build in exe, or maybe even Powershell.

Question is which MYS, training spell will not break something.. and will not stack up when is used without real target.. Well others will not break door for sure.. I will try Language spell..
It still need a bit qualityOfLife not yet done mods,more 3D models props(in HandmadeMod), 3D enemies not colliding with walls + some alternative Hexen 2 like hack&slash dance mod and it would be a dream. I played Ultima0+, but i know what i want :D

Post Reply