Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Separate Conditionals

A topic by The Planetary Courses created Sep 02, 2021 Views: 189 Replies: 2
Viewing posts 1 to 2

Sorry, I’m a bit new to Sophie’s Dice, say I wanted to roll 2d8, and if one of them rolls an 8, it doubles the value of the other die. Would that be possible? How do I do that? Thank you so much in advance !!

Developer

This one is actually pretty tricky, so it’s probably easier to just roll the dice and work it out yourself, but here’s my best attempt at a roll expression to do this (you might be able to do better with a good understanding of maths and the available dice notation:

roll=2d8, doubling=((roll-8)*2)*roll#, max(roll,doubling+(roll#*8))

This outputs three results, “roll” which is just the 2d8, “doubling” which sums any doubled values as a result of rolling 8s (roll# is the number of 8s in the roll pool, using the ‘count’ condition). The final result is greatest value; either the roll, or doubling plus 8 times the number of 8s rolled.

The final result will work as the value you want unless both dice roll 8, in which case you’ll need to use the ‘doubling’ result (or just remember that it is always 32 for that roll).

Like I said, it’s tricky! A lot of roll logic is deceptively complicated even when it seems simple in English (the ‘other die’ is the main complicating part here. If you wanted to just double the value of both dice for each 8 it would be much simpler:)

roll=2d8, roll*max(1,roll#*2)

Anyway that’s the best I can do for now, sorry. Hope it helps!

I understand, thank you so much for the in-depth explanation! Although I feel like I’ll work out the additional rule manually instead. I’m really loving your program by the way, me and my friends use it to make and test out our original TTRPG systems and it makes everything SO convenient <3