Define your own currencies and convert between them with the right factor
The CurrencySystem allows you to define your own currencies and convert between them with the right factor. The same principle is used in World of Warcraft with "Copper", "Silver" and "Gold".
Here is an example on how to use the CurrencySystem.
string[] currencyNames = new string[] { "Copper", "Silver", "Gold" };
int[] conversionFactors = new int[] {100};
Currency currency = new Currency(currencyNames, conversionFactors);
currency.SetBaseCurrencyValue(8353);
string currencyString = currency.ToStringReversed(); // "0 Gold 83 Silver 53 Copper"
Be sure to use .NET 7.0 or higher.
git clone https://github.com/ahriixi/currencysystem
dotnet build
You're ready to go! Just link the CurrencySystem.dll to your project and you're ready to go.
You can find the full documentation here.
Know how to make this project better or found a bug? Send a PR!