Jump to content

Recommended Posts

Posted

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 :) 

  • 10 months later...
  • 9 months later...
  • 3 months later...
Posted

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

 

  • 6 months later...
Posted

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.

Posted
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)

 

Posted
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?

Posted

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.

Posted
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......"

Posted
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.

Posted

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?

  • 2 weeks later...
Posted (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 by OsmelMC
  • 2 weeks later...
Posted
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?

Posted (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 by Arizona_Steve
Posted
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. 

Posted

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 month later...
Posted (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 by w234aew
Posted

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.

Posted
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.

 

 

Posted
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 ?

Posted
12 hours ago, botticelli said:

Yep, that did it, thanks. Perhaps a little comment inside PapyrusUtil.psc would be helpful, though ?

 

Which solution worked?

  • 3 weeks later...
Posted

The last parameter of ActorUtil.AddPackageOverride() is undocumented - the flags parameter. What does this parameter actually mean?

Posted
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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...