AI Bandit Spawns

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

AI Bandit Spawns

Stormforge
Have been playing around with the various DaiZy maps and mostly play without AI. The reason for this is I get tired of the Bandits spawning right next to me and killing me without having a chance to fight back. Sometimes they sapawn in from others times behind or to the side. The maps I tried AI on are Lingor, Panthera, Takistan, and Zargabad. Have read about other people changing the spawns so this does not happen. Curious of which maps have improved bandit spawning or even better is there a way I can change this. Not much for programing but did figure out from other posts how to reduce zombie speed. To change spawn number/distance/safe zone/ etc. I just pretty much need to be pointed in the right direction.
Reply | Threaded
Open this post in threaded view
|

Re: AI Bandit Spawns

Haleks
DaiZy Breaking Point SP and DaiZy Factions both have improved bandits spawn (minimum distance for Above's mission is 200; mine is set to 400 if I remember right).

If you want to fix it on other releases, you'll have to de-PBO the mission file, look for the doSomething_bandits.sqf function (it's in "scripts\mission\fnc") and modify it like this (for instance) :

 _p = [getpos player, random 360, 400 + random 400] call fnc_randomPos;
Reply | Threaded
Open this post in threaded view
|

Re: AI Bandit Spawns

Stormforge
This post was updated on .
Thanks will check that out. Using Notepad++ to poke around a little but the sheer amount of info can be overwhelming at times if you don't know what you are looking for.

Also are the loot random loot tables in the mission file as well? I was thinking of adding Robert Hammer's Weapon packs to some of the maps. Seems Celle already has them.

Ok got me a program to de-PBO the file. Let me see if I got this straight. Not a coder or anything like that. What I read here is basically the following means that from the players position it will randomly spawn anywhere from 400 to 800 meters away in a 360 degree arc?

 _p = [getpos player, random 360, 400 + random 400] call fnc_randomPos;
Reply | Threaded
Open this post in threaded view
|

Re: AI Bandit Spawns

Above
Administrator
Stormforge wrote
Thanks will check that out. Using Notepad++ to poke around a little but the sheer amount of info can be overwhelming at times if you don't know what you are looking for.

Also are the loot random loot tables in the mission file as well? I was thinking of adding Robert Hammer's Weapon packs to some of the maps. Seems Celle already has them.

Ok got me a program to de-PBO the file. Let me see if I got this straight. Not a coder or anything like that. What I read here is basically the following means that from the players position it will randomly spawn anywhere from 400 to 800 meters away in a 360 degree arc?

 _p = [getpos player, random 360, 400 + random 400] call fnc_randomPos;
The loot table is in the dayz_code. What you wanna pop into Notepad++ is config.cpp. =)
Reply | Threaded
Open this post in threaded view
|

Re: AI Bandit Spawns

Stormforge
I downloaded PBO Manager last night and wow everything looks easier to find.

So from what I gathered from the above code was correct?

Last programing/coding I did was in my high school days on an Apple IIc,
Reply | Threaded
Open this post in threaded view
|

Re: AI Bandit Spawns

Above
Administrator
Stormforge wrote
I downloaded PBO Manager last night and wow everything looks easier to find.

So from what I gathered from the above code was correct?

Last programing/coding I did was in my high school days on an Apple IIc,

Yes, sir. The 400 is the minimum + max spawnrange. And the 360 is the radius. =)
Reply | Threaded
Open this post in threaded view
|

Re: AI Bandit Spawns

Haleks
In reply to this post by Stormforge
Stormforge wrote
Ok got me a program to de-PBO the file. Let me see if I got this straight. Not a coder or anything like that. What I read here is basically the following means that from the players position it will randomly spawn anywhere from 400 to 800 meters away in a 360 degree arc?

 _p = [getpos player, random 360, 400 + random 400] call fnc_randomPos;
You got it straight dude

Arf, Above was faster ^^
Reply | Threaded
Open this post in threaded view
|

Re: AI Bandit Spawns

Stormforge
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.
Ray
Reply | Threaded
Open this post in threaded view
|

Re: AI Bandit Spawns

Ray
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.
Reply | Threaded
Open this post in threaded view
|

Re: AI Bandit Spawns

Stormforge
Ray wrote
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.

Just making sure I understand how it all works before I start playing around with it and adding things.
Reply | Threaded
Open this post in threaded view
|

Re: AI Bandit Spawns

Above
Administrator
In reply to this post by Ray
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.
Reply | Threaded
Open this post in threaded view
|

Re: AI Bandit Spawns

Stormforge
Gotcha, but from the way it looks there have to be the same number of entries under itemChance as there are under itemType. Also the order that they are in corresponds to the to the other list. Say I wanted the M9 to be very common loot item compared to other weapons. If I put it 2nd in the itemType list it seems that I would also have to put the percent for that item 2nd in the itemChance list?

Also to make sure I have this correct. To add items I only need to have a mod active in the expansions menu to put that item's ID into the list (with spawn percent chance, ammo ID, etc.) to get it to show up? I do not have to add anything else to the config.cpp? Like adding something to the file that tells it to look for the info on that item in say rh_mgswp.pbo?

I think I am most likely over thinking this making it seem there should be more to it than there is.

Reply | Threaded
Open this post in threaded view
|

Re: AI Bandit Spawns

Above
Administrator
Stormforge wrote
Say I wanted the M9 to be very common loot item compared to other weapons. If I put it 2nd in the itemType list it seems that I would also have to put the percent for that item 2nd in the itemChance list?
Correct! :)

Stormforge wrote
Also to make sure I have this correct. To add items I only need to have a mod active in the expansions menu to put that item's ID into the list (with spawn percent chance, ammo ID, etc.) to get it to show up? I do not have to add anything else to the config.cpp? Like adding something to the file that tells it to look for the info on that item in say rh_mgswp.pbo?

I think I am most likely over thinking this making it seem there should be more to it than there is.
You're correct, apart from the ammo part. You add ammo to the loot.cpp, under military. That way they'll spawn wherever military loot is set to spawn (everywhere expect supermarket pretty much).


EDIT* Let's say you add M9 (this is now a weapon from a mod *pretending*). It will spawn with 0-3 mags without you having to do anything. However if you want magazines to spawn on their own, like other mags, you gotta do what I wrote above. :)
Reply | Threaded
Open this post in threaded view
|

Re: AI Bandit Spawns

Stormforge
Thanks for the help. Now to see what I can mess up :)