Jump to content
  • 0

where would I find build time


calamity

Question

13 answers to this question

Recommended Posts

  • 0

player_build.sqf in dayz_code.pbo

I see the plot pole distance, the preview timer, and the max distance to move the item, But I dont see any build timers. Im looking to increase build time on some objects and decrease build time on others, like storage shed is 6 step timer  how can I change this to say 3 steps. sand bags are like 3 steps change that to 6 steps etc...

guess I dont really know what to look for.

Link to comment
Share on other sites

  • 0

cen is correct and your understanding of the way it works is a bit skewed. There is no build timers there is only loops. To be more specific animation loops and you cannot change the values as such as they are in the config files (see here https://github.com/vbawol/DayZ-Epoch/blob/master/SQF/dayz_code/Configs/cfgVehicles.hpp look for constructioncount).

So if you want to change the amount of "time" it takes to construct something you will need to increase or decrease the number of loops it takes to complete it. I haven't done this myself but I believe the code for it is here

_limit = 3;

if(isNumber (configFile >> "CfgVehicles" >> _classname >> "constructioncount")) then {
_limit = getNumber(configFile >> "CfgVehicles" >> _classname >> "constructioncount");
};

You may be able to insert something after it like

if (_classname == "XYZ") then {
_limit = 5;
};

Or using an array which would mean you can adjust it for more than just one

if (_classname in ["ABC","XYZ"]) then {
_limit = 5;
};

You will need to test to see how and if it works of course.

 

And you will need to figure out a way to set it up such that the file is called via your mission file and not via the default epoch client files.

Link to comment
Share on other sites

  • 0

cen is correct and your understanding of the way it works is a bit skewed. There is no build timers there is only loops. To be more specific animation loops and you cannot change the values as such as they are in the config files (see here https://github.com/vbawol/DayZ-Epoch/blob/master/SQF/dayz_code/Configs/cfgVehicles.hpp look for constructioncount).

So if you want to change the amount of "time" it takes to construct something you will need to increase or decrease the number of loops it takes to complete it. I haven't done this myself but I believe the code for it is here

_limit = 3;

if(isNumber (configFile >> "CfgVehicles" >> _classname >> "constructioncount")) then {
_limit = getNumber(configFile >> "CfgVehicles" >> _classname >> "constructioncount");
};

You may be able to insert something after it like

if (_classname == "XYZ") then {
_limit = 5;
};

Or using an array which would mean you can adjust it for more than just one

if (_classname in ["ABC","XYZ"]) then {
_limit = 5;
};

You will need to test to see how and if it works of course.

 

And you will need to figure out a way to set it up such that the file is called via your mission file and not via the default epoch client files.

 

yah thankz for that, I see om in over my head here. guess I will leave it be.

only a few items have the constructioncount and I cant find where cfgVehicles.hpp is called so I can change the path.

so for nowI just work on other issues

thankz guyz for your help.......

Link to comment
Share on other sites

  • 0

You don't change the path for cfgVehicles.hpp, you change the path for player_build.sqf which is where you would add the above changes I mentioned. player_build.sqf is in your client files.

This line is from the client files dayz_code\init\compiles.sqf

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

I think you can make the changes required to it the same way you make the changes for selfBloodbag if you know how to do that or you could google it.

 

This might help you with custom compiles

Link to comment
Share on other sites

  • 0

_limit = 3;

if(isNumber (configFile >> "CfgVehicles" >> _classname >> "constructioncount")) then {
_limit = getNumber(configFile >> "CfgVehicles" >> _classname >> "constructioncount");
};

 

This won't work. Anyone knows why?

Because you are saying that _limit shall be 3 but then again few lines later you changed it to the number getting out of the config file. So just delet the config getting things and you are fine.... except you want different limits for different buildings.

Link to comment
Share on other sites

  • 0

_limit = 3;

if(isNumber (configFile >> "CfgVehicles" >> _classname >> "constructioncount")) then {

_limit = getNumber(configFile >> "CfgVehicles" >> _classname >> "constructioncount");

};

 

This won't work. Anyone knows why?

Because you are saying that _limit shall be 3 but then again few lines later you changed it to the number getting out of the config file. So just delet the config getting things and you are fine.... except you want different limits for different buildings.

 

The value sets the default first to 3. Then it checks if there is a constructioncount value in the cfg file and if there is it uses that. Else the value remains on the default. Dont delete any of the config values. Theres no reason to be messing with it. As stated in my post you simply set the value after those lines. Use an array to set the value for multiple constructables to a limit of your choice after. I can't see this not working unless they have changed the code since I posted this.

Link to comment
Share on other sites

  • 0

Can i use 

 

 

if ((getPlayerUID player) in ["11111","22222"]) then {
if (DZE_StaticConstructionCount > 0) then {
_limit = DZE_StaticConstructionCount;
}
else {
if (isNumber (configFile >> "CfgVehicles" >> _classname >> "constructioncount")) then {
_limit = getNumber(configFile >> "CfgVehicles" >> _classname >> "constructioncount");
};
};
} else {
if (DZE_StaticConstructionCount > 0) then {
_limit = DZE_StaticConstructionCount;
}
else {
if (isNumber (configFile >> "CfgVehicles" >> _classname >> "constructioncount")) then {
_limit = 1;
};
};
};

?

Link to comment
Share on other sites

  • 0

Can i use 

?

Thats all that gets added to the quote  :wacko:  anyways..

 

I guess that would work.

And I think this might be simpler to read than so many nested ifs and the redundant 'if (DZE_StaticConstructionCount > 0)'.

if (DZE_StaticConstructionCount > 0) then {
    _limit = DZE_StaticConstructionCount;
}
else (isNumber (configFile >> "CfgVehicles" >> _classname >> "constructioncount")) then {
    _limit = getNumber(configFile >> "CfgVehicles" >> _classname >> "constructioncount");
};

if (!((getPlayerUID player) in ["11111","22222"])) then {
    if (_limit > 1) then {
        _limit = 1;
    };
};

Although I find it odd that you are stating that players not in the uid array get a limit of 1 while the players in the array get the default limit.

Link to comment
Share on other sites

  • 0

cen is correct and your understanding of the way it works is a bit skewed. There is no build timers there is only loops. To be more specific animation loops and you cannot change the values as such as they are in the config files (see here https://github.com/vbawol/DayZ-Epoch/blob/master/SQF/dayz_code/Configs/cfgVehicles.hpp look for constructioncount).

So if you want to change the amount of "time" it takes to construct something you will need to increase or decrease the number of loops it takes to complete it. I haven't done this myself but I believe the code for it is here

_limit = 3;

if(isNumber (configFile >> "CfgVehicles" >> _classname >> "constructioncount")) then {
_limit = getNumber(configFile >> "CfgVehicles" >> _classname >> "constructioncount");
};

You may be able to insert something after it like

if (_classname == "XYZ") then {
_limit = 5;
};

Or using an array which would mean you can adjust it for more than just one

if (_classname in ["ABC","XYZ"]) then {
_limit = 5;
};

You will need to test to see how and if it works of course.

 

And you will need to figure out a way to set it up such that the file is called via your mission file and not via the default epoch client files.

 

 

Thank you. This worked perfectly.

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...