• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

Trader cost messed up?

Plexius

Refugee
As i just started messing with adding new item groups to traders and such it adds in great but now everything in the trader costs negative money so i can buy for free and sell it back for money? ive added stuff to traders before so im confused why all of a sudden its messed up.

 
Did you change the first line in the trader xml file that changes the sale and buy prices based on the value prices in the items file?

 
nope which is why im confused 

 


    <append xpath="/traders/traderstage_templates">
        <traderstage_template name="EliteTier1" min="110" max="999999" /> <!-- Elite Items -->
        <traderstage_template name="EliteTier2" min="130" max="999999" /> <!-- Elite Items -->
        <traderstage_template name="EliteTier3" min="150" max="999999" /> <!-- Elite Items -->
    </append>
        <!--Create trader group for Elite Items including rare guns-->
    <insertBefore xpath="/traders/trader_item_groups/trader_item_group[@name='ammoAll']">
        <trader_item_group name="Eliteitems">
                <item name="gunBronzeShotgun" quality="1,4"/>
                <item name="gunBronzeDesertVulture" quality="1,4"/>
                <item name="gunBronzeSMG" quality="1,4"/>
                <item name="gunBronzeM60" quality="1,4"/>
                <item name="gunBronzeRPG" quality="1,4"/>
                <item name="gunTungstenM60" quality="1,4"/>
                <item name="gunMithrilSMG" quality="1,4"/>
                <item name="gunAdamantiumDesertVulture" quality="1,4"/>
                <item name="gunMithrilShotgun" quality="1,4"/>
                <item name="gunOrichalcumRPG" quality="1,4"/>
                <item name="gunNecroniumM60" quality="1,4"/>
                <item name="gunOrichalcumSMG" quality="1,4"/>
                <item name="gunUraniumDesertVulture" quality="1,4"/>
                <item name="gunUraniumShotgun" quality="1,4"/>
                <item name="gunNecroniumRPG" quality="1,4"/>
                <item name="Diamond Bit" prob="0.2"/>
                <item name="Carbon Bit" prob="0.15"/>
                <item name="Titanium Bit" prob="0.1"/>
                <item name="Obsidian Bit" prob="0.01"/>
                <item name="Diamond Harvester" prob="0.2"/>
                <item name="Carbon Harvester" prob="0.15"/>
                <item name="Titanium Harvester" prob="0.1"/>
                <item name="Obsidian Harvester" prob="0.01"/>
                <item name="modResistanceList" prob="0.1"/>
                <item name="modArmorPlatingMithril" prob="0.15"/>
                <item name="modArmorPlatingAdamantium" prob="0.06"/>
            </trader_item_group>
    </insertBefore>
        <!--Asking traders to sell Elite Items-->
    <append xpath="//trader_info[@id='1' or @id='2' or @id='6' or @id='7' or @id='8']/trader_items">
        <item group="Eliteitems" count="1,2"/>
    </append>

That is the pretty much the whole thing theres another group of code for ammo aswell but nothing that changes prices 



Screenshot_1.png

 
nope which is why im confused 

 


    <append xpath="/traders/traderstage_templates">
        <traderstage_template name="EliteTier1" min="110" max="999999" /> <!-- Elite Items -->
        <traderstage_template name="EliteTier2" min="130" max="999999" /> <!-- Elite Items -->
        <traderstage_template name="EliteTier3" min="150" max="999999" /> <!-- Elite Items -->
    </append>
        <!--Create trader group for Elite Items including rare guns-->
    <insertBefore xpath="/traders/trader_item_groups/trader_item_group[@name='ammoAll']">
        <trader_item_group name="Eliteitems">
                <item name="gunBronzeShotgun" quality="1,4"/>
                <item name="gunBronzeDesertVulture" quality="1,4"/>
                <item name="gunBronzeSMG" quality="1,4"/>
                <item name="gunBronzeM60" quality="1,4"/>
                <item name="gunBronzeRPG" quality="1,4"/>
                <item name="gunTungstenM60" quality="1,4"/>
                <item name="gunMithrilSMG" quality="1,4"/>
                <item name="gunAdamantiumDesertVulture" quality="1,4"/>
                <item name="gunMithrilShotgun" quality="1,4"/>
                <item name="gunOrichalcumRPG" quality="1,4"/>
                <item name="gunNecroniumM60" quality="1,4"/>
                <item name="gunOrichalcumSMG" quality="1,4"/>
                <item name="gunUraniumDesertVulture" quality="1,4"/>
                <item name="gunUraniumShotgun" quality="1,4"/>
                <item name="gunNecroniumRPG" quality="1,4"/>
                <item name="Diamond Bit" prob="0.2"/>
                <item name="Carbon Bit" prob="0.15"/>
                <item name="Titanium Bit" prob="0.1"/>
                <item name="Obsidian Bit" prob="0.01"/>
                <item name="Diamond Harvester" prob="0.2"/>
                <item name="Carbon Harvester" prob="0.15"/>
                <item name="Titanium Harvester" prob="0.1"/>
                <item name="Obsidian Harvester" prob="0.01"/>
                <item name="modResistanceList" prob="0.1"/>
                <item name="modArmorPlatingMithril" prob="0.15"/>
                <item name="modArmorPlatingAdamantium" prob="0.06"/>
            </trader_item_group>
    </insertBefore>
        <!--Asking traders to sell Elite Items-->
    <append xpath="//trader_info[@id='1' or @id='2' or @id='6' or @id='7' or @id='8']/trader_items">
        <item group="Eliteitems" count="1,2"/>
    </append>

That is the pretty much the whole thing theres another group of code for ammo aswell but nothing that changes prices 


Those are all custom items, did you assign them a value in the items.xml file?

Code:
    <property name="EconomicValue" value="175"/>
 
every single one thats in the trader template has a value i've triple checked *Edit* Infact every item has a value that doesnt have a property of 


<property name="SellableToTrader" value="false"/>

 
Last edited by a moderator:
Any yellow text in the log file when loading this modlet? Can you add the items.xml so we can potentially see anything going on in there?

 
Do any of the mods that you are loading up affect Better Barter or the barter system itself?

For example, this is the vanilla code for Better Barter:

            <passive_effect name="BarteringBuying" operation="base_add" level="1,2,3,4,5" value=".05,.1,.15,.2,.25"/>
            <passive_effect name="BarteringSelling" operation="base_add" level="1,2,3,4,5" value=".05,.1,.15,.2,.25"/>




If those numbers are adjusted too much, you can see a situation where all the purchase costs become negative.

 
Ahhhh.... sorry for late reply been working alot. That would explain it as i've redone every single perk since im working on a serverside overhaul mod

idk how i managed to do this, was probably rushing when i first added this. i fixed the top one the bottom was the original for both

 


<passive_effect name="BarteringBuying" operation="base_add" level="1,2,3,4,5,6,7,8,9,10" value=".05,.1,.15,.2,.25,.3,.35,.4,.45,.5"/>
            <passive_effect name="BarteringSelling" operation="base_add" level="1,2,3,4,5,6,7,8,9,10" value=".05,.1,.15,.2,.25,.3,.35,4,4.5,5"/>

Any yellow text in the log file when loading this modlet? Can you add the items.xml so we can potentially see anything going on in there?
but no there was no errors so thats why i made the post

Yep works good now

Screenshot_2.png

 
Back
Top