Creating SimOutfit for Occults
Hi, I'm creating a mod which adds new occult life states to the game (Angel and Demon) and I need them to have visual distinctions from normal Sims.
To do that, I have a horns and a wings accessories, which I placed in my main .package.
The issue is when I try to tell the game to attach it to newly turned sims.
The code I copy is the one that tells Vampires to have the teeth, and the birth mark in the neck. The code, executed whenever a sim is turned into a Vampire, is as follows :
Code:
SimOutfit uniformToApply = new SimOutfit(ResourceKey.CreateOutfitKeyFromProductVersion(string.Format("{0}{1}Vampire", OutfitUtils.GetAgePrefix(simDes.Age, true), OutfitUtils.GetGenderPrefix(simDes.Gender)), ProductVersion.BaseGame));
if (uniformToApply.IsValid)
{
simDes.ApplyBodyTypeToAllOutfits(uniformToApply, (ulong) 0x4800000000L, "VampireBirthMarkAndDental");
}
This code seems to generate a key from the age of the sim, his gender, and the information "vampire", the key being then fed to the SimOutfit method.
As I understand it, it needs the correct items (teeth, birth mark, wings, horns...) to be first properly given an official key, and not just imported in the game.
What I would need to know is either how :
- to create a SimOutfit from specified imported items (which I can then call uniformToApply in my code), to feed ApplyBodyTypeToAllOutfits()
- to register a key corresponding to the said items, which I can then feed to the new SimOutfit() method
More openly, anyone having information on the following methods is cheerfully welcome : SimOutfit, CreateOutfitKeyFromProductVersion, ApplyBodyTypeToAllOutfits