SAC Posted January 4, 2020 Share Posted January 4, 2020 Hi I have a quest selecting aliases for some sex stuff. Right now, one condition is "getissex male == 1" (meaning the alias should be male) "On popular request", I want to introduce a global variable to allow females too, something like: if _allow_female_global == 1 then disable the "getissex male == 1" condition In papyrus this can be done either with an if condition, or something "smart" like target_actor.getsex() > _allow_female_global, but in CK the quest alias does not seem to use numbers to denote gender, and I don't know how to do apply a condition to a quest selection criteria... not sure how clear my description is ^^basically the first condition should not be hardcoded, but rather take a global into account cc @Flashy (JoeR) @EgoBallistic Thank you! Link to comment
Guest Posted January 4, 2020 Share Posted January 4, 2020 I do it like this myself... I have a global variable set to 0 (male), named whatever you want. Link this to an MCM toggle that is worded so people know turning it ON means allowing females too. Then in your alias condition, do: GetIsSex == Male <= nameofyourglobalvariable It is important that it is <= and you need to check the use global checkbox and select your global variable. In this way the alias can be either male or female, depending on 1) the value of the variable (0 = male, 1 = female) and 2) depending on if you wish it to be males only or females only, which would be something completely different. The way I show up above is a single alias that allows male only if global = 0 or allows men AND women if the variable = 1. if you want females only then you need two aliases. One for males when the variable = 0 and one for females if the variable = 1. This one is a little trickier if you are using them for dialogue, but its not undoable. You just need to make sure BOTH aliases are set to OPTIONAL and you need a third alias, and empty one (Forced Ref = NONE), that is also OPTIONAL. And then in your MALE alias and your FEMALE alias, you tell them to force fill the third alias upon fill. In this way, they both wil use the third alias, which is what you would use for dialogue. Link to comment
SAC Posted January 4, 2020 Author Share Posted January 4, 2020 32 minutes ago, Flashy (JoeR) said: if you want females only then you need two aliases. Thank you! I need the simple case, i.e. default just males, allow also females on variable, never just females Link to comment
SAC Posted January 4, 2020 Author Share Posted January 4, 2020 41 minutes ago, Flashy (JoeR) said: GetIsSex == Male <= nameofyourglobalvariable ^^like this, right? Link to comment
SAC Posted January 4, 2020 Author Share Posted January 4, 2020 3 minutes ago, Flashy (JoeR) said: Yessir! Thank you very much again! Link to comment
SAC Posted January 4, 2020 Author Share Posted January 4, 2020 3 hours ago, Flashy (JoeR) said: GetIsSex == Male <= nameofyourglobalvariable I am doing something wrong. MCM toggles the global correctly (tested it), but, irrespective of the global value, I am getting a mix of males and females, instead of just males vs males+females Link to comment
Guest Posted January 4, 2020 Share Posted January 4, 2020 Your conditions, as shown in your screenshot, are set up correctly. This is exactly how Shenanigans does it for deciding sexual orientation of a pair of NPCs. Wait... Get is sex = male <= 0 would return women only. Get is sex = male <= 1 would return women and men. Change your get is sex to FEMALE. THATS how Shenanigans does it. So then: GetIsSex == Female <= 0, would return only males. GetIsSex == Female <= 1 would return males and females. Link to comment
VonHelton Posted January 4, 2020 Share Posted January 4, 2020 3 hours ago, SAC said: Hi I have a quest selecting aliases for some sex stuff. Right now, one condition is "getissex male == 1" (meaning the alias should be male) "On popular request", I want to introduce a global variable to allow females too, something like: if _allow_female_global == 1 then disable the "getissex male == 1" condition In papyrus this can be done either with an if condition, or something "smart" like target_actor.getsex() > _allow_female_global, but in CK the quest alias does not seem to use numbers to denote gender, and I don't know how to do apply a condition to a quest selection criteria... not sure how clear my description is ^^basically the first condition should not be hardcoded, but rather take a global into account cc @Flashy (JoeR) @EgoBallistic Thank you! I'm a total newb at scripting, but it sounds like your negating the very thing you're trying to do? Link to comment
SAC Posted January 4, 2020 Author Share Posted January 4, 2020 1 hour ago, Flashy (JoeR) said: GetIsSex == Female <= 0, would return only males. GetIsSex == Female <= 1 would return males and females. Yep. This works perfectly. TYVM! Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now