Billy1969 Posted March 16 Posted March 16 1 hour ago, traison said: Something to get you going here. See the sections about "how to find bait" and "how to fish". It's all bits in the end. The tricky part is finding where and what to edit. Need a disassembler or debugger for that. Ok, following your instructions in this thread and the thread you linked I backuped the original Papyrusutil.dll and downloaded XIV32, I launched it and opened the Papyrusutil.dll from 2020 (the 2021 one doesn't have the string 48 8d 0d b1 33 10 00 and has a bigger file size than the 2020 one) and so I replaced 48 8d 0d b1 33 10 00 with 48 85 FF 74 30 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 as instructed, and finally saved the file within XIV32. Remark; both the old and new .dll have the same file size (strange?) Then I replaced the old .dll with my new saved one and launched Skyrim SE through MO2 as usual Unfortunately I got an error message window stating 'main.cpp(73) PapyrusUtil module not found' with an 'OK' button and when pressed Skyrim SE no longer loads any further (it closes the game process) I must be missing something obvious but I can't see what. The string I replaced the original one with has more characters so I guess saving the .dll was not enough but it needs to be recompiled maybe? Many thanks for your help, I'm out of my comfort zone but I'm happy I'm learning new things from you.
traison Posted March 16 Posted March 16 (edited) 24 minutes ago, Billy1969 said: Remark; both the old and new .dll have the same file size (strange?) Size doesn't change when overwriting bytes. The pattern is there for anyone else that wants to find this or verify that they're at the correct offset. Pattern is unique. 24 minutes ago, Billy1969 said: ...opened the Papyrusutil.dll from 2020 (the 2021 one doesn't have the string... This is why I also posted the MD5 checksum. The dll must match exactly, otherwise who knows what you'll be patching. It's still possible the pattern exists at a different offset in a different version. 24 minutes ago, Billy1969 said: main.cpp(73) PapyrusUtil module not found That sounds like one of your PapyrusUtil patchers. Search for "PapyrusUtil module" in all dll files in Skyrim if it's not. Notepad++ can do the search. 24 minutes ago, Billy1969 said: I must be missing something obvious but I can't see what. No way for me to test the changes. Could be the patch is bad. Edit: To clarify, if the patch is bad I would expect the crash offset to change. If the patch is bad it's not going to print the message you got. Edited March 16 by traison
Billy1969 Posted March 16 Posted March 16 Well I'm back and I have good news so here's what I did: First You were right, Notepad++ found one file containing 'PapyrusUtil module' and that's the PapyrusUtilTFC.dll file, that's the one I mentioned before that patches PapyrusUtil.dll regarding the free camera bug. So I had to disable that one to be able to launch Skyrim SE without interruption or error. Note that I included Skyrim Utility Plus mod as that's the one I had to clean the Sexlab system for in the first place, it has it's own 2021 PapyrusUtil.dll but my patched one overrides it. So I reached the load game menu and I loaded my savegame and then all hell broke loose, I got bombarded by dozens of error pop-ups, one after the other complaining about PapyrusUtil.dll missing or being a wrong version. It started with Schlongs of Skyrim (I have the PapyrusUtil version), Cumshot, Sexlab itself and more Sexlab depending mods like Aroused etc etc I was able to click every window away with the ok button until everything else resumed loading and stopped complaining. Then I proceeded to clean the Sexlab system and behold it executed entirely without CTD! So you got the right string, the modified .dll worked without crashing. After that I restored my backupped Sexlab settings but that seemingly didn't work as the MCM menu values remained on defaults. Also although the new MCM settings from SLU+ showed I couldn't change or edit them, even clicking on them did nothing, so I was like damn something is still wrong. So I saved my game,, exit and then in MO2 re-ordered the PapyrusUtil.dll files so the unmodified one wins over the modified one and also re-enable the PapyrusUtilTFC.dll file I had to disable before to see if it would now work without error messages and then try to restore my settings once again in Sexlab (not clean the system that was now already done) when everything had loaded. As expected no error messages before reaching the menu, then when loading the savegame itself no more errors either! Just SOS restored it's settings as they were before as I got the message for every schlong type loading and restoring itself. When checking the Sexlab MCM it showed that Sexlab Utility Plus was now installed and when importing my backed up SL settings they filled in without problem. Best of all was that now the new SLU+ MCM settings could be set altered and edited at will! I checked the other mods that complained the first load time but all seemed normal, no errors. So in short EVERYTHING WORKS! I owe you big time, without your help to modify the .dll I would never have made it! Gooing to keep the modified .dll in a safe place in case I ever need to clean the SL system again, maybe I can post it here to help out people that encounter the same problem even. what do you think? I'm one happy fellow now
traison Posted March 16 Posted March 16 (edited) 7 hours ago, Billy1969 said: So in short EVERYTHING WORKS! I owe you big time, without your help to modify the .dll I would never have made it! Always exciting when a bytecode patch does what it was supposed to do. 😄👍 7 hours ago, Billy1969 said: ...maybe I can post it here to help out people that encounter the same problem even. what do you think? Sure, go ahead. Here's the checksum of the patched dll: 7fca035b9037e2dd25d2bc1b5db1893f PapyrusUtil.dll Sidenote: I somehow messed up and posted the md5 of the modified dll in my instructions post. That has now been corrected. Guess I need to see about patching my own PapyrusUtil (for 1170) now as well. Maybe i get lucky and the pattern still exists in this version. Edit: Issue with patching this in 1170 without a crash log is that it seems IsValidObject has been inlined in other functions by the compiler. It's in 7 different locations, all would need a similar patch. So I'm going to wait for this to become an issue and patch them as they show up. They all have the same issue, so it's only a matter of time, but I've managed to make it this far without this causing a crash. It's possible the 97 version of PapyrusUtil also has this function inlined in the same way. I tried compiling PapyrusUtil last night but like with all C++ projects, they never compile the first time you try - it's always a 1 week long problem to get these things working. Edited March 16 by traison
Billy1969 Posted March 16 Posted March 16 (edited) Here's the modified PapyrusUtil.dll Anyone downloading this remember this will only work for Skyrim SE version 1.5.97 and PapyrusUtils version 3.9, the last one for 1.5.97 on Nexus. Also backup your original .dll file and only use this one for being able to clean the Sexlab System without CTD if you have that problem, once that is done replace it again with the original unmodified PapyrusUtil.dll to resume normal gameplay. PapyrusUtil.7z Edited March 16 by Billy1969
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now