Jump to content

How to - condition on quest alias


Recommended Posts

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

 

image.png.c5cc3e6ef2eb1e6f9bb16275407e3dbc.png

 

^^basically the first condition should not be hardcoded, but rather take a global into account

 

cc @Flashy (JoeR) @EgoBallistic

 

Thank you!

 

 

Link to comment

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
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

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
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

 

image.png.c5cc3e6ef2eb1e6f9bb16275407e3dbc.png

 

^^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?

 

:hushed:

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use