Jump to content

Identify package of bad CAS CC - Tutorial


Recommended Posts

This mini tutorial requires the installation of the High Heels beta mod. Better make a save game backup before you install https://www.loverslab.com/files/file/14084-?-high-heels-boots-?-auto-slider-adjustment-beta/ (requires S4CL).

 

As one of my sims looked like this again I wrote some code to identify the CC.

sim_with_broken_cc.png.dc76211f05eccc3705b5ae8525e3ac11.png

 

I'm not a fan of the PIE menus so one has to use the cheat console. Calling the code from the console without caching the sims / results often takes a few seconds to complete.

The commands may also be used to simply identify the currently used CAS items.

 

Open the cheat console (Shift+Ctrl+C) and enter there 'o19.dump.sim be#go' to dump the outfit of a sim. (For help enter only 'o19.dump')

The string "be" is in the first name, the string "go" in the last name of the sim. 'be#go' should be 'Bella Goth' unless you have sims named 'Becca Gold' or 'Bea Good', in this case use 'Bel#Go' or 'Bella#G'. You can always enter the full first and last name - separated with '#' to improve your typing skills. If there is a space in either name surround everything with quotes.
Use your own string to match your sim, in this tutorial 'be#go' is used.

The file 'outfit.{sim_id}.{sim_name}.OutfitCategory.{outfit_category}.{outfit_index}.txt' should be written (into the 'documents' directory within the High Heels mod folder) and contain all item IDs the sim is currently wearing.

 

 

Enter 'o19.res.dump CASPART' (For help enter only 'o19.res'). This will take about one minute to complete and write all game items to the 'items.game.caspart.txt' file.
Enter 'o19.res.data'. Expect this output: "Parse 'Mods' data is True. Parse 'Game' data is False."
Enter 'o19.res.dump CASPART' again. This will take a while to complete and may even crash the game if you have a lot of CAS CC.

The file 'items.mods.caspart.txt' should be written and contain all CAS items.

 


Enter 'o19.dump.join be#go' to join the three files to 'full_outfit.{sim_id}.{sim_name}.OutfitCategory.{outfit_category}.{outfit_index}.txt'. Open this file with your favorite editor.

This file contains also the CC file names:
 

{
    'sim_id': 18821726364518941,
    'sim_name': 'bella#goth',
    'category_text': 'ATHLETIC',
    'category': 2,
    'index': 0,
    'outfit': {
        2: {
            'CAS_Part_Instance': 46835, 'Description': 'Hair',
            'Name': 'yfHair_LongBraidedPulledBack_DirtyBlonde',
            'Filename': 'C__...[full_path_removed]..._SimulationDeltaBuild0.package'
        },
        7: {
            'CAS_Part_Instance': 9223372039181308004, 'Description': 'Lower_body',
            'Name': 'Matty60s_Shortest Skirt_201503271916103993',
            'Filename': 'C__...[full_path_removed]..._Mods_..._Matty60s_Shortest Skirt.package'
        },
        ... [20 .. 30 IDs] ...
    }
}

We may guess which CC (usually in the Mods folder with a high CAS Part instance ID) is causing trouble. Or we may remove one item after the other:
Enter 'o19.dump.part 2 0 0 be#go' (2=outfit / body_part_id; 0 = current CAS_Part_Instance, otherwise specify a valid number; 0 = undress (1=dress up); be#go = Bella Goth)
Bella Goth without hair looks bad, so restore it with 'o19.dump.part 2 0 1 be#go' (unless the hair is causing the trouble).

 

There may be 20 to 30 IDs to test. After a while we will get to ID 7: 'o19.dump.part 7 0 0 be#go'. Now Bella has still feet and the upper body with head but no legs / skirt. And the black color problem is gone.

sim_with_broken_cc_2.png.87850ec5249a3899a427a3c2aa023b76.png
Now we know which is the offending outfit and we attach it again with 'o19.dump.part 7 0 1 be#go'. In CAS we may modify Bella accordingly.

Or dump the outfit of another sim with 'o19.dump.sim ti#pe' (Tina Peeping), open the file and look for the IDs: "...(7: { 'Lower_body': 13680881172134701453 }..." and apply it with 'o19.dump.part 7 13680881172134701453 1 be#go' to Bella. She should wear now the same 'Lower body' outfit as Tina.

 

As a simple solution one may delete the package. Locating it shouldn't be too hard but with CC creators adding too much special characters many of them are currently replaced with '_' (to be fixed,).


One may check for updated CC or try to fix it. This particular type of error may be related to missing MipMaps in DDS images as described in https://www.loverslab.com/topic/141396-sim-with-cc-turns-black-while-zooming/

 

It could also help to identify missing body parts, anyhow as the IDs are missing they may be hard to detect. Unless one knows which IDs must be in the outfit file.

 

 

Hopefully this helps to identify bad CC. Maybe it can also help with non-HD content or skintones while I had no opportunity to test this.

 

Link to comment
  • 1 month later...

I wish I'd seen this sooner. Looks to be much quicker than using Tray Importer and finding all the broken bits in CAS.

 

Is it possible to use the same code to get all the information from the CC in the mods folder? I'm trying to find a way to automate folder organization using the category tags in the packages. Powershell can easily parse the xml and move everything to the correct folders. But it can't read the xml in the packages. I need a bit of code that can read the packages and output the various tags associated with each file. 

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