Random quantity of random rolls?

Hi folks,

I've been playing around with Inspiration Pad, and so far it's great! But I've come across something that seems like it should be easy, and I can't figure it out.

I want to generate an encounter of creatures (say, rats in this example) and to keep the return values succinct I want to get the results as close to one line as I can. Something like this:

6 rats. AC 6, HD 0.5, HP 3, 4, 3, 3, 1, 2.

The syntax I've attempted is along these lines:

[roll={1d6}] rats. AC 6, HD 0.5, HP [@roll {1d6} >> implode].

..but the [@ ] syntax is pretty clearly looking for a table, so I'm getting errors. Am I missing something?

Comments

  • First solution that came to me was to "give it a table", so, let's try:
    Table: RatEncounter
    [roll={1d6}] rats. AC 6, HD 0.5, HP [@{roll} RatHP >> implode].
    
    Table: RatHP
    {1d6}
    
    That's the only way I figured out. If anyone knows a way to handle is without additional table, please share.

    Also, a small [when] statement can be useful
    [when]{roll}==1[do]rat[else]rats[end]
    
    It can be closed in magic table and used like that:
    Table: RatEncounter
    [roll={1d6}] rat[@s with {roll}]. AC 6, HD 0.5, HP [@{roll} RatHP >> implode].
    
    Table: RatHP
    {1d6}
    
    Table: s
    [when not]{$1}=1[do]s[end]
    
    Surly doesn't solve all problems (like with "wolf" and "wolves") but may be helpful.

    Good luck
  • Thanks for the response, Warenhari. I finally hit upon a solution that looks quite a bit like yours. As you say, the second bit needs to be a table. So I created "Roller":
    Table: RatEncounter
    [qty={1d6}] rats. AC 6, HD 0.5, HP [@{qty} Roller with 1, 4 >> implode]
    
    Table: Roller
    {{$1}d{$2}}
    

    I later modified Roller to handle the possibility of super rats (1d4+2 hp):
    Table: RatEncounter
    [qty={1d6}] rats. AC 6, HD 0.5, HP [@{qty} Roller with 1, 4, 2 >> implode]
    
    Table: Roller
    Set: bonus=[when]{$3}>0[do]{$3}[else]0[end]    // If the third parameter is excluded, {bonus} gets set to zero.
    {{$1}d{$2}+{bonus}}
    

    Having a table for dice rolls isn't pretty, but this is the cleanest solution I've found.

    p.s. Plural/singular solutions are never satisfactory or complete, so I've resigned myself to just ignoring the occasional "1 rats".

Leave a Comment