The plugin takes a Start value, and an End value, and will produce a unique sequence of those numbers, without repeating. The range is inclusive, so if you specify a range of 1 to 5, you will get the numbers 1,2,3,4,5, in a random pattern.

A Threshold value lets you configure how the cycle repeats when all of the numbers are used, and the sequence needs to continue/cycle. A Threshold=0 will completely ignore the previous sequence, so the numbers will be random within the same range again, but it is possible that the last number of the sequence may be the same as the first of the next. For example; 2,5,4,1,3 could be followed by 3,1,4,2,5. The value 3 will repeat because the sequence must be regenerated and no logic is applied to test the last value of the last sequence. A Threshold=1, would guarantee that the first number of the next sequence would not be a 3, so there would not be a repeat immediately when the sequence restarts. Care is still required not to abuse the Threshold, as if it is too large (that is, greater than half the range), it is impossible to guarantee not repeating the same values.

## Download

1.1 Stable (13.78 KB)## Info

- MIT License
- Official addon website
- Copyright David Taylor. All rights reserved.

## Statistics

- 685 total downloads
- 685 downloads of latest version
- 1 downloads per day average

## 10 Comments

You would want 4 instances, with a range of 1 to 40, if you want to pull cards from each category. Then you pull 4 cards from each instance. The threshold doesn't apply as you'd want to stop at 40 cards pulled, for each deck.

ok i will try that then. Thank you!

I Tried to use the plugin to pull a card out of 40 available from 4 different categories (so total is 160 cards).

It doesnt seems to work the way I was excepting as if I just do a test with 4 cards in each category, the same card eventually come back again when I choose start:1, end:4, threshold:4 before other cards was pulled.

Should I have 4 time each the same plugin in the project (one for each category) to solve this problem?

luckyrawatlucky

No, I don't support that, and don't see the need to do so. Just use a function to get the next value, and if it is '8', skip it and get the next number.

What if I want to skip a number between a range

Example

I random range is 1-15 but i don't want to 8 to be appear.

is this possible ?

if not can we have a feature like this, So we can skip some numbers from range that we don't want appear.

Thank you that was awesome and quite simple to use.

Fib, people were constantly asking how to do this. It seemed an obvious solution.

This seems great for representing something like a deck of cards, where when a card is drawn it is removed from the deck. Is that what you were going for? Or did you have another use in mind?

Thank you!

Good job!

I was waiting for this plugin!