Min Posted November 14, 2022 Posted November 14, 2022 Min's BaboDialogue Keyword Patcher View File Hey folks! I wrote this a while back for my own personal use, and decided to share it. This mod is a Mutagen patcher for Synthesis which automatically attempts to add appropriate keywords to all armors in your load-order. It does so via string comparison; if the name of an armor has a specific string within it, it is assigned a tag. For example, any armor containing the word "Transparent" is assigned the SLA_ArmorTransparent tag. You can see the list of what strings correspond to what tag in the code, here. For those who are unaware, the tags on your armor affect how NPC's from certain mods (Such as BaboDialogue) react to your character. So, if you're wearing erotic armor, people are going to comment on it accordingly. The purpose of this mod is to automate the process of applying these tags to everything in your load-order. Of note, this patcher covers most Devious Devices use-cases as well, allowing NPC's to react to your devices via these frameworks. Future Plans: Move the string/tag pairings to user configuration, so that users can edit this without editing the code. Maybe. Credits: @nb097 for submitting a patch reducing the number of masters that the patcher adds to the generated plugin. Submitter Min Submitted 11/14/2022 Category Adult Mods Requires BaboDialogue, Synthesis, SexlabAroused Babo Version Regular Edition Compatible Yes 2
mrdoodle Posted November 14, 2022 Posted November 14, 2022 Wow, that patched a huge amount of armors for me.
Min Posted November 14, 2022 Author Posted November 14, 2022 (edited) 21 minutes ago, mrdoodle said: Wow, that patched a huge amount of armors for me. Yeah - Every armor in your load-order, probably. I use LSAR, so I have it set to apply SLA_ArmorPretty to all of the non-erotic/etc armors. This also includes all loot variants (Leather Cuirass of Health, etc). Edited November 14, 2022 by Min 1
nb097 Posted November 14, 2022 Posted November 14, 2022 Thanks for this! But I'm getting errors running it - too many masters getting added. Looking at the log, it's even attempting to add the keywords to things like creature armor (as in, that appears on dragons, atronachs, etc.). Tried turning off all my other patchers and still got the same, so doesn't look like I can use this just yet. 1
Min Posted November 14, 2022 Author Posted November 14, 2022 8 minutes ago, nb097 said: Thanks for this! But I'm getting errors running it - too many masters getting added. Looking at the log, it's even attempting to add the keywords to things like creature armor (as in, that appears on dragons, atronachs, etc.). Tried turning off all my other patchers and still got the same, so doesn't look like I can use this just yet. Ahh, hmm. I suppose that would be a problem for users with load-orders that add a lot of armors. I think the fix for that would be to add an exclusion list to the settings, so that you could ignore the mods you don't care about. If/when I end up adding configurable settings to this, I'll add that. 1
Karkhel Posted November 14, 2022 Posted November 14, 2022 Brilliant idea, I have all my armors and clothing patched but this will be really useful to people, its pretty tedious when its just a couple mods that add multiple armors but if someone has a lot of mods it's probably a form of torture.
nb097 Posted November 14, 2022 Posted November 14, 2022 7 hours ago, Karkhel said: Brilliant idea, I have all my armors and clothing patched but this will be really useful to people, its pretty tedious when its just a couple mods that add multiple armors but if someone has a lot of mods it's probably a form of torture. 7 hours ago, Min said: Ahh, hmm. I suppose that would be a problem for users with load-orders that add a lot of armors. I think the fix for that would be to add an exclusion list to the settings, so that you could ignore the mods you don't care about. If/when I end up adding configurable settings to this, I'll add that. Yeah, I've certainly done most of mine by hand (or at least the ones I care most about); was more interested in this just to see what armors I've skipped/missed and what I might want to consider adding (or just letting the patch output be and not worrying about stuff unless I really want to). I'll definitely be keeping an eye on this!
slayerus Posted November 15, 2022 Posted November 15, 2022 (edited) Build patcher, worked with someone bug and needs add no autoclose for console. Running patch. Writing to output: d:\Games\Skyrim-AE\Data\BaboKeywords.esp Unhandled exception. MissingModException ccBGSSSE001-Fish.esm: A referenced mod was not present on the load order being sorted against: ccBGSSSE001-Fish.esm. This mod was referenced by MajorRecord: 000E4C:ccBGSSSE001-Fish.esm at Mutagen.Bethesda.Plugins.Binary.Translations.ModHeaderWriteLogic.SortMasters(List`1 modKeys) at Mutagen.Bethesda.Plugins.Binary.Translations.ModHeaderWriteLogic.ConstructWriteMasters(IModGetter mod) at Mutagen.Bethesda.Plugins.Binary.Translations.ModHeaderWriteLogic.PostProcessAdjustments(MutagenWriter writer, IModGetter mod, IModHeaderCommon modHeader) at Mutagen.Bethesda.Plugins.Binary.Translations.ModHeaderWriteLogic.WriteHeader(BinaryWriteParameters param, MutagenWriter writer, IModGetter mod, IModHeaderCommon modHeader, ModKey modKey) at Mutagen.Bethesda.Skyrim.Internals.SkyrimModCommon.WriteParallel(ISkyrimModGetter item, Stream stream, BinaryWriteParameters param, ModKey modKey) at Mutagen.Bethesda.Skyrim.SkyrimModMixIn.WriteToBinaryParallel(ISkyrimModGetter item, String path, BinaryWriteParameters param, IFileSystem fileSystem) at Mutagen.Bethesda.Skyrim.SkyrimMod.Mutagen.Bethesda.Plugins.Records.IModGetter.WriteToBinaryParallel(FilePath path, BinaryWriteParameters param, IFileSystem fileSystem) at Mutagen.Bethesda.Synthesis.SynthesisPipeline.Run(RunSynthesisMutagenPatcher args, ModKey exportKey) in D:\a\Synthesis\Synthesis\Mutagen.Bethesda.Synthesis\SynthesisPipeline.cs:line 461 at Mutagen.Bethesda.Synthesis.SynthesisPipeline.<>c__DisplayClass28_0.<<SetTypicalOpen>b__0>d.MoveNext() in D:\a\Synthesis\Synthesis\Mutagen.Bethesda.Synthesis\SynthesisPipeline.cs:line 247 --- End of stack trace from previous location --- at Mutagen.Bethesda.Synthesis.SynthesisPipeline.OpenTypical(OpenForSettings args) in D:\a\Synthesis\Synthesis\Mutagen.Bethesda.Synthesis\SynthesisPipeline.cs:line 261 at Mutagen.Bethesda.Synthesis.SynthesisPipeline.InternalRun(String[] args, RunPreferences preferences) in D:\a\Synthesis\Synthesis\Mutagen.Bethesda.Synthesis\SynthesisPipeline.cs:line 349 at Mutagen.Bethesda.Synthesis.SynthesisPipeline.InternalRun(String[] args, RunPreferences preferences) in D:\a\Synthesis\Synthesis\Mutagen.Bethesda.Synthesis\SynthesisPipeline.cs:line 367 at Mutagen.Bethesda.Synthesis.SynthesisPipeline.Run(String[] args) in D:\a\Synthesis\Synthesis\Mutagen.Bethesda.Synthesis\SynthesisPipeline.cs:line 304 at BaboKeywordPatcher.Program.Main(String[] args) in D:\Downloads\BaboKeywordPatcher-1.0.0\BaboKeywordPatcher\Program.cs:line 15 at BaboKeywordPatcher.Program.<Main>(String[] args) Edited November 15, 2022 by slayerus
Min Posted November 15, 2022 Author Posted November 15, 2022 10 minutes ago, slayerus said: Build patcher, worked with someone bug and needs add no autoclose for console. Running patch. Writing to output: d:\Games\Skyrim-AE\Data\BaboKeywords.esp Unhandled exception. MissingModException ccBGSSSE001-Fish.esm: A referenced mod was not present on the load order being sorted against: ccBGSSSE001-Fish.esm. This mod was referenced by MajorRecord: 000E4C:ccBGSSSE001-Fish.esm at Mutagen.Bethesda.Plugins.Binary.Translations.ModHeaderWriteLogic.SortMasters(List`1 modKeys) at Mutagen.Bethesda.Plugins.Binary.Translations.ModHeaderWriteLogic.ConstructWriteMasters(IModGetter mod) at Mutagen.Bethesda.Plugins.Binary.Translations.ModHeaderWriteLogic.PostProcessAdjustments(MutagenWriter writer, IModGetter mod, IModHeaderCommon modHeader) at Mutagen.Bethesda.Plugins.Binary.Translations.ModHeaderWriteLogic.WriteHeader(BinaryWriteParameters param, MutagenWriter writer, IModGetter mod, IModHeaderCommon modHeader, ModKey modKey) at Mutagen.Bethesda.Skyrim.Internals.SkyrimModCommon.WriteParallel(ISkyrimModGetter item, Stream stream, BinaryWriteParameters param, ModKey modKey) at Mutagen.Bethesda.Skyrim.SkyrimModMixIn.WriteToBinaryParallel(ISkyrimModGetter item, String path, BinaryWriteParameters param, IFileSystem fileSystem) at Mutagen.Bethesda.Skyrim.SkyrimMod.Mutagen.Bethesda.Plugins.Records.IModGetter.WriteToBinaryParallel(FilePath path, BinaryWriteParameters param, IFileSystem fileSystem) at Mutagen.Bethesda.Synthesis.SynthesisPipeline.Run(RunSynthesisMutagenPatcher args, ModKey exportKey) in D:\a\Synthesis\Synthesis\Mutagen.Bethesda.Synthesis\SynthesisPipeline.cs:line 461 at Mutagen.Bethesda.Synthesis.SynthesisPipeline.<>c__DisplayClass28_0.<<SetTypicalOpen>b__0>d.MoveNext() in D:\a\Synthesis\Synthesis\Mutagen.Bethesda.Synthesis\SynthesisPipeline.cs:line 247 --- End of stack trace from previous location --- at Mutagen.Bethesda.Synthesis.SynthesisPipeline.OpenTypical(OpenForSettings args) in D:\a\Synthesis\Synthesis\Mutagen.Bethesda.Synthesis\SynthesisPipeline.cs:line 261 at Mutagen.Bethesda.Synthesis.SynthesisPipeline.InternalRun(String[] args, RunPreferences preferences) in D:\a\Synthesis\Synthesis\Mutagen.Bethesda.Synthesis\SynthesisPipeline.cs:line 349 at Mutagen.Bethesda.Synthesis.SynthesisPipeline.InternalRun(String[] args, RunPreferences preferences) in D:\a\Synthesis\Synthesis\Mutagen.Bethesda.Synthesis\SynthesisPipeline.cs:line 367 at Mutagen.Bethesda.Synthesis.SynthesisPipeline.Run(String[] args) in D:\a\Synthesis\Synthesis\Mutagen.Bethesda.Synthesis\SynthesisPipeline.cs:line 304 at BaboKeywordPatcher.Program.Main(String[] args) in D:\Downloads\BaboKeywordPatcher-1.0.0\BaboKeywordPatcher\Program.cs:line 15 at BaboKeywordPatcher.Program.<Main>(String[] args) Looks to me like you're missing a master for that fish mod.
manafalls Posted November 15, 2022 Posted November 15, 2022 I'm probably missing something, but can't this also be done with a Keyword Item Distributor .ini file? That's how I apply the SoS revealing tag to armors using similar string checks.
Min Posted November 15, 2022 Author Posted November 15, 2022 4 hours ago, manafalls said: I'm probably missing something, but can't this also be done with a Keyword Item Distributor .ini file? That's how I apply the SoS revealing tag to armors using similar string checks. Yeah, looks like that would probably work as well. Hadn't been aware of that mod, neat. 1
slayerus Posted November 15, 2022 Posted November 15, 2022 5 hours ago, Min said: Looks to me like you're missing a master for that fish mod. Looks like i have this creation club mod and his master.
Min Posted November 15, 2022 Author Posted November 15, 2022 1 minute ago, slayerus said: Looks like i have this creation club mod and his master. What record is at id xx000E4C in that mod? Whatever it is, that's what's causing trouble.
chasidrill Posted November 15, 2022 Posted November 15, 2022 That's neat! Though..... got an error: Spoiler System.Exception: Failed to load keyword SLA_ArmorSpendex at BaboKeywordPatcher.Program.LoadKeyword(IPatcherState`2 state, String kwd) in D:\TMP\Synthesis\bjfmjv5i.imh\Git\btn1lgyl.fot\Runner\BaboKeywordPatcher\Program.cs:line 26 at BaboKeywordPatcher.Program.LoadKeywords(IPatcherState`2 state) in D:\TMP\Synthesis\bjfmjv5i.imh\Git\btn1lgyl.fot\Runner\BaboKeywordPatcher\Program.cs:line 55 at BaboKeywordPatcher.Program.RunPatch(IPatcherState`2 state) in D:\TMP\Synthesis\bjfmjv5i.imh\Git\btn1lgyl.fot\Runner\BaboKeywordPatcher\Program.cs:line 167 at Mutagen.Bethesda.Synthesis.SynthesisPipeline.<>c__DisplayClass13_0`2.<<AddPatch>b__0>d.MoveNext() in D:\a\Synthesis\Synthesis\Mutagen.Bethesda.Synthesis\SynthesisPipeline.cs:line 100 --- End of stack trace from previous location --- at Mutagen.Bethesda.Synthesis.SynthesisPipeline.Run(RunSynthesisMutagenPatcher args, Nullable`1 exportKey, IFileSystem fileSystem) in D:\a\Synthesis\Synthesis\Mutagen.Bethesda.Synthesis\SynthesisPipeline.cs:line 565 at Mutagen.Bethesda.Synthesis.SynthesisPipeline.Run(RunSynthesisMutagenPatcher args, IFileSystem fileSystem) in D:\a\Synthesis\Synthesis\Mutagen.Bethesda.Synthesis\SynthesisPipeline.cs:line 462 at Mutagen.Bethesda.Synthesis.SynthesisPipeline.<>c__DisplayClass37_0.<<InternalRun>b__1>d.MoveNext() in D:\a\Synthesis\Synthesis\Mutagen.Bethesda.Synthesis\SynthesisPipeline.cs:line 425 I don't have any SLA_ArmorSpendex keyword.... but SLA_ArmorSpandex Typo?
Min Posted November 15, 2022 Author Posted November 15, 2022 6 minutes ago, chasidrill said: That's neat! Though..... got an error: Hide contents System.Exception: Failed to load keyword SLA_ArmorSpendex at BaboKeywordPatcher.Program.LoadKeyword(IPatcherState`2 state, String kwd) in D:\TMP\Synthesis\bjfmjv5i.imh\Git\btn1lgyl.fot\Runner\BaboKeywordPatcher\Program.cs:line 26 at BaboKeywordPatcher.Program.LoadKeywords(IPatcherState`2 state) in D:\TMP\Synthesis\bjfmjv5i.imh\Git\btn1lgyl.fot\Runner\BaboKeywordPatcher\Program.cs:line 55 at BaboKeywordPatcher.Program.RunPatch(IPatcherState`2 state) in D:\TMP\Synthesis\bjfmjv5i.imh\Git\btn1lgyl.fot\Runner\BaboKeywordPatcher\Program.cs:line 167 at Mutagen.Bethesda.Synthesis.SynthesisPipeline.<>c__DisplayClass13_0`2.<<AddPatch>b__0>d.MoveNext() in D:\a\Synthesis\Synthesis\Mutagen.Bethesda.Synthesis\SynthesisPipeline.cs:line 100 --- End of stack trace from previous location --- at Mutagen.Bethesda.Synthesis.SynthesisPipeline.Run(RunSynthesisMutagenPatcher args, Nullable`1 exportKey, IFileSystem fileSystem) in D:\a\Synthesis\Synthesis\Mutagen.Bethesda.Synthesis\SynthesisPipeline.cs:line 565 at Mutagen.Bethesda.Synthesis.SynthesisPipeline.Run(RunSynthesisMutagenPatcher args, IFileSystem fileSystem) in D:\a\Synthesis\Synthesis\Mutagen.Bethesda.Synthesis\SynthesisPipeline.cs:line 462 at Mutagen.Bethesda.Synthesis.SynthesisPipeline.<>c__DisplayClass37_0.<<InternalRun>b__1>d.MoveNext() in D:\a\Synthesis\Synthesis\Mutagen.Bethesda.Synthesis\SynthesisPipeline.cs:line 425 I don't have any SLA_ArmorSpendex keyword.... but SLA_ArmorSpandex Typo? Not a typo - We're likely using different versions of Sexlab Aroused. I'm using Sexlab Aroused Baka - In this version, the keyword is indeed "Spendex". What version are you using?
chasidrill Posted November 15, 2022 Posted November 15, 2022 5 minutes ago, Min said: Not a typo - We're likely using different versions of Sexlab Aroused. I'm using Sexlab Aroused Baka - In this version, the keyword is indeed "Spendex". What version are you using? Aaaaahhh ok... I use SLAX
Min Posted November 15, 2022 Author Posted November 15, 2022 5 minutes ago, chasidrill said: Aaaaahhh ok... I use SLAX I wonder which version of the keyword mods use? ?
chasidrill Posted November 15, 2022 Posted November 15, 2022 (edited) 1 hour ago, Min said: I wonder which version of the keyword mods use? ? Uhm.... had a quick overlook.... It ran fast and neat. SLAX and baka's version handles arousal differently, so switching from one to another might cause issues with some other mods relying on SLAX. Though.... the only difference in keywords is this one spendex/spandex.... Do you think it's possible in your code to refer the keyword by its formID? So that labels and names won't matter anymore. Which is btw the classic refering used by papyrus, names can be whatever one's want, only thr FormID matters. I also noticed it copies all props in its esp, and many are uneeded or not modified (skin, circlets,....) and will cause issues with record overwriting one another and ITMs. edit: As for which keyword is used.... Sexlab aroused is the master mod, all refers to it for the arousal management, by its keywords. And as far as I know, there is barely any ready made armors with SL aroused as master (besides Baka's suite, which isn't neglectible....) Edited November 15, 2022 by chasidrill
Varithina Posted November 15, 2022 Posted November 15, 2022 (edited) 1 hour ago, Min said: Not a typo - We're likely using different versions of Sexlab Aroused. I'm using Sexlab Aroused Baka - In this version, the keyword is indeed "Spendex". What version are you using? Would not surprise me to see that, that is a typo, might be worth mentioning it in the aroused baka forum, just to make sure, or at least get somebody to do so. Just put spendex in google, and the first thing in the list was a question did I mean spandex. Hmm, just ran it on my load order, you might want to put in exclusions for helmets, hoods, gloves, shields to start with as non of them have baka keywords assigned to them I think, which means they do not need to be checked, other than that really nice, and makes things so much easier, I was dreading doing keywords for things like the luxury collection and a few other big armor packs I have. Edited November 15, 2022 by Varithina
Min Posted November 16, 2022 Author Posted November 16, 2022 6 hours ago, chasidrill said: Uhm.... had a quick overlook.... It ran fast and neat. SLAX and baka's version handles arousal differently, so switching from one to another might cause issues with some other mods relying on SLAX. Though.... the only difference in keywords is this one spendex/spandex.... Do you think it's possible in your code to refer the keyword by its formID? So that labels and names won't matter anymore. Which is btw the classic refering used by papyrus, names can be whatever one's want, only thr FormID matters. I also noticed it copies all props in its esp, and many are uneeded or not modified (skin, circlets,....) and will cause issues with record overwriting one another and ITMs. edit: As for which keyword is used.... Sexlab aroused is the master mod, all refers to it for the arousal management, by its keywords. And as far as I know, there is barely any ready made armors with SL aroused as master (besides Baka's suite, which isn't neglectible....) 6 hours ago, Varithina said: Would not surprise me to see that, that is a typo, might be worth mentioning it in the aroused baka forum, just to make sure, or at least get somebody to do so. Just put spendex in google, and the first thing in the list was a question did I mean spandex. Hmm, just ran it on my load order, you might want to put in exclusions for helmets, hoods, gloves, shields to start with as non of them have baka keywords assigned to them I think, which means they do not need to be checked, other than that really nice, and makes things so much easier, I was dreading doing keywords for things like the luxury collection and a few other big armor packs I have. Well, I went ahead and added support for the Spandex keyword as well. I haven't tested it (I don't have it in my Load-order), but I think it should work now. Let me know.
slayerus Posted November 16, 2022 Posted November 16, 2022 (edited) 13 hours ago, Min said: Not a typo - We're likely using different versions of Sexlab Aroused. I'm using Sexlab Aroused Baka - In this version, the keyword is indeed "Spendex". Bakafactory edit mistake and SpEndex now SpAndex, but in old versions in someone mods SpEndex. I think it's worth supporting both options just in case Edited November 16, 2022 by slayerus
Min Posted November 16, 2022 Author Posted November 16, 2022 5 hours ago, slayerus said: Bakafactory edit mistake and SpEndex now SpAndex, but in old versions in someone mods SpEndex. I think it's worth supporting both options just in case Agreed. I updated it to support both last night.
nb097 Posted November 16, 2022 Posted November 16, 2022 @Min So, I made some tweaks to the main program and now I can use it. Main things: Check race on the armor - if it's not DefaultRace, skip it (gets rid of creature armors) Check for non-playable/shield - if it's either, skip it Check slots - if it's head, hair, circlet, hands, feet, ring, amulet, or none, skip it Check keywords - if it doesn't have any, skip it (an Elder Scroll "hand armor" had been appearing otherwise; don't know if there were any others this trimmed out) On checking what tags to add, if no changes are made, skip it (this one doesn't seem to work perfectly, but it still kind of works) Let me know if you have any questions or comments. Program.cs
Min Posted November 16, 2022 Author Posted November 16, 2022 42 minutes ago, nb097 said: @Min So, I made some tweaks to the main program and now I can use it. Main things: Check race on the armor - if it's not DefaultRace, skip it (gets rid of creature armors) Check for non-playable/shield - if it's either, skip it Check slots - if it's head, hair, circlet, hands, feet, ring, amulet, or none, skip it Check keywords - if it doesn't have any, skip it (an Elder Scroll "hand armor" had been appearing otherwise; don't know if there were any others this trimmed out) On checking what tags to add, if no changes are made, skip it (this one doesn't seem to work perfectly, but it still kind of works) Let me know if you have any questions or comments. Program.cs 9.91 kB · 0 downloads Thanks for the patch. Checking the race makes sense. Same for non-playable/shield. Regarding the slots: For heels support, we need the feet slot. We tag heels with the SLA_BootsHeels tag. Can't ignore items with the "None" slot either, or we miss some devious devices. Aside from that, lgtm. I'll merge it after changing those two things.
nb097 Posted November 16, 2022 Posted November 16, 2022 59 minutes ago, Min said: Thanks for the patch. Checking the race makes sense. Same for non-playable/shield. Regarding the slots: For heels support, we need the feet slot. We tag heels with the SLA_BootsHeels tag. Can't ignore items with the "None" slot either, or we miss some devious devices. Aside from that, lgtm. I'll merge it after changing those two things. Ah, right, forgot about the BootsHeels tag. Good catch, sorry about that. And fair point on the "None" slot items - not using DD myself at the moment so I forgot that the inventory (or is it script?) items don't typically have slots associated.
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