Forum > Serverside Modding

Removing gold, silver, and copper to create one consistent currency

(1/1)

Kobiesan:
I'm trying to make it so there is just one currency (no copper, silver, or gold). So, to accomplish this I need to combine the text from gold, silver, and copper to create one fluid text (with commas every 3 values if that's possible?). But I am unsure how to go about this. I checked out moneyframe.lua and xml but I didn't know what to fiddle with. What I was able to accomplish was hide the silver and copper icons by creating a custom UI-MoneyIcons.blp and removing the <NormalTexture> for the silver/gold buttons in MoneyFrame.xml. But that isn't really a solution. How would I actually remove the silver/gold buttons and combine the texts?

Here's my moneyframe.lua:
https://pastebin.com/1e15hWCz

Here's my MoneyFrame.xml:
https://pastebin.com/Uex0kJCu

Here is what my moneyframe looks like atm:


Ideally I would get rid of gold, silver, and copper and make it all one currency but I have no clue where to start.

Kobiesan:
bump

Grymskvll:
Probably look for bits like this (from wotlk moneyframe.lua):

--- Code: --- -- Breakdown the money into denominations
local gold = floor(money / (COPPER_PER_SILVER * SILVER_PER_GOLD));
local silver = floor((money - (gold * COPPER_PER_SILVER * SILVER_PER_GOLD)) / COPPER_PER_SILVER);
local copper = mod(money, COPPER_PER_SILVER);
--- End code ---

I guess copper should just be set to money.
Gold and silver and their related frames should be removed ideally, rather than just hidden or set to 0.

Navigation

[0] Message Index

Go to full version