PDA

View Full Version : Random in story templates



Shogar
February 9th, 2018, 13:47
When trying to setup a random amount of something, is it not possible to get 0(zero)

I've got an NPC table setup and in the template it is set as:

[1d3-1x][Start NPC]


I want a chance of 0-2 NPC's, but the result is 1-2, there is always at least one of them.

Note: these are all Humanoid types for populating buildings in a town or such, like waitresses in an Inn, groomsman for the barns etc. with full descriptions (race, name, height, weight, background, quirks, etc.)

Trenloe
February 9th, 2018, 13:51
Actually, I've just done a test with random tables and I can get 0.

Can you provide more details of how you've got this setup? It's best to provide a screenshot showing the setup you're trying with the issue shown.

Shogar
February 9th, 2018, 13:58
The way I have it setup it pulls from about 15 different charts, things like Name, race, height, weight, background, quirks, etc.
It works fine except it will not let me get a result of zero, Such as an Inn that has 1d4-1 servents or grooms or... I want there to be a chance of none, but it always returns at least one of them

Trenloe
February 9th, 2018, 14:03
Please see my updated post above - a screenshot of the issue will really help!

Zacchaeus
February 9th, 2018, 14:40
I think you may be right. From a Story Template using the line [1d3-1][Table] will always call the table at least once no matter what the result of the dice roll is. I also tried to interpose a table between the expression and the table to be called; i.e. in the story template I called a table named [Call Me] which rolled [1d3-1][Table]. If I rolled just on the table Call Me in the chat output when the result was zero then it didn't return a result from the Table called but when used in a story template at least one result was always returned.