Home | Help | Download | Community | Site Map | New Posts | Sign in
Replies: 16 (Who?), Viewed: 9525 times.
Scholar
Original Poster
#1 Old 1st Apr 2008 at 10:48 PM
Default Alien Detection by BHAV
I've been putting a lot of time into an object that will report on the paranormal and species status for all humanoids and animals within the game world, including those fascinating creatures in Castaway Stories. All has gone well, with accurate detection of every one of them except for aliens!

Has anyone found a programatic method to detect that any given Sim is an alien? I would be satisfied with first generation detection only, i.e. identifying the child resulting from an alien abduction.

There is a discussion on skintone here that seemed to have promise, including the "My Person Data 0x3C: Skin Color" value - but that always seems to be zero. In fact, browsing to an Alien Sim within SimPE also shows a skin colour of zero.

There was also talk of detecting the actual skintone used, but no one seemed to know how to do that programatically. The default alien skintone is reported to be 6baf064a-85ad-4e37-8d81-a987e9f8da46

I thought that perhaps I could detect the presence of an alien parent, but the alien parent does not seem to be indentified in the Sim's family group, only the human parent is acknowledged.
Advertisement
Scholar
Original Poster
#2 Old 2nd Apr 2008 at 5:21 AM Last edited by Sophie-David : 2nd Apr 2008 at 5:28 AM.
It seems to me that none of the approaches mentioned above are going to work. What I might be able to do is to first determine if the subject Sim had only one parent, and if that parent were male. Then if I could parse the father's memories to check for "abducted by aliens" and "gave birth" this would be a very strong indication that the subject Sim was alien.

Off hand I cannot think of way that the subject Sim would not be an alien if all of the above were true, unless the father - child relationship were created in CAS with no mother specified. Then during gameplay the father could be abducted by aliens so that original child now had an alien sibling. The father in this case would have the specific alien and pregnancy memories, the original Sim child would indeed have only one parent - a parent who was male - but the original Sim child would not in fact be alien. In this case my detection logic would fail.

At this point I do not know if memories can be parsed in this way. In any event, it would appear that this test would not be foolproof. I would have to additionally determine that the subject Sim was not a CAS Sim but was born in-game. Again, I do not know of a way to determine this by BHAV (yes, its easy enough to do so by browsing the Sim's genetics in SimPE but that doesn't help the question at hand).
Scholar
Original Poster
#3 Old 2nd Apr 2008 at 6:31 PM
OK, I can see how the parent's memories may be searched for "Got Abducted by Aliens" (GUID 0x8CAB102B) and "Had Subject$!" (GUID 0x2C8CC73F). All being well, the second parental memory should also tell me that the specific subject Sim was actually born in-game. A very convoluted way to detect an alien genotype, but it should work. Then I'll begin work on a Cylon detector.
Scholar
Original Poster
#4 Old 4th Apr 2008 at 11:20 PM
With the addition of the "Met Aliens" (GUID 0x2DB66260) memory as an alternate to "Got Abducted by Aliens" (either/or) the suggested algorithm works well, including detection that the subject Sim was the one who was born after either of the two Alien encounter memories. In fact this method will work with hacks that allow females to become alien impregnated as well as males, for it should not trigger on conventional pregnancies. An object using this code should be released within a month.
Retired Duck
staff: retired moderator
#5 Old 4th Apr 2008 at 11:49 PM
Does it cope with twin-births?
Scholar
Original Poster
#6 Old 5th Apr 2008 at 10:14 PM
Thank you for following the story so far, Echo, that is a good insight. No, I hadn't thought of twins. I have now coded that in, to check if the very next memory is also of a birth, then to check if the Subject Sim was the one born in that case. The chances of a natural birth being the very next memory are very slim, even if the only intervening memory is to say that $Subject grew up badly.

It will take a bit of testing to try this out - I think Pascal Curious is going to be looking at twins next time! Another concern comes to me, it could be that alien abduction is only a one-time memory (like "Did WooHoo with $Subject"), in which case my method is going to breakdown on the second impregnation anyway - unless restricted to detecting male impregnation only when looking for a second pregnancy.

In any event I will likely have to allow for manual flagging or unflagging of alien status regardless, not only for the occasional error but for aliens designed in CAS and Phaenoh's Elliot and Polly (Elliot was given a memory wipe). It is tempting to set and test with Expression (Stack Object's person data 0x003C (skin color) == Literal 0x0005) for alien skin colour - S5 indicating the alien default. I presume Maxis shied away from setting skin colour for fears of racsist accusations because this parameter is always zero. But I think I will play it safe and use an invisible token (ha ha, a card carrying alien - my father used to be one for a short time in the States).

I do have a lookup table of GUIDs for all legacy aliens that came with the game - several alive and dead in Strangetown, one young adult at La Fiesta Tech, and a deceased one in Pleasantview. Actually the Strangetown Smith children detect properly without the table, based on Pollination Technician 9's presence in the legacy list. (Did you know #9 actually married his first children's half-sister, as shown here - its not called Strangetown without reason).

But I am aware that lookup GUIDs have the chance of being repeated in other neighbourhoods. Do you know of a way to detect the neighbourhood's ID number programatically?
Scholar
Original Poster
#7 Old 6th Apr 2008 at 4:31 PM
Quote:
Originally Posted by Sophie-David
It will take a bit of testing to try this out - I think Pascal Curious is going to be looking at twins next time! Another concern comes to me, it could be that alien abduction is only a one-time memory (like "Did WooHoo with $Subject"), in which case my method is going to breakdown on the second impregnation anyway - unless restricted to detecting male impregnation only when looking for a second pregnancy.
Alien abduction is a repeatable memory, so this algorithm will work fine. Alien abduction is flagged repeatable because the number of alien abductions is counted as a multiplier for the Extraterrestrial Reparation Grant. One purpose of this mod is that the scholarship will also be awarded on the basis of alien heritage. It is in the interests of Sim society that aliens be well indoct... um, educated.

Quote:
Originally Posted by Sophie-David
But I am aware that lookup GUIDs have the chance of being repeated in other neighbourhoods. Do you know of a way to detect the neighbourhood's ID number programatically?
Yes, use the Global variable for Neighborhood ID. For example Expression (Global 0x0028 (Current Neighborhood ID) == Literal 0x0002) will check for Strangetown.

BTW, it is useless to check for Stella Terrano's GUID because La Fiesta Tech may be attached anywhere. Her GUID will be initialized more or less randomly during the attachment process. While it would be desireable to identify her as alien manually it is in any event too late to apply for scholarships when she is already in college.
Instructor
#8 Old 16th Apr 2008 at 1:59 PM
It's really insteresting and I think I will use your infos in order to make a mod which allow alien only to ask an abduction of a normal sim !


But is it possible to test the memories of the grandparents in order to detect the second alien generation ?
Scholar
Original Poster
#9 Old 16th Apr 2008 at 8:57 PM Last edited by Sophie-David : 16th Apr 2008 at 9:09 PM.
Quote:
Originally Posted by Kabuto
It's really insteresting and I think I will use your infos in order to make a mod which allow alien only to ask an abduction of a normal sim !
Ah, what a delightfully evil idea!

All being well my project will be released by this time next week. It is intended for the Victorian London Challenge - The Honest to Dickens Mirrors for Discerning Victorians. You are welcome to scoop out any useful code, although credit would be nice of course. What you may want to do is simply use my objects in support of your project so that you will neither have to reinvent the wheel nor introduce yet another system of alien detection to the possible confusion of the players.

BTW, there is a non-functional BHAV in the globals, called something like "Do I Have an Alien Dad?" If I remember correctly, it is supposed to prevent half-aliens from being impregnated if they are abducted. But since the game does not preserve the link from a half-alien child to the Pollination Technician NPC this code is useless.
Quote:
Originally Posted by Kabuto
But is it possible to test the memories of the grandparents in order to detect the second alien generation ?
Yes, it would be entirely possible to do this with a recursive algorithm. However, the coding was becoming quite complex already so instead of doing so I actually set a token on any given alien so that generational detection becomes very easy.

I also use a lookup table to determine the alien status for the legacy aliens that come with the game. The natural child of a legacy alien will be appropriately classified, and the child's alien token is then used to determine alien status for future generations.

But there is a twist to this. I use the token to track the portion of alien heritage that any given Sim may have, on a scale of zero to four, as follows:

0 - Contains no traceable alien heritage: a standard Sim genotype. Normally used only as an override. For example Strangetown's Jill Smith is programatically tagged as a half-alien because her father is a full alien. But not only does Jill not look like an alien, it is quite clear from studying her genotype in SimPE that Pollination Technician Smith is not her biological father. The value of zero is used to set things straight.

1 - One Quarter Alien: typically this would be the child of the union between a half-alien parent and a standard parent. Dina and Nina Caliente are theoretically quarter-aliens.

2 - Half Alien: the child of an abductee or the child of two half-alien parents (my genotyping is simplistic - typical of the laws of citizenship inheritance rather than biologically based)

3 - Three Quarter Alien: the child from the union of a pure alien and a half-alien. This could happen if a half-alien were impregnated during an abduction. Or less likely, if Pollination Technician Smith had an affair!

4 - Full Alien, a pure alien genotype. Strangetown's Pollination Technician Smith is the only known and alive full alien in the legacy game. Perhaps La Fiesta Tech's Stella Terrano is also a full alien, but I haven't checked yet. There are however a total of seven dead full aliens that could be relinked in SimPE and then resurrected.

For your Abduction by Alien Agent project you could simply read the Alien Token's value and proceed from there.

For CAS aliens and those like Stella Terrano and Phaenoh's Polly whose geneology is untraceable and who have non-fixed GUIDs, I do plan to release The Candelabrum of Unearthly Visitation as a supporting object. This will allow the user to set any arbitrary value on the Alien Token, as well as arrange for the introduction of CAS aliens from the Sim Bin into the neighbourhood (i.e. free range aliens ).
Scholar
Original Poster
#10 Old 24th Apr 2008 at 8:54 PM
The finished mirrors have now been posted here.

La Fiesta Tech's Stella Terrano is in fact a pure or full alien. As noted above, her status is not detectable by these mirrors.

Pleasantview's Dina and Nina Caliente are not alien in any respect. Genetic testing has shown that their father Flamenco had not a trace of the alien genotype, proving that Pollination Technician 7 could not have been one of their grandparents. Some folks will claim anything for a little notoriety!
Instructor
#11 Old 25th Apr 2008 at 4:30 PM
Thank you, your BHAV code will be very useful for future projects !
Scholar
Original Poster
#12 Old 26th Apr 2008 at 7:28 PM Last edited by Sophie-David : 26th Apr 2008 at 9:01 PM.
Default Alien Detection BHAVs
Kabuto, these are the specific BHAVs you will need to extract (with instance numbers in parentheses):

Get in Temp 7 - Alien Research (1026)
Sub - Same Subject? (1027)
Get in Temp 7 - Registered Alien (1028)
Sub - Add/Update Alien & Misc Skill Tokens (1029)
Get in Temp 7 - Alien Token (1030)
Function - Is Castaway? (10EC)

Together with the Alien token this will be all you need to both calculate and read alien status, completely independently of my discernment mirrors. Get in Temp 7 - Alien Research is the entry point, and it operates on the Sim pointed to by the Stack Object. This BHAV will return the Alien status in Temp 7 according to the table in Post #9 above (e.g. 0 = Non-Alien, 4 = Full Alien). These routines work with the base game, the three Stories editions, and all expansions.
Scholar
Original Poster
#13 Old 27th Apr 2008 at 6:38 AM
Strangetown's Chloe Singles, Lola Singles and Johnny Smith each have Pollination Technician #9 Smith as their father. Since their other parents were presumeably pure humans they should each be half aliens. However I discovered today that Maxis did not play by the rules and both their dominant and recessive Skintone Range values are alien, indicating that they are in fact full aliens. I have adjusted the lookup table (Get in Temp 7 - Registered Alien) accordingly.
Test Subject
#14 Old 3rd Jul 2010 at 1:24 AM
So could Dina or Nina have an alien child with either themselves (using cheats) or humans?
Scholar
Original Poster
#15 Old 29th Jul 2010 at 10:50 PM
Quote:
Originally Posted by haleyyxd
So could Dina or Nina have an alien child with either themselves (using cheats) or humans?
No. Dina and Nina are not alien at all.
Fat Obstreperous Jerk
#16 Old 30th Jul 2010 at 6:55 PM
Trying to detect an "alien" in the way above gets hairier when you consider that NONE of those are actual indications of being a green alien, and this method easily fails to detect Nth-generation aliens.

Grant me the serenity to accept the things I cannot change, the courage to change the things I cannot accept, and the wisdom to hide the bodies of those I had to kill because they pissed me off.
Scholar
Original Poster
#17 Old 30th Jul 2010 at 9:51 PM
Quote:
Originally Posted by J. M. Pescado
Trying to detect an "alien" in the way above gets hairier when you consider that NONE of those are actual indications of being a green alien, and this method easily fails to detect Nth-generation aliens.
I would be more than happy if you presented me with a better algorithm! However Nth-generation detection actually does work, provided you run the ancestors through the discernment mirror so as to set the alien token. I wasn't really concerned about the manifested skin colour - quite the contrary - I was wanting to detect latent alien ancestry, calculated to a one quarter level.

See Honest to Dickens Mirrors, Baker's Dozen (11) -
Quote:
The results of these calculations are also used to adjust the Miscellaneous Skills token's Alien Abduction value. This value is used to determine scholarship benefits, with one scholarship of 1500 awarded for each quarter portion of alien heritage.

Of course this algorithm has very little to do with genotype, but everything to do with ancestry - much the same as how western governments typically determine aboriginal status. The only truly accurate way that I know to determine genotype is through SIMPE, the Sim equivalent of a blood test.

The most significant shortcoming with this method is that there is no support at all for CAS aliens, including those with user created skintones. For this reason I devised the as yet unpublished Candelabrum of Unearthly Visitation so that the user could set the alien token to an arbitrary value. But as usual that venture kept growing and then became swamped by layers of new projects...
Back to top

Section jump