Re: RELEASE: DaiZy FACTIONS Chernarus 1987 v11.32a (09.06.19)
Posted by Oliv82 on Dec 02, 2020; 12:14pm
URL: http://kodabar-dayz-daizy-single-player-forum.163.s1.nabble.com/RELEASE-DaiZy-FACTIONS-Chernarus-1987-v11-32b-20-10-20-tp13907p20792.html
Hi Lightside1125 !
You play the good mod thx :)
I don't know if it was the first time you installed and played v11.32a on your computer
But be advised, for each updates you install, you need to restart another "adventure" of your "survivor"
By my experience this kind of bug is very rare, look like all scripts are not loaded especialy in "missions" folder
It should be also you PC performance not enough to load all at the time, It happen very rarely on first times you play the mod, but after another restart the problem is commonly fixed.
I dont know what to say more, it should be a zip error with the upload... idk
If your 11.32a works fine, 11.32b is not a major update and i can post the code update of the jerrycans scripts, thats the priority on this update
------------------------------------------------------------------------------------------------------
jerry_refuel.sqf (Missions\1987FACTIONS_Chernarus_v1132a.chernarus\dayz_code\actions\jerry_refuel.sqf)
------------------------------------------------------------------------------------------------------
//Refuel vehicle (or fuel tanks) with Jerrycan 1 by 1
private["_jcType","_jcCap","_hiFuelQty","_fuelCapTank","_fuelQtyTank","_fuelQtyVehAfter","_diff","_jcNewType"];
player removeAction s_player_reftank;
s_player_reftank = 1;
_selJR = _this select 3;
if (isNull _selJR) exitWith {
cutText ["ERROR: isNull _selJR !","PLAIN"];
s_player_reftank = -1;
};
_type = typeOf _selJR;
_jerryTypeArr = [];
{
if (_x in AllJC) then {
_jerryTypeArr set [count _jerryTypeArr,_x];
_jcType = _x;
_jcCap = getNumber (configFile >> "CfgMagazines" >> _x >> "fuelQuantity");
};
} forEach (magazines player);
_fuelQtyArr = [];
if (count _jerryTypeArr > 1) then {
{
_jcCap = getNumber (configFile >> "CfgMagazines" >> _x >> "fuelQuantity");
_fuelQtyArr set [count _fuelQtyArr,_jcCap];
} forEach _jerryTypeArr;
_hiFuelQty = _fuelQtyArr call BIS_fnc_greatestNum;
_jcCap = _hiFuelQty;
_jcType = "";
{
_jcSearchType = getNumber (configFile >> "CfgMagazines" >> _x >> "fuelQuantity");
if (_hiFuelQty == _jcSearchType) then {
_jcType = _x;
};
} forEach AllJC;
};
if ((_jcType == "") or (isNil "_jcCap")) exitWith {
cutText ["---- jerry_refuel.sqf ERROR ---- locVar missed !", "PLAIN"];
s_player_reftank = -1;
};
// ---------------- Statics Fuel tanks ----------------
_isFuelTank = {_type isKindOf _x} count AllTanks > 0;
if (_isFuelTank) exitWith {
_fuelCapTank = _selJR getVariable ["fuelcap", 0];
_fuelQtyTank = _selJR getVariable ["fuelqty", 0];
if (_fuelQtyTank == _fuelCapTank) exitWith {
cutText ["The tank is already full !", "PLAIN DOWN"];
s_player_reftank = -1;
};
player playActionNow "Medic";
[player,"refuel",0,false,10] call dayz_zombieSpeak;
[player,10,true,(getPos player)] spawn player_alertZombies;
sleep 8;
_fuelQtyVehAfter = _fuelQtyTank + _jcCap;
// Tank not fully refuelled
if (_fuelQtyVehAfter < _fuelCapTank) exitWith {
_selJR setVariable ["fuelqty",_fuelQtyVehAfter];
player removeMagazine _jcType;
player addMagazine "ItemJerrycanEmpty";
cutText [format ["You have refuelled %1l in tank. Estimated quantity: %2l", _jcCap, (round _fuelQtyVehAfter)], "PLAIN DOWN"];
s_player_reftank = -1;
};
// Tank fully refuelled
if (_fuelQtyVehAfter >= _fuelCapTank) exitWith {
_selJR setVariable ["fuelqty",_fuelCapTank];
player removeMagazine _jcType;
// find diff of fuel qty
_diff = abs(ceil(_fuelQtyVehAfter - _fuelCapTank));
if (_diff > 20) then {_diff = 20};
{
_jcSearchType = getNumber (configFile >> "CfgMagazines" >> _x >> "fuelQuantity");
if (_diff == _jcSearchType) then {
_jcNewType = _x;
};
} forEach AllJC;
player addMagazine _jcNewType;
cutText [format ["You have refuelled %1l. The tank is full.", (20 - _diff)], "PLAIN DOWN"];
s_player_reftank = -1;
};
};
// ---------------- Vehicles ----------------
_fuelCapVeh = getNumber(configFile >> "cfgVehicles" >> _type >> "fuelCapacity");
if (isNil "_fuelCapVeh") then {_fuelCapVeh = 50};
_textVeh = getText (configFile >> "CfgVehicles" >> _type >> "displayName");
_fuelRatioVeh = fuel _selJR;
_fuelQtyVeh = _fuelRatioVeh * _fuelCapVeh;
player playActionNow "Medic";
[player,"refuel",0,false,10] call dayz_zombieSpeak;
[player,10,true,(getPos player)] spawn player_alertZombies;
sleep 8;
_fuelQtyVehAfter = _fuelQtyVeh + _jcCap;
// Vehicle not fully refuelled
if (_fuelQtyVehAfter < _fuelCapVeh) exitWith {
_fuelRatioVehAfter = _fuelQtyVehAfter / _fuelCapVeh;
_selJR setFuel _fuelRatioVehAfter;
player removeMagazine _jcType;
player addMagazine "ItemJerrycanEmpty";
cutText [format ["You have refuelled %1l in %2.", _jcCap, _textVeh], "PLAIN DOWN"];
s_player_reftank = -1;
};
// Vehicle fully refuelled
if (_fuelQtyVehAfter >= _fuelCapVeh) exitWith {
_selJR setFuel _fuelCapVeh;
player removeMagazine _jcType;
// find diff of fuel qty
_diff = abs(ceil(_fuelQtyVehAfter - _fuelCapVeh));
if (_diff > 20) then {_diff = 20};
_jcNewType = "";
{
_jcSearchType = getNumber (configFile >> "CfgMagazines" >> _x >> "fuelQuantity");
if (_diff == _jcSearchType) then {
_jcNewType = _x;
};
} forEach AllJC;
player addMagazine _jcNewType;
cutText [format ["You have refuelled %1l in %2. The fuel tank is full.", (20 - _diff), _textVeh], "PLAIN DOWN"];
s_player_reftank = -1;
};
------------------------------------------------------------------------------------------------------
jerry_fill.sqf (Missions\1987FACTIONS_Chernarus_v1132a.chernarus\dayz_code\actions\jerry_fill.sqf)
------------------------------------------------------------------------------------------------------
//Used only for fuelTanks like "Land_Ind_TankSmall", "Land_fuel_tank_big", etc...
private["_jcCap","_lowFuelQty","_jcSearchType"];
player removeAction s_player_fillfuel;
s_player_fillfuel = 1;
if (!("equip_hose" in magazines player)) exitWith {
cutText ["You need a Hose !", "PLAIN DOWN"];
s_player_fillfuel = -1;
};
_selJF = _this select 3;
if (isNull _selJF) exitWith {
cutText ["---- jerry_fill.sqf ERROR ---- isNull _selJF !","PLAIN"];
s_player_fillfuel = -1;
};
_fuelQtyTank = _selJF getVariable ["fuelqty",0];
if (isNil "_fuelQtyTank") exitWith {
cutText ["---- jerry_fill.sqf ERROR ---- Undefined _fuelQtyTank !","PLAIN"];
s_player_fillfuel = -1;
};
if (_fuelQtyTank < 1) exitWith {
cutText ["The fuel tank level is too low !","PLAIN DOWN"];
s_player_fillfuel = -1;
};
_jerryTypeArr = [];
_jcType = "";
{
if (_x in AllJC) then {
_jerryTypeArr set [count _jerryTypeArr,_x];
_jcType = _x;
_jcCap = getNumber (configFile >> "CfgMagazines" >> _x >> "fuelQuantity");
};
} forEach (magazines player);
_fuelQtyArr = [];
if (count _jerryTypeArr > 1) then {
{
_jcCap = getNumber (configFile >> "CfgMagazines" >> _x >> "fuelQuantity");
_fuelQtyArr set [count _fuelQtyArr,_jcCap];
} forEach _jerryTypeArr;
_lowFuelQty = _fuelQtyArr call BIS_fnc_lowestNum;
_jcCap = _lowFuelQty;
_jcType = "";
{
_jcSearchType = getNumber (configFile >> "CfgMagazines" >> _x >> "fuelQuantity");
if (_lowFuelQty == _jcSearchType) then {
_jcType = _x;
};
} forEach AllJC;
};
if ((_jcType == "") or (isNil "_jcCap")) exitWith {
cutText ["---- jerry_fill.sqf ERROR ---- locVar missed !", "PLAIN"];
s_player_fillfuel = -1;
};
player playActionNow "Medic";
[player,"refuel",0,false,10] call dayz_zombieSpeak;
[player,10,true,(getPosATL player)] spawn player_alertZombies;
sleep 8;
_JCQtyToFill = 20 - _jcCap;
if (_JCQtyToFill > 20) exitWith {
cutText ["---- jerry_fill.sqf ERROR ---- _JCQtyToFill > 20 !","PLAIN"];
s_player_fillfuel = -1;
};
_fuelQtyAfter = _fuelQtyTank - _JCQtyToFill;
if (_fuelQtyTank > 20) exitWith {
_selJF setVariable["fuelqty",(round _fuelQtyAfter)];
player removeMagazine _jcType;
player addMagazine "ItemJerrycan20L";
cutText [format ["You have filled %1l in jerrycan. Estimated quantity left: %2l", _JCQtyToFill, (round _fuelQtyAfter)], "PLAIN DOWN"];
s_player_fillfuel = -1;
};
if (_fuelQtyTank <= 20) exitWith {
_selJF setVariable["fuelqty",0];
player removeMagazine _jcType;
_JCQtyToFill = ceil _fuelQtyTank;
_jcNewCap = _jcCap + _JCQtyToFill;
if (_jcNewCap > 20) then {_jcNewCap = 20};
_jcNewType = "";
{
_jcSearchType = getNumber (configFile >> "CfgMagazines" >> _x >> "fuelQuantity");
if (_jcNewCap == _jcSearchType) then {
_jcNewType = _x;
};
} forEach AllJC;
player addMagazine _jcNewType;
cutText [format ["You have filled %1l in jerrycan. The tank is now empty !", _JCQtyToFill], "PLAIN DOWN"];
s_player_fillfuel = -1;
};