Randomized Choices in Dialogue (1 Viewer)

BlueZephyr

Casual Client
Joined
Nov 29, 2018
I'm not sure I can explain this properly but I'll give it a try.

I've developed a way to get random choices in dialogues using the da.random variable. Using it I can get a simple yes/no answer. Using 2 of them together will get me a choice of 4 things. The formula I use is *da.random <= custvar*. Therefore, if random is less than the custom variable I set it'll return 1. My question I'm getting around to is how to do 3 choices like this?

What I'm aiming for is to allow Him to choose a different sex position after climax, to put it simply. The dialogue can do her control, forced and doggie sex. I'm guessing her control could be a default where it'll happen if the other 2 don't trigger, then having forced and doggie positions be chosen with custom variables that da.random will be compared with.

Any ideas?
 

Eva-2X

Content Creator
Joined
Nov 3, 2018
If you use MoreTriggers mod, you can bind two custom variables together by using the following trigger.
[BIND_VARIABLES_custvarA_custvarB]

Each and everytime the custvarA value is updated (let's say 2), custvarB is also updated to that very value. This will help you to sharpen/extend your decision tree.

Below is a quote from the author of the mod.

[BIND_VARIABLES_<var1>_<var2>]: When you write dialogues, you may want to double check some variables on a same line to create ranges. For example I defined "myVariable":5 and I have some lines like these:
myLine:"Blah blah" {"check":{"myVariable":">=1","myVariable":"<=3"}}
myLine:"Blah blah" {"check":{"myVariable":">=4","myVariable":"<=7"}}
myLine:"Blah blah" {"check":{"myVariable":">=8","myVariable":"<=10"}}
Basically, it would not work, because you can't check the same variable multiple times on one line. I think it's sby sby who reported this, or at least I've been aware of this by reading the notes of one of his mods where he explains that he created var1 and var2 which are always populated with the exact same values so that you can use var1 and var2 to check for ranges of values for the "same" variable.
So if you want to do this in your own dialogue, you have to make sure that you always "set":{} var1 and var2 with the same values at the same time. Maybe you won't find this difficult, at least if you think about ranges from the beginning of your writing (adding it in an already 500 lines dialogue is a pain in the ass, trust me), but it can still be a source of errors if you forget this somehwere and your vars loose synchronization.
Anyway, since I'm just a lazy ass, I created this trigger so that you can bind var2's value to var1's value. So you just have to create your var1 and var2 in the initial settings and then you fire this trigger and voila ! Every time you will "set":{} the value of var1, var2 will be synchronized automatically. It's magic ! :p
Note: The binding works only in one way; var1 -> var2. So if you "set":{} var2, var1 won't be updated as well. That's your problem :)
Note2: Only a "set" operation will trigger the update of var2's value. This means that you can only use this trigger to bind together variables that you defined and will manage yourself through your dialogue. But IT WON'T WORK with variables like da.breathPercentage or mt.cuminmouth, because these variables exist only to let you access the value of variables already managed by the game and over which you don't have full control. Well, in fact, the binding would work in the sense that with each time you "set" mt.<whatever>, var2 will also be updated, but every other time that anything which is not you will make the value of mt.<whatever> change, var2 won't be updated. Be aware of that !
 

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.