• 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.

Feature Request: Bulk add rows in new generator UI

JohnnFour

Game Master
Staff member
Adamantium WoA
Wizard of Story
Wizard of Combat
Gamer Lifestyle
Demonplague Author
Borderland Explorer
@mKlaumann @JochenL Can we make it as easy as copy & paste within the UI to populate individual tables?

I build my data sets in Excel or plain text file.

It would be ideal to create generators straight from there instead of building row by row in the UI, or switching to Code mode and adding the extra YAML/JSON code wrapped around each line.
 

ELF

Generator Sage
Wizard of Story
Wizard of Combat
This would be useful even for my oldskool ways. When working with large sets of data, I usually organize the data in a spreasheet, then copy it to a text editor where I run YAML conversion macros and then copy the table data to the actual generator file in another editor.

With this I could skip the text editor steps and move directly to testing. (y)
 

Kathorus

New member
In the mean-time, if you're in a spreadsheet you should be able to use concatenation to quickly wrap the lines with the needed characters.

For instance, let's say you have a small table you setup like this;

1551819909956.png

The formula, in Excel, is =CONCATENATE("{","""","m","""",": ", A2,", ","""","v","""",": ","""",B2,"""","},")

It's important to note, you have to be careful with all the quotes, but once you have the formula in you can save it. Then you just use the fill handle to quickly populate the rest of the cells. Then you can just copy the new values into the generator.

1551820623433.png

1551820691436.png
 

ELF

Generator Sage
Wizard of Story
Wizard of Combat
Neat! The conversion can be simplified by using the YAML format, which Campaign Logger also supports. If you are processing just the table entries, it's enough to slap a dash in front of each line. (Granted, if the line contains formatting, adding quotes is a good idea as well.)
 

JohnnFour

Game Master
Staff member
Adamantium WoA
Wizard of Story
Wizard of Combat
Gamer Lifestyle
Demonplague Author
Borderland Explorer
Cool beans!
 

vnavone

New member
As someone who has a bunch of random tables stored in Google Sheets I would definitely benefit from this feature. I'm not very comfortable working with code, so I'm hoping for a simpler solution such as bulk input via the Form view. Whatever GUI for form-filling tools you can provide to non-coders like me for building generators would be greatly appreciated!

FWIW, I tried using the Google Sheet JSON formatter above but when I pasted into the JSON editor the quotes came out all messed up so ended up reformatting by hand.
 

JochenL

CL Byte Sprite
Staff member
Adamantium WoA
Wizard of Story
Wizard of Combat
Gamer Lifestyle
Borderland Explorer
We are preparing a CSV bulk import at the moment.
 

JochenL

CL Byte Sprite
Staff member
Adamantium WoA
Wizard of Story
Wizard of Combat
Gamer Lifestyle
Borderland Explorer
I started work today.
 
  • Like
Reactions: ELF

JochenL

CL Byte Sprite
Staff member
Adamantium WoA
Wizard of Story
Wizard of Combat
Gamer Lifestyle
Borderland Explorer
Update Time!
  • 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
  • All imported generators now get "[IMPORTED] " prepended to their name - that can be changed to whatever one desires after a file has been imported
To test this:
  • Click Upload as for JSON:
    1613746359931.png
  • Select or Drag/Drop a CSV file instead of a JSON file
  • Done! You can now change your new generator as desired!
 
Last edited:

ELF

Generator Sage
Wizard of Story
Wizard of Combat
  • Select or Drag/Drop a CSV file instead of a JSON file
I did not get this working. I tested CSV files exported from Excel with several different variations, but the dragging the file or using the Open file dialog produces no reaction from the UI.

Dragging an improperly formatted JSON file produces an error message, but with CSV files I get no reaction.
 

JochenL

CL Byte Sprite
Staff member
Adamantium WoA
Wizard of Story
Wizard of Combat
Gamer Lifestyle
Borderland Explorer
I did not get this working. I tested CSV files exported from Excel with several different variations, but the dragging the file or using the Open file dialog produces no reaction from the UI.
Can you send me an example file?
 

ELF

Generator Sage
Wizard of Story
Wizard of Combat
Here's the CSV file (zipped due to Xenforo requirements). It's just a simple listing of the most common Finnish female, male and family names.

Some potential pitfalls:
  • the formatting of accented characters
  • the structure changes on line 326 due to some obscure reason I cannot recall now.
  • there are some blank cells near the end (due to the limitations of the source material).
 

Attachments

  • Karavaani-hahmogeneraattori - Nimi.zip
    5.7 KB · Views: 1
Last edited:

ELF

Generator Sage
Wizard of Story
Wizard of Combat
  • the formatting of accented characters
I replaced the accented characters with non-accented versions, but that did not change the behavior.

  • the structure changes on line 326 due to some obscure reason I cannot recall now.
I removed the lines after 325, but this did not help.

  • There are some blank cells near the end (due to the limitations of the source material).
I removed also the lines containing empty cells (from 306 onwards), but this had no effect either.
 

JochenL

CL Byte Sprite
Staff member
Adamantium WoA
Wizard of Story
Wizard of Combat
Gamer Lifestyle
Borderland Explorer
The last rows started with three excess commas each - I removed them. After that, the generator was created. It was not imported as there was no header for the three excess columns
To get the generator fully working I had to remove the leading blanks in the header row, too.
 

Attachments

  • Karavaani-hahmogeneraattori - Nimi (corrected).zip
    13.1 KB · Views: 1
  • Like
Reactions: ELF

ELF

Generator Sage
Wizard of Story
Wizard of Combat
The last rows started with three excess commas each - I removed them. After that, the generator was created.

I did the same (see above), but that did not help. I still get no reaction from the generator UI.

I also removed the spaces from within the first line, but that changed nothing.

Still investigating.

Edit: Your version does work, so there must still be some other difference between the files.
 

ELF

Generator Sage
Wizard of Story
Wizard of Combat
Solved! In my version there were still tabs on the lines I had removed. Seems that those confused the import process. After I removed the lines containing just tabs, the import worked.

Suggestion: an error message for failed imports so that the user gets some kind of reaction even for incompatible files.

Another: Even better if the import function could ignore extraneous white space (outside of the actual cells), as these 'invisible' errors can be hard for users to solve.
 
Last edited:
Top