Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

draw without replacement

Hi everyone, We want integrate a draw without replacement in macro, because in "Insectopia" we take, one, two, etc "blatte" in a bag and roll20 don't have this option Can you help me please. Thx
1587117845

Edited 1587118077
Hello, The following post is probably what you are looking for: Draw from a pouch (do not hesitate to browse the whole thread, tricks posted are truely awesome).
Thx, But this technic is hard, and I don't need view of the count . I just need have virtual bag and pouch one two or more without replace in I sure is it possible with API but coding is over my capacity lol. Thx for your awser
The only "simple" way I see to make the pouch without the API is probably what you've already done: create a rollable-table named 'Pouch', with the option 'Allow players to roll from table' checked and filled with below entries and change the weight of each color once drawn. When a weight is zeroed, the associated item cannot be rolled anymore. Macro for drawing from the pouch: @{selected|token_name} draws ?{Pouch, select how many marble to draw|1,a [[1t[Pouch]]] marble|2,a [[1t[Pouch]]] and a [[1t[Pouch]]] marbles|3,a [[1t[Pouch]]], a [[1t[Pouch]]] and a [[1t[Pouch]]] marbles|4,a [[1t[Pouch]]], a [[1t[Pouch]]], a [[1t[Pouch]]] and a [[1t[Pouch]]] marbles} Another macro, same usage (but you will have to hover the result to see all the marbles): @{selected|token_name} draws [[?{Pouch, input how many marble to draw|1}t[Pouch]]] The major drawback is the strenous work for the GM: the rollable-table must be changed after each draw. Weight Color 2 black 17 white 17 blue 4 green 2 red May a scripter come upon this topic ;)
1587228113

Edited 1587228732
Thx a lot ! The distribution is : red 3 green 6 blue 12 white 18 black 3 I test your idea but with this macro I have juste one result even if select 4
1587234867

Edited 1587235539
Thank you for the distribution, I wasn't sure about the numbers. I only knew there was 42 tokens. Try this new version: **@{selected|token_name}** draws ?{Pouch, select how many marble to draw|1,a [[1t[Pouch]]] marble|2,a [[1t[Pouch]]] and a [[1t[Pouch]]] marbles|3,a [[1t[Pouch]]] and a [[1t[Pouch]]] and a [[1t[Pouch]]] marbles|4,a [[1t[Pouch]]] and a [[1t[Pouch]]] and a [[1t[Pouch]]] and a [[1t[Pouch]]] marbles} edit: Some characters are problematic with roll query so we have to replace them with HTML entities (see Help Center article here )
Thx it work . It' is not without  replacement but I have one macro for all my draw ^^
After testing the 'without replacement' constraint by changing the weight of each marble color after each draw I stumpled onto a major issue: when you draw a number of marble that is higher than the number of a single marble color. - there is 7 marbles left in the pouch: 4 white, 2 blue and 1 red - a player use the macro to draw 4 marbles - the macro can draw: 1 white, 1 blue and... 2 red ! The issue can even occurs on the first draw: a player retrieves 4 marbles and the macro returns 4 black marbles which is impossible. The solution I provided doesn't work, sorry. I fear you need the API to do exactly what you want.
But thx a lot for your answer ! I better understand macro thx to you .