Jump to content

trader help please


theredwolf13

Recommended Posts

I am at a loss here. No errors, it just doesn't work.

 

 

<config>

 

<remove xpath="/traders/trader_info[@id=1]/@open_time"/>

<remove xpath="/traders/trader_info[@id=1]/@close_time"/>

 

<set xpath="/traders/trader_info[@id=1]/@reset_interval">1</set>

<set xpath="/traders/trader_info[@id=1]/@min_inventory">40</set>

<set xpath="/traders/trader_info[@id=1]/@max_inventory">100</set>

 

<set xpath="/traders/trader_info[@id=3]/@reset_interval">1</set>

<set xpath="/traders/trader_info[@id=3]/@min_inventory">40</set>

<set xpath="/traders/trader_info[@id=3]/@max_inventory">100</set>

<set xpath="/traders/trader_info[@id=3]/@allow_sell">true</set>

 

<set xpath="/traders/trader_info[@id=4]/@reset_interval">1</set>

<set xpath="/traders/trader_info[@id=4]/@min_inventory">40</set>

<set xpath="/traders/trader_info[@id=4]/@max_inventory">100</set>

<set xpath="/traders/trader_info[@id=4]/@allow_sell">true</set>

 

<set xpath="/traders/trader_info[@id=5]/@reset_interval">1</set>

<set xpath="/traders/trader_info[@id=5]/@min_inventory">40</set>

<set xpath="/traders/trader_info[@id=5]/@max_inventory">100</set>

<set xpath="/traders/trader_info[@id=5]/@allow_sell">true</set>

 

</config>

 

 

Thank you for your time.

Link to comment
Share on other sites

Never messed with traders, but perhaps they require an open and close time so removing it entirely causes it to resort to a default. Try removing the lines in trader.xml directly and see if it works or if you get the same result. Make a backup first of course. If it doesn't work then try changing it to an open time of 00:00 and close time of 23:59.

Link to comment
Share on other sites

When in a game open console and type exportcurrentconfigs and take note of world.

 

Then go to appdata/roaming/7 days to die/saves find the world and configs and search traders.xml and see what it is doing

 

As far as I can tell, it didn't change anything. Which is very confusing. I have the folder order correct and a modinfo.xml.

 

- - - Updated - - -

 

Never messed with traders, but perhaps they require an open and close time so removing it entirely causes it to resort to a default. Try removing the lines in trader.xml directly and see if it works or if you get the same result. Make a backup first of course. If it doesn't work then try changing it to an open time of 00:00 and close time of 23:59.

 

You can comment out the hours if you wish to keep the traders open 24/7. Just can't seem to get it into modlet form.

Link to comment
Share on other sites

You could use setattribute

 

Example for trader 1

 

<setattribute xpath="/traders/trader_info[@id='1']" name="reset_interval">1</setattribute>
<setattribute xpath="/traders/trader_info[@id='1']" name="min_inventory">40</setattribute>
<setattribute xpath="/traders/trader_info[@id='1']" name="max_inventory">100</setattribute>

 

You could the use set attribute on the open and close times too using the above syntax

Link to comment
Share on other sites

You could use setattribute

 

Example for trader 1

 

<setattribute xpath="/traders/trader_info[@id='1']" name="reset_interval">1</setattribute>
<setattribute xpath="/traders/trader_info[@id='1']" name="min_inventory">40</setattribute>
<setattribute xpath="/traders/trader_info[@id='1']" name="max_inventory">100</setattribute>

 

You could the use set attribute on the open and close times too using the above syntax

 

I gave it a go but now it is giving errors on top of not working.

 

I give up. lol I am just going to go back to editing the actual xml. Thank you very much for trying to help folks. :)

Link to comment
Share on other sites

I think the problem is that you can not remove time elements from the trader with Xpath so every way i tried to remove threw errors .

 

Your original code but with the trader settings below works perfectly for me, it just would not let me remove the times. i set time with trader closed for 1 min only and it worked. Trader restocks daily as well !

 

The code Royal posted above definately also works for the trader reset days too, it threw errors when trying to change opening times.

 


<Trader>
       <set xpath="/traders/trader_info[@id='1']/@open_time">0:00</set>
<set xpath="/traders/trader_info[@id='1']/@close_time">23:59</set>
<set xpath="/traders/trader_info[@id='1']/@reset_interval">1</set>
<set xpath="/traders/trader_info[@id='1']/@min_inventory">40</set>
<set xpath="/traders/trader_info[@id='1']/@max_inventory">100</set>


</Trader>

 

So you should be ok to do the rest of your modlet.

 

Never messed with traders, but perhaps they require an open and close time so removing it entirely causes it to resort to a default. Try removing the lines in trader.xml directly and see if it works or if you get the same result. Make a backup first of course. If it doesn't work then try changing it to an open time of 00:00 and close time of 23:59.

 

Scwanobi may be right on this one I tried I failed and tried again I failed so came to believe this may be the case.

Link to comment
Share on other sites

maybe try to remove the whole trader and add it complete again

no idea of that works

 

Here my code for a additional vending machine (no idea if thats helpfull)

<config>
<append xpath="/traders">

<trader_info id="6" reset_interval="2" override_buy_markup="1.0" allow_sell="false" min_inventory="6" max_inventory="13" min_items_swapped="6" max_items_swapped="13">
	<trader_items count="10">
		<item name="drugPainkillers" count="1" />		
		<item name="medicalFirstAidBandage" count="1" />		
		<item name="medicalSplint" count="1" />		
		<item name="drugPainkillers" count="1" />		
		<item name="medicalFirstAidBandage" count="1" />		
		<item name="medicalSplint" count="1" />		

		<item name="foodCropCorn" count="4,8"/>
		<item name="foodCropPotato" count="4,8"/>
		<item name="foodCropBlueberries" count="4,8"/>
		<item name="foodCropMushrooms" count="4,8"/>
		<item name="foodEgg" count="2,8"/>
		<item name="foodRawMeat" count="10,40"/>			
		<item name="foodHoney" count="1,2"/>				
		<item name="foodCanBeef" count="2,3"/>	
		<item name="foodCanPasta" count="2,3"/>	
		<item name="foodCanSoup" count="2,3"/>
		<item name="drinkJarBoiledWater" count="2,3"/>
		<item name="drinkJarGoldenRodTea" count="2,3"/>
		<item name="drinkJarRedTea" count="2,3"/>
		<item name="drinkJarCoffee" count="2,3"/>		
	</trader_items>

	<tier_items level="1,499" count="all">  <!-- requires Perk 0 -->
		<item name="ammo9mmBullet" count="10,30"/>
		<item name="ammo762mmBulletFMJ" count="5,30"/>
		<item name="ammo44MagnumBullet" count="5,20" />
		<item name="ammoShotgunShell" count="5,20"/>	
	</tier_items>

	<tier_items level="500,2999" count="all">  <!-- requires Perk 1-2 -->
		<item name="ammo9mmBullet" count="15,50"/>
		<item name="ammo762mmBulletFMJ" count="15,50"/>
		<item name="ammo44MagnumBullet" count="5,30"/>
		<item name="ammoShotgunShell" count="5,30"/>		
	</tier_items>		


	<tier_items level="3000,3999" count="all">  <!-- requires Perk 3 -->
		<item name="ammo9mmBullet" count="25,70"/>
		<item name="ammo762mmBulletFMJ" count="20,80"/>
		<item name="ammo44MagnumBullet" count="10,40" />
		<item name="ammoShotgunShell" count="10,40"/>	
	</tier_items>

	<tier_items level="4000,4999" count="all"> <!-- requires Perk 4 -->
		<item name="ammo9mmBullet" count="40,250"/>
		<item name="ammo762mmBulletFMJ" count="40,120"/>
		<item name="ammo44MagnumBullet" count="20,80" />
		<item name="ammoShotgunShell" count="20,80"/>
	</tier_items>

	<tier_items level="5000,-1" count="all"> <!-- requires Perk 5 -->
		<item name="ammo9mmBullet" count="100,300"/>
		<item name="ammo762mmBulletFMJ" count="50,200"/>
		<item name="ammo44MagnumBullet" count="30,100" />
		<item name="ammoShotgunShell" count="30,100"/>			
	</tier_items>		
</trader_info>

</append>	
</config>

Link to comment
Share on other sites

I think the problem is that you can not remove time elements from the trader with Xpath so every way i tried to remove threw errors .

 

Your original code but with the trader settings below works perfectly for me, it just would not let me remove the times. i set time with trader closed for 1 min only and it worked. Trader restocks daily as well !

 

The code Royal posted above definately also works for the trader reset days too, it threw errors when trying to change opening times.

 


<Trader>
       <set xpath="/traders/trader_info[@id='1']/@open_time">0:00</set>
<set xpath="/traders/trader_info[@id='1']/@close_time">23:59</set>
<set xpath="/traders/trader_info[@id='1']/@reset_interval">1</set>
<set xpath="/traders/trader_info[@id='1']/@min_inventory">40</set>
<set xpath="/traders/trader_info[@id='1']/@max_inventory">100</set>


</Trader>

 

So you should be ok to do the rest of your modlet.

 

 

 

Scwanobi may be right on this one I tried I failed and tried again I failed so came to believe this may be the case.

 

I think you are correct. I tried so many ways to remove the hours. That being said, making the open/closing the same time worked. :) Now to see if I can stop the loud announcements. Thank you very much for all your help folks! Much appreciated.

Link to comment
Share on other sites

The trader open close sounds are at the bottom of the sounds.xml. Not sure if you can set the audio source name or audio source clip to be empty or not. It would likely keep the sound from firing but might throw an nre. You could replace it with a quicker and quieter audio clip like one of the sounds for hitting cloth. I did that for metal on metal sounds cause I like busting up things and ripping down metal structures was grating on my nerves.

Link to comment
Share on other sites

The trader open close sounds are at the bottom of the sounds.xml. Not sure if you can set the audio source name or audio source clip to be empty or not. It would likely keep the sound from firing but might throw an nre. You could replace it with a quicker and quieter audio clip like one of the sounds for hitting cloth. I did that for metal on metal sounds cause I like busting up things and ripping down metal structures was grating on my nerves.

 

 

Or possibly set the announcement volumes to '0' for all occurences of announce? maybe do it with contains name.

 

 

Edit : Would you believe that setting both closing time and opening times to '0.00' actually works and testing on navezgane traders I get no annoucements.. so thats the fix for sound and then trader is fully open 24/7 .

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...