5E Character Create Playlist
Page 1 of 4 123 ... Last
  1. #1

    Character Wealth Extension

    Removing due to uncertainty regarding OGL v1.1
    Last edited by WatBot2ndBrkfst; January 9th, 2023 at 20:43. Reason: Removing Due to Uncertainty of OGL v1.1. May reupload

  2. #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'

    Files:
    1102 - My version, throws an error.
    110 - Latest version patched by Cast.
    Attached Files Attached Files
    Last edited by FeatherRin; March 5th, 2022 at 08:40. Reason: Added newest version

  3. #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.

  4. #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 17:43.

  5. #5
    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.
    Yes. I can add it to the code if you are willing to share.

  6. #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)
    Attached Files Attached Files

  7. #7
    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 well
    Last edited by WatBot2ndBrkfst; August 12th, 2020 at 20:24. Reason: Added 5E note

  8. #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
    Happy bodging!

    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 bother
    Last edited by FeatherRin; August 13th, 2020 at 04:41. Reason: added exception handling

  9. #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 15:53. Reason: example

  10. #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.
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
STAR TREK 2d20

Log in

Log in