Nymra Posted June 14, 2019 Posted June 14, 2019 Simple as that: I reached a point in setting up my mod profiles that I cannot improve them anymore without changing mods myself (start modding myself). Basically I noticed, that all the mods we need are already there, but half of them are unfinished or have a single missing feature (or one too much) that make them bad. Sadly, I have zero talent and no knowlegde of programming/scripting and how to use the tools. So I m screwed I even had scripts provided but I failed to compile them with Creation Kit .aaaah... What I need is someone that is willing to fullfill some of my wishes by changing scripts of mods or enhance them/change them. I am also willing to do something in return if I can or, should it be necessary, even pay money for that (we can talk about that in PM. I am not rich, just as a warning lol). Yeah, I am that desperate I can also provide my skills in layouts, photo editing if need be.... Stuff that I desperatly need at the moment: - Changing the Naked Dungeons Immortality feature (basically a built in combat defeat) to allow creature group animations - add a difficulty feature to the "struggle free from furniture" feature of Naked Dungeons - Adding a function to SexLabUtil1 that allows unequipping of a certain body slot (i have already a script source provided by a nice modder from LL, but I am unable to compile it). - prevent Deviously Helpless from equipping an armbinder after rape If the we both agree on that, the changes can also be released in the respective mod threads to improve those mods for everybody.
Verstort Posted June 14, 2019 Posted June 14, 2019 Can you specify how/why your compile attempts in CK fail? Can you post the errors you get? I personally don't compile through CK at all anymore, because one day it just stopped working (I think it's a mod organizer fault, and it was a good excuse to switch) so I switched to calling the compiler (which is a separate program outside of CK that you can call directly) through a bat script, which I can then call through notepad++. Not having to open CK, then navigate CK's awful script compile interface, instead compiling with a keybinding in notepad was a huge boost, although it took time to setup. The bat script exists because the compiler program is dumb, and needs to be told where everything is to compile anything. At minimum, it needs to know where the language flag file is, where the script file you want to compile is, and where the PEX you are compiling should be placed once it's done. If you have Mod organizer, or something similar that merges mods into a virtual directory when running the game, then you need to tell the compiler where specific mod source files are located, assuming you compile a script with dependencies, the compiler will need to find source files for those dependencies, so the bat keeps track of that too.compile_with_sources_local.bat and then setup notepad++ to run the script with a keybinding based on this guide: https://www.creationkit.com/index.php?title=Notepad%2B%2B_Setup I can compile that one script of yours that someone else provided for removing clothes pretty easily at least, I haven't seen the code for the other mods yet.
Nymra Posted June 14, 2019 Author Posted June 14, 2019 1 hour ago, Verstort said: I can compile that one script of yours that someone else provided for removing clothes pretty easily at least, I haven't seen the code for the other mods yet. 1. This is the code part that was kindly provided by Hawk9969. I then tried like for a week to compile anything and read all the shit about the stuff but gave up because I had other things to do. Basically I hoped to learn something that I can use in the future for other stuff, but I think I have to start way smaller The idea is to have a cmd that can be used inside of SexlabUtil1s MCM Menu to make the mod unequip a certain item slot (primary concern: body, feet, hands, head) while ideally I would wish to have all item slots covered. From what I understand in the code, this should be possible by chosing the item slot number in the command line in the ini file ([Main] etc.), so this would be like the perfect heaven. (the problem at the moment with sexlabutil1 strip function is, that it is basically tied to a certain single item. So any time I change the PC outfit I have to change all the ini files, too). The goal is to have a dynamic partial stripping system for sexlab that has a different outcome each time and also strips stuff before, during and after sex scenes. On 4/8/2019 at 4:35 PM, Hawk9969 said: ElseIf theCode == "unequipslot" Int slot = ExtraTools.StrGetToken(pos, _cmd, ":") as Int slot = PapyrusUtil.ClampInt(slot, 0, 33) Int equipSlot If slot < 32 theForm = aCaster.GetWornForm(Armor.GetMaskForSlot(slot + 30)) equipSlot = 0 Else theForm = aCaster.GetEquippedWeapon(slot - 32) equipSlot = slot - 31 EndIf If theForm aCaster.UnequipItemEx(theForm, equipSlot, False) aCaster.QueueNiNodeUpdate() EndIf Add this to SexLabUtil1Cmd.psc on function _playCmd just below the code block for unequip and recompile SexLabUtil1Cmd.psc. Use the command unequipslot:<slot>. Ex: [Main] Name=Unequip Slot 15 Page=0 Type=cmd Id=485757 Cmd=unequipslot:15 Slot 32 is the right hand weapon and slot 33 is the left hand weapon. Or you can just use this mod to manually strip your characters as you deem necessary. Much better than having to rely on slots, as some items equip to completely different slots. Quote Can you specify how/why your compile attempts in CK fail? Do you get specific errors? I did not save the last error output because it went all in circles around me. I thought I had progress but then suddenly errors showed up that I thought were gone. I admit I did not really find a guide that I fully understood for compiling through Mod Organizer (which seems to be an extra barrier for me there, because more stuff has to be considered). Quote I personally don't compile through CK at all anymore, Hide contents because one day it just stopped working (I think it's a mod organizer fault, and it was a good excuse to switch) so I switched to calling the compiler (which is a separate program outside of CK that you can call directly) through a bat script, which I can then call through notepad++. Not having to open CK, then navigate CK's awful script compile interface, instead compiling with a keybinding in notepad was a huge boost, although it took time to setup. The bat script exists because the compiler program is dumb, and needs to be told where everything is to compile anything. At minimum, it needs to know where the language flag file is, where the script file you want to compile is, and where the PEX you are compiling should be placed once it's done. If you have Mod organizer, or something similar that merges mods into a virtual directory when running the game, then you need to tell the compiler where specific mod source files are located, assuming you compile a script with dependencies, the compiler will need to find source files for those dependencies, so the bat keeps track of that too.compile_with_sources_local.bat and then setup notepad++ to run the script with a keybinding based on this guide: https://www.creationkit.com/index.php?title=Notepad%2B%2B_Setup this sounds at least promising Something that I can pick up and try for myself. I am currently looking for a good way to introduce myself to mod making and maybe learn the important stuff bit by bit. I was kinda hoping that with some basic knowlegde I could start adopting mods and improve/continue them... Quote I haven't seen the code for the other mods yet. I was hoping that at least the creature group part could be fixed via Test5edit. But I do not understand enough of the structure to even identify the parts that are necessary. So my guess is, that it is hidden in the depths of the scripts.
ryp12345 Posted June 14, 2019 Posted June 14, 2019 1 hour ago, Verstort said: Can you specify how/why your compile attempts in CK fail? Can you post the errors you get? I personally don't compile through CK at all anymore, Reveal hidden contents because one day it just stopped working (I think it's a mod organizer fault, and it was a good excuse to switch) so I switched to calling the compiler (which is a separate program outside of CK that you can call directly) through a bat script, which I can then call through notepad++. Not having to open CK, then navigate CK's awful script compile interface, instead compiling with a keybinding in notepad was a huge boost, although it took time to setup. The bat script exists because the compiler program is dumb, and needs to be told where everything is to compile anything. At minimum, it needs to know where the language flag file is, where the script file you want to compile is, and where the PEX you are compiling should be placed once it's done. If you have Mod organizer, or something similar that merges mods into a virtual directory when running the game, then you need to tell the compiler where specific mod source files are located, assuming you compile a script with dependencies, the compiler will need to find source files for those dependencies, so the bat keeps track of that too.compile_with_sources_local.bat and then setup notepad++ to run the script with a keybinding based on this guide: https://www.creationkit.com/index.php?title=Notepad%2B%2B_Setup I can compile that one script of yours that someone else provided for removing clothes pretty easily at least, I haven't seen the code for the other mods yet. Don't mean to hijack, but could you help me out with these errors i got when using your bat? I was trying to compile something from Sexlab Aroused Creatures. Please see attached error log. compiler error log.txt
abbrewiatura Posted June 14, 2019 Posted June 14, 2019 Nymra I'm sorry. but I think you dropped a mod on my Breasts with hardening nipples the other day. Just at this moment there was a voltage drop and the file was corrupted. If it's not too much trouble, could you resend the link to it?
Verstort Posted June 14, 2019 Posted June 14, 2019 3 hours ago, ryp12345 said: Don't mean to hijack, but could you help me out with these errors i got when using your bat? I was trying to compile something from Sexlab Aroused Creatures. Please see attached error log. compiler error log.txt 93.81 kB · 0 downloads Quote AddMenuOption is not a function or does not exist AddToggleOption is not a function or does not exist AddSliderOption is not a function or does not exist Those look like MCM functions, and the compiler doesn't understand/know them. My bet is the compiler cannot find the script source files for the MCM menu, which come as part of SKYUI. Looking at the SKYUI download on Nexus, the source files are locked away in a BSA file, where the compiler cannot find them. You need to use a program like BSAOpt (https://www.nexusmods.com/skyrim/mods/247/) to uncompress the files into script/source before the compiler can find them. Edit: Oh if you used my bat and got that, it might be that the SkyUI pointer is pointed at the wrong directory too, make sure line 34 the one with "Set SkyUI" is pointed at the correct directory of the source files, not just the mod directory
Nymra Posted June 14, 2019 Author Posted June 14, 2019 2 hours ago, abbrewiatura said: Nymra I'm sorry. but I think you dropped a mod on my Breasts with hardening nipples the other day. Just at this moment there was a voltage drop and the file was corrupted. If it's not too much trouble, could you resend the link to it? I think you are talking to the wrong person I only know of the nipple mod from Monoman but that one was mentioned already in your own topic? 2 hours ago, ryp12345 said: Don't mean to hijack, but could you help me out with these errors i got when using your bat? I was trying to compile something from Sexlab Aroused Creatures. Please see attached error log. compiler error log.txt 93.81 kB · 1 download yeah, go on In the end this is about scripting and the experience with the BSA archives was the first of the problems I had to adress when I started to try that stuff. 11 minutes ago, Verstort said: I ve sent you a PM with more details if you need. If something is unclear, just ask. If it would take too much time and trouble, just tell me also please, then I can stop bothering people with it 0
Verstort Posted June 14, 2019 Posted June 14, 2019 3 hours ago, Nymra said: 1. This is the code part that was kindly provided by Hawk9969. I then tried like for a week to compile anything and read all the shit about the stuff but gave up because I had other things to do. Basically I hoped to learn something that I can use in the future for other stuff, but I think I have to start way smaller The idea is to have a cmd that can be used inside of SexlabUtil1s MCM Menu to make the mod unequip a certain item slot (primary concern: body, feet, hands, head) while ideally I would wish to have all item slots covered. From what I understand in the code, this should be possible by choosing the item slot number in the command line in the ini file ([Main] etc.), so this would be like the perfect heaven. (the problem at the moment with sexlabutil1 strip function is, that it is basically tied to a certain single item. So any time I change the PC outfit I have to change all the ini files, too). The goal is to have a dynamic partial stripping system for sexlab that has a different outcome each time and also strips stuff before, during and after sex scenes. On 4/8/2019 at 7:35 AM, Hawk9969 said: ElseIf theCode == "unequipslot" Int slot = ExtraTools.StrGetToken(pos, _cmd, ":") as Int slot = PapyrusUtil.ClampInt(slot, 0, 33) Int equipSlot If slot < 32 theForm = aCaster.GetWornForm(Armor.GetMaskForSlot(slot + 30)) equipSlot = 0 Else theForm = aCaster.GetEquippedWeapon(slot - 32) equipSlot = slot - 31 EndIf If theForm aCaster.UnequipItemEx(theForm, equipSlot, False) aCaster.QueueNiNodeUpdate() EndIf Add this to SexLabUtil1Cmd.psc on function _playCmd just below the code block for unequip and recompile SexLabUtil1Cmd.psc. Use the command unequipslot:<slot>. Ex: [Main] Name=Unequip Slot 15 Page=0 Type=cmd Id=485757 Cmd=unequipslot:15 Slot 32 is the right hand weapon and slot 33 is the left hand weapon. Or you can just use this mod to manually strip your characters as you deem necessary. Much better than having to rely on slots, as some items equip to completely different slots. Not sure I understand what you want from this mod, but attempting to compile got me some unicode errors: Quote no viable alternative at character 'ï' no viable alternative at character '»' no viable alternative at character '¿' At this line: Endif Which suggested some character encoding glitch, maybe from the keyboard or operating system of the person who wrote that code, maybe the server stored something funny, but I rewrote it and those went away. Got a re-used symbol error, so renamed it to something else (int equipSlot) and it compiled for me (don't know if it actually works mind you): SexlabUtil1_17.7z
Nymra Posted June 15, 2019 Author Posted June 15, 2019 12 minutes ago, Verstort said: Not sure I understand what you want from this mod, but attempting to compile got me some unicode errors: At this line: Endif Which suggested some character encoding glitch, maybe from the keyboard or operating system of the person who wrote that code, maybe the server stored something funny, but I rewrote it and those went away. Got a re-used symbol error, so renamed it to something else (int equipSlot) and it compiled for me (don't know if it actually works mind you): SexlabUtil1_17.7z 92.77 kB · 0 downloads ❤️ Will test it right away and report back.
Nymra Posted June 15, 2019 Author Posted June 15, 2019 1 hour ago, Verstort said: Not sure I understand what you want from this mod, but attempting to compile got me some unicode errors: At this line: Endif Which suggested some character encoding glitch, maybe from the keyboard or operating system of the person who wrote that code, maybe the server stored something funny, but I rewrote it and those went away. Got a re-used symbol error, so renamed it to something else (int equipSlot) and it compiled for me (don't know if it actually works mind you): SexlabUtil1_17.7z 92.77 kB · 0 downloads Sooo, nothing seems to be ever easy o_O I just tested it with Hands, feet, body and... it did not work. Kind of... Because strange enough the cmds ran (the mod has a debug that shows the code that is used) and the unequip sounds was there three times, too lol But no stripping Also no bug report in the console. If I got an item wrong in the past it said "bla bla not found", hmm... 9
Verstort Posted June 15, 2019 Posted June 15, 2019 24 minutes ago, Nymra said: Sooo, nothing seems to be ever easy o_O I just tested it with Hands, feet, body and... it did not work. Kind of... Because strange enough the cmds ran (the mod has a debug that shows the code that is used) and the unequip sounds was there three times, too lol But no stripping Also no bug report in the console. If I got an item wrong in the past it said "bla bla not found", hmm... 9 still not sure what is actually going on with this mod, but here's added debug if the form is none for more info to help you figure it out. I have SexlabUtil1 unequipslot try 2.7z
Nymra Posted June 15, 2019 Author Posted June 15, 2019 10 hours ago, Verstort said: still not sure what is actually going on with this mod, but here's added debug if the form is none for more info to help you figure it out. I have SexlabUtil1 unequipslot try 2.7z 92.92 kB · 1 download I m at work now and be back sunday evening for more testing. Thank you so much so far
Nymra Posted June 18, 2019 Author Posted June 18, 2019 On 6/15/2019 at 3:38 AM, Verstort said: Debug said the following: Error: slot:33 not found(form:NONE), eslot:2
Verstort Posted June 18, 2019 Posted June 18, 2019 I wasn't paying attention when I compiled that code or added debug... but according to DD's slot reference, the player's available body slots range from 30 to 61. Why does that code take a 31-61 range number and shrink it to lower than 30? Shouldn't it be the other way around, taking a 0-29 number and boosting it to the 31-61 range? Looks like <30 is the invalid number range here. At least I'm assuming you wanted to strip slot 33, which is the hands/gloves slot, since slot 2 is unknown. Should be an easy change, just swap the code(271:278) to this: If slot >= 30 eSlot = slot theForm = aCaster.GetWornForm(Armor.GetMaskForSlot(eSlot)) else ; "There are only two weapon slots, but the function to get" ; "the weapons doesn't accept slots, it accepts a boolean," ; "where if the bool is true, it gets the offhand weapon" eSlot = slot ; "not sure what your script input is here, are you starting at " ; "zero or one for the first weapon slot? " ; "slot >= 2 is an expression, it gets evaluated into a boolean before the function" ; "is slot greater or equal to 2? TRUE or FALSE which gets passed to the function" ; "PS this doesn't unequip spells, you need actor.GetEquippedSpell(bool offHand)" theForm = aCaster.GetEquippedWeapon(eSlot >= 2) EndIf Edit: You can remove items once you have the form, you don't need to use UnequipItemEx Except for DD items, which has a different procedure for removing items, so assuming you might want to remove DD items... change this code: If theForm aCaster.UnequipItemEx(theForm, eSlot, False) aCaster.QueueNiNodeUpdate() else ; print out endif into ; "This code was untested, hand written for example" ; "we need zadLibs to remove DD safely, lets try loading as a soft dependency for now" ; " WARNING: this is sometimes compiles into a hard dependency, reasons unknown" ; "if that happens, you should make a sacrificial quest script and put the code there" ; "then, test if the mod exists here with bool is = Game.GetQuest("zadLibs") != NONE " zadLibs libs = (Game.GetQuest("zadLibs") as zadLibs) if theForm && zadLibs && theForm.HasKeyword(zadLibs.zad_BlockGeneric) ; "This is a DD item that is blocked, we should NOT remove it" ; "Nothing doing" MiscUtil.PrintConsole("Error: armor: [" + theForm + "] has a BlockGeneric keyword, cannot remove safely") elseif theForm && zadLibs && theForm.HasKeyword(zadLibs.zad_InventoryDevice) ; "This is a DD item, we do a different song and dance to remove safely" keyword kwd = libs.GetDeviceKeyword(theForm) armor rndrd = libs.GetRenderedDevice(theForm) libs.removeDevice(aCaster, theForm, rndrd, kwd) elseif theForm ; "This item is not DD, just remove it" aCaster.UnequipItem(theForm, true, true) ;aCaster.UnEquipItemSlot(slot) ; "probably won't work for weapons" else ; "there was no item here, print debug" MiscUtil.PrintConsole("Error: slot:" + slot + " not found, eslot:" + eSlot) endif I've never used this before... not sure if that's my bad and I've been doing things wrong for a long time but I don't think it's needed. Quote aCaster.QueueNiNodeUpdate() Edit2: wait what the fuck is this slot = PapyrusUtil.ClampInt(slot, 0, 33) This fucks with everything, squashing our slot into a 0-33 number, by taking any 34-61 number and making it a meaningless 33. Get rid of it.
Guest Posted June 18, 2019 Posted June 18, 2019 Seems like neither of you understood what my code does and how, so here is the explanation. Yes, the armor slots range from 30 to 61, which if you look at this line: theForm = aCaster.GetWornForm(Armor.GetMaskForSlot(slot + 30)) It corrects the slot for you. So instead of starting at 30, you start at 0. Just how SexLab does it 3 hours ago, Verstort said: This fucks with everything, squashing our slot into a 0-33 number, by taking any 34-61 number and making it a meaningless 33. Get rid of it. The clamp is in place to prevent whoever writes the ini from underflowing or overflowing the slot id. Cmd=unequipslot:-1 ; Underflow Cmd=unequipslot:34 ; Overflow You simply didn't understand how the code already corrects for the proper slot id. Cmd=unequipslot:0 ; Slot 30 Cmd=unequipslot:31 ; Slot 61 Cmd=unequipslot:32 ; Right hand weapon Cmd=unequipslot:33 ; Left hand weapon In your code: aCaster.UnequipItem(theForm, true, true) This is wrong, as it will prevent the actor from ever equipping that again on its own. EDIT: aCaster.QueueNiNodeUpdate() is needed for a few situations, like updating the player model if you are in TFC.
Guest Posted June 18, 2019 Posted June 18, 2019 This is also correct in my code: theForm = aCaster.GetEquippedWeapon(slot - 32) equipSlot = slot - 31 Because at this point our slot is either 32 or 33, the parameter for GetEquippedWeapon will either be 0 (right hand) or 1 (left hand). Same applies for equipSlot, where it will either be 1 (right hand) or 2 (left hand).
Verstort Posted June 19, 2019 Posted June 19, 2019 5 hours ago, Hawk9969 said: Seems like neither of you understood what my code does and how, so here is the explanation. Yes, the armor slots range from 30 to 61, which if you look at this line: theForm = aCaster.GetWornForm(Armor.GetMaskForSlot(slot + 30)) It corrects the slot for you. So instead of starting at 30, you start at 0. Just how SexLab does it ...really? Sexlab does something like that? Seems weird to me not to use the number system the actual game uses, when it requires extra code to convert back before using the game's papyrus functions. 5 hours ago, Hawk9969 said: In your code: aCaster.UnequipItem(theForm, true, true) This is wrong, as it will prevent the actor from ever equipping that again on its own. Alright you got me; I copied code I found and didn't write without paying enough attention to what I was grabbing. Typically I just use actor.UnEquipItemSlot(slot) for non-DD slots instead of removing by reference, since the error if the slot is empty is benign, although that doesn't work when you don't know beforehand if the slot is DD or not, because you're using user input.
Guest Posted June 19, 2019 Posted June 19, 2019 Yes, that's how SexLab does it. It's much more beneficial to use indexes, as Papyrus has no mapped arrays. https://www.creationkit.com/fallout4/index.php?title=Biped_Slots We use the index to tell which slot ID it's supposed to use. Also, the extend version of UnequipItem and EquipItem (UnequipItemEx and EqupItemEx) are SKSE functions which should be preferred (assuming you've SKSE) over the non Ex versions as they allow you to specify from which hand (or no hand) that item should be unequipped/equipped.
Nymra Posted June 19, 2019 Author Posted June 19, 2019 Sidenote: This was never intended to work with Devious Devices. I honestly dont know if SexLabUtil1 could handle DDs with the already existing command (where you have to specify a certain item), never tested it. The idea behind all this is just to make SexLabUtil1 a "partial stripping" mod for Sexlab Scenes, where you can unequip certain items slot by chance (the chance is configureable in the MCM) at sex start, end or after that. Just imagine the "Strip Item" Menu of Sexlab had the additional option to "strip item chance X%" instead of just "Never strip" and "Always Strip" for each of your items worn.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.