Quick Reply
Search this Thread
Test Subject
Original Poster
#1 Old 15th Apr 2025 at 11:56 PM
Default Custom NPC-outfits for world?
Hello,

Is it possible to create custom NPC-outfits for a world built in CAW? I have gotten down with recoloring objects tied to the specific world file (for example a custom colored guard rail that fits with the aesthetic of my world). Is it possible to change for example the police uniform that is generated in my world?

I am thinking specifically of the police uniform as I am building a cold, northern (sort of Alaskan-vibes) world and the default uniform has short sleeves - I would like to give them a jacket... Is it possible to mod the CAW-file/world file to have specific uniforms? I get that I can change career outfits for the policemen individually, but I would like a default setting that switches everyone (if possible)

It doesn't have to be tied to the world, although that would be the best solution.

I also in general would like to change the default Butler“s uniform? Is it possible to create some sort of default-replacement thing for similar NPC-uniforms? :o
Reaper
staff: moderator
#2 Old 16th Apr 2025 at 5:31 PM
That should be possible. But you need to do script modding.

There is an XML file called ServiceSpecifications, and there is a corresponding class with the same name under the namespace Sims3.Gameplay.Services. This class contains a static Dictionary for each service as a subclass called ServiceSpecifications. And finally, under this subclass, the list of uniforms is found for each world type. I assume that you can edit this whenever your custom world gets loaded and change it back to its original value when exiting your custom world.

I don't promise this will work, but it should be the majority of your work:
Code:
private static string[] originalUniforms; //We will store the original list of uniforms here.

static YourClass()
{
    World.sOnWorldLoadFinishedEventHandler += OnWorldLoadFinished; //We will need this for each time a world is loaded.
}

private static void OnWorldLoadFinished(object sender, EventArgs e)
{
    if (GameUtils.GetWorldName(false) == "YourWorldsName") //We check whether this world is your custom world by its WORLD file name (excluding the file extension ".world").
    {
        originalUniforms = ServiceNPCSpecifications.sServiceSpecifications["ServiceNameHere"].Uniforms[IntValueCorrespondingToYourCustomWorldsType]; //We first save the original array of uniforms so that if you load another world, these will be used later.
        ServiceNPCSpecifications.sServiceSpecifications["ServiceNameHere"].Uniforms[IntValueCorrespondingToYourCustomWorldsType] = new[] { array of uniforms here as strings }; //We assign the custom uniform(s) here. The int value is most likely 0 as it is UserCreated (check Sims3.SimIFace.WorldName).
    }
    else //If it's not your custom world, then it's another world.
    {
        if (originalUniforms != null) //Null check because we might not have assigned a value to this variable yet.
        {
            ServiceNPCSpecifications.sServiceSpecifications["ServiceNameHere"].Uniforms[IntValueCorrespondingToYourCustomWorldsType] = originalUniforms
        }
    }
}

Again, I don't promise this will work, especially on the first try. But we can go through this.

As for the name of the uniforms, I recommend you construct your custom outfits with Cmar's SimOutfitter.

Let me know if you have any other questions.

This is a signature.
Back to top