Random amount deck pick

Hello.

I just discovered the program a few days ago after I searched for an easy to use customizable random generator for ages, and this seems to be the perfect solution. After reading the PDF manual, I made a random vehicle generator for a post-apocalyptic scenario. I would like to have random amounts of damage / damaged components generated, but obviously I don't want the same kind of damage appear twice. So my code looks like this:

Table: DamageYN
shuffle: DamageType
2:None
8:[!1d4 DamageType >> implode]

Table: DamageType
shuffle: MissingParts
4:Tires / Tracks
6:Battery
2:Motor
1:Shotholes
3:Missing Parts: <font color=red>[!1d6 MissingParts >> implode]</font>
2:Crashed
3:Burning
3:Burnt out
6:Brakes
6:Ignition
3:Horn

Table: MissingParts
2:Lights
6:{1d2} Outside Mirrors
5:Interior Mirror
5:Antenna
5:{1d5} Seats
1:Pedals
3:Gear Lever
2:Steering Wheel
1:Interior Lights
4:Bumper
1:Grill
2:{1d4} Doors 
1:Exhaust pipe
1:Instruments

However, apparently deck picks do not work with dice throws, as the table gets shown as "missing". How can I still have a random amount of damages picked from the list without having the same kind appear more than once?

Comments

  • You're so close! It works, you just need that 1d4 to be in curly brackets:

    8:[!{1d4} DamageType >> implode]

    Also, you don't need those Shuffle lines. Initially, everything is available to be picked. If the generator runs multiple times, everything is available each time. You only need to shuffle if you are going to make some random selections followed by a new set of random selections that you want to possibly overlap within the same result. For example, if you had a treasure generator where you want a result that might say there are 3 diamonds and 2 rubies in the first bag AND 1 diamond and 6 sapphires in the second bag. In that case you might want to be able to pick diamonds once per bag, but never twice per bag. This is pretty niche. In your generator as you have it, removing those lines will make zero difference, they are not doing anything at all.

  • Oh shoot, I didn't think of having these brackets there too.

    Ah okay. From reading the PDF I thought I needed to shuffle, but it makes sense the way you put it.

    Thank you!

Leave a Comment