Skip to content

[Server Hosting] Setting up Custom Market Currencies

LieutenantMaster edited this page Jan 21, 2022 · 13 revisions

Return to the overview "The Market System"


If you plan on using different currency (or currencies) than the gold/silver bars and nuggets we provide by default with the Expansion Core mod, then you need to make some slight adjustments to the Exchange category configuration as well as the individual Trader settings files.

Exchange/Currency Settings

To define the values for your currencies, you need to add each currency item that you plan to use to the Exchange category located in your servers profile directory (YOUR_SERVER_PROFILE_DIRECTORY/ExpansionMod/Market/Exchange.JSON). Note that you can have several exchanges with different currencies if desired, the only requirement is that each category JSON filename must start with the word "Exchange" (without quotes, case insensitive) so it can be recognized by the system.

You can define as many currency items as you want/need here. There is no limit.

Example: (Exchange_Euros.json)

{
    "m_Version": 8,
    "DisplayName": "#STR_EXPANSION_MARKET_CATEGORY_EXCHANGE",
    "Icon": "Deliver",
    "Color": "FBFCFEFF",
    "InitStockPercent": 75,
    "Items": [
        {
            "ClassName": "moneyeuro_1000",
            "MaxPriceThreshold": 1000,
            "MinPriceThreshold": 1000,
            "SellPricePercent": -1,
            "MaxStockThreshold": 1,
            "MinStockThreshold": 1,
            "SpawnAttachments": [],
            "Variants": []
        },
        {
            "ClassName": "moneyeuro_100",
            "MaxPriceThreshold": 100,
            "MinPriceThreshold": 100,
            "SellPricePercent": -1,
            "MaxStockThreshold": 1,
            "MinStockThreshold": 1,
            "SpawnAttachments": [],
            "Variants": []
        },
        {
            "ClassName": "moneyeuro_10",
            "MaxPriceThreshold": 10,
            "MinPriceThreshold": 10,
            "SellPricePercent": -1,
            "MaxStockThreshold": 1,
            "MinStockThreshold": 1,
            "SpawnAttachments": [],
            "Variants": []
        },
        {
            "ClassName": "moneyeuro_1",
            "MaxPriceThreshold": 1,
            "MinPriceThreshold": 1,
            "SellPricePercent": -1,
            "MaxStockThreshold": 1,
            "MinStockThreshold": 1,
            "SpawnAttachments": [],
            "Variants": []
        }
    ]
}

ClassName

The class name of the currency item you want to add. Case insensitive, does not need to be lowercase like in the example above.

MaxPriceThreshold and MinPriceThreshold

Defines the value of the item.

MaxPriceThreshold and MinPriceThreshold always need to have the same values like in the example above.

MaxStockThreshold and MinStockThreshold

Needs to be 1, or else the exchange of currency at an exchange trader will not work as expected!

PurchaseType

Needs to be 0 for currency items!

Leave the other parameters empty, like in the example above, as we don't need them for currency.

Trader Settings

To define which type of currency will be accepted by each trader, we need to add the desired currency items to the Currencies array of the individual traders. The Market Trader settings files are located in your servers profile directory (YOUR_SERVER_PROFILE_DIRECTORY/ExpansionMod/Traders/).

Example:

"Currencies": [
    "moneyeuro_1000",
    "moneyeuro_100",
    "moneyeuro_10",
    "moneyeuro_1"
],

For further information about the trader settings, please take a look at this Wiki page:

https://github.com/salutesh/DayZ-Expansion-Scripts/wiki/%5BServer-Hosting%5D-Trader-Settings

Clone this wiki locally