Jump to content

Recommended Posts

Posted

I have no technical no-how so I dont understand most of what you are talking about, but sexlabframework keeps saying storageutil.dll doesnt exist when it does, I did a clean uninstall of skyrim AND skse and all mods and it still wont work

Edit: it says outdated or missing papyrusutil in skse plugins but I never had that to begin with?

Posted

Just curious as to why the Bat, Read and Write files were removed from MiscUtil as of 2.9 and onwards?
Yeah I saw the Unused comments in the psc, but now it's broken my mod that was using those functions.

(only for one tiny thing, setting the NPC level to scale same as the player, setlevel 1000 0 1 0, since there is no native papyrus/skse script functions to do the same that I've found yet).

Broken is not really the case as at least my calls were redirected to debug.
But meh...

Sorta blows as I luv the updated version due to the array function updates and utilizing skse 1.7.2 / 1.7.3
Ahh well, Can't have my cake and eat it as well.

Posted

Dearest Ashal,

 

i am considering implementing a value modifier system via StorageUtil. i do not have the source, would you be able to tell me what the maximum character length is for storage keys? this thing has the potential to generate long key names. here is some relevant code. i haven't actually tested this yet for viability or even actual running it. i just engineered it and compiled it i cant test it from work. 

 

 

 

Float Function ActorModGetTotal(Actor Who, String What)
{fetch the sum of all the mods so.}

	What = "SGO.Actor.Mod." + What

	Int x
	Int Count = StorageUtil.StringListCount(Who,What)
	String ModKey
	Float Value
	
	x = 0
	While(x < Count)
		ModKey = StorageUtil.StringListGet(Who,What,x)
		Value += StorageUtil.GetFloatValue(Who,ModKey)
		x += 1
	EndWhile

	Return Value
EndFunction

Float Function ActorModGetValue(Actor Who, String ModKey)
{fetch the specified actor mod.}

	ModKey = "SGO.ActorModValue." + ModKey

	Return StorageUtil.GetFloatValue(Who,ModKey,0.0)
EndFunction

Function ActorModSetValue(Actor Who, String What, String ModKey, Float Value=0.0)
{set a specified actor mod.}

	What = "SGO.Actor.Mod." + What
	ModKey = "SGO.ActorModValue." + ModKey

	StorageUtil.StringListAdd(Who,What,ModKey,FALSE)
	StorageUtil.SetFloatValue(Who,ModKey,Value)

	Return
EndFunction

Function ActorModUnsetValue(Actor Who, String What, String ModKey)
{remove a specified actor mod.}

	What = "SGO.Actor.Mod." + What
	ModKey = "SGO.ActorModValue." + ModKey

	StorageUtil.StringListRemove(Who,What,ModKey,TRUE)
	StorageUtil.UnsetFloatValue(Who,ModKey)

	Return
EndFunction 

 

 

 

which would in the end, be used like 

Event OnEffectStart(Actor Target, Actor Caster)
    SGO.ActorSetModValue(Target,"BreastScale","SomeThirdPartyMod.BreastEffect",1.0)
EndEvent

Event OnEffectFinish(Actor Target, Actor Caster)
    SGO.ActorUnsetModValue(Target,"BreastScale","SomeThirdPartyMod.BreastEffect")
EndEvent

generating a key of "SGO.ActorModValue.SomeThirdpartyMod.BreastEffect" - so you may see why i am concerned about string length.

Posted

Just curious as to why the Bat, Read and Write files were removed from MiscUtil as of 2.9 and onwards?

Yeah I saw the Unused comments in the psc, but now it's broken my mod that was using those functions.

(only for one tiny thing, setting the NPC level to scale same as the player, setlevel 1000 0 1 0, since there is no native papyrus/skse script functions to do the same that I've found yet).

 

Broken is not really the case as at least my calls were redirected to debug.

But meh...

 

Sorta blows as I luv the updated version due to the array function updates and utilizing skse 1.7.2 / 1.7.3

Ahh well, Can't have my cake and eat it as well.

 

They were removed for security reasons. The bat functionality you can replicate using the ConsoleUtil plugin, and there wasn't any real use for the read/write function as the Json functions added serve much the same purposes while being more versatile. I also wasn't aware of any mods making use of them so I didn't see much harm in removing them, what specifically are you using them for?

 

 

 

Dearest Ashal,

 

i am considering implementing a value modifier system via StorageUtil. i do not have the source, would you be able to tell me what the maximum character length is for storage keys? this thing has the potential to generate long key names. here is some relevant code. i haven't actually tested this yet for viability or even actual running it. i just engineered it and compiled it i cant test it from work. 

 

 

 

Float Function ActorModGetTotal(Actor Who, String What)
{fetch the sum of all the mods so.}

	What = "SGO.Actor.Mod." + What

	Int x
	Int Count = StorageUtil.StringListCount(Who,What)
	String ModKey
	Float Value
	
	x = 0
	While(x < Count)
		ModKey = StorageUtil.StringListGet(Who,What,x)
		Value += StorageUtil.GetFloatValue(Who,ModKey)
		x += 1
	EndWhile

	Return Value
EndFunction

Float Function ActorModGetValue(Actor Who, String ModKey)
{fetch the specified actor mod.}

	ModKey = "SGO.ActorModValue." + ModKey

	Return StorageUtil.GetFloatValue(Who,ModKey,0.0)
EndFunction

Function ActorModSetValue(Actor Who, String What, String ModKey, Float Value=0.0)
{set a specified actor mod.}

	What = "SGO.Actor.Mod." + What
	ModKey = "SGO.ActorModValue." + ModKey

	StorageUtil.StringListAdd(Who,What,ModKey,FALSE)
	StorageUtil.SetFloatValue(Who,ModKey,Value)

	Return
EndFunction

Function ActorModUnsetValue(Actor Who, String What, String ModKey)
{remove a specified actor mod.}

	What = "SGO.Actor.Mod." + What
	ModKey = "SGO.ActorModValue." + ModKey

	StorageUtil.StringListRemove(Who,What,ModKey,TRUE)
	StorageUtil.UnsetFloatValue(Who,ModKey)

	Return
EndFunction 

 

 

which would in the end, be used like 

Event OnEffectStart(Actor Target, Actor Caster)
    SGO.ActorSetModValue(Target,"BreastScale","SomeThirdPartyMod.BreastEffect",1.0)
EndEvent

Event OnEffectFinish(Actor Target, Actor Caster)
    SGO.ActorUnsetModValue(Target,"BreastScale","SomeThirdPartyMod.BreastEffect")
EndEvent
generating a key of "SGO.ActorModValue.SomeThirdpartyMod.BreastEffect" - so you may see why i am concerned about string length.

 

Length limits shouldn't be a problem unless the keys are just stored as std::string's, so the max is whatever your systems max_size is for those - which should be well into the millions.

 

Though from the sounds of what your doing, it'd probably be better done using a combination of different list values rather than encoding data into the keys. I'm not entirely clear on what your plan is; but if you aren't stacking more on top of "SGO.ActorModValue.SomeThirdpartyMod.BreastEffect" than it's "fine", though overly long for my taste, I'd suggest at least abbreviating where possible, such as ActorModValue -> AMV. If they get really long and are used on a bunch of different forms and/or value types, it's probably going to start noticeably effecting the skse co-save times during loading and saving.

Posted

 

Though from the sounds of what your doing, it'd probably be better done using a combination of different list values rather than encoding data into the keys. I'm not entirely clear on what your plan is; but if you aren't stacking more on top of "SGO.ActorModValue.SomeThirdpartyMod.BreastEffect" than it's "fine", though overly long for my taste, I'd suggest at least abbreviating where possible, such as ActorModValue -> AMV. If they get really long and are used on a bunch of different forms and/or value types, it's probably going to start noticeably effecting the skse co-save times during loading and saving.

 

 

the main point of the system is to provide a way to stack buffs/debuffs and while allowing mods to add and remove the values they added when needed. if i just went with a straight FloatListAdd(who,what,value) and the value is 1.0, there is no way to remove or modify that specific 1.0 out of the long list of possible 1.0's in that array., its basically implementing FloatListAdd(who,what,subwhat,value) with the tools available. this way they could modify that value, and forget what it was letting the system do its job.

 

basically, i reimplemented nioverride for non-bone (or bone, whatever, the concept of stacking values is limitless of application) things. AddNodeTransformScale(who, ..., what aka bone, subwhat aka alias, value)

Function SomeFourthPartyModAddBuff(Actor Who)
    MyThirdPartyMod.SetModValue(Who,"BreastScaleMulti",1.2)
EndFunction

Function SomeForthPartyModRemoveBuff(Actor Who)
    MyThirdPartyMod.UnsetModValue(Who,"BreastScaleMulti")
EndFunction

Function SomeForthPartyModAdjustBuff(Actor Who, Float Inc)
    MyThirdPartyMod.AdjustModValue(Who,"BreastScaleMulti",Inc)
EndFunction

then any mod that care can fetch the sum of all mods that modified it.

Function MyThirdPartyMod_ApplyBreastScaleMulti(Actor Who)
    Float BreastScaleMulti = self.GetModTotal("BreastScaleMulti")

    ;; ...

    Return
EndFunction
Posted

 

 

Though from the sounds of what your doing, it'd probably be better done using a combination of different list values rather than encoding data into the keys. I'm not entirely clear on what your plan is; but if you aren't stacking more on top of "SGO.ActorModValue.SomeThirdpartyMod.BreastEffect" than it's "fine", though overly long for my taste, I'd suggest at least abbreviating where possible, such as ActorModValue -> AMV. If they get really long and are used on a bunch of different forms and/or value types, it's probably going to start noticeably effecting the skse co-save times during loading and saving.

 

 

the main point of the system is to provide a way to stack buffs/debuffs and while allowing mods to add and remove the values they added when needed. if i just went with a straight FloatListAdd(who,what,value) and the value is 1.0, there is no way to remove or modify that specific 1.0 out of the long list of possible 1.0's in that array., its basically implementing FloatListAdd(who,what,subwhat,value) with the tools available. this way they could modify that value, and forget what it was letting the system do its job.

 

 

 

You could keep 2 separate lists, a float list with the value and a string list with the mod name. Anytime a value is added/removed from the float list by a mod, the mod name is also added/removed from the string list at the same time. If maintained properly, the lists should match up so that you can lookup the index of the mod name, and use that same index to access its value from the float list.

 

This way an actor just keeps a single list for an effect which you can easily add up to get the final stacked amount or check to see if an actor even has any mods for an effect set, without having to go through a list of saved key names to check on the actor for single float values.

Posted

testing Please see the zip file where storageutil.dll is.

Anything wrong with it?

Testing (if you get this with no attached file, the test failed)

 

I'm supposed to have a missing or outdated storageutil.dll

(3.0RC1)

Posted

testing Please see the zip file where storageutil.dll is.

Anything wrong with it?

Testing (if you get this with no attached file, the test failed)

 

I'm supposed to have a missing or outdated storageutil.dll

(3.0RC1)

 

Are you using SexLab 1.60? If so then you should be using the version of storageutil.dll from that as it's newer, not the one from here.

  • 2 weeks later...
Posted

Posted final version of PapyrusUtil v3.0:

 

Changelog 3.0 - 08/21/2015:

  • REQUIRES SKSE 1.7.3
  • StorageUtil & JsonUtil Int/Float/String/FormListToArray()
  • Various new utility and array functions in PapyrusUtil.psc
  • Various other new functions I can't remember, mostly related to dealing with or returning arrays
  • Fixed various crash related bugs
  • Improved performance for many functions
  • REMOVED MiscUtil.WriteToFile(),ReadFromFile(),ExecuteBat() - Functions were largely unused, a security risk, and better accomplished by other means.
Posted

 

Just curious as to why the Bat, Read and Write files were removed from MiscUtil as of 2.9 and onwards?

Yeah I saw the Unused comments in the psc, but now it's broken my mod that was using those functions.

(only for one tiny thing, setting the NPC level to scale same as the player, setlevel 1000 0 1 0, since there is no native papyrus/skse script functions to do the same that I've found yet).

 

Broken is not really the case as at least my calls were redirected to debug.

But meh...

 

Sorta blows as I luv the updated version due to the array function updates and utilizing skse 1.7.2 / 1.7.3

Ahh well, Can't have my cake and eat it as well.

 

They were removed for security reasons. The bat functionality you can replicate using the ConsoleUtil plugin, and there wasn't any real use for the read/write function as the Json functions added serve much the same purposes while being more versatile. I also wasn't aware of any mods making use of them so I didn't see much harm in removing them, what specifically are you using them for?

 

 

.......

Thank you for the heads up about ConsoleUtil, never knew it existed till you posted.

 

That was it, the only use I had of it , console prid an actor and setlevel 1000 0 1 0, so it's not mission critical.

 

Haven't tested it yet, but ConsoleUtil will do what I'm after.

Would have been nice not to depend on another 3rd party library though, but no biggie.

 

Thank You.

 

P.S Sorry I made you repeat yourself, read back a few pages to the post where you said you were removing it, "Speak now", but at the time of your post I wasn't aware of it, otherwise I would have spoke up then ...lol

 

Posted

Wow.

 

@Ashal - does it mean you are in the process of uploading Sexlab 1.60?

 

It means I'm pretty much done and just watching for, and silently fixing issues people report with the last 1.60 RC3. Releasing this finally was something to do in the meantime. Final 1.60 should come out this weekend, assuming nobody suddenly finds a major bug in RC3 out of the blue.

 

 

Just curious as to why the Bat, Read and Write files were removed from MiscUtil as of 2.9 and onwards?

Yeah I saw the Unused comments in the psc, but now it's broken my mod that was using those functions.

(only for one tiny thing, setting the NPC level to scale same as the player, setlevel 1000 0 1 0, since there is no native papyrus/skse script functions to do the same that I've found yet).

 

Broken is not really the case as at least my calls were redirected to debug.

But meh...

 

Sorta blows as I luv the updated version due to the array function updates and utilizing skse 1.7.2 / 1.7.3

Ahh well, Can't have my cake and eat it as well.

 

They were removed for security reasons. The bat functionality you can replicate using the ConsoleUtil plugin, and there wasn't any real use for the read/write function as the Json functions added serve much the same purposes while being more versatile. I also wasn't aware of any mods making use of them so I didn't see much harm in removing them, what specifically are you using them for?

 

 

.......

Thank you for the heads up about ConsoleUtil, never knew it existed till you posted.

 

That was it, the only use I had of it , console prid an actor and setlevel 1000 0 1 0, so it's not mission critical.

 

Haven't tested it yet, but ConsoleUtil will do what I'm after.

Would have been nice not to depend on another 3rd party library though, but no biggie.

 

Thank You.

 

P.S Sorry I made you repeat yourself, read back a few pages to the post where you said you were removing it, "Speak now", but at the time of your post I wasn't aware of it, otherwise I would have spoke up then ...lol

 

 

 

Having talked to the author of ConsoleUtil, seeing as he is also the original author of this plugin; I just resumed development over it after it was abandoned. It's possible the functionality from ConsoleUtil and/or animation speed control may eventually just be incorporated into this plugin by default when 3.1 comes out.

Posted

So just checking, do I have something wrong with my PapyrusUtil or was the latest version supposed to be a bit gutted from the 1.59 version?

When I open consoles and click on something I can no longer see what mod it comes from, the name of the character, open up their inventory or spell list (the whole press tab for extra info is gone) and so on. I'm using Sexlab 1.6, latest beta SKSE (Sexlab reports all checks OK), this latest version of Papyrus Util installed after due to Mod Organizer and not wanting SOS to overwrite it, and MO is reporting no other mod is conflicting with PapyrusUtil. I am using the Extended UI mod (needed to fix perk descriptions on my overhaul) but I was using that with the Util for 1.59 and had no issues.

 

Note I haven't been following developement very closely so if these features have been moved to another mod, just link me on.

Posted

So just checking, do I have something wrong with my PapyrusUtil or was the latest version supposed to be a bit gutted from the 1.59 version?

 

When I open consoles and click on something I can no longer see what mod it comes from, the name of the character, open up their inventory or spell list (the whole press tab for extra info is gone) and so on. I'm using Sexlab 1.6, latest beta SKSE (Sexlab reports all checks OK), this latest version of Papyrus Util installed after due to Mod Organizer and not wanting SOS to overwrite it, and MO is reporting no other mod is conflicting with PapyrusUtil. I am using the Extended UI mod (needed to fix perk descriptions on my overhaul) but I was using that with the Util for 1.59 and had no issues.

 

Note I haven't been following developement very closely so if these features have been moved to another mod, just link me on.

 

That came from mfgconsole which used to be included in sexlab.  Ashal removed that from SL1.60.  mfg was what was used for open the mouth but now is handled by SKSE functions.  Just install MFGConsole from Nexus and the info will reappear.  Ashal mentioned that he will probably readd mfg next update because other mods (like zaz) were relying on it.

Posted

how about another family of functions that would allow you to delete all keys starting with a prefix? a quick uninstall button.

 

DeleteFloatValuesWithPrefix("SGO.")

DeleteFloatListsWithPrefix("SGO.")

 

i do my best to track everything i create, but, still, this would be amazing.  a delete by key prefix or by a glob pattern, either or.

Posted

how about another family of functions that would allow you to delete all keys starting with a prefix? a quick uninstall button.

 

DeleteFloatValuesWithPrefix("SGO.")

DeleteFloatListsWithPrefix("SGO.")

 

i do my best to track everything i create, but, still, this would be amazing.  a delete by key prefix or by a glob pattern, either or.

 

Sounds like a good idea to me, will add it next update.

 

I was also thinking of adding a set of "pluck" functions that removes a value and returns it to help clean up some scripts where I find myself just storing temporary data. Like so,

; // Get then clear a variable
int Var = StorageUtil.GetIntValue(self, "TempVar", 0)
StorageUtil.UnsetIntValue(self, "TempVar")

; // Same as
int Var = StorageUtil.PluckIntValue(self, "TempVar", 0)

As well as a set of shift and pop functions for lists to return and remove a the first and last element. Could be carried over as array utility functions as well.

StorageUtil.StringListAdd(self, "MyList", "Cat")
StorageUtil.StringListAdd(self, "MyList", "Dog")
StorageUtil.StringListAdd(self, "MyList", "Bird")
StorageUtil.StringListAdd(self, "MyList", "Lizard")

string ShiftVar = StorageUtil.StringListShift(self, "MyList") ; // ShiftVar = "Cat"
; // MyList = Dog, Bird, Lizard
string PopVar = StorageUtil.StringListPop(self, "MyList") ; // PopVar = "Lizard"
; // MyList = Dog, Bird
Posted

all of those have my upvote.
 

another idea would be to return a list of all the keys for a type. nioverride does this for transforms. that way one could technically make a mod that does nothing but help you clean out stale data. 

 

[update] 8 more lines of code replaced with  1 WrapFloat and 1 ClampFloat

Posted

another idea would be to return a list of all the keys for a type. nioverride does this for transforms. that way one could technically make a mod that does nothing but help you clean out stale data. 

 

Already exists.

 

in 3.0:

string[] function debug_AllObjIntKeys(Form ObjKey) global native
string[] function debug_AllObjFloatKeys(Form ObjKey) global native
string[] function debug_AllObjStringKeys(Form ObjKey) global native
string[] function debug_AllObjFormKeys(Form ObjKey) global native
string[] function debug_AllObjIntListKeys(Form ObjKey) global native
string[] function debug_AllObjFloatListKeys(Form ObjKey) global native
string[] function debug_AllObjStringListKeys(Form ObjKey) global native
string[] function debug_AllObjFormListKeys(Form ObjKey) global native

in 2.8 and older:

int function debug_GetIntKeysCount(Form ObjKey) global native
int function debug_GetFloatKeysCount(Form ObjKey) global native
int function debug_GetStringKeysCount(Form ObjKey) global native
int function debug_GetFormKeysCount(Form ObjKey) global native
int function debug_GetIntListKeysCount(Form ObjKey) global native
int function debug_GetFloatListKeysCount(Form ObjKey) global native
int function debug_GetStringListKeysCount(Form ObjKey) global native
int function debug_GetFormListKeysCount(Form ObjKey) global native

string function debug_GetIntKey(Form ObjKey, int index) global native
string function debug_GetFloatKey(Form ObjKey, int index) global native
string function debug_GetStringKey(Form ObjKey, int index) global native
string function debug_GetFormKey(Form ObjKey, int index) global native
string function debug_GetIntListKey(Form ObjKey, int index) global native
string function debug_GetFloatListKey(Form ObjKey, int index) global native
string function debug_GetStringListKey(Form ObjKey, int index) global native
string function debug_GetFormListKey(Form ObjKey, int index) global native
Posted

sexlab is overwriting the scrips from papyrusUtil, do I need to put papyrus avobe sexlab or keep sexlab higher?

 

I'm using sexlab version 159c and papyrus 3.0.

Posted

sexlab is overwriting the scrips from papyrusUtil, do I need to put papyrus avobe sexlab or keep sexlab higher?

 

I'm using sexlab version 159c and papyrus 3.0.

 

Switch to SL 1.6 and then it's not important anymore, as SL 1.6 provides PapyrusUtil 3.

If you want to stay with SL 1.59, then I would recommend to let PapyrusUtil 3 overwrite anything, as it being more up-to-date than the one provided by SL 1.59

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