And here’s the version of the Magic Shop app that I promised last week for the newest edition:

Magic Hoard Windows App

Unlike last week’s app, this one is much simpler as items in the new edition are not ascribed actual prices. Instead, it’s mostly just a way to generate random results that include randomized special features.

What It Does

Select a treasure table.

Each table comes with a predefined chance for each special feature (e.g., at 25%, since there are four different special feature types, on average each item will generate one special feature, while at 100% it will always generate all four features). You can change the rate for a table by moving the slider (the rate is saved for the session, but not for when you close and reopen the app).

Click Add Item from Selected Table to randomly roll an item (plus possible special features). It’s added to the top of the list in the output box.

Click Sort List to sort all the items in the box alphabetically by item name.

Click Clear List to empty the list. Unless you click Clear List, switching between tables and special feature chances will not change anything about the already generated items in the list (e.g., you could generate three from table A and then one from table D, and all would be in the list).

Installing the App and Editing Modifiers

Extract everything in the .zip file to its own folder. Run the .exe file; it’s looking in its own folder for the .txt files.

As with the previous app, everything uses statistical weights to determine when it shows up. Read last week’s post for a description of how that works.

The files and their formats are:

  • AllItems: A list of every item (without special features), in the format [Treasure Table]|[Random Weight]|[Item Name]. If you add a new table name, you also have to add it to the TreasureTables file.
  • SpecialFeatures: A list of every possible special feature, in the format [Random Weight]|[Feature Table]|[Feature Name]|[Feature Description]. Unlike with AllItems, you can add a completely new table of features here and it will automatically added (e.g., you could add entries for a new Previous Owner table fully within the text file).
  • TreasureTables: This file purely saves the default special feature chances for each table, in the format [Treasure Table]|[Percentage Chance]. Percentage chance must be an integer between 0 and 100, and new tables added have to also have at least one entry in AllItems. This is where you change the default special feature values for good if you don’t like the defaults I picked out.

Known Limitations

In order to keep it as extensible as possible using just the text files, I didn’t include the “pick two properties” entry on the Property table, so it will never generate more than one Property special feature.

There’s a weird bug that I can’t quick track down such that sometimes, when you make a bunch of items with a high chance of special features, items with the same name will have exactly the same (or almost exactly the same) special features. I haven’t been able to generate it reliably, and if you get it, clearing the list, changing the percentage slider and generating a few items, then changing it back and clearing again seems to fix it for the session. Programming is hard, y’all.