-
May 26th, 2020, 19:06 #1
- Join Date
- Jun 2018
- Posts
- 6
PFRPG - Character Wealth Extension
Description:
As a GM for Pathfinder, I find myself tediously calculating each character's wealth in an Excel spreadsheet.
This extension adds a chat command to calculate a character's wealth in gold pieces from the items in their inventory.
You can also calculate the party's wealth and all characters wealth, including those not in the party.
Hope some people find this useful. Please provide feedback or any bugs you find.
Rulesets:
- 3.5E
- 5E
- PFRPG
Extension:
PFRPG-Character-Wealth-Extension-v1-1-0.ext
Github Link:
https://github.com/Wattabout2ndBrkfs...alth-Extension
Dependencies:
Tested on both FGC v 3.3.11 and FGU 4.0.0. Works on both.
Usage:
/charwealth [character name]
"character name" is the exact name, including spaces, of the character you wish the calculate the wealth for.
/charwealth -all
This command prints out all characters' wealth and the running total
/charwealth -party
This command prints out all party members' wealth from the party sheet and the running total
Notes:
- You must be the Host in order to use this command.
- You must enter the exact character name you wish to calculate the wealth for. Spaces in the name are okay.
- It looks at each item and creates a running total of the character's wealth.
- The format of an item's cost must be a number, followed by a space, followed by the cost type.
- The number must contain numerical characters. Commas can be used.
- There must be a unit type for the cost or else the item will be excluded.
- The cost types must be either "pp", "gp", "sp", or "cp". The letters for these can have any case. Any currencies besides these will result in that item being excluded from the total.
- 1 pp = 10 gp; 1 gp = 1gp; 1 sp = 0.1 gp; 1 cp = 0.01 gp
- If an item is not added to the character's wealth, a chat message will be displayed with the item name and a description.
- Gold pieces by default are not a part of the character's inventory. These must be added manually to a character's wealth.
- Compatible with 5E. However, there are items in the DMG whose cost is a range. These are not calculated into total wealth. Also, electrum is not supported.
Compatibility with Other Extensions:
This does not modify any existing code besides adding a chat command. The calculated value is outputted to the chat.
Screenshots:
Sccreenshot-1.PNG
Sccreenshot-2.PNG
Sccreenshot-3.PNG
Sccreenshot-4.PNG
License:
GNU GPLv3
This means you can commercialize it or do anything else with it, as long as they give you credit for the parts of your work they use and they too release it under the same license.
Version:
v1.0.0 - Initial release for 3.5E and PFRPG rulesets
v1.1.0 - Added support for 5E ruleset and added "-party" and "-all" options
Future Improvements:
- Automatically add a character's gold into the character wealth
- Possibly add a UI element
- Done - Add ability for GM to calculate each character's wealth from a single command, instead separate commands
Acknowledgements:
- Thanks to FeatherRin for getting the ball rolling on v1.1.0
Last edited by WatBot2ndBrkfst; August 12th, 2020 at 21:21. Reason: Updating to v1.1.0
-
August 12th, 2020, 00:26 #2
Since the first comment is mine, I will add the newest version I made here for easy access.
What's more in my version?
- Handles estimated item ranged prices such as: '101 - 500 gp'Last edited by FeatherRin; October 20th, 2020 at 22:30. Reason: Added newest version
-
August 12th, 2020, 02:29 #3
Upgrades
So I did this:
nn.png
I would post it but your license dosen't allow me. Let me know if you want it.
-
August 12th, 2020, 03:33 #4
Wow, why didn't I notice this before 'wasting' my time building this into my inventory UI...
Honestly, I like your approach of posting it in chat much better.Last edited by bmos; August 12th, 2020 at 18:43.
bmos' pathfinder 1e extensions
he/him | Discord Tag: wil.thieme#3396
-
August 12th, 2020, 17:14 #5
- Join Date
- Jun 2018
- Posts
- 6
Hi FeatherRin,
Thank you for testing it with 5e. I don't use 5e, so I didn't test it for that ruleset.
I would post it but your license dosen't allow me. Let me know if you want it.
-
August 12th, 2020, 17:28 #6
My personal upgrades (Tested only in 5E)
-Removed fancy lines to fit the all command.
-Added "/charwealth all" catch, which outputs each pc's total item wealth and also the total party item wealth.
-Currently ignores all characters with 0 wealth even when solo checked, but you dont need it anyway. (I was too lazy to bother)
-
August 12th, 2020, 21:23 #7
- Join Date
- Jun 2018
- Posts
- 6
Released v1.1.0
Updated extension with two arguments. One calculates wealth for characters only on the party sheet. The other calculates wealth for all players, including those not on the party sheet.
Added support for 5E ruleset as wellLast edited by WatBot2ndBrkfst; August 12th, 2020 at 21:24. Reason: Added 5E note
-
August 13th, 2020, 02:07 #8
Hey, its me again!
If you want player coins included as well, stick this in before nodeInventoryItems
Code:local nodeInventoryTreasure = DB.getChildren(nodeChar, "coins"); if nodeInventoryTreasure then -- If the inventory list is not nil -- for k, nodeCoin in pairs(nodeInventoryTreasure) do -- For every item in the inventory list -- local sCoinName = DB.getValue(nodeCoin, "name", ""):upper(); local sCoinAm = DB.getValue(nodeCoin, "amount", ""); if sCoinName == "GP" then nRunningTotal = nRunningTotal + sCoinAm; elseif sCoinName == "PP" then nRunningTotal = nRunningTotal + sCoinAm * 10; elseif sCoinName == "SP" then nRunningTotal = nRunningTotal + sCoinAm * 0.1; elseif sCoinName == "CP" then nRunningTotal = nRunningTotal + sCoinAm * 0.01; elseif sCoinName .. " " == " " then -- Don't spam for empty cells. -- --Nothing else -- Currency is defined, but is not a standard currency -- sChatMessage = "" .. sCoinName .. ": Excluded. Non-standard currency used"; printChatMessage(sChatMessage); end end end
ps: might as well credit me in the xml
pps: elifs break automatically, you dont need to break them.
ppps: i think everything is core func anyway, just set it to any and let people try it out without guarantee
pppps: no one uses electrum, dont even botherLast edited by FeatherRin; August 13th, 2020 at 05:41. Reason: added exception handling
-
August 13th, 2020, 05:33 #9
...also here's a "concat" to solve the '-' problems.
It grabs the second (highest) number of the two with minimal effort and no (extra) memory usage. At higher levels it's inaccurate, but at that point I doubt people care.
'101 - 500 gp' => '500 gp'
'10,000 - 50,000 gp' => '50,000 gp'
Code:if string.match(sItemCost,"-") then sItemCost = string.sub((string.match(string.reverse(sItemCost), "(.+)%-")):reverse(), 2); end
It has to go right before this part, otherwise it will mess up the conversion.
Code:local aCostData = StringManager.split(sItemCost, " ", true);
Last edited by FeatherRin; August 13th, 2020 at 16:53. Reason: example
-
August 14th, 2020, 19:38 #10
Here's the file for those who can't wait for WatBot2ndBrkfst and can't do it for themselves.
Added:
-Counts player money (coins/treasure) towards total.
-Support for estmated range prices such as '101 - 500 gp', uses higher number.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks