Jump to content

Question

Hey all!

 

I'm trying to replace the current metal currency with gems, but updating them in the database alone did not work. The gems are not being removed after buying an item. 

 

Anyone know what I have to do to make this work?  :mellow:

 

Thanks!

Share this post


Link to post
Share on other sites

16 answers to this question

Recommended Posts

  • 0

I am assuiming so the game takes ur "currency" at face value from your inventory.  Or that the Epoch devs have not added a "rate" for the current in game gems.

The old trading way  is a "Face value" trading system, the new way breaks down what you have in your inventory so it can give change when purchasing items.

Share this post


Link to post
Share on other sites
  • 0

Pardon my ignorance, but where am I making this change?

 

afile is a column in the Traders_DATA table of your SQL database.

 

If you haven't already, get Navicat or any other MySQL management software; or if your host allows it, you can always use the built in phpMyAdmin.

Share this post


Link to post
Share on other sites
  • 0

When I use trade_items_old I get this error.

18:11:58 Error Zero divisor
18:11:58 File z\addons\dayz_server\compile\server_tradeObject.sqf, line 9
18:12:07 "EPOCH SERVERTRADE: Player: Pewpew (snip) sold a ItemKiloHemp in/at Any for <null>x <null>"
18:12:07 Error in expression <urrency =	_this select 5; _qty =		_this select 6; _clientID = 	owner _player; _p>

Share this post


Link to post
Share on other sites
  • 0

Follow the first post of this thread to the letter:

 

It worked flawlessly for me and now I've added several things like Apache AH64 and the Avenger in the traders. They are insanely high priced but the players LOVE having something to 'quest' towards.

Share this post


Link to post
Share on other sites
  • 0

I am not using SQL but rather using the DZE_ConfigTrader = true method and using using hpp files.

 

example:

 

class Category_3100 {
    class G36_C_SD_camo {type = "trade_weapons";buy[] = {1,"ItemGoldBar10oz"};sell[] = {5,"ItemGoldBar"};};

};

 

is there a way I can do the afile _old so it can be handled with the old barter system instead of the new ?

 

Could I do {afile = "trade_weapons_old"} or something at the end?

 

Wait!! maybe I just need to change the existing line to look like this bellow.

 

class G36_C_SD_camo {type = "trade_weapons_old";buy[] = {1,"ItemRuby"};sell[] = {5,"ItemGoldBar"};};

Share this post


Link to post
Share on other sites
  • 0

I am not using SQL but rather using the DZE_ConfigTrader = true method and using using hpp files.

 

example:

 

class Category_3100 {

    class G36_C_SD_camo {type = "trade_weapons";buy[] = {1,"ItemGoldBar10oz"};sell[] = {5,"ItemGoldBar"};};

};

 

is there a way I can do the afile _old so it can be handled with the old barter system instead of the new ?

 

Could I do {afile = "trade_weapons_old"} or something at the end?

 

Wait!! maybe I just need to change the existing line to look like this bellow.

 

class G36_C_SD_camo {type = "trade_weapons_old";buy[] = {1,"ItemRuby"};sell[] = {5,"ItemGoldBar"};};

if you are using the missionfile categorys and stuff to have server figure out the prices foor trade items do something like this :

 

	class LAV25_DZE {
		type = "trade_any_vehicle";
		buy[] = {4,"ItemBriefcase100oz"};
		sell[] = {2,"ItemBriefcase100oz"};
	};
	class LAV25 {
		type = "trade_any_vehicle_old";
		buy[] = {4,"ItemSapphire"};
		sell[] = {2,"ItemSapphire"};
	};

this _old  has to be there for all items, weapons, vehicles that will be sold and bought for gemstones

Share this post


Link to post
Share on other sites
  • 0

that seemed to work for my but it look odd on the vendor list now. Doesn't show the weapon icon or the discription, Something like  (class G36_C_SD_camo) but I can buy it for a ruby.

dont worry about it, it works

vehicles will not show up green for being sold but you can still sell them

Share this post


Link to post
Share on other sites
  • 0

 

When I use trade_items_old I get this error.

18:11:58 Error Zero divisor
18:11:58 File z\addons\dayz_server\compile\server_tradeObject.sqf, line 9
18:12:07 "EPOCH SERVERTRADE: Player: Pewpew (snip) sold a ItemKiloHemp in/at Any for <null>x <null>"
18:12:07 Error in expression <urrency =	_this select 5; _qty =		_this select 6; _clientID = 	owner _player; _p>

Hi Sukkaed, did you manage to fix this issue? I'm getting the same error in my rpt since adding gems to Black Market Trader at Stary.....

 

23:09:29 Error in expression <urrency = _this select 5;
_qty = _this select 6;
_clientID = owner _player;
_p>
23:09:29   Error position: <select 6;
_clientID = owner _player;
_p>
23:09:29   Error Zero divisor
23:09:29 File z\addons\dayz_server\compile\server_tradeObject.sqf, line 9
 

 

Thanks

Share this post


Link to post
Share on other sites
  • 0

Hi Sukkaed, did you manage to fix this issue? I'm getting the same error in my rpt since adding gems to Black Market Trader at Stary.....

 

23:09:29 Error in expression <urrency = _this select 5;
_qty = _this select 6;
_clientID = owner _player;
_p>
23:09:29   Error position: <select 6;
_clientID = owner _player;
_p>
23:09:29   Error Zero divisor
23:09:29 File z\addons\dayz_server\compile\server_tradeObject.sqf, line 9
 

 

Thanks

Fix on this?

Share this post


Link to post
Share on other sites
  • 0

Fix on this?

Never got a fix and was told to ignore it so have done. I'm not sure the error is having any adverse reaction apart from slight extra spam in the report. This will depend on how much your gem trader gets used though. Because of the higher currency, I have changed my gem rarity to a 4% drop instead of 40%. So, this trader's activity is quite low within each restart cycle.

Share this post


Link to post
Share on other sites
  • 0

Never got a fix and was told to ignore it so have done. I'm not sure the error is having any adverse reaction apart from slight extra spam in the report. This will depend on how much your gem trader gets used though. Because of the higher currency, I have changed my gem rarity to a 4% drop instead of 40%. So, this trader's activity is quite low within each restart cycle.

Where can you change the drop rate?

Share this post


Link to post
Share on other sites
  • 0

Where can you change the drop rate?

Hi, read this thread from the link down. about 1.5 pages. There's some important things to read further down so, it's worth reading the whole post.

 

 

You edit and override a file called remove.sqf.

Share this post


Link to post
Share on other sites
  • 0

Follow the first post of this thread to the letter:

 

It worked flawlessly for me and now I've added several things like Apache AH64 and the Avenger in the traders. They are insanely high priced but the players LOVE having something to 'quest' towards.

does this work 1.0.5.1 ?? cause i can't seem to get it to work. it shows up in the traders but doesn't buy it when i try. i am using ruby's ????

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Similar Content

    • By Brian Soanes
      To unlock vehicles left in your traders over a server restart, open your epoch_server.pbo

      In epoch_server\compile\epoch_vehicle\EPOCH_load_vehicles.sqf
      Find
      if (_allowDamage) then { Just above that, add this
      A3E_SafeZonePosArray = [ [[18451.9,14278.1,0]], //Altis East trader [[13333.5,14494.3,0]], //Altis Central trader [[6192.46,16834,0]] //Altis West trader ]; { if (_vehicle distance (_x select 0) < 200) then { _vehicle lock false; diag_log format["Vehicle %1 left in trader unlocked @ %2", _class, mapGridPosition _vehicle]; }; } forEach A3E_SafeZonePosArray; Pack pbo and you're good to go
    • By victorks
      my first work in editin :) https://uploaddeimagens.com.br/imagens/20180307202515_1-jpg https://uploaddeimagens.com.br/imagens/20180307202245_1-jpg DOWNLOAD: https://www.dropbox.com/s/oq97j7x59362kqe/CASTLEai.sqf?dl=0 AI M2 NEED WAI: https://pastebin.com/GJMnPvZP ON THE MAP: https://pastebin.com/cyqH9rNV  
       
      https://www.dropbox.com/s/oq97j7x59362kqe/CASTLEai.sqf?dl=0
       
       
       
       
       
       
       
       
       
    • By Thug
      In the file server_spawnTraders.sqf
      private "_trader"; { _trader = createAgent [_x select 0,_x select 1,[],0,"CAN_COLLIDE"]; {_trader removeMagazine _x;} count magazines _trader; removeAllItems _trader; // removeAllWeapons _trader;//this is commented out so traders have weapons removeBackpack _trader; _trader switchMove ""; _trader setDir (_x select 2); _trader setVehicleInit "this disableAI 'ANIM'; this disableAI 'AUTOTARGET'; this disableAI 'FSM'; this disableAI 'MOVE'; this disableAI 'TARGET'; this setBehaviour 'CARELESS'; this forceSpeed 0; this allowDamage false;"; _trader setUnitAbility 0.6; _trader disableAI "ANIM"; _trader disableAI "AUTOTARGET"; _trader disableAI "FSM"; _trader disableAI "MOVE"; _trader disableAI "TARGET"; _trader setBehaviour "CARELESS"; _trader forceSpeed 0; _trader allowDamage false; _trader enableSimulation false; } count _this; processInitCommands; What would I have to do to get the Traders to move like they did in v1.0.5.1
      I have tried but can not get it to work.
    • By Thug
      I have an overpoch Sauerland server. The vehicle traders are not spawning when you buy. The SOB takes your money and gives you a key, but no vehicle.  The arrow comes up for about 12 seconds.  After the restart, they are there, all on top of each other.
      NO, I do not have infistar installed.  It brakes the server. No admin tools at all.
      Here are my server and client RPTs. Can someone please take a look for me?
      Client
      Server
      All other traders work.
       
    • By blueman
      I made some changes to the traders inventory.
      So they they have 15 drinks, and 15 food.
      However, when I restart server, and check, the inventory was just like it was before restart.
      I have a feeling I don't understand the loot system yet, and the traders.
      Looks like it's a running tally of what ever gets sold to them, and it carries over through restarts.
      Probably only resets after it reaches a certain point (amount of items).

      What I'd like to do, is have the traders have a minimum of 15 food and 15 drink at all times is that possible?
      Thanks,
  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...