Re: AI Bandit Spawns

Posted by Above on
URL: http://kodabar-dayz-daizy-single-player-forum.163.s1.nabble.com/AI-Bandit-Spawns-tp5249p5288.html

Ray wrote
Stormforge wrote
class Military: Default {
		zombieChance = 0.3;
		maxRoaming = 6;
		zombieClass[] = {"z_soldier","z_soldier_heavy","z_policeman"};
		lootChance = 0.4;
		lootPos[] = {};
		itemType[] =	{
			{"UZI_SD_EP1","weapon"},		
			{"M9","weapon"},
			{"M16A2","weapon"},
};
		itemChance[] =	{
			0.03,
			0.05,
			0.05,
};

Ok let me see if I understand this

lootChance = 0.4 //40% chance loot will appear

Then under itemChance after it determines that loot will appear 0.03 = 3% chance and corresponds to the Uzi, 1st 0.05 = 5% and corresponds to the M9, with the 2nd 0.05 going to the M16A2?

Then how would I link this to the weapon pack, or do I just need it active? Under //class CfgMods, //class CfgAddons, or some other way?

Sorry for all the questions and appreciate the help.

Well, if you're trying to add custom weapons from some addons, then simply put the weapon ID's, ammo ID's and such into the loot table of the chosen building/npc. Don't forget the spawnchance , too.

You gotta keep in mind that the loot is vs the rest of the same loot type for that loot spot. So the numbers doesn't have to mean THAT much.