elxdark Posted August 31, 2015 Posted August 31, 2015 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 Ok I got it, thanks
Whacked Posted September 1, 2015 Posted September 1, 2015 I've been having a crash on load problem every once in awhile after installing 3.0. I'm still using SL 1.59.I make multiple saves per play session, and can play for long periods without any issue or crashes. There is no indication there is a problem, and when reloading the game and the last save I made, I get CTD. Sometimes it's not just the last save I made, a few of the sequential saves I made. The hdtSkyrimMemPatch.log shows storageutil.dll as the cause, and I never saw this with 2.8. I've attached a file with the htdSkyrimMemPatch log and dump, plus my papyrus.log. StorageutilCrash.7z
Ashal Posted September 1, 2015 Author Posted September 1, 2015 I've been having a crash on load problem every once in awhile after installing 3.0. I'm still using SL 1.59. I make multiple saves per play session, and can play for long periods without any issue or crashes. There is no indication there is a problem, and when reloading the game and the last save I made, I get CTD. Sometimes it's not just the last save I made, a few of the sequential saves I made. The hdtSkyrimMemPatch.log shows storageutil.dll as the cause, and I never saw this with 2.8. I've attached a file with the htdSkyrimMemPatch log and dump, plus my papyrus.log. StorageutilCrash.7z Main log I'd need to is papyrusutil's, which you can find in the main Skyrim folder named "PapyrusUtilDev.log"
Whacked Posted September 1, 2015 Posted September 1, 2015 I guess that should have been self evident Here is all the logs and the dump again. StorageutilCrash.7z
Ashal Posted September 1, 2015 Author Posted September 1, 2015 I guess that should have been self evident Here is all the logs and the dump again. StorageutilCrash.7z It's happening during package override loading, as the last line is: PKGO Load This is an issue specifically fixed in 3.0, are you 100% positive you're running the newest version? Even if you are, install it again and make sure it's not at a lower priority than sexlab 1.59c if you're using mod organizer. And if you don't mind sticking around and helping hash this problem out asap, it would be much appreciated as I was planning in a hour or two to release a SexLab update along with updating PapyrusUtil to 3.1, would prefer to fix this issue if it's still actually present in 3.0 though.
Whacked Posted September 1, 2015 Posted September 1, 2015 I guess that should have been self evident Here is all the logs and the dump again. StorageutilCrash.7z It's happening during package override loading, as the last line is: PKGO Load This is an issue specifically fixed in 3.0, are you 100% positive you're running the newest version? Even if you are, install it again and make sure it's not at a lower priority than sexlab 1.59c if you're using mod organizer. And if you don't mind sticking around and helping hash this problem out asap, it would be much appreciated as I was planning in a hour or two to release a SexLab update along with updating PapyrusUtil to 3.1, would prefer to fix this issue if it's still actually present in 3.0 though. No problem, I'll reinstall 3.0 and report back right away.
Whacked Posted September 1, 2015 Posted September 1, 2015 Reinstalled and loaded the test save that just crashed (the last set of logs), and it loaded ok. Played through the quest to get the silverblood mercenaries to leave that mine (used SL Solutions) then saved at the exit of the mine. Trying to load that save after restarting the game resulted in a crash, logs attached.The Storageutil.dll I am using is 827kb, if that is any help.Load Order: 00 Skyrim.esm 01 Update.esm 02 Unofficial Skyrim Patch.esp [Version 2.1.3] 03 Dawnguard.esm 04 Unofficial Dawnguard Patch.esp [Version 2.1.3] 05 HearthFires.esm 06 Unofficial Hearthfire Patch.esp [Version 2.1.3] 07 Dragonborn.esm 08 Unofficial Dragonborn Patch.esp [Version 2.1.3] 09 Skyrim Project Optimization - Full Version.esm 0A Campfire.esm 0B Havok Breast Physic.esm 0C hdtHighHeel.esm 0D ApachiiHair.esm 0E ApachiiHairFemales.esm 0F AzarHair.esm 10 EFFCore.esm 11 daymoyl.esm 12 SexLab.esm [Version 1.59b] 13 SexLabAroused.esm 14 CreatureFramework.esm [Version 1.0.0] 15 ZaZAnimationPack.esm 16 Devious Devices - Assets.esm [Version 2.8.3] 17 Schlongs of Skyrim - Core.esm 18 BeeingFemale.esm [Version 2.4] 19 Devious Devices - Integration.esm 1A Devious Devices - Expansion.esm 1B HighResTexturePack01.esp 1C HighResTexturePack02.esp 1D HighResTexturePack03.esp 1E Unofficial High Resolution Patch.esp [Version 1.1.9] 1F SMIM-FarmhouseFlickeringFix.esp 20 SMIM-DragonbornTernFix.esp 21 SMIM-DungeonsCliffsIceSkirts.esp 22 FNISspells.esp 23 NoTint.esm 24 FISS.esp 25 Devious Deviants.esp 26 Havok Breast Physic.esp 27 Havok Breast Physic Dragonborn.esp 28 Havok Breast Physic Dawnguard.esp 29 StrapOnbyaeonv1.1.esp 2A EC Clothes.esp 2B Ursine Armor Pack.esp 2C Sotteta Huntress Armor.esp 2D Sotteta Necromancer Outfit.esp 2E WildHuntress.esp 2F Tembtra Thief Armor.esp 30 Merta Black Rose Armor.esp 31 Merta Assassin Armor.esp 32 EliteRogueArmour.esp 33 AncientDraugr.esp 34 CharmingHighHeels.esp 35 MashupUNP.esp 36 FollowerDistanceTest.esp 37 Weapons & Armor Fixes_Remade.esp 38 Weapons & Armor_TrueOrcishWeapons.esp 39 Weapons & Armor_FasterArrows.esp 3A Weapons & Armor_DragonPriestMasks.esp 3B Clothing & Clutter Fixes.esp 3C Complete Crafting Overhaul_Remade.esp 3D AlternativeCraftingSystem.esp 3E SkyUI.esp 3F SkyTweak.esp 40 SkyrimSpeeds.esp 41 UIExtensions.esp 42 TradeBarter.esp 43 Blacksmith Chests.esp 44 Populated Cities Towns Villages.esp 45 Immersive Followers.esp 46 High Level Enemies.esp 47 High Level Enemies - Dawnguard.esp 48 High Level Enemies - Dragonborn.esp 49 High Level Enemies - Raised Ability Caps.esp 4A Feminine Females.esp 4B Brawl Bugs CE.esp 4C UnreadBooksGlow.esp [Version 2.2.0] 4D Auto Unequip Ammo.esp 4E Auto Unequip Helmet.esp 4F AutoPV.esp 50 Smelter_Riften & Solitude.esp 51 ImprovedHearthfireLighting.esp 52 Skyrim Shadow Striping Fix.esp [Version 2.1] 53 Remove Interior Fog V2 - Full Version.esp 54 LPSleep.esp 55 Alternate Start - Live Another Life.esp [Version 3.0.4] 56 BetterQuestObjectives.esp [Version 1.5.4] 57 BetterQuestObjectives-DBForevertoMisc.esp 58 BetterQuestObjectives-AlternateStartPatch.esp 59 NotSoFast-MainQuest.esp 5A Better Stealth AI for Followers.esp [Version 3.4] 5B Better Favor Jobs.esp 5C daymoyl_DawnguardAddon.esp 5D da_alternate_start_extension.esp 5E mjhReducedGoldRewards.esp 5F LFGCustom.esp 60 Run For Your Lives.esp [Version 2.0.5] 61 Cidhna Mine Expanded.esp 62 Devious Cidhna.esp 63 Immersive Horses.esp 64 RaceMenu.esp 65 RaceMenuPlugin.esp 66 RaceMenuOverlays.esp 67 RaceMenuPantyhose.esp 68 RaceMenuMorphsUUNP.esp 69 XPMSE.esp 6A Improved Freckles Skyrim.esp 6B lovelyhairstylesce.esp 6C LovelyHairstylesLITE.esp 6D VioLens.esp [Version 2.1] 6E NonSexLabAnimationPack.esp 6F Cloaks.esp 70 Cloaks - Dawnguard.esp 71 No Axe or Pickaxe required.esp 72 Chesko_WearableLantern.esp 73 Remodeled Armor - Vanilla Replacer.esp 74 Remodeled Armor - Vanilla Replacer - Dawnguard.esp 75 Remodeled Armor - Vanilla Replacer - Dragonborn.esp 76 SexLab Eager NPCs.esp 77 Schlongs of Skyrim.esp 78 SOS - Smurf Average Addon.esp 79 SOS - VectorPlexus Muscular Addon.esp 7A SOS - VectorPlexus Regular Addon.esp 7B SOS - Carloss32 Horse Addon.esp 7C SOS - Leito Addon.esp 7D SOSRaceMenu.esp 7E SSLToys.esp 7F SexLab_Solutions.esp 80 SexLabSkoomaWhore.esp 81 xazPrisonOverhaul.esp 82 SexLab_Solutions_PO_Patch.esp 83 TemptressVixen.esp 84 SexLab-AmorousAdventures.esp 85 SexLab-AmorousAdventures-ArousalTriggers.esp 86 dD-No Spinning Death Animation Merged.esp 87 dD - Enhanced Blood Main.esp 88 dD-Dragonborn-Dawnguard-EBT Patch.esp 89 dD-Reduced Splatter Size.esp 8A ShowersInInns.esp 8B Bathing in Skyrim - Main.esp 8C iNeed.esp 8D iNeed - Dangerous Diseases.esp 8E BeeingFemaleBasicAddOn.esp 8F adcSexlife.esp 90 SexLabDangerousNights2.esp 91 SexLab TDF Aggressive Prostitution.esp 92 sexlab_WearAndTear.esp 93 SexLab Cumshot.esp [Version 1.6] 94 sr_FillHerUp.esp 95 SexLab Romance.esp 96 LoversComfort.esp 97 MF_SpectatorCrowds.esp 98 SexLab STDs.esp 99 SexLabDefeat.esp 9A SexLab Aroused Creatures.esp 9B MoreNastyCritters.esp 9C SexLabNudeCreatures.esp 9D SexLabNudeCreaturesDG.esp 9E SexLabNudeCreaturesDB.esp 9F SexLabWerewolves.esp A0 SexLabWerewolvesMB.esp A1 xazPrisonOverhaul - Patch.esp A2 Immersive Citizens - AI Overhaul.esp A3 Morwen.esp A4 mjollfacelift-v4-1-Blonde.esp A5 Jenassa Makeover.esp A6 Ysolda.esp A7 LydiaPrettyFace.esp A8 AelaSylvanMK.esp A9 Working Dog.esp AA Dual Sheath Redux.esp AB Dual Sheath Redux Patch.esp AC EFFDialogue.esp AD BetterQuestObjectives-EFFPatch.esp AE Throthgar Follower.esp AF xMiscFixes.esp B0 SmeltersNavMesh.esp B1 CFireCCOPatch.esp ++ Remodeled-SOS-Patch.esp ++ SOS - no underwear for beast races.esp ++ Unlimited Jewelry For Dawngurad & Dragonborn.esp ++ Weapons & Armor_TrueWeaponsLvlLists.esp ++ Complete Crafting_TrueWeaponsLvlLists.esp B2 Bashed Patch, 0.esp B3 Elephant'sScriptLatencyTester.esp StorageutilCrash2.7z
Ashal Posted September 1, 2015 Author Posted September 1, 2015 Reinstalled and loaded the test save that just crashed (the last set of logs), and it loaded ok. Played through the quest to get the silverblood mercenaries to leave that mine (used SL Solutions) then saved at the exit of the mine. Trying to load that save after restarting the game resulted in a crash, logs attached. The Storageutil.dll I am using is 827kb, if that is any help. Load Order: 00 Skyrim.esm 01 Update.esm 02 Unofficial Skyrim Patch.esp [Version 2.1.3] 03 Dawnguard.esm 04 Unofficial Dawnguard Patch.esp [Version 2.1.3] 05 HearthFires.esm 06 Unofficial Hearthfire Patch.esp [Version 2.1.3] 07 Dragonborn.esm 08 Unofficial Dragonborn Patch.esp [Version 2.1.3] 09 Skyrim Project Optimization - Full Version.esm 0A Campfire.esm 0B Havok Breast Physic.esm 0C hdtHighHeel.esm 0D ApachiiHair.esm 0E ApachiiHairFemales.esm 0F AzarHair.esm 10 EFFCore.esm 11 daymoyl.esm 12 SexLab.esm [Version 1.59b] 13 SexLabAroused.esm 14 CreatureFramework.esm [Version 1.0.0] 15 ZaZAnimationPack.esm 16 Devious Devices - Assets.esm [Version 2.8.3] 17 Schlongs of Skyrim - Core.esm 18 BeeingFemale.esm [Version 2.4] 19 Devious Devices - Integration.esm 1A Devious Devices - Expansion.esm 1B HighResTexturePack01.esp 1C HighResTexturePack02.esp 1D HighResTexturePack03.esp 1E Unofficial High Resolution Patch.esp [Version 1.1.9] 1F SMIM-FarmhouseFlickeringFix.esp 20 SMIM-DragonbornTernFix.esp 21 SMIM-DungeonsCliffsIceSkirts.esp 22 FNISspells.esp 23 NoTint.esm 24 FISS.esp 25 Devious Deviants.esp 26 Havok Breast Physic.esp 27 Havok Breast Physic Dragonborn.esp 28 Havok Breast Physic Dawnguard.esp 29 StrapOnbyaeonv1.1.esp 2A EC Clothes.esp 2B Ursine Armor Pack.esp 2C Sotteta Huntress Armor.esp 2D Sotteta Necromancer Outfit.esp 2E WildHuntress.esp 2F Tembtra Thief Armor.esp 30 Merta Black Rose Armor.esp 31 Merta Assassin Armor.esp 32 EliteRogueArmour.esp 33 AncientDraugr.esp 34 CharmingHighHeels.esp 35 MashupUNP.esp 36 FollowerDistanceTest.esp 37 Weapons & Armor Fixes_Remade.esp 38 Weapons & Armor_TrueOrcishWeapons.esp 39 Weapons & Armor_FasterArrows.esp 3A Weapons & Armor_DragonPriestMasks.esp 3B Clothing & Clutter Fixes.esp 3C Complete Crafting Overhaul_Remade.esp 3D AlternativeCraftingSystem.esp 3E SkyUI.esp 3F SkyTweak.esp 40 SkyrimSpeeds.esp 41 UIExtensions.esp 42 TradeBarter.esp 43 Blacksmith Chests.esp 44 Populated Cities Towns Villages.esp 45 Immersive Followers.esp 46 High Level Enemies.esp 47 High Level Enemies - Dawnguard.esp 48 High Level Enemies - Dragonborn.esp 49 High Level Enemies - Raised Ability Caps.esp 4A Feminine Females.esp 4B Brawl Bugs CE.esp 4C UnreadBooksGlow.esp [Version 2.2.0] 4D Auto Unequip Ammo.esp 4E Auto Unequip Helmet.esp 4F AutoPV.esp 50 Smelter_Riften & Solitude.esp 51 ImprovedHearthfireLighting.esp 52 Skyrim Shadow Striping Fix.esp [Version 2.1] 53 Remove Interior Fog V2 - Full Version.esp 54 LPSleep.esp 55 Alternate Start - Live Another Life.esp [Version 3.0.4] 56 BetterQuestObjectives.esp [Version 1.5.4] 57 BetterQuestObjectives-DBForevertoMisc.esp 58 BetterQuestObjectives-AlternateStartPatch.esp 59 NotSoFast-MainQuest.esp 5A Better Stealth AI for Followers.esp [Version 3.4] 5B Better Favor Jobs.esp 5C daymoyl_DawnguardAddon.esp 5D da_alternate_start_extension.esp 5E mjhReducedGoldRewards.esp 5F LFGCustom.esp 60 Run For Your Lives.esp [Version 2.0.5] 61 Cidhna Mine Expanded.esp 62 Devious Cidhna.esp 63 Immersive Horses.esp 64 RaceMenu.esp 65 RaceMenuPlugin.esp 66 RaceMenuOverlays.esp 67 RaceMenuPantyhose.esp 68 RaceMenuMorphsUUNP.esp 69 XPMSE.esp 6A Improved Freckles Skyrim.esp 6B lovelyhairstylesce.esp 6C LovelyHairstylesLITE.esp 6D VioLens.esp [Version 2.1] 6E NonSexLabAnimationPack.esp 6F Cloaks.esp 70 Cloaks - Dawnguard.esp 71 No Axe or Pickaxe required.esp 72 Chesko_WearableLantern.esp 73 Remodeled Armor - Vanilla Replacer.esp 74 Remodeled Armor - Vanilla Replacer - Dawnguard.esp 75 Remodeled Armor - Vanilla Replacer - Dragonborn.esp 76 SexLab Eager NPCs.esp 77 Schlongs of Skyrim.esp 78 SOS - Smurf Average Addon.esp 79 SOS - VectorPlexus Muscular Addon.esp 7A SOS - VectorPlexus Regular Addon.esp 7B SOS - Carloss32 Horse Addon.esp 7C SOS - Leito Addon.esp 7D SOSRaceMenu.esp 7E SSLToys.esp 7F SexLab_Solutions.esp 80 SexLabSkoomaWhore.esp 81 xazPrisonOverhaul.esp 82 SexLab_Solutions_PO_Patch.esp 83 TemptressVixen.esp 84 SexLab-AmorousAdventures.esp 85 SexLab-AmorousAdventures-ArousalTriggers.esp 86 dD-No Spinning Death Animation Merged.esp 87 dD - Enhanced Blood Main.esp 88 dD-Dragonborn-Dawnguard-EBT Patch.esp 89 dD-Reduced Splatter Size.esp 8A ShowersInInns.esp 8B Bathing in Skyrim - Main.esp 8C iNeed.esp 8D iNeed - Dangerous Diseases.esp 8E BeeingFemaleBasicAddOn.esp 8F adcSexlife.esp 90 SexLabDangerousNights2.esp 91 SexLab TDF Aggressive Prostitution.esp 92 sexlab_WearAndTear.esp 93 SexLab Cumshot.esp [Version 1.6] 94 sr_FillHerUp.esp 95 SexLab Romance.esp 96 LoversComfort.esp 97 MF_SpectatorCrowds.esp 98 SexLab STDs.esp 99 SexLabDefeat.esp 9A SexLab Aroused Creatures.esp 9B MoreNastyCritters.esp 9C SexLabNudeCreatures.esp 9D SexLabNudeCreaturesDG.esp 9E SexLabNudeCreaturesDB.esp 9F SexLabWerewolves.esp A0 SexLabWerewolvesMB.esp A1 xazPrisonOverhaul - Patch.esp A2 Immersive Citizens - AI Overhaul.esp A3 Morwen.esp A4 mjollfacelift-v4-1-Blonde.esp A5 Jenassa Makeover.esp A6 Ysolda.esp A7 LydiaPrettyFace.esp A8 AelaSylvanMK.esp A9 Working Dog.esp AA Dual Sheath Redux.esp AB Dual Sheath Redux Patch.esp AC EFFDialogue.esp AD BetterQuestObjectives-EFFPatch.esp AE Throthgar Follower.esp AF xMiscFixes.esp B0 SmeltersNavMesh.esp B1 CFireCCOPatch.esp ++ Remodeled-SOS-Patch.esp ++ SOS - no underwear for beast races.esp ++ Unlimited Jewelry For Dawngurad & Dragonborn.esp ++ Weapons & Armor_TrueWeaponsLvlLists.esp ++ Complete Crafting_TrueWeaponsLvlLists.esp B2 Bashed Patch, 0.esp B3 Elephant'sScriptLatencyTester.esp StorageutilCrash2.7z I might see where the issue would occur now, here's a possibly fixed version: v31_prerelease.zip Overwrite your install of 3.0 with it and try again. Whether it works or not post your PapyrusUtilDev.log again afterwards, as I set it to print out a little bit more relevant information for debugging purposes.
Whacked Posted September 1, 2015 Posted September 1, 2015 I might see where the issue would occur now, here's a possibly fixed version: v31_prerelease.zipOverwrite your install of 3.0 with it and try again. Whether it works or not post your PapyrusUtilDev.log again afterwards, as I set it to print out a little bit more relevant information for debugging purposes. Tested it a few times and it seems to be loading alright with the one you uploaded. PapyrusUtilDev.log
Ashal Posted September 1, 2015 Author Posted September 1, 2015 And your log confirms what I expected. Will go ahead with releasing 3.1 and sexlab update now then. Thanks.
Whacked Posted September 1, 2015 Posted September 1, 2015 And your log confirms what I expected. Will go ahead with releasing 3.1 and sexlab update now then. Thanks. Great, glad to help, and glad to be able to load my saves again!
zaira Posted September 2, 2015 Posted September 2, 2015 Feature request for JsonUtils: string[] function GetFileList(string path) global native Background - for my Bob The Builder engine (persistent user cell edits) I store one construction plan per cell in a special sub folder of StorageUtilData. During startup I collect all construction plan filenames (filename contains cell identifier). Whenever a user enters a cell I check if there is a construction plan filename - and process the construction plan and remove the filename from the filename list. Currently I have to store the filename list in an extra file but it is error prone because I have to keep this list and the files in sync. The returned strings should contain the name that can be used in this way: JsonUtil.GetStringValue(path + filename[0],"NameOfValue")
Ashal Posted September 2, 2015 Author Posted September 2, 2015 a "file list" or a "json list"? Actually nevermind that, why not both?
zaira Posted September 2, 2015 Posted September 2, 2015 A list of json filenames without file extension and without prefix path that was given in the function call. prefix path is always relative to StorageUtilData string[] planfilenames = JsonUtil.GetFiles("ConstructionPlans") int i = planfilenames.Length while i>0 i -= 1 string valueFromPlan = JsonUtil.GetStringValue("ConstructionPlans/" + planfilenames[i] , "Key") endwhile
zaira Posted September 5, 2015 Posted September 5, 2015 Is the source code of PapyrusUtils available anywhere? I might be able to provide a patch for the GetFiles function...
Guest Posted September 5, 2015 Posted September 5, 2015 The "GetFiles" function you are proposing looks to me like a search function for the file system. At this point, if Ashal does it exactly as you describe, then you may get fines from others mods too. Two options (if Ashal decides to do something for this): * Use a simple pattern matching technique: string[] result = JsonUtil.GetFiles("ConstructionPlan*") this should return all the file, including the sub-path, for something that starts with "ConstructionPlan". Only one wildcard acceptable to minimize the complexity of the pattern matching. * Change the function to "GetFilesInFolder(String folderName)", and then use for sure sub-folderds, of just one level, where you get everything inside.
zaira Posted September 5, 2015 Posted September 5, 2015 I looked at SKSE wiki - it seems it is not possible to return arrays (https://github.com/xanderdunn/skaar/wiki/Registering-Functions) - so it must be done with StorageUtil arrays. Too bad - I need this function very much and tried to add it to my own SKSE plugin...
b3lisario Posted September 5, 2015 Posted September 5, 2015 I looked at SKSE wiki - it seems it is not possible to return arrays (https://github.com/xanderdunn/skaar/wiki/Registering-Functions) - so it must be done with StorageUtil arrays. Too bad - I need this function very much and tried to add it to my own SKSE plugin...Yes you can return arrays. VMResultArray<BSFixedString> foo(StaticFunctionTag*){ VMResultArray<BSFixedString> list; list.resize(2, 0); list[0] = BSFixedString("hello"); list[1] = BSFixedString("world"); return list; }
zaira Posted September 5, 2015 Posted September 5, 2015 I looked at SKSE wiki - it seems it is not possible to return arrays (https://github.com/xanderdunn/skaar/wiki/Registering-Functions) - so it must be done with StorageUtil arrays. Too bad - I need this function very much and tried to add it to my own SKSE plugin...Yes you can return arrays. VMResultArray<BSFixedString> foo(StaticFunctionTag*){ VMResultArray<BSFixedString> list; list.resize(2, 0); list[0] = BSFixedString("hello"); list[1] = BSFixedString("world"); return list; } OMG thank you! So the wiki is outdated "Although it isn't possible to return an array from an SKSE function that's exported to Papyrus"
Ashal Posted September 6, 2015 Author Posted September 6, 2015 Is the source code of PapyrusUtils available anywhere? I might be able to provide a patch for the GetFiles function... There's an old copy of the source somewhere in this thread for like version 2.6 or something, but nothing recent. No recent version of it posted anywhere, mostly out of laziness but also a bit out of embarassment as this was my first foray into C++ and I'm not exactly proud of a lot of it's code as I've grown to learn it better. I can post the source if there's really enough demand for it. I do plan on rewriting a lot of the older code in it eventually though, and would gladly post the source then. I plan on adding the functions next release in any case, not that hard to make. I've also recently added these 2 functions, which are pretty different from most of the other functions in PapyrusUtil so far, and some people might find a lot of use in. Only done some light testing with them so far, and will definitely need to more thoroughly test them before releasing: ; // Get a list of all living actors within a distance of given object/actor's current cell, optionally also filter results by a provided keyword. Actor[] function ScanCellActors(ObjectReference CenterOn, float radius = 5000.0, Keyword HasKeyword = none) global native ; // Get a list of all objects of a given form type within a distance of given object/actors's current cell, optionally also filter results by a provided keyword. ObjectReference[] function ScanCellObjects(int formType, ObjectReference CenterOn, float radius = 5000.0, Keyword HasKeyword = none) global native Basically a function to help get a list of relevant actors or objects for processing. Could be used as a simple replacement for cloak effects and such, the downside being you'd lose the threaded nature of doing such stuff in a cloak effect or other such techniques. The "GetFiles" function you are proposing looks to me like a search function for the file system. At this point, if Ashal does it exactly as you describe, then you may get fines from others mods too. Two options (if Ashal decides to do something for this): * Use a simple pattern matching technique: string[] result = JsonUtil.GetFiles("ConstructionPlan*") this should return all the file, including the sub-path, for something that starts with "ConstructionPlan". Only one wildcard acceptable to minimize the complexity of the pattern matching. * Change the function to "GetFilesInFolder(String folderName)", and then use for sure sub-folderds, of just one level, where you get everything inside. It would take a a folder argument and an optional recursive switch, then JsonUtil version would limit the results to only .json files with the starting directory being the same as other files made using JsonUtil, then I'd also add another version in PapyrusUtil or MiscUtil that returns files by extension, and the starting directory be the root Data folder instead. Don't see any trouble with it, though I might also restrain it's searching so you can't look outside the Skyrim folder for security purposes.
zaira Posted September 6, 2015 Posted September 6, 2015 An actor search with keyword filter is not as useful as a faction filter - for example you can add a NPC per script into a faction but you cannot do this with keywords - for that you need an alias - so you can't assign a keyword to a large group. For other things like a spectator call I need a combination of keywords and factions (Exclude Guards, Childs, Innkeeper, Bards), Animals). Sometimes I need to include, sometimes I need to exclude things.
zaira Posted September 6, 2015 Posted September 6, 2015 I have implemented the Getfiles (thanks to b3lisario) in my MESKSEUtils plugin now - but I would prefer to see it in your utils package - I give you the source code, if you want. I added also a MoveFile function - because my Bob-The-Builder will move invalid or broken plans into a quarantine to speed up next startup time.
darkconsole Posted September 25, 2015 Posted September 25, 2015 about to make use of ClearFloatListPrefix(String PrefixKey)... but is is there an objected version that i am totally blind to see? FloatListClearPrefix(Form ObjKey, String PrefixKey) UnsetFloatValuePrefix(Form ObjKey, String Prefix) the global "all the things" versions are good and perfect and i already made use of that for "uninstall all the things" - but having it available to be scoped to specific forms would be pretty useful as well. i didn't notice these weren't a thing in any form until i started writing my ResetActor method. if there are no plans for this, i'm going to be looking at about a 50 lines of code to clear out the cosave data for specific forms upon player request.
Expired6978 Posted September 26, 2015 Posted September 26, 2015 I looked at SKSE wiki - it seems it is not possible to return arrays (https://github.com/xanderdunn/skaar/wiki/Registering-Functions) - so it must be done with StorageUtil arrays. Too bad - I need this function very much and tried to add it to my own SKSE plugin...Yes you can return arrays. VMResultArray<BSFixedString> foo(StaticFunctionTag*){ VMResultArray<BSFixedString> list; list.resize(2, 0); list[0] = BSFixedString("hello"); list[1] = BSFixedString("world"); return list; } OMG thank you! So the wiki is outdated "Although it isn't possible to return an array from an SKSE function that's exported to Papyrus" It wasn't possible at the time, it's possible now after I decoded what the game does with the "new x[y]" instruction. There were some odd special cases I had to account for, I tried to maintain the templating schema, it isn't perfect. The VMResultArray is essentially just an STL vector wrapper, when the implementation of your function is run, the virtual function of the NativeFunction will call your implementation, return a list, then create a VM array and copy your contents over (Packing) The problem with this implementation is your array is probably going to be copied 3 times. Once to populate it, once to copy it to the parent function from the return value, then again to move the contents into the actual VM type. Though I think the benefit of convenience and maintaining the template specs outweighs the lost instructions from multiple copies, nobody should really be creating arrays large enough for it to be a serious issue.
Ashal Posted January 5, 2016 Author Posted January 5, 2016 Uploaded v3.2, changelog: 3.2 - 01/04/2016 Many fixes for various CTD and performance issues JsonUtil New Functions: Unload() - Unloads a file from memory that has been used by JsonUtil, optionally saving changes first IsPendingSave() - Checks if the given Json file has been modified since it was last loaded/saved IsGood() - Checks if the given Json file is currently loaded or not and has no errors GetErrors() - Returns a formatted string of any Json parsing errors, if any JsonInFolder() - Returns an array of all Json files in a given directory. StorageUtil New Functions: CountObj<type>Prefix() - counts the number of keys that start with string on a specific object ClearObj<type>Prefix() - removes any values with keys that start with string on a specific object MiscUtil New Functions: FilesInFolder() - Returns an array of all files, or with a given extensions, contained in a folder. ScallCellActors() - Get an array of nearby actors in a cell matching criteria. ScanCellObjects() - Get an array of nearby objects of specific form type in a cell matching criteria. WriteToFile() - Readded after having removed in previous update. ReadFromFile() - Readded after having removed in previous update.
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