Skip Navigation
InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)CW
cwiggins999 @lemmy.world
Posts 2
Comments 2
Offsetting returned value from table
  • Thanks for these solutions - clearly I have a lot to learn about Perchance, and some of these techniques will be helpful with some things I want to do in the future. I just discovered Perchance within the last week and really finding it useful for some tools for gaming.

    I came up with this solution after posting the question - I created a "showhead" and "showtail" variable and set them to 0 or 1 based on my input field value, then tagged just the first and last list entries with "conditional odds" based on that value - like

    lastitem ^[showtail]

  • Offsetting returned value from table

    I have a table with 13 entries, but based on a variable (values -1, 0, 1) I would want to return from items 1-11, 2-12, or 3-13 respectively. So the variable value would essentially tell the generator to ignore some entries from the head or tail of the list. Is there a way to accomplish this in Perchance?

    3
    Multiple paths in a generator
  • Excellent - thanks! Each environment seems to have nuances, but I should have tried this google approach - glad to see it is well indexed. The history examples are perfect.

    I looked at the DYI API also - can it handle a parameter for choosing a particular output, as in the multiple-independent-outputs-example? Like the individual buttons do, using "update(out1)", "update(out2)", etc.? I'm thinking of invoking this in Tabletop Simulator's ingame tablet, and it has an earlier version of chromium that doesn't look like it supports the generator URLs directly, so might use an API versus trying to transpile.

  • Multiple paths in a generator

    I just discovered Perchance this morning while looking for some options to consolidate and "oracle-ize" some pen-an-paper game tables from Ganesha games. I'm a retired and somewhat lazy software developer who figured there should be a way to accomplish this without reinventing the wheel, and Perchance seems to fit the bill well. One initial question - the example generator html files seem to have a single call to "update" when the button is clicked. Can a generator respond to multiple button messages? For example if I wanted to include two unrelated tables in a single generator file ? I have about 15 tables for one game, and would like to be able to have buttons for each table, plus a read-only scrolling text area that contains the output from each click, like a journal.

    3