• Hello game master! Welcome to our growing community. Please take a moment to Register (top right button, see how: Slides).

    If you use Campaign Logger, you can use the same login details - we've linked the app to this forum for secure and easy single sign-on for you.

    And please drop by the Introductions thread and say hi.

Generators from CSV Quick-and-Dirty How-To

ExileInParadise

RPG Therapist
Staff member
Adamantium WoA
Wizard of Story
A question about how to use Comma-Seperated Values (CSV) files to create generators came up on the RPT Discord (you are on the Discord right?)

I had need of a quick generator so I took some nodes while building it to share with you.

First, review the change log notes about CSV for generators that Jochen put in when he added them to the mix:
Generator UI now supports the upload of CSV, too (not just JSON)
The first CSV row is treated as a header row
Values within a row need to be separated by COMMA (not semi-colon)
Double-quotes around a value must be used to have commas within a value
Each column will become its own table
The filename will be the name of the new generator
The column names (from the header row) will become the names of the tables
The column names will be the categories of the new generator
The column names will form the auto-created result pattern from where one can adjust the generator manually

Jochen also linked a number of examples:
generators are available as code for download and tinkering:
https://campaign-community.com/index.php?resources/generator-file-downloads.327/

HOW-TO STEPS
Create your CSV file.

Example: Oracle.csv
d6,Oracle
1,"No, and ..."
2,"No"
3,"No, but ..."
4,"Yes, but ..."
5,"Yes"
6,"Yes, and ..."

Log into generator UI: https://generator-ui.campaign-logger.com/

Click "Open Generator Upload Window" button (just to the right of the green NEW button

Drag and drop your CSV into the "drop here" dashed box or - click within the dashed box and find your CSV file from the file picker.

Importing the Oracle.csv example above creates a new generator named [IMPORTED] Oracle with no description, and two categories "d6" and "Oracle" based on the column names in the header row.

THAT'S IT! It's ready to use or customize.

Click the [>] Play button next to the generator to run it in a window.

While it works as-is - it's rolling on each "column" as individual tables and showing both results in a confusing way...

For this example we really only need to see the Oracle result, not the d6.

Click the [Edit] button to open the Generator file in editor.

There are 3 "views" of the generator:
1. YAML source code
2. JSON source code
3. Through a form.

Switch to Form view.

Edit the Generator Name to suit such as Solo Oracle

Edit the Description to suit such as Solo gaming Yes/No Oracle with six results.

Edit the Path to suit, such as /Solo/Oracle

Edit the Categories tags to suit - I group my generators by Campaign Logger tag style (@ for NPC, ^ for Faction, etc).

Where does the Oracle fit? Rules ... so I am going to tag it as "~ Rules" - the space is intentional to avoid CL thinking its a log or page.

Edit the Result Pattern to match the format of the output line you want to see when you use the generator.

A {tablename} in the result pattern means "roll on this table and show that result here"

The Oracle example shows {d6} and {Oracle} - we don't need the 1-6 d6 table roll - so we can remove that from the result pattern leaving just {Oracle}.

We can add flavor text to make the generator a little more fun ...

Change the result pattern to says: "The answer to your dilemma is {Oracle}."

That's what your Solo Oracle generator will look like when used.

Advanced Note: If you plan to combine multiple generators and tables, adding flavor text to the result pattern may spoil how those result show up in other linked views.

Use flavor texts for standalone generators that are not intended to mix and match and be called by other generators.

There's nothing needs editing in the tables in this example, but it doesn't hurt to peek at them.

Hit the turn triangle next to d6 under Tables.

The d6 column of the Oracle.csv got translated as 6 rows with a multiplicity (M) of 1 each.

Multiplicity is "the weight" of that row and Value is what's returned when the table is rolled in.

If you had a table with 3 results but one result needed to be returned on a 1-8 of a d10, then 9 and 10 each returned some other result you wiuld use multiplicity and a 3 row table
Row: 1 Value V: Success! Multiplicity: 8
Row: 2 Value V: Complication ... Multiplicity 1
Row: 3 Value V: Setback! Multiplicity 1

Explore the Oracle table as well.
You can use the Mulitplicity (M) for each row to change how likely each of those results are.
If you wanted something like a "Bell Curve" you could:
Row: 1 Value: No, and ... Multiplicity 1
Row: 2 Value: No Multiplicity 3 (3 x more likely than row 1)
Row: 3 Value: No, but ... Multiplicity: 5
Row: 4 Value: Yes, but ... Multiplicity: 5
Row: 5 Value: Yes Multiplicity: 3
Row: 6 Value: Yes and ... Multiplicity: 1

Now that we've made our edits - choose VALIDATE at the bottom of the form.

That will run checks over what we've put in to ensure its useful as a generator.

You will get a green notice if all is well or a red notice if there is something to fix.

Save your generator when it validates.

You can then exit back to the main Generator UI page or show the run window in the form editor and test roll it.

That's really it now - Enjoy!
 
Top