FragZ Posted May 24, 2014 Report Share Posted May 24, 2014 I would like them to have all the same skin, as well as if its possible to make them despawn loot when they die...? Link to comment Share on other sites More sharing options...
0 ekroemer Posted May 25, 2014 Report Share Posted May 25, 2014 I'm guessing here: Regarding skins I'd have a look at (at least) init\world_classname_configs\global_classnames.sqf init\world_classname_configs\epoch\dayz_epoch.sqf and redefine DZAI_BanditTypes to something like DZAI_BanditTypes = ["Survivor2_DZ"] Maybe, it's more convenient to hack scripts\DZAI_scheduler.sqf and to put the DZAI_banditTypes redefinition in line 26, just before the block "if (DZAI_verifyTables)" For lootless corpses, I think you have to edit compile\ai_killed_all.sqf Here I'd duplicate the else branch of the "if (isPlayer _killer)" if-clause and substitute the true branch with it. For good measure you could comment out the line 0 = [_x,_weapongrade] spawn DZAI_addLoot; in compile\heli_getout.sqf or simply edit compile\ai_generate_loot.sqf to only keep the lines 1,2,3 and 29 _unit = _this select 0; _weapongrade = _this select 1; clearMagazineCargoGlobal _unit; Link to comment Share on other sites More sharing options...
0 FragZ Posted May 25, 2014 Author Report Share Posted May 25, 2014 I'm guessing here: Regarding skins I'd have a look at (at least) init\world_classname_configs\global_classnames.sqf init\world_classname_configs\epoch\dayz_epoch.sqf and redefine DZAI_BanditTypes to something like DZAI_BanditTypes = ["Survivor2_DZ"] Maybe, it's more convenient to hack scripts\DZAI_scheduler.sqf and to put the DZAI_banditTypes redefinition in line 26, just before the block "if (DZAI_verifyTables)" For lootless corpses, I think you have to edit compile\ai_killed_all.sqf Here I'd duplicate the else branch of the "if (isPlayer _killer)" if-clause and substitute the true branch with it. For good measure you could comment out the line 0 = [_x,_weapongrade] spawn DZAI_addLoot; in compile\heli_getout.sqf or simply edit compile\ai_generate_loot.sqf to only keep the lines 1,2,3 and 29 _unit = _this select 0; _weapongrade = _this select 1; clearMagazineCargoGlobal _unit; I only have DZAI for custom spawns in AI hotzones. If I was to make them get their gear deleted upon death, would your last option be the best? Link to comment Share on other sites More sharing options...
0 ekroemer Posted May 25, 2014 Report Share Posted May 25, 2014 Again, only guessing: as far as I've seen, the loot-handling method is the same for all cases of DZAI usage. I take it you'll want to do both, remove the AI's weapons on death and prevent loot (medic, toolbelt, etc) being added. If you don't use HeliPatrols then you can skip editing heli_getout.sqf and only make the changes in ai_killed_all.sqf. This if-clause if (isPlayer _killer) then { [...] } else { if (_killer == _victim) then { removeAllWeapons _victim; } else { { _victim removeMagazines _x; } forEach (magazines _victim); }; }; gives loot (medic, food, toolbelt, ...) to the AI body and adds humanity if the AI has been killed by the player removes all weapons and mags if not (e.g. run over with a vehicle) To leave a lootless corps every time, you need to call the else branch even if the AI has been killed by the player, so just duplicate it or get rid of the if-clause altogether and keep only the red code. Link to comment Share on other sites More sharing options...
0 FragZ Posted May 25, 2014 Author Report Share Posted May 25, 2014 I still need help for the Skin part I didin't get it to work. As for the loot, ty I will try that! But I got this: if (isPlayer _killer) then { private ["_trigger","_equipType","_weapongrade"]; _trigger = _unitGroup getVariable ["trigger",objNull]; _equipType = if (!isNil "_trigger") then {_trigger getVariable ["equipType",1]} else {1}; _weapongrade = _equipType call DZAI_getWeapongrade; 0 = [_victim,_weapongrade] spawn DZAI_addLoot; 0 = [_killer,_victim,"banditKills"] call DZAI_countKills; } else { if (_killer == _victim) then { removeAllWeapons _victim; } else { { _victim removeMagazines _x; } forEach (magazines _victim); }; }; Link to comment Share on other sites More sharing options...
0 ekroemer Posted May 26, 2014 Report Share Posted May 26, 2014 But I got this: [...] Yes, iirc, that's the same in my version, I merely used [...] to indicate code that is of no interest here because it handles the case of generating loot. My first thing to try would be to delete all lines from the code you quoted but the ones I marked red in my post above (sorry, can't mark text in code-boxes). Regarding the skins I'd have thought this the easier problem. Have you tried editing scripts\DZAI_scheduler.sqf and putting the code DZAI_BanditTypes = ["Survivor2_DZ"]; in line 26, just before the block "if (DZAI_verifyTables)"? You'll have to insert the skin of your preference, of course. Link to comment Share on other sites More sharing options...
0 Ulyssies Posted May 26, 2014 Report Share Posted May 26, 2014 Not sure with dzai but with sarge they have a config file where you choose what cloths they wear and the guns they use. Link to comment Share on other sites More sharing options...
0 ekroemer Posted May 26, 2014 Report Share Posted May 26, 2014 Yes, it's the same for WAI and DZMS, but here it's a bit more complicated, I guess because DZAI covers all flavours of DayZ and is not written with Epoch in mind. But I think, I just found the official answer to the skin question: http://opendayz.net/threads/explanation-what-is-global_classnames-sqf-and-why-its-important.18635/ You can focus on the bottom part of the post, below "HYPOTHETICAL SCENARIO". Link to comment Share on other sites More sharing options...