Lupine00 Posted May 31, 2019 Posted May 31, 2019 Having looked into the critical section - not a shared resource - so I need to get hold of the one in StorageUtils, or call the StorageUtils functions from a sibling DLL. It's a pity the mutex wasn't exported, as it makes extending StorageUtils a bit fiddly - that might be an understatement. Presumably there has to be some way to find the registrations, and it has to be done after the registration phase for the calling mod so there's no ordering dependency. Seems possible, just time consuming. Or, alternatively, rely on the non-changing nature of the papyrusutil DLL, and use info about its load to get the address of the mutex object and manufacture a pointer to it. This seems super-fragile, and if papyrusutil updated, would probably cause CTDs. Getting native funcs work in VS2017 originally, with latest SKSE was ... time consuming ... very. Nobody explains this, the sample in the latest SKSE very inconveniently lacks any explanation and doesn't seem to do what is required for adding native funcs to Papyrus, so you can't use it as a guide. The old demos are old, and stale, and don't work now, and VS2017 has a few little issues of its own. I haven't tried 2019 yet. Probably won't
NinjaKittayPK Posted April 30, 2020 Posted April 30, 2020 Slightly off topic, but would it be possible for a spell effect script to modify a .json stored in StorageUtilData using the PapyrusUtil mod? (SSE)
hanboyuas Posted February 7, 2021 Posted February 7, 2021 What would be the difference of using this vs. using just forms to save same data?
Silvain Posted May 17, 2021 Posted May 17, 2021 Hello Ashal, I hope it is okay for me to report a bug here that happens with SSE and the newest (3.9) version of PapyrusUtil. The original discussion starts here: https://www.loverslab.com/topic/149018-wartimes-a-daughters-tale-le-alternate-start-scenario/?do=findComment&comment=3379261 In short this happens only with SE, even with a basic load order and the Tweaked Version of YPS Fashion made by Monoman1 found here: https://www.loverslab.com/topic/149018-wartimes-a-daughters-tale-le-alternate-start-scenario/?do=findComment&comment=3378897 The bug does not happen on LE. The following line in LE works flawlessly and always returns a working value. In SE it seems to always return -1. Int Index = JsonUtil.FormListFind("/ypsFashion/Underwear.json", "forms", Stockings) The whole function is as follows if relevant. The issue has been confirmed for others besides myself. Spoiler function AddNylonsTattoo(Form Stockings;/int NylonsType, int Nylonspattern, int NylonsColor/;) ; add tattoo according to current settingsIf CurrentNylons RemoveNylonsTattoo(CurrentNylons) EndIf Int Index = JsonUtil.FormListFind("/ypsFashion/Underwear.json", "forms", Stockings) If Index > -1 String Name = JsonUtil.StringListGet("/ypsFashion/Underwear.json", "names", Index) If Name String Area String Texture Int Color Int i = 0 While i < JsonUtil.StringListCount("/ypsFashion/Underwear.json", "areas_" + Name) Area = JsonUtil.StringListGet("/ypsFashion/Underwear.json", "areas_" + Name, i) Texture = JsonUtil.StringListGet("/ypsFashion/Underwear.json", "textures_" + Name, i) Color = JsonUtil.IntListGet("/ypsFashion/Underwear.json", Name, i) ;Debug.Messagebox(Color) Util.BeginOverlay(PlayerActor, 0.95, Texture, Area, SlotToUse = -1, TintColor = Color, EmissiveColor = 16777215) i += 1 EndWhile CurrentNylons = Stockings EndIf EndIf endFunction
tmk052 Posted December 16, 2021 Posted December 16, 2021 I download and replaced your new version of papyrusUtil AE with the old, game crashed on loading, so I disabled all mods and add one by one to see which was causing the problem. It was the papyrusUil AE, I removed it redownloaded it and reinstalled, same problem.
Ashal Posted December 16, 2021 Author Posted December 16, 2021 5 minutes ago, tmk052 said: I download and replaced your new version of papyrusUtil AE with the old, game crashed on loading, so I disabled all mods and add one by one to see which was causing the problem. It was the papyrusUil AE, I removed it redownloaded it and reinstalled, same problem. Download v4.2 (which I just now uploaded here)
Samson Nite Posted December 16, 2021 Posted December 16, 2021 3 hours ago, Ashal said: Download v4.2 (which I just now uploaded here) I installed SL frame 1.63 without "sslSystemConfig.pex" that caused Papyrus Util 3.9 issue. I kept old version of this file. After that, I had no error and was clean. I don't even need V4.2 of papyrus util. Can you check what is wrong with this script file?
sirgilly Posted December 16, 2021 Posted December 16, 2021 For SE, should I allow papyrus util to overwrite sexlab or sexlab to overwrite papyrus util - I notice the file in sexlab is newer but if it were a new version I would assume it would be put here too.
Samson Nite Posted December 16, 2021 Posted December 16, 2021 6 hours ago, sirgilly said: For SE, should I allow papyrus util to overwrite sexlab or sexlab to overwrite papyrus util - I notice the file in sexlab is newer but if it were a new version I would assume it would be put here too. SL Framework 1.36 has new Papyrus itself and can overwrite any existing file, except that shitty file "sslSystemConfig.pex". If you overwrite everything with this file, you will get a stupid error " Papyrus utility is outdated or missing blablabla......"
Ashal Posted December 17, 2021 Author Posted December 17, 2021 3 hours ago, Samson Nite said: SL Framework 1.36 has new Papyrus itself and can overwrite any existing file, except that shitty file "sslSystemConfig.pex". If you overwrite everything with this file, you will get a stupid error " Papyrus utility is outdated or missing blablabla......" The included sslSystemConfig is fine. You just installed it wrong.
sirgilly Posted December 17, 2021 Posted December 17, 2021 Do I need to worry about some files present in papyrusUtil that are not present in sexlab? I am wondering if I should overwrite papyrusutil with sexlab or remove papyrus util entirely and accept some files are not present?
OsmelMC Posted December 25, 2021 Posted December 25, 2021 (edited) On 12/16/2021 at 10:47 PM, sirgilly said: Do I need to worry about some files present in papyrusUtil that are not present in sexlab? I am wondering if I should overwrite papyrusutil with sexlab or remove papyrus util entirely and accept some files are not present? Always use the newest versions available for your Skyrim version. For that you can check the version numbers and date of the DLL file Edited December 25, 2021 by OsmelMC
Miller826 Posted January 7, 2022 Posted January 7, 2022 On 12/16/2021 at 10:16 PM, Samson Nite said: SL Framework 1.36 has new Papyrus itself and can overwrite any existing file, except that shitty file "sslSystemConfig.pex". If you overwrite everything with this file, you will get a stupid error " Papyrus utility is outdated or missing blablabla......" Wait - what? I should let the new Sexlab overwrite even PapyrusUtil? For real? What?
Arizona_Steve Posted January 7, 2022 Posted January 7, 2022 (edited) Is there a link to the source code anywhere? I'm currently trying to figure out how to switch Random Sex over to the Address Library as the latest SKSE seems to have issues importing into Visual C++. Edited January 8, 2022 by Arizona_Steve
Ashal Posted January 8, 2022 Author Posted January 8, 2022 15 hours ago, Arizona_Steve said: Is there a link to the source code anywhere? I'm currently trying to figure out how to switch Random Sex over to the Address Library as the latest SKSE seems to have issues importing into Visual C++. It takes some tweaking to get current SKSE properly working in Visual Studio, but it's quickly doable once you know how. If you message me on discord I can walk you through how to get it working. Same goes for Address Library. In any case, you can see the source of how Address Library was implement from this commit: https://github.com/eeveelo/PapyrusUtil/commit/44fe0a256f06700a08bfc22315a025baf3505363 As I've discovered since switching to address library though, if you use SKSE related functions that use addresses themselves in your plugin, your plugin won't be version independent like you'd hope and still has to be recompiled whenever SKSE updates. But at the very least updates are much easier now as I no longer have to track down updated function addresses. 1
b1ad3LLua Posted January 12, 2022 Posted January 12, 2022 Hi. If im using legendary skyrim do i need to install "Address Library for SKSE Plugins" cos it says for skyrim special edition and i want to use legendary. 1
w234aew Posted March 1, 2022 Posted March 1, 2022 (edited) With JsonUtil, is it possible to read hexadecimal integer values from variables? Is there any special formatting I need to do in the .json file itself when setting the integer? (ex. including the 0x in the number) Wasn't able to find anything indicating this isn't possible, but no other .jsons in my mod folder had examples of this being done. EDIT: Nevermind, I figured it out. JsonUtil converts hex->dec. EDIT 2: Are JSONUtil Integers signed or unsigned? Or is there a way I can flag them as unsigned? EDIT 3: Nevermind again, figured it out, just had to do conditionals for direction (sign not needed, can be eliminated as a factor using conditionals). Edited March 1, 2022 by w234aew
botticelli Posted March 6, 2022 Posted March 6, 2022 Is it possible that PushForm() is not working out of global functions in LE? I tried it with this method: Form[] Function GetAllFormsByKeyword(Actor acActor, Keyword theKeyword) Global int i = _Q2C_Functions.GetNumItemsWithKeyword(acActor, theKeyword) Form[] carried = none while i i -= 1 carried = PapyrusUtil.PushForm(carried, _Q2C_Functions.GetNthFormWithKeyword(acActor, theKeyword, i)) endwhile return carried EndFunction With debugging, I found that the Q2C-Function does indeed return a valid form, but the Array "carried" stays empty... Q2C for LE can be found here,, for SE here. I don't know, if that problem also exists in SE.
Ashal Posted March 6, 2022 Author Posted March 6, 2022 2 hours ago, botticelli said: Is it possible that PushForm() is not working out of global functions in LE? I tried it with this method: Form[] Function GetAllFormsByKeyword(Actor acActor, Keyword theKeyword) Global int i = _Q2C_Functions.GetNumItemsWithKeyword(acActor, theKeyword) Form[] carried = none while i i -= 1 carried = PapyrusUtil.PushForm(carried, _Q2C_Functions.GetNthFormWithKeyword(acActor, theKeyword, i)) endwhile return carried EndFunction With debugging, I found that the Q2C-Function does indeed return a valid form, but the Array "carried" stays empty... Q2C for LE can be found here,, for SE here. I don't know, if that problem also exists in SE. I can't test or confirm right now, but it most likely has to do with the fact that you're initializing the array as a none. Try changing Form[] carried = none To Form[] carried If that doesn't work for some reason, try this instead Form[] carried = Utility.CreateFormArray(0) And if it STILL doesn't work, then try initializing it with at least 1 element and seeing if that fixes it. But pretty sure that shouldn't be necessary. 2
botticelli Posted March 7, 2022 Posted March 7, 2022 15 hours ago, Ashal said: I can't test or confirm right now, but it most likely has to do with the fact that you're initializing the array as a none. Try changing Form[] carried = none To Form[] carried If that doesn't work for some reason, try this instead Form[] carried = Utility.CreateFormArray(0) And if it STILL doesn't work, then try initializing it with at least 1 element and seeing if that fixes it. But pretty sure that shouldn't be necessary. Yep, that did it, thanks. Perhaps a little comment inside PapyrusUtil.psc would be helpful, though ?
Ashal Posted March 8, 2022 Author Posted March 8, 2022 12 hours ago, botticelli said: Yep, that did it, thanks. Perhaps a little comment inside PapyrusUtil.psc would be helpful, though ? Which solution worked?
botticelli Posted March 8, 2022 Posted March 8, 2022 9 hours ago, Ashal said: Which solution worked? Your first suggestion worked (leaving out initialization to none)
zaira Posted March 24, 2022 Posted March 24, 2022 The last parameter of ActorUtil.AddPackageOverride() is undocumented - the flags parameter. What does this parameter actually mean?
Ashal Posted March 24, 2022 Author Posted March 24, 2022 1 hour ago, zaira said: The last parameter of ActorUtil.AddPackageOverride() is undocumented - the flags parameter. What does this parameter actually mean? Not sure why it's not documented, but if I recall correctly, setting it to a value of 1 will make it skip checking if the packages conditions are met and forcibly use regardless, assuming it's the package picked by the priority order.
zaira Posted March 24, 2022 Posted March 24, 2022 21 minutes ago, Ashal said: ...but if I recall correctly... Yes, indeed, I checked the source code. Thanx
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