Posts: 263
Thanks: 2093 in 16 Posts
10 Achievements
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.