SN1P3R Posted July 21, 2014 Report Share Posted July 21, 2014 If i want to change the loot that spawns on zombies do i edit the CfgLootSmall.hpp or cfgLoot.hpp file? Link to comment Share on other sites More sharing options...
0 cen Posted July 21, 2014 Report Share Posted July 21, 2014 CfgLoot.hpp has the zombie classes: policeman[] = { {"ItemBandage",0.3} ,{"7Rnd_45ACP_1911",0.08} ,{"6Rnd_45ACP",0.08} ,{"15Rnd_W1866_Slug",0.14} ,{"8Rnd_B_Beneli_Pellets",0.16} ,{"HandRoadFlare",0.07} ,{"8Rnd_9x18_MakarovSD",0.01} ,{"ItemComboLock",0.05} ,{"SmokeShell",0.04} ,{"FoodMRE",0.04} ,{"ItemHotwireKit",0.03} ,{"ItemDocument",0.02} }; Link to comment Share on other sites More sharing options...
0 SN1P3R Posted July 21, 2014 Author Report Share Posted July 21, 2014 Yeh but so does the CfgLootSmall - do i need to edit both? Link to comment Share on other sites More sharing options...
0 SN1P3R Posted July 21, 2014 Author Report Share Posted July 21, 2014 using 1.0.5.1 and overpoch - Loot is spawning fine in building. But on the zombies barely any loot drops and when it does its not using the overpoch loot. Ive been thru the cfgloot.hpp file and everything is fine. Anyone able to help me get loot spawning properly on the zombies. Much appreciated. Event went to the extent of hashing out all the object that is meant to drop on zombies and leaving 1 object with a high rate of spawn and that still doesnt work. Link to comment Share on other sites More sharing options...
0 cen Posted July 21, 2014 Report Share Posted July 21, 2014 pretty sure zombies are screwed up in 1051 Link to comment Share on other sites More sharing options...
0 SN1P3R Posted July 22, 2014 Author Report Share Posted July 22, 2014 Ok so now i have got zombies spawning loot did a tes and 23 kills with 20 dropping loot, just it is not dropping any of the overpoch loot. Link to comment Share on other sites More sharing options...
0 itsatrap Posted July 22, 2014 Report Share Posted July 22, 2014 yeah i have the same problem with the mission cfg loot files. even took the files from there github, and im still getting errors on zombie loot Link to comment Share on other sites More sharing options...
0 hambeast Posted July 22, 2014 Report Share Posted July 22, 2014 Just replied to a PM about this. You need to do the following to make epoch use the new mission files: change: } count getArray (configFile >> "cfgLoot" >> getText(_lootType)); to: } count getArray (missionConfigFile >> "cfgLoot" >> getText(_lootType)); edit: just want to say there's probably a bug in the default loot tables regarding zombies... Changing it over to my mission file defined loot tables seems to clear it up. Also added a check to make sure that it logs issues if they are thrown. Here's my whole zombie_generate.sqf https://gist.github.com/deadfred666/49a26c8b1b47f89ed812 hogscraper and deadeye 2 Link to comment Share on other sites More sharing options...
0 itsatrap Posted July 22, 2014 Report Share Posted July 22, 2014 Hmm, i use the same mission file for two servere one overpoch and one vanialla epoch, kan i make this more dynamic ? if (DZE_MissionLootTable) then { { _array set [count _array, _x select 0] } count getArray (missionConfigFile >> "cfgLoot" >> getText(_lootType)); } else { { _array set [count _array, _x select 0] } count getArray (configFile >> "cfgLoot" >> getText(_lootType)); }; ?? Link to comment Share on other sites More sharing options...
0 hambeast Posted July 22, 2014 Report Share Posted July 22, 2014 Hmm, i use the same mission file for two servere one overpoch and one vanialla epoch, kan i make this more dynamic ? if (DZE_MissionLootTable) then { { _array set [count _array, _x select 0] } count getArray (missionConfigFile >> "cfgLoot" >> getText(_lootType)); } else { { _array set [count _array, _x select 0] } count getArray (configFile >> "cfgLoot" >> getText(_lootType)); }; ?? you should be able to do something like that. Just make sure to validate your code works Link to comment Share on other sites More sharing options...
0 SN1P3R Posted July 22, 2014 Author Report Share Posted July 22, 2014 Confirmed everything hambeast has shown works. I now have zombies dropping loot at a high rate and epoch/overpoch loot is dropping ;) Thanks for the help :D Link to comment Share on other sites More sharing options...
0 Savinakis Posted July 23, 2014 Report Share Posted July 23, 2014 Just replied to a PM about this. You need to do the following to make epoch use the new mission files: change: } count getArray (configFile >> "cfgLoot" >> getText(_lootType)); to: } count getArray (missionConfigFile >> "cfgLoot" >> getText(_lootType)); edit: just want to say there's probably a bug in the default loot tables regarding zombies... Changing it over to my mission file defined loot tables seems to clear it up. Also added a check to make sure that it logs issues if they are thrown. Here's my whole zombie_generate.sqf https://gist.github.com/deadfred666/49a26c8b1b47f89ed812 I do not have this file zombie_generate.sqf on my server? Could it be called something else or built into some other file. I made the changes above in my server_functions.sqf but it didn't seem to do anything at all. Here is how my server_functions.sqf looks for that part // Add 0-3 loots to vehicle using random cfgloots _num = floor(random 4); _allCfgLoots = ["trash","civilian","food","generic","medical","military","policeman","hunter","worker","clothes","militaryclothes","specialclothes","trash"]; for "_x" from 1 to _num do { _iClass = _allCfgLoots call BIS_fnc_selectRandom; _itemTypes = []; if (DZE_MissionLootTable) then{ { _itemTypes set[count _itemTypes, _x select 0] } count getArray (missionConfigFile >> "cfgLoot" >> _iClass); } else { { _itemTypes set[count _itemTypes, _x select 0] } count getArray (missionconfigFile >> "cfgLoot" >> _iClass); }; _index = dayz_CLBase find _iClass; _weights = dayz_CLChances select _index; _cntWeights = count _weights; _index = floor(random _cntWeights); _index = _weights select _index; _itemType = _itemTypes select _index; _veh addMagazineCargoGlobal [_itemType,1]; //diag_log("DEBUG: spawed loot inside vehicle " + str(_itemType)); }; [_veh,[_dir,_objPosition],_vehicle,true,"0"] call server_publishVeh; Link to comment Share on other sites More sharing options...
0 Savinakis Posted July 23, 2014 Report Share Posted July 23, 2014 Ok so now i have got zombies spawning loot did a tes and 23 kills with 20 dropping loot, just it is not dropping any of the overpoch loot. How did you get them to spawn more loot? Link to comment Share on other sites More sharing options...
0 SN1P3R Posted July 23, 2014 Author Report Share Posted July 23, 2014 In the zombie_generate.sqf file around line 90 change if (_rnd < 0.2) then { to if (_rnd < 0.65) then { (or whatever percentage you want it to be) And if you are using custom loot change at around line 95 } count getArray (ConfigFile >> "cfgLoot" >> getText(_lootType)); to this } count getArray (missionConfigFile >> "cfgLoot" >> getText(_lootType)); Link to comment Share on other sites More sharing options...
0 Savinakis Posted July 23, 2014 Report Share Posted July 23, 2014 In the zombie_generate.sqf file around line 90 change if (_rnd < 0.2) then { to if (_rnd < 0.65) then { (or whatever percentage you want it to be) And if you are using custom loot change at around line 95 } count getArray (ConfigFile >> "cfgLoot" >> getText(_lootType)); to this } count getArray (missionConfigFile >> "cfgLoot" >> getText(_lootType)); See I don't have a zombie_generate.sqf, i found this array information in the AH.sqf here is what it looks like adminCallZeds = { fnc_addZeds = { _position = _this; for "_i" from 1 to 10 do { _unitTypes = []+ getArray (configFile >> "CfgBuildingLoot" >> "Default" >> "zombieClass"); _agent = objNull; _type = _unitTypes call BIS_fnc_selectRandom; _radius = 40; _method = "NONE"; _agent = createAgent [_type, _position, [], _radius, _method]; _agent setVariable ["myDest",_position]; _agent setVariable ["newDest",_position]; _rnd = random 1; if (_rnd > 0.99) then { _lootType = getText (configFile >> "CfgVehicles" >> _type >> "zombieLoot"); _lootTypeCfg = getArray (configFile >> "CfgLoot" >> _lootType); _array = []; { _array set [count _array, _x select 0] } count _lootTypeCfg; if (count _array > 0) then { _index = dayz_CLBase find _lootType; _weights = dayz_CLChances select _index; _loot = _array select (_weights select (floor(random (count _weights)))); if(!isNil "_array") then { _loot_count = getNumber(configFile >> "CfgMagazines" >> _loot >> "count"); if(_loot_count>1) then { _agent addMagazine [_loot, ceil(random _loot_count)]; } else { _agent addMagazine _loot; }; }; }; }; _id = [_position,_agent] execFSM "\z\addons\dayz_code\system\zombie_agent.fsm"; }; }; i changed this to .99 and they still don't drop crap if (_rnd > 0.99) then { _lootType = getText (configFile >> "CfgVehicles" >> _type >> "zombieLoot"); _lootTypeCfg = getArray (configFile >> "CfgLoot" >> _lootType); _array = []; { Link to comment Share on other sites More sharing options...
0 cen Posted July 23, 2014 Report Share Posted July 23, 2014 you have to pull zombie_generate.sqf from the client files in the @DayZ_Epoch\addons\dayz_code.pbo Link to comment Share on other sites More sharing options...
0 Savinakis Posted July 24, 2014 Report Share Posted July 24, 2014 you have to pull zombie_generate.sqf from the client files in the @DayZ_Epoch\addons\dayz_code.pbo and add it to the server files? I want to override the client files so I can set the zombie loot for my server, and loot frequency etc. Link to comment Share on other sites More sharing options...
0 Chainsaw Squirrel Posted March 19, 2015 Report Share Posted March 19, 2015 Hambeast If you still have this , could you repost link or send me a drop box link to it ?? I know is pretty old thread ... Thank You Here's my whole zombie_generate.sqf https://gist.github....c8b1b47f89ed812 Link to comment Share on other sites More sharing options...
0 SchwEde Posted March 19, 2015 Report Share Posted March 19, 2015 he already said what you need to do ;) change this: } count getArray (configFile >> "cfgLoot" >> getText(_lootType)); into } count getArray (missionConfigFile >> "cfgLoot" >> getText(_lootType)); and done Link to comment Share on other sites More sharing options...
0 Chainsaw Squirrel Posted March 19, 2015 Report Share Posted March 19, 2015 he already said what you need to do ;) change this: } count getArray (configFile >> "cfgLoot" >> getText(_lootType)); into } count getArray (missionConfigFile >> "cfgLoot" >> getText(_lootType)); and done Ok just dont get where LOL .. parden the retarded LOL, I put zombie_generate.sqf in custom compiles, that was posted .. that code not in that .. just trying to decipher what file needs edited Link to comment Share on other sites More sharing options...
0 SchwEde Posted March 19, 2015 Report Share Posted March 19, 2015 just redirect the zombie_generate in your compiles.sqf and edit those lines in the zombie_generate :) Link to comment Share on other sites More sharing options...
Question
SN1P3R
If i want to change the loot that spawns on zombies do i edit the CfgLootSmall.hpp or cfgLoot.hpp file?
Link to comment
Share on other sites
20 answers to this question
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now