Home | Download | Discussion | Help | Site Map | New Posts | Sign in

Latest Site News

Theme Catchup2018 - posted on 1st May 2018 at 1:50 PM
Replies: 11 (Who?), Viewed: 426 times.
Lab Assistant
Original Poster
#1 Old 13th May 2018 at 12:39 AM Last edited by whiteman-Dara : 17th May 2018 at 10:48 AM.
Default the creation of an alien is possible in the CAS?
I tried to create a AlienSort in CASLoadSim, but my game crashes, I do not understand why a ghost is written in occult types, if it does not have the OccultGhost class? Is it possible to create a button referring to the class AlienUtils?
staff: administrator
#2 Old 13th May 2018 at 12:11 PM
Because if you don't use occult types, CAS won't be able to generate an actual supernatural with it's needed data Like ghost having their own tombstone connected to their inventory and mummies also having their own walk/interactions etc. So it's just a matter of grabbing the data that it's needed + the hidden traits that they have (Which I believe aliens have as well) Although I would carefully study the Fairy CAS and such, because I think the reason it's crashing is because it can't grab the data it can with the others. Or well, EA's settings.
#3 Old 15th May 2018 at 4:58 PM
I think you should check how Master Controller adds Alien DNA to Sims.
Lab Assistant
Original Poster
#4 Old 16th May 2018 at 10:23 PM
skydome, Did not find anything, except
using System;

namespace NRaas.CommonSpace.Helpers
public enum SimType
#5 Old 17th May 2018 at 3:07 AM
Check the Master controller cheat module. The interaction comes with that module.
Lab Assistant
Original Poster
#6 Old 17th May 2018 at 10:51 AM
skydome, How will this help me?
using NRaas.CommonSpace.Options;
using Sims3.Gameplay.Abstracts;
using Sims3.Gameplay.CAS;
using Sims3.Gameplay.CelebritySystem;
using Sims3.Gameplay.Interfaces;
using Sims3.UI;
using System;

namespace NRaas.MasterControllerSpace.Sims.Intermediate
public class AlienPercentage : SimFromList, IIntermediateOption, IOptionItem, IInteractionOptionItem<IActor, GameObject, GameHitParameters<GameObject>>, IDescriptionOptionItem, IInteractionOptionItem<IActor, SimDescriptionObject, GameHitParameters<SimDescriptionObject>>, ICommonOptionItem
private float mPercent;

public override string GetTitlePrefix()
return "Criteria.AlienPercentage";

protected override int GetMaxSelection()
return 0;

protected override bool CanApplyAll()
return true;

protected override bool Run(SimDescription me, bool singleSelection)
if (!base.ApplyAll)
string text = StringInputDialog.Show(this.Name, Common.Localize(this.GetTitlePrefix() + ":Prompt", me.IsFemale, new object[]
}), me.CelebrityLevel.ToString(), 256, StringInputDialog.Validation.None);
if (string.IsNullOrEmpty(text))
return false;
this.mPercent = 0f;
if (!float.TryParse(text, out this.mPercent))
SimpleMessageDialog.Show(this.Name, Common.Localize("Numeric:Error"));
return false;
me.mAlienDNAPercentage = this.mPercent;
if (me.CreatedSim != null)
return true;
#7 Old 17th May 2018 at 8:26 PM
Not exactly sure since I don't know how you're doing this. You want to add an alien option in the supernatural section in CAS right? You can make it so the Sim will get 100% alien DNA to the sim. You could even add the Alien outfit and skin tone like we do when we select Genies in CAS.
Department of Post-Mortem Communications
#8 Old 18th May 2018 at 8:38 AM
While I am no coder at all, I think the issue is a bit more complicated, because aliens are actually not a supernatural life state. All occults or supernaturals from ghosts to mermaids are governed by a hidden occult trait (they added the ghost trait with the Supernatural EP), and in CAS you simply add the trait to make a supernatural. But there is no hidden "Alien" trait. This is done via a percentage number of alien DNA, ranging from 0-100. So, I guess you'd also need some sort of slider mechanism in order to make an alien in CAS.

If I were a coder I would probably look at how the game creates the alien NPCs in the Alien household, as it adds a 100% alien percentage automatically.
staff: administrator
#9 Old 18th May 2018 at 5:59 PM Last edited by Lyralei : 19th May 2018 at 11:06 AM. Reason: my sub-consciousness really have a thing for mermaids doesn't it? :P
Agreed, which was kinda what I tried to explain in my first post. Now I took a look at the way the fairy and ghosts data works, given how they apply something new and unique to that specific to a supernatural (So wings with the fairy, etc). And if it's actually possible to add a new occult type like that, since I know you've been working on a solution for this for about a year or so.

Now looking at the code, (which I will say they could have totally written way better than the way it is at the moment) and let's say, take the ghostdata:


if (occultType <= OccultTypes.Ghost)
				if (occultType <= OccultTypes.Unicorn)
					switch (occultType)
					case OccultTypes.Mummy:
					case OccultTypes.Frankenstein:
					case OccultTypes.Vampire:
					case OccultTypes.Mummy | OccultTypes.Frankenstein:
						return result;
						if (occultType != OccultTypes.ImaginaryFriend && occultType != OccultTypes.Unicorn)
							return result;

It basically calls the CASGhostData, which is another class that the CASsupernaturaldata calls (Same counts for CASFairyData, CASMermaidData, etc). AS you can read, the snippet pretty much says "exclude the mummies and frankensteins, imaginary friends and unicors
Now after it reads all the occulttypes the script checks and calls, including the CASGhostData, CASMermaidData, etc. It says:


			result = new CASSupernaturalData(occultType);
			return result;

if none of those supernaturals have been clicked on the menu that has been mentioned in the script, it looks at the occultType. Now this is an enum. Enums are pretty difficult to... well, bypass if that makes any sense:

This also pretty much shows that aliens indeed aren't, even by script, non-occult types. So... in this case we have a problem. The Alien isn't in the enum list, so that's already an issue, nor is an occultType. Nor is there a xml/tuning list that lists them all like the CommodityKinds for traits. We know that there is a "bypassable" way (If that's even a word :P) for traits in this case, but that's because the game doesn't check all the individual traits and then if there's no trait to be found, checks the enum. It's actually written in this sense where from the script you can call yours from creating an internal const basically (With of course some additional resources ) to get it done.

So, to answer your question on "I do not understand why a ghost is written in occult types, if it does not have the OccultGhost class?"
The reason why is because there is a CASGhostData class. That class is referred in the CASSupernaturalData already that points to the enum, which then seemingly adds a 'deathtype' simdescription to the sim. I couldn't really understand why there wasn't any ghosthiddentrait attached to the sim and went to research this a bit more. It seems that EA has 3 different way of spawn, apply, etc. a ghost type to a sim. And reading the script, it seems that it only applies a simdescription.deathtype to a sim but the trait is rarely being called in any ghost-related script anyways. it's interesting too that EA didn't include the actual hiddentrait in the enum trait list in the occult manager. So that pretty much points out that ghosts are just... well, ghosts with a shader/material and an animation applied to them through the deathtype ANd then there's also the fun fact that the occultTypes are connected to the occultmanager.

Now we have a few problems here:

- The CASSupernaturalData checks the occultTypes through the enum and these are hardcoded. They don't actually refer to any traits whatsoever either. So that is actually pretty bad given how to make an occult ourselves we need traits.
- The CAS(Specific supernatural kind)Data refers to it's own occult type. This is how it reads it and how they eventually call all the interactions they do.
- Occult types aren't listed in XML files either.
- The reason it's probably crashing now is because it's not recognizing it as a occultType, which it seems it's the only way this works.

Now you might be able to make a work-around script if you have made traits or skills yourself, since if you understand that technique (Which also is done in a work-around way) it will be easier to understand how to may be able to actually get there to make it read the AlienUtils. (or maybe even have it make your own code) But to be really fair, it's not easy nor can I actually see a way it might be possible.

I will say that I am a bit curious on to what you've written code related already. Maybe with that it might be easier to help you out. don't forget to put them under a spoiler though. Although this code should be relatively small since it only should call CAS data. No social interactions.
Lab Assistant
Original Poster
#10 Old Yesterday at 10:10 AM
Thanks to everyone for replies
Skydome, it's impossible to add an alien to the supernatural type button. Think I need to add another button for this.
Don Babilon, More than sure the slider will not work, since sliders are designed to change physical data.
Lyralei, I have several versions, half of them do not work:
sorting aliens is failed, because the sort uses the code CasAgeGenderFlags in which
there is no aliens.
namespace Sims3.SimIFace.CAS
[Flags, ComVisible(false)]
public enum CASAgeGenderFlags : uint
None = 0u,
Baby = 1u,
Toddler = 2u,
Child = 4u,
Teen = 8u,
YoungAdult = 16u,
Adult = 32u,
Elder = 64u,
AgeMask = 127u,
Male = 4096u,
Female = 8192u,
GenderMask = 12288u,
Human = 256u,
Horse = 512u,
Cat = 768u,
Dog = 1024u,
LittleDog = 1280u,
Deer = 1536u,
Raccoon = 1792u,
LargeBird = 2048u,
SimWalkingDog = 2304u,
SimWalkingLittleDog = 2560u,
SimLeadingHorse = 2816u,
Paddleboat = 3072u,
WaterScooter = 3328u,
Speedboat = 3584u,
Rowboat = 3840u,
HouseboatSmall = 16640u,
HouseboatMedium = 16896u,
HouseboatLarge = 17152u,
Shark = 17408u,
Sailboat = 17664u,
WindsurfBoard = 17920u,
SpeciesMask = 52992u,
LeftHanded = 1048576u,
RightHanded = 2097152u,
HandednessMask = 3145728u

Adding a traits to aliens will work, but their DNA will break.
and the last addition of the enum to the aliens.
using System;

namespace Sims3.UI.Hud
public enum UtilsTypes : uint
Human = 0u,
Alien = 1u,
#11 Old Yesterday at 4:00 PM
I like that idea. Creating another button for Alien. You could make it so pressing that button gives 100% Alien DNA and changes the skintone to gree and changes your outfit to alien outfit.
staff: administrator
#12 Old Today at 12:17 PM
What exactly do you mean with versions?
Back to top