Dialogue Action - Check Strings for "Not Equals"? (1 Viewer)

MagnusNoctus

Potential Patron
Joined
Nov 22, 2022
Hey,

I was wondering if it was possible to check for a "not equals" or "!=" when dealing with Strings. I know there is an entire explanation for checking integers, but found that this won't work when checking String data.

There might be another way around this if there isn't a way.... I'm attempting to check to see if the girl is wearing any clothes (i.e. not "None"). I'm hoping that my dialogue can dynamically check to see if there are any clothes being worn before it attempts to remove a particular item. But the particular item could be one of many.

general:"I'm not wearing a bra." {"check":{"da.clothes.top.type":"None"}} // This one works
general:"I'm wearing some kind of bra." {"check":{"da.clothes.top.type":"!=None"}} // This one doesn't

Thanks for any help.
 

BlueZephyr

Casual Client
Joined
Nov 29, 2018
Coincidentally I'm having a similar issue, except I'm checking for her name. Basically I have 4 girls taking turns and I want it to be random and they won't go twice in a row. I'm considering using their loaded names to decide who not to load next.

{"check":{"da.her.name":"!=Heather"}}

Seeing as M MagnusNoctus 's example didn't work I'm sure mine won't either. I'll look around and research to see if I can find a solution.
 

BlueZephyr

Casual Client
Joined
Nov 29, 2018
Ok so, quick search on here and I found a couple tutorial threads for dialogues. Unfortunately it seems you can't check strings with operators such as <=, >= and !=. It works just fine with numbers but I can't seem to find a way to do it with strings. For the time being I'm just gonna try to find a work around in my dialogue. Sorry I couldn't help this time. Maybe someone else could shed some light on this?
 

Sam_U_R_aI

Content Creator
Joined
Sep 28, 2023
I might be a little late for a reply and both of you already found a (different) way to do it, but you M MagnusNoctus could use an equals check within a line redirection trigger, like this:

intro:"[intro*da.clothes.top.type == None*]"​
intro0:"I'm wearing *da.clothes.top.type*."​
intro1:"I'm not wearing any bras."​

It basically plays intro0 or intro1 depending on the truth of the statement within the asterisks (if the variable's value doesn't exactly coincide with the string, it's a false statement, i.e. 0; if it does, it's a true statement, i.e. 1). I've used such a trick in a dialogue of mine (unfinished, might try to complete it some day or another) where he reacts accordingly to her underwear or lack thereof as she undresses.

As for BlueZephyr BlueZephyr , you could use a variant of it for the check then load a different girl like this:

initial_settings:{"x":"*"}​
intro:"[intro*da.her.name == Girl1**da.her.name == Girl2**da.her.name == Girl3**da.her.name == Girl4*]"​
intro1000:"I'm Girl1.[newgirl*da.random x 3 \ 1 + 1 % 4 + 1*]"​
intro0100:"I'm Girl2.[newgirl*da.random x 3 \ 1 + 2 % 4 + 1*]"​
intro0010:"I'm Girl3.[newgirl*da.random x 3 \ 1 + 3 % 4 + 1*]"​
intro0001:"I'm Girl4.[newgirl*da.random x 3 \ 1 + 4 % 4 + 1*]"​
newgirl1:"Now I'm Girl1."​
newgirl2:"Now I'm Girl2."​
newgirl3:"Now I'm Girl3."​
newgirl4:"Now I'm Girl4."​

So the following newgirl<int> (each with a corresponding da.charcode.load to at the very least change her actual da.her.name) line is set by the formula da.random x <totalNumberOfGirls - 1> \ 1 + <thisGirlNumber> % <totalNumberOfGirls> + 1, which would select any girl but the current one.
 

Users who are viewing this thread

Top


Are you 18 or older?

This website requires you to be 18 years of age or older. Please verify your age to view the content, or click Exit to leave.