Package: pf2e-wealth-calculator
PF2e Wealth CalculatorA simple tool to quickly get information on large batches of items, runes and precious materials for Pathfinder Second Edition.FeaturesQuickly get stats for a single item directly from the command line or add all of your loot to a file and have it process everything at once.Supports input from multiple files, so you can keep everything organized.Automatically calculate the price, level and rarity of items made from precious materials or with runes - or both!Searches every item present on the Archives of Nethys - all 4000+ of them.Randomly generate items on the fly for marketplaces or encounters.PrerequisitesPython 3.9 or above (tested on 3.9, 3.10 and 3.11)InstallationPython (Recommended method)If you already have Python installed, simply runpip install pf2e-wealth-calculatorIf you encounter an error, try changingpiptopip3.If you don't already have Python installed, you can get it from theofficial website, your operating system's package manager or the Microsoft Store.Prebuilt Windows ExecutableIf you are on Windows and don't want to install Python, you can download the executable file directly from theReleases Tab.If you choose this method, don't double click on the executable file to use it! It won't work. Instead, place it in a folder of your preference, then open a terminal in that folder (in Windows 11 you can just right click on the folder and press "Open in Terminal"). Follow the same instructions under Usage, except you change everypf2ewcto the name of the executable prefixed by.\. For example, if you downloadedpf2ewc-0.1.0.exe, you can use.\pf2ewc-0.1.0.exeNote that the executable takes noticeably longer to run than the Python version, so if the long startup times bother you, consider installing from Python directly.UsageThere's two ways to use this script: either pass in an item name directly or make a text file containing a list of items and how many of each you want.To pass a single item, simply runpf2ewc -i "your item here"Quotation marks can be omitted if the item's name is only one word long.Alternatively, create and write a text file where you list all of your items. On each line, write the name of the item that you want (using the same name you find on the Archives of Nethys). Next, add a comma followed by how many of this item you need. You can omit it in case you only need one.Tip: Don't worry about upper- and lowercase, they don't make a difference.For example:# Weapons and armor
+1 striking longsword
Cold iron breastplate (low-grade)

# Gear
Sunrod, 5
Lantern (Hooded), 2
Bedroll

# Currency and expensive stuff
12gp
*35gpThen open a terminal in the same folder as the text file and runpf2ewc your_text_file_here.txtTip: Put quotation marks around the file name if there are any spaces in it, e.g.pf2ewc "dungeon loot.txt".If you used the previous items, it should produce the following output:Total value (converted in gp):
  - 2 cp
  - 4 sp
  - 332 gp

Of which:
  - Items: 285 gp
  - Art objects: 35 gp
  - Currency: 12 gpLet's unpack what's going on here. Firstly, every line with a#is ignored, so you can write whatever you want in them. They're useful to keep your loot files nice and tidy, so use them as you see fit.Next, the weapon has runes while the armor is made of low-grade cold iron. As you can see, the script automatically calculates how much they're worth without you having to tell it anything else!Then, in "Gear" section, some items are counted multiple times. This makes it easy to add any amount of items and check whether you are giving too much or too little.Finally, in the "Currency and expensive stuff" section, you can see that you can add plain currency instead of any specific item. You may notice some weird notation on the*34gpline. The asterisk before the number means that it'll be considered as an art object instead of simple currency and categorize accordingly. This is useful whenever you want to give your player some expensive item to be sold instead of coins and want to make sure you keep things separate.You can use the-lor--leveloption followed by the party's level or two levels in the format X-Y (e.g. 2-5) to compare the items' total value to the one PCs are supposed to come across throughout the level or range of levels you input. These expected values come from the Treasure by Level table on Page 508 of the Core Rulebook (which you can findhere).For instance, runningpf2ewc your_text_file_here.txt -l 2would add the following lines to the previous output:Difference:
  - 32 gp too much (Expected 300 gp)If you want a detailed breakdown of what you're giving to your players, then you can use the-dor--detailedoption, which counts the levels, categories, subcategories and rarities of all of the items you input.Using the same items as before with the-doption would add these lines to the output:Levels:
  - Level 4: 1
  - Level 5: 1
  - Level 1: 5
  - Level 0: 5

Categories:
  - Weapons: 1
  - Armor: 1
  - Alchemical items: 5
  - Adventuring gear: 3
  - Currency: 1
  - Art objects: 1

Subcategories:
  - Base weapons: 1
  - Base armor: 1
  - Alchemical tools: 5
  - None: 5

Rarities:
  - Common: 12Note that items without a level, like currency, are currently considered as being level 0.Formatting guidelinesYou can also print these rules in the terminal by usingpf2ewc -f.PF2e Wealth Calculator is entirely case-insensitive, meaning it doesn't matter if the names of the items are uppercase or lowercase.In the majority of cases, the spelling must be exactly the same as the one used by the Archives of Nethys (this is because this calculator uses data from the AoN). A spelling mistake will cause the script to skip the item and suggest a possible correction. Other items in the file will still be processed.You can input a weapon or armor with runes etched into it and the script will automatically calculate the price, level and rarity of the item. The calculator is built with standard notation in mind, meaning it should start with the potency rune (i.e. the +1/+2/+3), followed by the striking and potency runes (if any), followed by the item itself. For instance,+1 striking warhammeris fine, as is+2 greater striking frost extending halberd. Runes ordered in a different manner usually work so long they all precede the base item, but this syntax may lead to unexpected behaviour as the script is not built with it in mind.You can also input weapons, armor and items made of a precious material. As with runes, the price, level and rarity will be calculated automatically. Write the item name as you would usually: this means the material goes first, then the base item and finally the grade of the material. For example,silver dagger (low-grade)is correct. To cut down on typing, the grade really just needs to include "low", "standard" or "high" and it'll be treated the same way;silver dagger lowwill work just fine. One thing to note is that most materials can only be found at higher grades. This scriptdoes notcheck if the material/grade pair is valid andwillcrash if it's not.You can combine runes and materials too! Just make sure thatallof the runes are placed before the material and the item, otherwise it won't work. Otherwise, follow the syntax from the previous two points. For example,+1 striking ghost touch mithral flail (standard-grade)is correct.Currency is a valid item to input, which is useful in case you want to make your players find a bunch of plain old coins in a dungeon, for instance. The syntax is just what you'd expect: the number of coins followed by the coin type.12 gpand520cpare both fine. Note that platinum pieces ("pp") are not supported. If you prepend a currency with an asterisk like*100gp, it'll be counted as an art object instead. This allows you to divide items that are only there to be sold for currency from plain currency. This is especially useful if the art objects are hard to sell and therefore don't represent "immediate cash", so to speak.You can start a line with a#character to comment the line. This means it won't be processed by the script and is useful to mark down where the items come from.Options-dor--detailedshows how many items of a given level, category, subcategory and rarity there are within the given input file.-lor--levelfollowed by a number or two numbers in the X-Y format makes the calculator compare the total value of the input items to the expected total value that a party of four is supposed to find throughout the specified level(s).-cor--currencyfollowed by a number adds an arbitrary amount of gp to the calculation.-for--formatshows helpful information on how to correctly format the text file.-nor--no-conversionprevents coins from being converted to gp automatically (some calculations use gp only, so expect values to be slightly different from what you'd expect).-ior--itemfollowed by the name of an item allows you to run the script without creating a file. If the item name is composed of multiple words, you must put it in quotation marks, like-i "tengu gale blade".-ror--randomfollowed by a number randomly generates that many items, picking them without restraint from every item in the game. You can follow this option with the-loption to restrict random generation to that level or range of levels only.--tblshows the Treasure by Level table from page 508 of the Core Rulebook.Known exceptionsCustom scrolls and wands are not supported. However, since their price only varies with spell level, you can use their general item names instead. For scrolls it'snth-Level Scrolland for wands it'sMagic Wand (nth-Level Spell), where "nth" is the spell's level (e.g. 1st, 2nd, etc.). For example, instead ofscroll of lightning bolt, use3rd-level scrolland instead ofwand of see invisibility, usemagic wand (2nd-level spell).There is currently no way to apply runes to anything that doesn't use potency runes. This means accessories and shields with runes are currently not supported. To get around this, you can add the runes as separate items, which would give the same total value at the cost of not getting the correct item level and rarity.LicenseThis project is released under theGNU GPLv3 License. The data this program uses for its calculations is taken from theArchives of Nethysand is available for use under theOpen Game License v1.0a.