Help needed Help with Traders (Dedicated Server)

Discussion in 'Custom Playfields & Systems' started by Gary Parkin, Mar 28, 2023.

  1. Gary Parkin

    Gary Parkin Captain

    Joined:
    Aug 10, 2015
    Messages:
    164
    Likes Received:
    95
    If I modify the TraderNPCConfig.ecf files in the save folder on my dedicated server (Different PC) and add to the Traders file so they will buy and sell more, will my friend and I that connect to my server see the extra items and be able to sell more?
    Or does he have to edit his too? (please tell me not) *shudder*

    I want them to buy all our extra steel plate and sell us fuel cells.
     
    #1
    Last edited: Mar 30, 2023
  2. ravien_ff

    ravien_ff Rear Admiral

    Joined:
    Oct 22, 2017
    Messages:
    6,291
    Likes Received:
    11,948
    As long as you edit the correct file on the server, it should apply to any newly spawned traders.
    For POIs that have already been visited you may need to wait for the traders to restock and/or the POI itself to regenerate or just find a new version of that POI you've never visited before.
     
    #2
  3. Gary Parkin

    Gary Parkin Captain

    Joined:
    Aug 10, 2015
    Messages:
    164
    Likes Received:
    95

    Sorry this took so long @ravien_ff. I only see one place to edit this file at:
    C:\Program Files (x86)\Steam\steamapps\common\Empyrion - Dedicated Server\Content\Configuration\TraderNPCConfig.ecf

    Hopefully this will help someone else.
    ==========================

    traders file is not saved in the save folder.
    Which means that any Steam/Empyrion updates will overwrite it and I'll need a backup.

    Doing a search, I found a few TraderNPCConfig.ecf files for differene scenarios, but none for the one we are using:

    GameConfig:
    GameName: OverPowered
    Seed: 798497
    CustomScenario: Default Random
    InitialGameWorld: Akua

    Default Random has no Configuration folder so I added one to test this and it seems to work.
    I added shotgun shells to ServerntCorp (that doesn't sell them) and they showed up but only one time.
    Reloaded the traders file (traders reload) and the new items were not there. (pulling hair out)


    SOLUTION!!!! When you execute a traders reload command followed by a regenerate command while connected to your dedicated server installed onto a different PC, it seems to reload the TraderNPCConfig.ecf file on YOUR PC located at:
    C:\Program Files (x86)\Steam\steamapps\common\Empyrion - Galactic Survival\Content\Configuration
    Which actually makes sense if you think about it, but not if you're trying to reload the one on the server. (Do as I want, not as I say)

    I found this out by adding Pumpkin Cookie to the bottom of the ServerntCorp's config on my PC, and adding Shotgun Shells to the bottom of the ServerntCorp's config in the folder I created in the Default Random scenario's folder.

    When you startup the server and connect, the ServerntCorp sells Shotgun Shells. *good*
    I edited the file on the server to have him buy more shells, then I issued a traders reload command from my PC which seemed to do nothing, so I followed it up with the regenerate {poi#}, in my case regenerate 137013.
    I clicked on the ServerntCorp Trader and he was no longer selling Shotgun Shells but Pumpkin Cookies. (added on my file in my PC)

    I restarted the game and he still sells Cookies. I restarted the Game and the Server and he's back to selling Shotgun Shells.

    My issue now is I have no idea how to refresh the server to use its own config file after issuing the command if I want to change the prices as I test this.
    If I remove the TraderNPCConfig.ecf out of the Content/Configuration folder I created for Default random, and restart the server and reconnect, it still shows me the config I have on MY PC.
    Regenerating the POI (without reloading the traders file) loads the TraderNPCConfig.ecf in the server's root Config folder.

    So regenerating the POI seems ok but not reloading the traders file. Weird.

    Edit: The way to do it seems to be to edit the TraderNPCConfig.ecf in the server's root Config folder.
    Stop and restart the server, go into game and run regenerate {poi#} using the di command.
    DON'T run trader reload, and you'll be fine.

    If anyone has more information on this, please post...
    And thanks for the help ravien_ff
     
    #3
    Last edited: Mar 30, 2023

Share This Page