Jump to content

XEdit Scripts - Automate Utilities (SLA, SLS, + other stuff)


Recommended Posts

XEdit Scripts - Automate Utilities (SLA, SLS, + other stuff)

View File

Check for NPC Tint Masks.pas


Checks a mod's NPCs for face tint files in the directory you specify. Edit "sTintMaskPath" to point to your mod's FaceGenData\FaceTint directory. Make sure it ends in a backslash. The texture file name gets appended to it.

e.g. "mods\[My MO2 mod dir]\Textures\Actors\Character\FaceGenData\FaceTint\[My Mod's ESP/ESM file name]\" 



IMAD removal.pas

This file will create a image space modifier removal bat file "removeimods" in your SSE game directory.


If you change your load order you will have to rerun this.

 

To use it.

  1. Load the target ESM/ESP files in SSE Edit. This can be your entire load order.
  2. CRTL+Click the target ESM/ESP files. Or CTRL+A for your entire load order.
  3. Right click on any of the target ESM/ESP files and select "Apply Script...".
  4. Select "<new script>" from the list of available scripts dropdown
  5. You'll see the New Script Template. Copy all. Delete it. Paste the IMAD removal PAS script.
  6. Save it and name it.
  7. Run it

 

Each "rimod" command is followed by the source mod in a comment. e.g.

rimod 0401EB05; DLC2DBBookLevelIod [IMAD:0401EB05] - [04] Dragonborn.esm
rimod 04023F86; DLC2HMDaedraExpImod [IMAD:04023F86] - [04] Dragonborn.esm
rimod 04024FBC; DLC2HMDaedraExpImod02 [IMAD:04024FBC] - [04] Dragonborn.esm
rimod 040317D8; DLC2MiraakTeleportIMODStatic [IMAD:040317D8] - [04] Dragonborn.esm
rimod 04031D26; DLC2StandingStoneReleaseImod [IMAD:04031D26] - [04] Dragonborn.esm

 

While in game you can use "bat removeimods" to remove all image space modifiers. If the something that is applying the modifier is still active it will come back. You can then ALT+TAB out of the game and edit the bat file and remove "rimod" commands to find the troublesome mod. 

TAWOBA SLS JSON.pas
Generates a BikiniArmors.json file for SexLab Survival.

Before you start.

  • Right click on any file under "SKSE\Plugins\StorageUtilData\SL Survival\" in MO2's Data Tab and select "Reveal in Explorer".
  • Copy the full path to SL Survival's Storage Util's directory. You'll need this later

 

Making a "BikiniArmors.json" file with SSE Edit.

  1. Load the TAWOBA mod in SSEEdit
  2. Right of the TAWOBA ESP file name and select "Apply Script..."
  3. Select "<new script>" from the list of available scripts dropdown
  4. You'll see the New Script Template. Copy all. Delete it. Paste the TAWOBA SLS JSON PAS script.
  5. Change "sJsonPath  := 'E:\';" to SL Survival's Storage Util's directory. Make sure it ends with a backslash. "BikiniArmors.json" gets appended to it later. 
  6. Save it and name it.
  7. Run it

 

The script uses the ArmorMaterialXXXXXX keywords to sort and categorize the armor.




TAWOBA SL Aroused and Survival.pas

Automates a large portion of adding SLA and SLS keywords to armor.


Instructions for using the xedit script:

Spoiler

Before you start. Always backup your TAWOBA ESP file

You need to a basic understanding of FormIDs before you proceed with this.


First. Add the keywords to TAWOBA from SL Aroused and Survival. The script currently uses:

  • _SLS_BikiniArmor [KYWD:0A049867]
  • EroticArmor [KYWD:0708C7F6]
  • SLA_BootsHeels [KYWD:0708F410]
  • SLA_ThongLowleg [KYWD:0708EDC2]
  • SLA_MicroHotpants [KYWD:0708F3F4]
  • SLA_MiniSkirt [KYWD:0708F40E]
  • SLA_ArmorHarness [KYWD:0708F3FC]
  • SLA_Brabikini [KYWD:0708E856]
  • SLA_ArmorHalfNakedBikini [KYWD:0708E854]


xedit 1.png

 

xedit 2.png

 

Once you've added the keywords make a note of the FormIDs. They will not be the same ones I have. You will need them later to edit the FormIDs in the script.  

 

xedit 3.png


Edit the PAS file (Any text editor) and update the FormIDs with the hex values shown in your Xedit. The first 2 digits will change with your load order. The last 6 digits will pretty much stay the same unless the mod goes through some major edits.

Not trying to be condescending. Just trying to save you some grief as there are many different levels of experience moding games here. If you don't understand this then you really should stop at this point.
 

xedit 4.png

 

Save it. It's easier to edit later then in the Xedit window.

To the right of the TAWOBA ESP file name. Right click and select "Apply Script..."


xedit 3 A.png

 

Select "<new script>" (You can see I've named it "Skyrim SE - SLS and SLA Keywords")

 

xedit 3 B.png

 

You'll see the New Script Template. Copy all. Delete it. Paste your edited PAS script in, then save it. Give it a really descriptive name because there are a lot of scripts from a lot of Bethesda games.

xedit 3 C.png

 

Then...

You made a backup right?

... press "OK"

 

 

 


The Xedit script searches the armor's name for keywords to determine what SLA keywords are applied.

  • The SLS keyword  "_SLS_BikiniArmor" is applied to every piece of armor.
  • The SLA keyword "EroticArmor" is applied to any match when the armor's name contains one of the following words
         boots
         thong
         pants
         bikini
         skirt
         thigh
         harness
  • "SLA_BootsHeels" gets added to any piece if armor with the words "boots" in its name.
  • "SLA_ThongLowleg" added with "thong" in its name.
  • "SLA_MicroHotpants" added with "pants" in its name.
  • "SLA_MiniSkirt" added with "skirt" in its name.
  • "SLA_ArmorHarness" added with "harness" in its name.
  • "SLA_Brabikini" added with "bikini" and "top" in its name.
  • "SLA_ArmorHalfNakedBikini" added with "bikini" and "top" but not with "dwarven" in its name.

xedit 5.png

 

Feel free to modify and share!


  • Submitter
  • Submitted
    05/11/2021
  • Category
  • Requires
    Sexlab Aroused Redux, Sexlab Survival
  • Regular Edition Compatible
    Yes

 

Link to comment

Dude, this is epic! Just by reading your script it opens up my understanding and so many great time savers I can use this for, thank you. Just 1 question, to play it safe with the original MOD, would it work for me to simply copy all armor records into a patch for each of my armor mods and then simply narrowly apply the script to only that patch?

Link to comment

this seems really useful, since i dont download any armor other than the more *cough* *cough* interesting armors, once i figure out how to use xedit this seems like i will be able to save a lot of time because the keywords added to armors with those as its names fits for most of all my armor (as long as i read it all correctly).

Link to comment

Wow, so if this really works, then you are my hero, I wanted to do this manually at the weekend with TAWOBAR 6.0.

 

Supplement:

I see you are using only the normal SLA version and not the one with the extended keywords from Bakafactory. So I have to do it manually again.

Link to comment

Your script seems to add several keywords to most armour. While I wanted to do that as well originally, checking on Bakas thread this post seems to suggest that only one of the mentioned keywords should be used on a given piece.

Might just him not being a native speaker and me not being one either that causing me to misunderstand though.

 

Link to comment
34 minutes ago, Talesien said:

Your script seems to add several keywords to most armour. While I wanted to do that as well originally, checking on Bakas thread this post seems to suggest that only one of the mentioned keywords should be used on a given piece.

Might just him not being a native speaker and me not being one either that causing me to misunderstand though.

 

 

To be precise, these cuirassarmor keywords are not supposed to be added more than one to each piece.

sla_ArmorPretty

EroticArmor

sla_ArmorSpandex

SLA_ArmorLewdLeotard

SLA_ArmorCurtain

SLA_HalfNakedBikini

SLA_ArmorTransparent

SLA_ArmorHalfNaked

But other keywords are okay to use freely as you think it fits.

EX)
           O
SLA_HalfNakedBikini
SLA_MiniSkirt
SLA_HasStockings
SLA_ThongGString

            X
sla_ArmorSpandex
SLA_HalfNakedBikini
SLA_MiniSkirt
SLA_HasStockings
SLA_ThongGString


bikini and spandex at the same time? Doesn't make any sense.

Link to comment
3 hours ago, factoryclose said:

 

To be precise, these cuirassarmor keywords are not supposed to be added more than one to each piece.

sla_ArmorPretty

EroticArmor

sla_ArmorSpandex

SLA_ArmorLewdLeotard

SLA_ArmorCurtain

SLA_HalfNakedBikini

SLA_ArmorTransparent

SLA_ArmorHalfNaked

But other keywords are okay to use freely as you think it fits.

EX)
           O
SLA_HalfNakedBikini
SLA_MiniSkirt
SLA_HasStockings
SLA_ThongGString

            X
sla_ArmorSpandex
SLA_HalfNakedBikini
SLA_MiniSkirt
SLA_HasStockings
SLA_ThongGString


bikini and spandex at the same time? Doesn't make any sense.

 

Thanks for the clarification.

Link to comment
On 5/11/2021 at 9:04 PM, sirgilly said:

Dude, this is epic! Just by reading your script it opens up my understanding and so many great time savers I can use this for, thank you. Just 1 question, to play it safe with the original MOD, would it work for me to simply copy all armor records into a patch for each of my armor mods and then simply narrowly apply the script to only that patch?

 

That wouldn't be a bad idea. Your original mods remain untouched too so it would be be easy to undo if things mess up.

Link to comment
On 5/12/2021 at 8:19 AM, factoryclose said:

 

To be precise, these cuirassarmor keywords are not supposed to be added more than one to each piece.

sla_ArmorPretty

EroticArmor

sla_ArmorSpandex

SLA_ArmorLewdLeotard

SLA_ArmorCurtain

SLA_HalfNakedBikini

SLA_ArmorTransparent

SLA_ArmorHalfNaked

But other keywords are okay to use freely as you think it fits.

EX)
           O
SLA_HalfNakedBikini
SLA_MiniSkirt
SLA_HasStockings
SLA_ThongGString

            X
sla_ArmorSpandex
SLA_HalfNakedBikini
SLA_MiniSkirt
SLA_HasStockings
SLA_ThongGString


bikini and spandex at the same time? Doesn't make any sense.


There are other keywords that I think should be unique. e.g. "SLA_ArmorCapeFull" and "SLA_ArmorCapeMini". If you want to group them into sets that will fit into your design plan I will refactor the script.

Link to comment
On 5/12/2021 at 3:24 AM, AreaGamer said:

Wow, so if this really works, then you are my hero, I wanted to do this manually at the weekend with TAWOBAR 6.0.

 

Supplement:

I see you are using only the normal SLA version and not the one with the extended keywords from Bakafactory. So I have to do it manually again.


You don't have to.

The procedure is almost exactly the same for Bakafactory SLA and Normal SLA.. You would import the SLA and SLS keywords the exact same way. You would then have to go to the following section in the XEdit script and update the last 6 digits of the Hexadecimal FormIDs.

 

  slKeywordsSLS := TStringList.Create;
  slKeywordsSLS.Add(prefixSLS + '049867');    // _SLS_BikiniArmor [KYWD:0A049867]

  // instead can also load keywords from a text file (one keyword per line)
  // ProgramPath - path were xEdit exe file is
  // DataPath    - path to game's Data folder
  // slKeywordsSLS.LoadFromFile(ProgramPath + 'keywords.txt');

  slKeywordsErotic := TStringList.Create;
  slKeywordsErotic.Add(prefixSLA + '08C7F6');   // EroticArmor [KYWD:0708C7F6]

  slKeywordsBoots := TStringList.Create;
  slKeywordsBoots.Add(prefixSLA + '08F410'); // SLA_BootsHeels [KYWD:0708F410]

  slKeywordsThongs := TStringList.Create;
  slKeywordsThongs.Add(prefixSLA + '08EDC2'); // SLA_ThongLowleg [KYWD:0708EDC2]

  slKeywordsHotpants := TStringList.Create;
  slKeywordsHotpants.Add(prefixSLA + '08F3F4'); // SLA_MicroHotpants [KYWD:0708F3F4]

  slKeywordsSkirts := TStringList.Create;
  slKeywordsSkirts.Add(prefixSLA + '08F40E'); // SLA_MiniSkirt [KYWD:0708F40E]
  
  slKeywordsThigh := TStringList.Create;
  
  
  slKeywordsHarness := TStringList.Create;
  slKeywordsHarness.Add(prefixSLA + '08F3FC'); // SLA_ArmorHarness [KYWD:0708F3FC]

  slKeywordsBikini := TStringList.Create;
  slKeywordsBikini.Add(prefixSLA + '08E856'); // SLA_Brabikini [KYWD:0708E856]
  slKeywordsBikini.Add(prefixSLA + '08E854'); // SLA_ArmorHalfNakedBikini [KYWD:0708E854]
  
  
  
  sla_ArmorPretty := TStringList.Create;
  sla_ArmorPretty.Add(prefixSLA + '08E853'); // SLA_ArmorPretty [KYWD:0708E853]



 

Link to comment
  • 2 weeks later...

Hello,

 

Which version of SLA is this referring to?  I tried SLA Redux, SLA Extended, and SLA Modular and none of them had some of the keywords referenced in the OP.  I even checked the last three numbers in case the name had changed.  I have SLA_KillerHeels but not SLA_BootHeels, SLA_MiniSkirt, and SLA_ArmorHarness.

SLA Redux only has one keyword so I suppose that is not it.

 

image.png.cf2678a976a425dcd1a385e1dc13ae09.png

Link to comment
8 hours ago, delgathar said:

Hello,

 

Which version of SLA is this referring to?  I tried SLA Redux, SLA Extended, and SLA Modular and none of them had some of the keywords referenced in the OP.  I even checked the last three numbers in case the name had changed.  I have SLA_KillerHeels but not SLA_BootHeels, SLA_MiniSkirt, and SLA_ArmorHarness.

SLA Redux only has one keyword so I suppose that is not it.

 

image.png.cf2678a976a425dcd1a385e1dc13ae09.png

That would be Baka version found here:

 

Look for "SexLabAroused SSE Loose Modified by Bakafactory 2020 11 17.7z" under Files.

Edited by xlord2
Link to comment
  • 4 weeks later...

Hello,

 

Kofman77 made some Stalhrim and Dragonscale bikini armor.  The keyword script was pretty self explanatory, but the json was a bit different.  I wanted to be sure I was making all of the right changes before I proceeded.  So on the string list, I add keywords for Stalhrim and Dragonscale, below that I append to the tstring list. And that's it, or do I need other edits?  thank you.

Link to comment
  • 2 weeks later...

Hello,

 

For some reason I'm noticing that the TAWOBA SLS script is leaving out a comma after ELVEN.  I only noticed because I ran it past json validator.  
 

This snippet of code seems to be the culprit.  The code doesn't seem to work "as is" because there are 11 armors in the base script.  The result was that SLS was not injecting elven armors into the world.

 

If the goal is to make sure the final bracket doesn't have a comma, is there another way to write this that is expandable?  I added 6 more armor types and will probably add stahlrim soon too because someone recently released stahlrim bikini armor.  I'm just thinking of ways the script might be written that expands more organically with fewer edits.

 

Thank you.

 

edit - I changed the 10 in the code to iWolfIdx then it worked correctly.

    if idxA <> 10 then
      sJsonOut.Add( #9#9 + '],' )
    else
      sJsonOut.Add( #9#9 + ']' );

  image.png.2fc24f05a60397fbcff7a0c421ff0dc0.png

 

Edited by delgathar
image double posted.
Link to comment

TAWOBA SLS JSON.pas

 

Ok this is my updated and tested version of the script.  Apparently Wolf had to be last in the list or it wouldn't work. 

I've fixed the error that made the script forget the comma after the Elven bracket, but include it for every other armor. This was resulting in invalid json according to the JSON Validator.

 

I've added support for Dragonscale, Glass, Daedric, Imperial Heavy, Imperial Light, Nordic Heavy, Nordic Light, and Ancient Nord Bikini's. 

 

Thank you for this script.  I'd have no idea where to begin writing a script from scratch, but I was sorta able to bumble my way updating yours.

Edited by delgathar
Link to comment

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use