Skip to content

Persistent Traders

Lightman edited this page Sep 28, 2024 · 20 revisions

Authors Note: Needs updating!

Persistent Trader Data

As of v1.0.4.0, there is a new PersistentTraders.json file that can be found in the config/lightmanscurrency folder within your Minecraft installation. This data can include two different things:

Persistent Traders

Persistent Traders are a tool intended for modpack developers, that allows you to have pre-defined Creative Network Traders that will automatically be created in any single-player or multiplayer world. By default it will not have any traders, so you will need to either edit the file manually, or use a test world to define the persistent traders.

Warning: As Persistent Traders are always creative, any data deemed insignificant (such as the traders item storage) will be lost when the world is reloaded or when the /lcconfig reload command is run. Only persistent data (trade logs, and certain trade rule data) will be maintained when reloaded, in order to allow persistent traders to be changed in the config without any repercussions.

Persistent Auctions

Persistent Auctions allow server owners to set certain items to be up for auction permanently. The behavior for persistent auctions is significantly different from that of persistent traders though, so I'll list their behavior below.

  • Checks the auction house every minute to check whether the auction should be created.
  • If no auction flagged as being created by a persistent auction with the same id, AuctionData will be generated based on the persistent auctions data.
  • Once the auction is created and in the Auction House, it will behave the same as any auction generated by a player, with it's only difference being that it will prevent another persistent auction with it's PA id from being generated until it's time runs out.

Running the /lcconfig reload command will reload the persistent traders & auctions from file, removing the need to reboot the server to make changes.

Creating a Persistent Trader In-Game

As of v1.1.6.4, you can now create Persistent Traders in-game without the need to edit the file directly. The process for doing so is as follows:

  1. Place down any Trader of the type that you wish to create a Persistent Trader of.
  2. Set up the Trader to be in the same state you'd like the Persistent Trader to be in. (Define the trades/trade rules, change it's name, etc.)
  3. While in Admin Mode, open the Traders Settings. 3b. Navigate to the "Build Persistent Copy" settings tab
  4. Input the desired "Owner Name" & ID into the text fields 4a. If no Owner Name is defined, will default to "Minecraft". 4b. If no ID is defined, it will generate a non-conflicting id for you.
  5. Click on the "Create Persistent Trader" button in the bottom-left corner.

Doing this will add the persistent trader to the data list, load the new data (same as runnning /lcconfig reload, but only persistent data will be reloaded), and save the new data to file.

WARNING: If the PersistentTrader.json file has been edited externally but not reloaded (via the /lcconfig reload command or a reboot), creating a persistent trader will cause those changes to be lost.

Creating a Persistent Auction

As of v1.1.6.3, you can now create Persistent Auctions in-game in a similar manner to how you create Persistent Traders. The process is as follows.

  1. Open up the Auction House's "Create Auction" tab while in Admin Mode.
  2. Set up the Auction as you'd like it to be defined.
  3. Input the desired ID into the text field above the screen (may require a lower GUI scale to appear on-screen). 3a. If no ID is defined, it will generate a non-conflicting id for you.
  4. Click the "Create Persistent Auction" button in the top-right corner of the screen.

WARNING: If the PersistentTrader.json file has been edited but not reloaded (via the /lcconfig reload command or a reboot), creating a persistent auction will cause those changes to be lost.