diana47

joined 1 year ago
 

Hi!

I need a consumable list where two items are picked, but only the first is a random selection, and the second item is not at random but always a specific item based on the random first item.

Say, if item one is "A", then item two always has to be "X", and if item one is "B", then item two always has to be "Y".

To complicate things: "X" and "Y" should not be eligible for the random first item, they can only be the second, non-random item.

To complicate things further: none of the items are numbers, I'm sorry.

What I tried was to do something like a consumable list with dynamic odds, where I used == instead of != in mad hopes it'd work, but of course it didn't. (Is this something that could work if I changed it up a bit?)

A friend suggested I could use key/value pairs, but that would be so incredibly unwieldy and I'd rather not. I want to use this for long lists (plural) and for multiple possible outcomes. If key/value pairs are the most reasonable way to do this, how would I do this? Could I define the pairs in my list?

I'd really, really appreciate if someone could point me in the right direction.

Sorry if my question and/or explanation is confusing, I had too much coffee and I've been staring at code >24 hours now. Please let me know if I need to rephrase my question to make it make sense to people who are not in my brain.

Thank you!

(Not linking the generator in question because it's almost 3,000 lines of code and what I want to do is currently not in it anyway lol.)