Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Quick Reply
Search this Thread
Instructor
Original Poster
#1 Old 27th Nov 2012 at 10:34 PM
Default 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:


I appreciate any help! Also, it takes a few Sim minutes for the skintone to change, is this normal?
Advertisement
Forum Resident
#2 Old 27th Nov 2012 at 11:52 PM
Shot in the dark:
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.
Ms. Byte (Deceased)
#3 Old 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.
Instructor
Original Poster
#4 Old 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:
  • 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
Anyone have any suggestions as to what can be done?
Screenshots
Forum Resident
#5 Old 6th Dec 2012 at 10:41 PM
I tried what CMAR suggested.
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.
Screenshots
Instructor
Original Poster
#6 Old 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.

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.
Forum Resident
#7 Old 7th Dec 2012 at 2:14 AM
I used MasterController's reset sim.
Sorry I totally forgot to mention that.
Instructor
Original Poster
#8 Old 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:
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);
Screenshots
Test Subject
#9 Old 15th Jul 2013 at 9:44 PM
Where do I enter these codes?
Instructor
Original Poster
#10 Old 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 Old 13th Jul 2016 at 9:05 PM
Sims MX, Can you upload it to here ?
Back to top