• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

RealmWorks CSV Import Tool

In that realm I am recreating, or entering, second edition DND game mechanics. In doing so, I have duplicated each category so I can modify it for my needs while inactivating the original categories.

With that said, when I try to follow the steps for your tool and import the final product your tool produces from my spreadsheets (in this case, a weapons list), it creates duplicate categories in realmworks (manage>categories etc). For example, Instead of just one category called "Mundane weapons," I have now have Mundane weapons and "Mundane weapons 01"

This is across the board for all my previously duplicated categories. Is there anyway to stop that?

Hi Cirrob,

Sorry that I completely missed your post in this thread!

The structure file that you provide is what the tool provides in the resulting output file. It might be that although you have hidden the category inside RealmWorks, it might not be marked as hidden in the structure file that is generated by realm works, and so my tool won't know that you aren't interested in these hidden categories.

If you haven't hidden the original category names, then what names are you using for your new categories?
 
@Cirrob I don't think you made a bad choice. Though, LWD is silent at the moment I hope that the situation will improve and they will review resuming the project again in the future.
 
@Farling:
Hi there! I'm trying to load an XLSX file for import. Loading the structure works, but when loading the data the tool states "unknown file extension" and the path to the file and does not load the file. I use excel version 2010.

Saving as CSV in excel and the loading seems to work.

@Cirrob:
It's possible that I'm stuck already with build 254 which might not be ideal, if you are going to import multiple times into a realm. I suggest you'll stick with build 253 for the time being. There is another thread discussing import issues (import fails once after your first import). I wanted to test if the import of farlings tool still works, even if the Realm Works import fails.

EDIT: Import from Farlings tool worked. I will retry later on with the category that failed when using the main realm.
 
Last edited:
Release 2.12 is available

This release adds the ability to create "derived" columns, where the value of the column is based on a javascript expression, which can examine the value in other columns for each row.

In the javascript expression, you can access the value of a column called "columnname" using the following:
row.column('columnname')

The new "derived" columns are managed in a new window which can be accessed by pressing the "Custom Columns" button. Simply enter the name of the new column in the top box, and add the javascript expression in the large main box, and press Apply (or OK). Your new custom columns are saved as part of the project (old projects will load correctly, with no custom columns).

The "derived" column appears in the data table as soon as you press apply or OK; so you can see the text that will be used when your import file is generated. (If the javascript is badly formed, then the error will appear as part of the generated text.)

This release also fixes a bug that prevented excel spreadsheets from being loaded.

(Internally, the software has been updated from Qt 5.12.0 to 5.12.8.)

(I need the derived column functionality because some 5E json data has spell casting split into separate fields, and I want them in a single field.)
 
Last edited:
Version 2.13 is available

This version adds save and load buttons for your "derived" columns.

This gives you a simple way to copy the derived columns from one project into another project.

Note that loading a saved set of derived columns will replace all the derived columns that are currently in the open project.
 
@Farling

I tried using this tool today and I encountered an error when I tried to import it into Realm Works:
The following errors were encountered during import:

Encountered validation error for the import XML: The 'format_version' attribute is invalid - The value '4' is invalid according to its datatype 'urn:lonewolfdevel.com:realm-works-export:version_type' - The MaxInclusive constraint failed.

I've only used the program once before and it worked flawlessly but that was more than a year ago. I have the latest version (I downloaded and installed after getting the error the first time.

Any suggestions?

EDIT: I looked back a page and found that you added a new feature to force version 3. I wasn't sure if this would work (because I could not find the same error I reported above) so I tried it anyway and it worked.
 
Last edited:
Any suggestions?

EDIT: I looked back a page and found that you added a new feature to force version 3. I wasn't sure if this would work (because I could not find the same error I reported above) so I tried it anyway and it worked.

Yes, that is the error which would be produced.

Version 254 of Realm Works has an issue that is generates an export file in version 4, but it only imports a file marked with version 3.

They fixed this problem with version 255, but only released it as a beta test version.
 
Apologies if it has already been asked and i am just missing it but when i try to load in a .json to work with, the app just closes. has anyone else had this? is there a fix?
 
Apologies if it has already been asked and i am just missing it but when i try to load in a .json to work with, the app just closes. has anyone else had this? is there a fix?

Hi apoca6, would it be possible for you to PM me the json file so that I can investigate?
 
I'm not Will Smith ;-)

lol, would you want to be?

Next question, looking at my data, some of the fields were split so instead of alignment, i have a 4 or 5 columns with variations, some for C some for G (in the case of CG), is it possible to add multiple items to one field and have them concatenate? so 'C' 'blank' 'blank' 'blank' 'G' in the alignment field would parse as 'CG' into RW?

Hope that makes sense? I can work around it if not.
 
Next question, looking at my data, some of the fields were split so instead of alignment, i have a 4 or 5 columns with variations, some for C some for G (in the case of CG), is it possible to add multiple items to one field and have them concatenate? so 'C' 'blank' 'blank' 'blank' 'G' in the alignment field would parse as 'CG' into RW?

You can use the new "custom columns" function. You create a new column, and write some javascript which defines how the value will be generated for this new column.

So you could write a function which will examine various other columns and decide what the single new combined value should be.

For example, the following javascript for a custom column merges several columns into a single D&D 5E spell duration field

row.column('duration/1/duration/amount') + ' ' + row.column('duration/1/duration/type') + ((row.column('duration/1/concentration') == 'true') ? ' (C)' : '')

and for the time field we have a more complex expression

var r = row.column('time/1/number') + ' ' + row.column('time/1/unit')

if (row.column('time/1/condition') != '')
r += ' (' + row.column('time/1/condition') + ')'

if (row.column('meta/ritual') != '')
r += ' (R)'

r

and for the description, we need to merge several fields including some HTML:

var a = row.column('entries/1')
var b = row.column('entries/2')
var c = row.column('entries/3')

var d = ''
if (a != ' ') d += '<p>' + a + '</p>'
if (b != ' ') d += '<p>' + b + '</p>'
if (c != ' ') d += '<p>' + c + '</p>'

d

Note that I'm a complete amateur at javascript, so there could be easier ways to do the above things.
 
Last edited:
I keep trying to avoid Javascript, but guess i will have to look into it :D

It has Java in the name so i guess i am halfway there with my basic level of Java?! :)

Thanks for taking the time to reply, it is appreciated!
 
well i am hacking it together, ok.
The two existing custom columns were all i needed really; where the data was split into several columns, they just needed combining into one, similar to the derived example field.

It will take a bit to do, but means i can import everything easily now without going back in to adjust everything individually :) you are a life/sanity saver with this program :D
 
Version 2.16 is now available

This version adds a new javascript function for derived columns.

row.hasColumn(name) will return true only if a column called "name" exists in the model.

This allows you to use the same javascript for multiple different data sets which might merely have a different number of named columns, e.g. (entries/1, entries/2 in one file, and entries/1, entries/2, entries/3 in another file; or perhaps entries/3/caption might exist, but no entries/1/caption or entries/2/caption).
 
I have a question. I'm currently building a excel CSV file that wil randomly generate all kinds of intel for towns/cities. I want to take it a step further and have it also generate one or more item shops or other buildings in these towns.

I know I can use the import tool to load up my towns, but is there a way to have it create "sub-topics" at the same time?

for example if my csv looks like this:
Town name, some town data; Shop name; shop data

Could I get:

Topic: Town name (with the town data in correct snippets)
-- Subtopic Shop name (with the shop data in the correct snippets)
 
Back
Top