FlashyJoer Posted November 23, 2017 Share Posted November 23, 2017 Is anyone aware of why spawned settler NPCs that are visibly female have a getsex() value of 0 (man), instead of 1 (woman)? All of the NPC Actors in the CK clearly show the Female checkbox as ticked (default Actors) but their value shows as male in game... yet named NPCs with the checked Female flag do return a 1 value for GetSex()... stumped. Thoughts or exact knowledge you can share? Link to comment Share on other sites More sharing options...
FlashyJoer Posted November 23, 2017 Author Share Posted November 23, 2017 Okay... this is very weird and I dont get why it is set as such, but all of the ENC female farmer NPC actors are using the MALE farmer default template.... going to play with this and see if it fixes my problem. Link to comment Share on other sites More sharing options...
FlashyJoer Posted November 23, 2017 Author Share Posted November 23, 2017 (edited) So that doesnt work... tried instead to obtain closest with a Ref Alias, as shown in the screenshot with the following code, where RSE_PartInCrime is a global var in my MCM to determine the preferred gender for companion. But of course, it always returns Target Gender Not Found, even though I am standing NEXT to a female NPC... unless I am near a named NPC like Piper and then it reports female found. Im stumped... am I doing something wrong, is there a reason the gender is not working on basic npcs? Id appreciate the input... pulling hair out and starting to look like Homer S now... :tongue: ReferenceAlias Property ClosestREF auto <--- screenshot shows how ref is set. Actor Closest = ClosestREF.GetReference() as ActorInt GenderChk = Closest.GetActorBase().GetSex()If GenderChk == RSE_PartInCrime.getvalueint() Debug.Notification("NPC is female")Else Debug.Notification("Target Gender not found")Endif Furthermore, if I take out my test code above and try this instead: Actor Closest = ClosestREF.GetReference() as ActorDebug.Notification("Name of Target :"+ClosestREF.GetLeveledActorBase().GetName()) The result is always empty - just the 'Name of Target:" shows... Edited November 23, 2017 by joerqc Link to comment Share on other sites More sharing options...
ThoraldGM Posted November 24, 2017 Share Posted November 24, 2017 Idk what's up with the gender flags, but debug notifications would not tell me what Scavver picked up (Name etc). But sometimes debug trace printed the full info in Papyrus.0.log Link to comment Share on other sites More sharing options...
FlashyJoer Posted November 24, 2017 Author Share Posted November 24, 2017 (edited) I found the problem and Ill be happy to share. :smile: I found the if I use GetActorBase() on spawned NPCs, ie: generated from a level list, I get empty results. BUT, if I use GetLeveledActorBase().GetSex() or .GetName(), I actually get the real result. :smile: The only one that doesnt work on leveled actors is race, cuz according to the wiki, race is not used on level list spawns. At least not in a way we can query in papyrus... Edited November 24, 2017 by joerqc Link to comment Share on other sites More sharing options...
Pelgar Posted January 3, 2018 Share Posted January 3, 2018 Hey Joerqc, thanks for sharing. I've been stumped by this all day. Maybe I can start making some progress now. Link to comment Share on other sites More sharing options...
Recommended Posts