Modding Help Merchant NPC Prices

Discussion in 'Starbound Modding' started by DraikNova, Apr 15, 2017.

Tags:
  1. DraikNova

    DraikNova Spaceman Spiff

    Ok, so I am in the planning stages of my mod. Amongst other things, I want to add a merchant that sells blocks. In normal gameplay, even gold blocks lack sell for 0. However, I want this merchant to sell a variety of blocks, even relatively common stuff that should really sell for 0, so I can't just edit the item worth. Is it possible to use the normal merchant framework for this, or would I have to make a custom set-up to allow for this difference in buy price and sell price?
     
  2. bk3k

    bk3k Oxygen Tank

    You can define custom parameters for items, and that would include the price.

    The downside being these custom parameter items won't stack with default parameter items.
     
  3. DraikNova

    DraikNova Spaceman Spiff

    I'm not sure I understand what you're saying. Are you saying I should just make a different version of the blocks with the updated price? At that point, it seems simpler to just make it a pseudo-crafting table, like the 2 Stop Teleshop.
     
    Last edited: Apr 15, 2017
  4. Nexus Of Chaos

    Nexus Of Chaos Parsec Taste Tester

    lets say you want dirt to sell for 1000000 pixels. you should do /spawnitem dirtmaterial <#> '{"price":5000000}'

    if i'm right, price you buy at is 5x the price you sell at, and the price parameter is what you buy at
     
  5. DraikNova

    DraikNova Spaceman Spiff

    Yeah, the thing is, I want the merchant to be able to sell to players for a price, but players to not be able to make a fortune off of selling dirt, which would require keeping dirt at 0 pixels in worth. Which is why I decided to just use the 2 Stop Teleshop method and make it a crafting table (see above).
     

Share This Page