SpencerMycek / KineticistExpandedElements

Mod for Pathfinder: WoTR by OwlCat Games -- Expands the choices of Kineticist Element Choices
Other
20 stars 7 forks source link

[FileNotFoundException] Missing file and critical incorrect wood guid #38

Closed sztrzask closed 1 year ago

sztrzask commented 1 year ago

I've checked the logs and found this error (UMM -> Logs -> Open detailed logs)

[KineticistElementsExpanded] [Exception] FileNotFoundException - Could not find file "D:\Steam\steamapps\common\Pathfinder Second Adventure\Mods\KineticistElementsExpanded\Icons\PositiveAdmixture.png" System.IO.FileNotFoundException: Could not find file "D:\Steam\steamapps\common\Pathfinder Second Adventure\Mods\KineticistElementsExpanded\Icons\PositiveAdmixture.png" File name: 'D:\Steam\steamapps\common\Pathfinder Second Adventure\Mods\KineticistElementsExpanded\Icons\PositiveAdmixture.png' at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x0019e] in :0 at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share) [0x00000] in :0 at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare) at System.IO.File.OpenRead (System.String path) [0x00000] in :0 at System.IO.File.ReadAllBytes (System.String path) [0x00000] in :0 at KineticistElementsExpanded.Helper.CreateSprite (System.String filename, System.Int32 width, System.Int32 height) [0x00012] in <95f14581a5d8411981386052ba8700b1>:0 [KineticistElementsExpanded] Warning: Generating new GUID for WildTalentBonusFeatWood [KineticistElementsExpanded] Warning: Generating new GUID for WildTalentBonusFeatWood1 [KineticistElementsExpanded] Warning: Generating new GUID for WildTalentBonusFeatWood2 [KineticistElementsExpanded] Warning: Generating new GUID for WildTalentBonusFeatWood3 [KineticistElementsExpanded] Finished loading Kineticist Elements Expanded

and it seems like the file IS missing image

Truinto commented 1 year ago

Uh... if that log is correct and executes on user site, then you are generating Guids on user site. Which is really bad. If you push an update which overwrites the blueprints.txt file, then it will forget these Guids and generate new ones. That means any save file which has any of the old Guids will be bricked.

If you have copied part of my code, make sure you also allow guid generation only while compiling in debug. And only publish release files.

Truinto commented 1 year ago

I also recommend to copy the blueprints.txt with post-build scripts so you don't forget to ship it with the mod.

Btw, I also have blueprints_dynamic.txt which calculates a new Guid from two others. This is safe since you get the same Guid every time. Not true for regular ones tho.

Truinto commented 1 year ago

Since every user will have different guids for WildTalentBonusFeatWood* you cannot make an update that fixes it. Anyone not having picked that will be unaffected. You can remove the features from save files by hand. Or use my tool, which isn't tested very well, but I bet will help a lot. https://github.com/Truinto/BlueprintPurge/releases/tag/v0.4.0

The guids to filter for will be in the blueprints.txt; at least until it's overwritten. Afterwards the crash message will contain the first faulty guid. So it might need 4 tries to get rid of it.

sztrzask commented 1 year ago

Can I use Toybox's edit party, list features and remove them by hand from there?

Truinto commented 1 year ago

While it still boots, probably. Unless it still shows up in the class progression overview, even after being removed. Then you are out of luck.

sztrzask commented 1 year ago

I was able to remove the mod, remove the guids using your tool and load the save, however my kineticst Regis is borked - cannot use gather power (both as a mod and as an action). I'll try to clean him up later. Other kineticsts work correctly and can gather power (given they have never taken Wood/Aether/Void elements before).

SpencerMycek commented 1 year ago

So I’m pretty sure the issue is just to positiveadmixture png file, which I don’t have there. And I forgot to change the name to something else

I do see it generating GUIDS Which is real strange, and I don’t know why, but I’ll look in too