Jump to content
  • 0

Shorten Buy/Sell Time


ChesterCheetoz

Question

Is it possible to cut the time down for players to buy and sell items? I keep getting complaints about how long it takes.  I just tell them they should be happy they have vendors at all.  But either way, if I can keep the players happy, Ill try.  If there is a way, is there a reason its set the way it is? To prevent errors or anything?

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

I get the same comments regarding wood chopping etc too. I'm guessing they're all tied up to the action involved - if I could even set it so 2 piles of wood are obtained or something per 'hit' (but keep the overall time total the same e.g. 1/10, but it gives 20 wood once finished) that'd be good too.

Link to comment
Share on other sites

  • 0

I was just looking into the wood chopping for our own server, should be pretty easy to customize the settings a little.

 

take a look at the file "@DayZ_Epoch\addons\dayz_code\actions\player_chopWood.sqf"

Looks like u can't change the animation speed, but off course get 2 wood with 1 animation or double the wood count at the end...

 

around line 89:

if(_finished) then {
    _counter = _counter + 1;
};

that will increase the counter after each animation you could change it to "_counter + 2" or something but be aware if the tree size is an odd number u have to change "if(_counter == _countOut) exitWith {" to "if(_counter >= _countOut) exitWith {" at line 95 or you might run into an infinite loop! :D this will skip every other animation so u get 2/10, 4/10, 6/10 etc.. a little messy but double the speed lol

 

 

the other solution would be to increase the size of the wood pile, thats pretty simple:

_item addMagazineCargoGlobal [_itemOut,_countOut];

the "_countOut" defines how much wood you get, so just double it or whatever u want:

_item addMagazineCargoGlobal [_itemOut,_countOut * 2];

Ok the file player_chopWood.sqf is included in the compiles.sqf so chances are u already customized that file (used with many mods), if u dont knwo about that it's explained in many other topics in this forum or google it. ;)

anyway, just copy the player_chopWood.sqf to your mission.bpo and change that in your compiles.sqf.

 

find:

player_chopWood =			compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_chopWood.sqf";

change to (I put the file in the "fixes" folder):

player_chopWood =            compile preprocessFileLineNumbers "fixes\player_chopWood.sqf";

that should be it, testing it now! :)

 

 

btw it might not be easy to change it for the trading, since it is only 1 animation, you could remove or change the animation but it should NOT the instant so players could but many items without a delay!

Link to comment
Share on other sites

  • 0

I was just looking into the wood chopping for our own server, should be pretty easy to customize the settings a little.

 

Ohhhh, you legend! Yeah I'm familiar with those files, and we indeed already have a custom complies.sqf. I really don't see why that 'woodn't' work (couldn't resist), I will just try the doubling of the wood piles at the end and see how that goes. Won't be able to try this for a couple of days though but I'll be sure to report back here if it worked! Can't see why it wouldn't though!

Link to comment
Share on other sites

  • 0

Ok it's working on my test server, but I addd a little fun part if anyone cares :D

So I set the size of the wood pile u get on the humanity level, so if u are a hero u get more wood (less 2500 humanity wont change so u get the default for now, but I added a value so bandits could get less wood).

I've also added a max factor, so u won't get "endless" wood if u have 100k humanity or something, so here is the change I made:

_itemOut = "PartWoodPile";
_humanity = player getVariable["humanity",0];
_countOutFactorMin = 1; // min factor, no negative effect for bandits
_countOutFactorMax = 4; // max factor, so a hero with 50k humanity or something won't get 20 times the wood
_countOutFactor = _humanity / 2500; // defaults to 1 as survivor, < 1 as bandit and > 1 as hero
if (_humanity < 0) then {
	_countOutFactor = -1 / _countOutFactor;
};
if (_countOutFactor < _countOutFactorMin) then {
	_countOutFactor = _countOutFactorMin;
} else {
	if (_countOutFactor > _countOutFactorMax) then {
		_countOutFactor = _countOutFactorMax;
	};
};
_countOut = ceil(_countOut * _countOutFactor);
 

That should do the trick, but you should also add the new variables ("_humanity","_countOutFactor","_countOutFactorMin","_countOutFactorMax") to the "private-list" at the top (line 6):

private ["_isOk","_i","_objName","_objInfo","_lenInfo","_started","_finished","_animState","_isMedic","_proceed","_counter","_itemOut","_countOut","_tree","_distance2d","_distance3d","_trees","_findNearestTree","_humanity","_countOutFactor","_countOutFactorMin","_countOutFactorMax"];

So maybe people actually want to be a hero, but I think the humanity system is still to buggy.. since u won't get any humanity from killing bandits and stuff.. but still maybe someone wants to use that or come up with a better idea :D

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...