In this forum, you can ask questions and get help with the House Party Custom Story Creator. Not for Bug Reports. See the forum below for that.
Forum rules
Forum rules
No racism, sexism, anti-semitism, brigading, doxxing, or ANY form of abusive behavior. No discussion of hacking or piracy or the buying, trading, or selling of ANY type of product or service (digital or otherwise). No advertising of any product or service (digital or otherwise, and this includes streams or any service involving 'subscribers'). No discussion of religion or politics. Do not link to other adult sites, with the exception being discussion of other adult games in Offtopic/allowed subforums; i.e. no pornography.

Do not spam, do not try to circumvent any automated tools that are part of these forums or any linking to these forums. Do not judge others based on their preferences for custom stories, their opinions, sexuality, etc., and most certainly do not bring it to the moderators.

Respect the moderators and each other and all will be well. Report any violations of the above rules. Do not violate local or international laws (including, but not limited to the laws of your country and/or the laws of the United States) while making use of these forums. The IP address of all posts are recorded to aid in enforcing these conditions.

We will use username, e-mail, AND IP bans without reservation, and mods hold the final word in such decisions.
Post Reply
Posts: 34
Joined: Thu Aug 09, 2018 10:02 pm


Post by flyeatsdog » Fri Sep 07, 2018 8:56 am

Coinflip is a 50-50 chance only,or? But that doesn't mean that we can't even the odds on more choices.
Here are my thoughts on how to even the chances:

ET=Event Trigger, O=Order, V=Modify Value, Trigger=Perform Event

ET:Choice 1
O:0 V:c1=1
O:0 V:c1=2 Crit:Coinflip
O:1 Trigger:Choice 2

ET:Choice 2
O:0 V:c2=1 Crit:c1=1
O:0 V:c2=2 Crit:c1=1;Coinflip
O:0 V:c2=3 Crit:c1=2
O:0 V:c2=4 Crit:c1=2;Coinflip

c1=1 and c1=2 should both have a chance of 50%.
c2=1, c2=2, c2=3 and c2=4 should all have a chance of 25%.

ET:CChoice 1
O:0 V:cc1=1
O:0 V:cc1=2 Crit:Coinflip
O:1 Trigger:CChoice 2

ET:CChoice 2
O:0 V:cc2=1 Crit:cc1=1
O:0 V:cc2=2 Crit:cc1=1;Coinflip
O:0 V:cc2=3 Crit:cc1=2
O:0 V:cc2=4 Crit:cc1=2;Coinflip
O:1 V:cc1=0 Crit:cc2=4
O:1 V:cc2=0 Crit:cc2=4
O:2 Trigger:CChoice 1 Crit:cc2=0

cc2=1, cc2=2, cc2=3 and cc2=4 should all have a chance of 25%, but since cc2=4 resets the values and jumps back
it should even the chances for cc2=1, cc2=2 and cc2=3 to be 33,33%.

This could be expanded to more choices. I have added a file where you can see or test it. Please correct me if i'm wrong.
Is my thinking right? Is there maybe a better/easier way to do it?
(107.61 KiB) Downloaded 46 times

Posts: 770
Joined: Thu Feb 15, 2018 1:50 am

Re: Coinflip

Post by peter980 » Fri Sep 07, 2018 11:02 am

I'm already doing something like this in my story.

For example two conflips in condition equals 25% chance.

Or if you assign separate variable to result of both conditions, you essentilly get binary number between 0-3 (00, 01, 10, 11), whivh you can use as random select between 4 choices.

Posts: 34
Joined: Thu Aug 09, 2018 10:02 pm

Re: Coinflip

Post by flyeatsdog » Fri Sep 07, 2018 11:47 am

Thanks for your fast reply. I'm gonna check it out.

Posts: 926
Joined: Tue Feb 13, 2018 4:29 pm

Re: Coinflip

Post by erasmus » Fri Sep 07, 2018 12:21 pm

Yep, you can do a fair amount with coin flips and nesting them (as I believe you're discussing here) can allow for some interesting possibilities. Always just be aware that a coin flip by itself will execute the moment it "passes". E.g. our warpto's when the Original Story starts can effectively have the characters warp to several places prior to the checking against the result of their final flip. Oops.
Eek! Games LLC
Vice President, QA & UX

Posts: 36
Joined: Mon Aug 06, 2018 6:48 pm

Re: Coinflip

Post by e2pii » Sat Sep 08, 2018 12:34 am

You can simplify that considerably.

modify value x set 0 (if not already)
modify value x add 1, criteria coinflip
modify value x add 2, criteria coinflip
modify value x add 4, criteria coinflip
and so on.

Then x has a uniform distribution (equal probability) from 0 to 2^(n)-1. And don't forget you can use less than, greater than, and inequality checks when deciding what values trigger what events.

Posts: 34
Joined: Thu Aug 09, 2018 10:02 pm

Re: Coinflip

Post by flyeatsdog » Wed Sep 12, 2018 7:35 am

Thanks e2pii. Thats alot easier.

Post Reply