Norbyte / ositools

Advanced scripting and mod support for Divinity Original Sin 2
MIT License
378 stars 30 forks source link

Surface-manipulating spells stopped working during modded playthrough, traced issue back to script extender. #42

Closed KhadgarsDisciple closed 3 years ago

KhadgarsDisciple commented 3 years ago

Issue Summary:

On my current modded playthrough of DOS2, I noticed that most spells that effected surfaces stopped functioning at a certain point. I didn't really notice until much later in the game, so I don't know exactly when it stopped working. I loaded earlier saves to find otu when the issue first started occuring, but by the time I noticed, my max # of autosaves had cycled, so I only had manual saves to go on. I only know that it was between receiving the bless skill Fort Joy and arriving at Driftwood, and can't provide a useful diagnosis of what specifically happened to cause the issue. After disabling all mods & gift bags, the issue persisted. Only after removing the DXGI.dll file from the directory did the issue resolve. Not implying the script extender originally caused problem, of course.

Modlist:

Issue details:

When I cast a spell such as Bless, Global Cooling, or Contamination, directly on any valid surface or cloud, they do not seem to do anything. Vaporize & Pressure spike work (i think), but Bless is the important one. If I cast these spells instead on a entity standing within the surface, they give the entity the buff and effect the surface as normal... sometimes.

The issue seems to be encapsulated in the save file and not the game client, as when I was loading an earlier save file, the issue stopped occuring.

Here is a save file in which you can see the issue occuring. https://www.dropbox.com/s/jltqqxx7xydxwhl/Savey%20Gravey.zip?dl=0 To reproduce, cast bless, with any character, on the pool of blood, or a pool of water, or any other surface or cloud, and observe behavior.

Expected Result:

Bless, Global Cooling, Contamination, and all other spells work as expected.

Norbyte commented 3 years ago

Can you check with the current extender version (v53)? There was a compilation bug I fixed in a patch that caused various strange things to occur.

I loaded your save with the extender and DU enabled, and blessing the blood surface actually created a blessed blood surface, i.e. it worked for me.

KhadgarsDisciple commented 3 years ago

I'm not super familiar with github, where can I find v53? I only see up to v52 on the releases (https://github.com/Norbyte/ositools/releases).

I was not aware it automatically updated, and I am actually on version 53. I just assumed I was still on 52 since thats what I downloaded from the releases page. I am also unaware of if I was ever on v52 at all, having not noticed/checked the version number on the bottom of the main menu.

Norbyte commented 3 years ago

It auto-updates, so it's sufficient to just check your savegame again.

KhadgarsDisciple commented 3 years ago

I went ahead and re-tested my save file, and here are the results:

Setup Misc Bless Global Cooling
DU + Script Extender Works correctly Does not work on surfaces
Script Extender Only Works correctly Does not work on surfaces
DU Only Error messages on load Works correctly Works correctly
Vanilla Works correctly Works correctly

So I don't know exactly when my Script Extender updated, and if that fixed the bless issue, or if maybe it just randomly started working again, as these issues sometimes do, but bless seems to be working for me as well, as is contamination. What ISN'T working is global cooling.

Now, while for the most part I don't really care about this spell, I can't really say the issue is solved, since there's still something going on that probably shouldn't happen, or shouldn't have happened. Perhaps DU improperly calls some script, which ends up being persistant? This would explain how the issue continues even after I have disabled the mod. There is the possibility that whatever issue occured only was able to reach such a state under an older version of the Script Extender, making this a weird legacy issue, but without having or attempting a real repro (outside of my current save games), I can't really say one way or the other.

(If you end up deciding to load the provided save file again, the Global Cooling spell can be found on the character Lohse.)

Norbyte commented 3 years ago

I've updated v53 to fix this particular issue. Can you check again please?

KhadgarsDisciple commented 3 years ago

I checked the issue again, and it still occurs mostly the same. I made a new test scenario, and I'm not entirely sure if it's just a result of being in an exact, specific location / position relative to surfaces or not, but global cooling DID freeze some water, but only a tiny segment in a mostly straight line from the casting character.

Here are two comparison videos, showing the process and differences.

Worthy of note is that on vanilla, global cooling seemed to effect the entire surface within the highlighted region, whereas with script extender, it only effected a tiny region and did not spread. It also seemed to have a big impact on ignition, where on vanilla, it ignited all applicable poison surfaces, but with the script extender, it somehow whiffed and hit nothing. Perhaps it only effected the same linear space that global cooling hit, and since no poison was there, nothing happened?

KhadgarsDisciple commented 3 years ago

Just for completeness sake, I also tested removing the script extender > loading the game > re-saving the game > quitting & replacing the script extender back in the folder > re-launching the game > loading the save file.

Just in case that would somehow reset whatever the problem was. It did not make global cooling work properly, though.

Norbyte commented 3 years ago

That's strange, I did test it multiple times and it worked with the latest fix. Can you try removing the C:\Users\<name>\AppData\Local\OsirisExtender folder?

KhadgarsDisciple commented 3 years ago

I removed that folder, and now global cooling is working as I would expect it to. I'll do a bit more testing and then post an update.

KhadgarsDisciple commented 3 years ago

I tested it a bit more, and when I am only running the Script Extender and not Divinity Unleashed, global cooling works properly. When I switch back on Divinity Unleashed, it breaks again.

Just as a note, global cooling DID work properly when I first started playing, with both DU and Script Extender active, so it wasn't some innate problem I can verify easily, or else I would have started a fresh save to test it properly.

I'm gonna go ahead and say that either my save file is broken beyond repair, or that mod is doing something weird. I'm okay with calling this closed, or at least shelving it unless someone else has the same issue with a better repro.

Norbyte commented 3 years ago

Yeah, I couldn't repro this in any other save. Strangely, if I resaved your save after disabling DU and re-enabling it on the "new" save, surfaces started working again.

Skill properties also seemingly don't execute in your save at all for some reason, which is very strange for me.

I'll close this issue since I can't really do much at this point, and investigating further would likely take days until I could pinpoint an issue (if I even could).