Steel_Dragon 30 Posted September 30, 2019 Hi, I am running v5.0.0 I have a serious issue with vitems namely gathered or mined items. When the player is mining / gathering and they reach the capacity of their backpack numerous times (so they have emptied it and refilled it) the vitems collected start to not show in the inventory but still take up room. Eventually the backpack will say "inventory full" but the inventory items are not in there. This happens overtime. I log out and log back in - the pick axe is still in the inventory and it clears the weight back to just the pick axe weight. I believe it was a lag issue initially. I have since removed all dynamic weather (including the biggest culprit fog) and it seems to have gotten a little better but the issue remains. any help would be greatly appreciated Spoiler survival.sqf /* Adjustment of carrying capacity based on backpack changes */ if (backpack player isEqualTo "") then { life_maxWeight = LIFE_SETTINGS(getNumber,"total_maxWeight"); _bp = backpack player; } else { if (backpack player isEqualTo "B_OutdoorPack_blk") then { //Backpack id right now is "" _bp = backpack player; life_maxWeight = 15; //the weight you want. }; if (backpack player isEqualTo "B_AssaultPack_khk") then { //Backpack id right now is "" _bp = backpack player; life_maxWeight = 20; //the weight you want. }; if (backpack player isEqualTo "B_AssaultPack_dgtl") then { //Backpack id right now is "" _bp = backpack player; life_maxWeight = 20; //the weight you want. }; if (backpack player isEqualTo "B_AssaultPack_rgr") then { //Backpack id right now is "" _bp = backpack player; life_maxWeight = 20; //the weight you want. }; if (backpack player isEqualTo "B_AssaultPack_sgg") then { //Backpack id right now is "" _bp = backpack player; life_maxWeight = 20; //the weight you want. }; if (backpack player isEqualTo "B_AssaultPack_blk") then { //Backpack id right now is "" _bp = backpack player; life_maxWeight = 20; //the weight you want. }; if (backpack player isEqualTo "B_AssaultPack_cbr") then { //Backpack id right now is "" _bp = backpack player; life_maxWeight = 20; //the weight you want. }; if (backpack player isEqualTo "B_AssaultPack_mcamo") then { //Backpack id right now is "" _bp = backpack player; life_maxWeight = 20; //the weight you want. }; if (backpack player isEqualTo "B_TacticalPack_oli") then { //Backpack id right now is "" _bp = backpack player; life_maxWeight = 25; //the weight you want. }; if (backpack player isEqualTo "B_Kitbag_mcamo") then { //Backpack id right now is "" _bp = backpack player; life_maxWeight = 35; //the weight you want. }; if (backpack player isEqualTo "B_Kitbag_sgg") then { //Backpack id right now is "" _bp = backpack player; life_maxWeight = 35; //the weight you want. }; if (backpack player isEqualTo "B_Kitbag_cbr") then { //Backpack id right now is "" _bp = backpack player; life_maxWeight = 35; //the weight you want. }; if (backpack player isEqualTo "B_FieldPack_blk") then { //Backpack id right now is "" _bp = backpack player; life_maxWeight = 40; //the weight you want. }; if (backpack player isEqualTo "B_FieldPack_ocamo") then { //Backpack id right now is "" _bp = backpack player; life_maxWeight = 40; //the weight you want. }; if (backpack player isEqualTo "B_FieldPack_oucamo") then { //Backpack id right now is "" _bp = backpack player; life_maxWeight = 40; //the weight you want. }; if (backpack player isEqualTo "B_Bergen_sgg") then { //Backpack id right now is "" _bp = backpack player; life_maxWeight = 45; //the weight you want. }; if (backpack player isEqualTo "B_Bergen_mcamo") then { //Backpack id right now is "" _bp = backpack player; life_maxWeight = 45; //the weight you want. }; if (backpack player isEqualTo "B_Bergen_rgr") then { //Backpack id right now is "" _bp = backpack player; life_maxWeight = 45; //the weight you want. }; if (backpack player isEqualTo "B_Bergen_blk") then { //Backpack id right now is "" _bp = backpack player; life_maxWeight = 65; //the weight you want. }; if (backpack player isEqualTo "B_ViperHarness_blk_F") then { //Backpack id right now is "" _bp = backpack player; life_maxWeight = 65; //the weight you want. }; if (backpack player isEqualTo "B_ViperHarness_ghex_F") then { //Backpack id right now is "" _bp = backpack player; life_maxWeight = 65; //the weight you want. }; if (backpack player isEqualTo "B_ViperHarness_oli_F") then { //Backpack id right now is "" _bp = backpack player; life_maxWeight = 65; //the weight you want. }; if (backpack player isEqualTo "B_FieldPack_ocamo_Medic") then { //Backpack id right now is "" _bp = backpack player; life_maxWeight = 65; //the weight you want. }; if (backpack player isEqualTo "B_FieldPack_ocamo_ReconMedic") then { //Backpack id right now is "" _bp = backpack player; life_maxWeight = 65; //the weight you want. }; if (backpack player isEqualTo "B_Carryall_ocamo") then { //Backpack id right now is "" _bp = backpack player; life_maxWeight = 80; //the weight you want. }; if (backpack player isEqualTo "B_Carryall_oucamo") then { //Backpack id right now is "" _bp = backpack player; life_maxWeight = 80; //the weight you want. }; if (backpack player isEqualTo "B_Carryall_mcamo") then { //Backpack id right now is "" _bp = backpack player; life_maxWeight = 80; //the weight you want. }; if (backpack player isEqualTo "B_Carryall_ocamo") then { //Backpack id right now is "" _bp = backpack player; life_maxWeight = 80; //the weight you want. }; if (backpack player isEqualTo "B_Carryall_oli") then { //Backpack id right now is "" _bp = backpack player; life_maxWeight = 80; //the weight you want. }; if (backpack player isEqualTo "B_Carryall_khk") then { //Backpack id right now is "" _bp = backpack player; life_maxWeight = 80; //the weight you want. }; if (backpack player isEqualTo "B_Carryall_cbr") then { //Backpack id right now is "" _bp = backpack player; life_maxWeight = 80; //the weight you want. }; if (backpack player isEqualTo "B_Bergen_tna_f") then { //Backpack id right now is "" _bp = backpack player; life_maxWeight = 120; //the weight you want. }; if (!(backpack player isEqualTo "") && {!(backpack player isEqualTo _bp)}) then { _bp = backpack player; life_maxWeight = LIFE_SETTINGS(getNumber,"total_maxWeight") + round(FETCH_CONFIG2(getNumber,"CfgVehicles",_bp,"maximumload") / 4); }; }; Configuration.sqf /* ***************************** ****** Weight Variables ***** ***************************** */ life_maxWeight = LIFE_SETTINGS(getNumber, "total_maxWeight"); life_carryWeight = 0; //Represents the players current inventory weight (MUST START AT 0). /* loadGear.sqf {(backpackContainer player) addItemCargoGlobal [_x,1];} forEach (_bMags); life_maxWeight = if (backpack player isEqualTo "") then {LIFE_SETTINGS(getNumber,"total_maxWeight")} else {LIFE_SETTINGS(getNumber,"total_maxWeight") + round(FETCH_CONFIG2(getNumber,"CfgVehicles",(backpack player),"maximumload") / 4)}; { [true,(_x select 0),(_x select 1)] call life_fnc_handleInv; } forEach (_yItems); Share this post Link to post Share on other sites
Steel_Dragon 30 Posted October 1, 2019 Trying this atm - (Edit - did not work) https://www.altisliferpg.com/topic/187-tutorial-backpack-custom-capacity/ Share this post Link to post Share on other sites
Steel_Dragon 30 Posted October 3, 2019 I have returned to the original base code and now every time the player opens and closes the Y menu the backpack adds the base capacity to itself - essentially giving the player unlimited capacity - This was the original problem and why i tried to set individual bp capacities. Also now when i log off and back on the bp disappears. This is what is happening with vanilla settings reinstated - https://www.altisliferpg.com/topic/4665-backpack-space/ My files - Spoiler File: configuration.sqf ***************************** ****** Weight Variables ***** ***************************** */ life_maxWeight = LIFE_SETTINGS(getNumber, "total_maxWeight"); life_carryWeight = 0; //Represents the players current inventory weight (MUST START AT 0). /* ***************************** ****** Life Variables ******* ***************************** File: fn_survival.sqf /* Adjustment of carrying capacity based on backpack changes */ if (backpack player isEqualTo "") then { life_maxWeight = LIFE_SETTINGS(getNumber,"total_maxWeight"); _bp = backpack player; } else { if (!(backpack player isEqualTo "") && {!(backpack player isEqualTo _bp)}) then { _bp = backpack player; life_maxWeight = LIFE_SETTINGS(getNumber,"total_maxWeight") + round(FETCH_CONFIG2(getNumber,"CfgVehicles",_bp,"maximumload") / 4); }; }; File: fn_loadGear.sqf if (!(_goggles isEqualTo "")) then {_handle = [_goggles,true,false,false,false] spawn life_fnc_handleItem; waitUntil {scriptDone _handle};}; if (!(_headgear isEqualTo "")) then {_handle = [_headgear,true,false,false,false] spawn life_fnc_handleItem; waitUntil {scriptDone _handle};}; if (!(_uniform isEqualTo "")) then {_handle = [_uniform,true,false,false,false] spawn life_fnc_handleItem; waitUntil {scriptDone _handle};}; if (!(_vest isEqualTo "")) then {_handle = [_vest,true,false,false,false] spawn life_fnc_handleItem; waitUntil {scriptDone _handle};}; if (!(_backpack isEqualTo "")) then {_handle = [_backpack,true,false,false,false] spawn life_fnc_handleItem; waitUntil {scriptDone _handle};}; {_handle = [_x,true,false,false,false] spawn life_fnc_handleItem; waitUntil {scriptDone _handle};} forEach _items; {player addItemToUniform _x;} forEach (_uItems); {(uniformContainer player) addItemCargoGlobal [_x,1];} forEach (_uMags); {player addItemToVest _x;} forEach (_vItems); {(vestContainer player) addItemCargoGlobal [_x,1];} forEach (_vMags); {player addItemToBackpack _x;} forEach (_bItems); {(backpackContainer player) addItemCargoGlobal [_x,1];} forEach (_bMags); life_maxWeight = if (backpack player isEqualTo "") then {LIFE_SETTINGS(getNumber,"total_maxWeight")} else {LIFE_SETTINGS(getNumber,"total_maxWeight") + round(FETCH_CONFIG2(getNumber,"CfgVehicles",(backpack player),"maximumload") / 4)}; { [true,(_x select 0),(_x select 1)] call life_fnc_handleInv; } forEach (_yItems); Share this post Link to post Share on other sites
Steel_Dragon 30 Posted October 3, 2019 Just reset all files back to the vanilla and it seems to have fixed it. Share this post Link to post Share on other sites