- Site Map >
- Modding and Creation >
- Sims 3 Creation >
- Modding Discussion >
- Alien eyes
- Site Map >
- Modding and Creation >
- Sims 3 Creation >
- Modding Discussion >
- Alien eyes
Replies: 10 (Who?), Viewed: 16958 times.
#1
27th Nov 2012 at 10:34 PM
Alien eyes
I want to turn a Sim into an alien and so far I've managed to change the skintone and apply the alien sliders to my Sims. However, I can't find a way to change the eyes, so they look like these:Below is my code:
Code:
private static void SetAlienGenetics(SimDescription desc, OutfitCategories cat, int index) { using (SimBuilder builder = new SimBuilder()) { SimOutfit outfit = desc.GetOutfit(cat, index); builder.Clear(); builder.UseCompression = true; builder.Age = desc.Age; OutfitUtils.SetAutomaticModifiers(builder); OutfitUtils.SetOutfit(builder, outfit, null); builder.SkinTone = new ResourceKey((ulong)CASSkinTones.AlienSkinTone, 0x354796a, 0); builder.SkinToneIndex = 1f; builder.SetFacialBlend(new ResourceKey(ResourceUtils.HashString64("EarPoint"), 0x358b08a, 0), 1f); builder.SetFacialBlend(new ResourceKey(ResourceUtils.HashString64("EyeAlien"), 0x358b08a, 0), 1f); builder.SetFacialBlend(new ResourceKey(ResourceUtils.HashString64("EyeAlienCorrector"), 0x358b08a, 0), 1f); SimOutfit outfit2 = new SimOutfit(builder.CacheOutfit(string.Format(desc.FirstName + desc.LastName + "{0}{1}", cat, index))); if (cat == OutfitCategories.Special) { uint specialOutfitKeyForIndex = desc.GetSpecialOutfitKeyForIndex(index); desc.RemoveSpecialOutfitAtIndex(index); desc.AddSpecialOutfit(outfit2, specialOutfitKeyForIndex); } else { desc.RemoveOutfit(cat, index, true); desc.AddOutfit(outfit2, cat, index); } } }
I appreciate any help! Also, it takes a few Sim minutes for the skintone to change, is this normal?
Advertisement
#2
27th Nov 2012 at 11:52 PM
Posts: 768
Thanks: 8156 in 12 Posts
Shot in the dark:
MakeAlien triggers MakeSim ... AddMissingParts ... AddMissingPartsHuman
where you can find the line
Appears to be a CAS part that gets set depending on homeworld?
Edit:
You say "I can't find a way to change the eyes, so they look like these:"
I interpreted your post so that the comma is in the wrong spot and you would like to have your homemade aliens like those in the picture.
MakeAlien triggers MakeSim ... AddMissingParts ... AddMissingPartsHuman
where you can find the line
Code:
CASPart part10 = new CASPart(new ResourceKey(ResourceUtils.HashString64("amFaceEyeColor"), 0x34aeecb, 0));
Appears to be a CAS part that gets set depending on homeworld?
Edit:
You say "I can't find a way to change the eyes, so they look like these:"
I interpreted your post so that the comma is in the wrong spot and you would like to have your homemade aliens like those in the picture.
#3
28th Nov 2012 at 12:58 AM
Try:
desc.SetAlienDNAPercentage(percentage);
Looks like you can make partial aliens this way - worth a try! If the eyes are a lighting effect, this may be the only way to do it.
desc.SetAlienDNAPercentage(percentage);
Looks like you can make partial aliens this way - worth a try! If the eyes are a lighting effect, this may be the only way to do it.
#4
6th Dec 2012 at 5:26 AM
Consort, I don't believe alien eyes are CAS parts. I took a look at those functions and the CAS part you mention is added to every Sim. If the Sim is in a vacation world, a specific preset will be applied, but that's it.
Cmar, I tried that method but it's not working. The problems with my custom-made aliens are:
Cmar, I tried that method but it's not working. The problems with my custom-made aliens are:
- They keep their sclera (I have seen wild aliens running in my town and they do have black eyes)
- Their "Brain Power" motive is stucked unless I reset them
- Any interaction related to "Brain Power" will make them "jump" from one place to the other
#5
6th Dec 2012 at 10:41 PM
Posts: 768
Thanks: 8156 in 12 Posts
I tried what CMAR suggested.
Sim gets an alien voice
Eyes remain human, but when you take the Sim into CAS or mirror the alien eyes show, they don't stick however.
Alien eyes only show in live mode after resetting the Sim, this also seems to "unstuck" the brain power for me.
Code:
SetAlienDNAPercentage(1f)
Sim gets an alien voice
Eyes remain human, but when you take the Sim into CAS or mirror the alien eyes show, they don't stick however.
Alien eyes only show in live mode after resetting the Sim, this also seems to "unstuck" the brain power for me.
#6
7th Dec 2012 at 2:07 AM
Adding these two lines before setting the alien percentage to 100% fixes the Brain Power motive without having to reset.
The eyes must be some type of effect like Cmar suggested, because they show up in the portrait, the floating head in the pie menu and CAS. But I don't see them in Live Mode even if I use the "resetsim" cheat.
Code:
base.Target.Motives.GetMotive(CommodityKind.Energy).DisableMotive(); base.Target.Motives.CreateMotive(CommodityKind.AlienBrainPower);
The eyes must be some type of effect like Cmar suggested, because they show up in the portrait, the floating head in the pie menu and CAS. But I don't see them in Live Mode even if I use the "resetsim" cheat.
#7
7th Dec 2012 at 2:14 AM
Posts: 768
Thanks: 8156 in 12 Posts
I used MasterController's reset sim.
Sorry I totally forgot to mention that.
Sorry I totally forgot to mention that.
#8
7th Dec 2012 at 5:30 AM
Last edited by Sims MX : 7th Dec 2012 at 5:57 AM.
Thanks, NRaas' reset fixes the alien eyes. I'll check his code to see how it's done.
Edit:
I found it! NRaas code destroys the Sim and replaces it with a new one. For this it calls the OnStartup() method of the Sim class. On that method I found this bit:
It's basically the code, I posted before, but it also includes a reference to a visual override. I tried it in-game and it works! My custom-made aliens now have alien eyes and a working Brain Power motive. Thanks Consort without your help I wouldn't have found this.
2nd Edit:
The following code removes the alien eyes!
Edit:
I found it! NRaas code destroys the Sim and replaces it with a new one. For this it calls the OnStartup() method of the Sim class. On that method I found this bit:
Code:
if (this.SimDescription.IsAlien) { World.ObjectSetVisualOverride(base.ObjectId, eVisualOverrideTypes.Alien, null); if (this.SimDescription.IsAlienEvolved && !this.Motives.HasMotive(CommodityKind.AlienBrainPower)) { this.Motives.GetMotive(CommodityKind.Energy).DisableMotive(); this.Motives.CreateMotive(CommodityKind.AlienBrainPower); } }
It's basically the code, I posted before, but it also includes a reference to a visual override. I tried it in-game and it works! My custom-made aliens now have alien eyes and a working Brain Power motive. Thanks Consort without your help I wouldn't have found this.
2nd Edit:
The following code removes the alien eyes!
Code:
World.ObjectRemoveVisualOverride(target.ObjectId, eVisualOverrideTypes.Alien);
Test Subject
#9
15th Jul 2013 at 9:44 PM
Posts: 2
Where do I enter these codes?
#10
15th Jul 2013 at 11:03 PM
You have to create a script mod in C# (a programming language). Head to the tutorial section (Tutorials:TS3_GeneralModdingwiki) to learn how to make your first mod.
Test Subject
#11
13th Jul 2016 at 9:05 PM
Posts: 58
Sims MX, Can you upload it to here ?
Who Posted
|