Jump to content
  • 0

How to choose what items AI from missions carry?


BUckENbooz

Question

Hi everyone!

 

This is my first server and so far things are going some what well. I am having some trouble though as far as what I want AI from missions to be carrying. I'm not sure how to edit this or change what they have on them also, how can I choose what come in mission crates? I want it to be a bit more unique. 

 

I thought this is edited through the database but I didn't see it? If it is where exactly is this edited at? I am using www.phpmyadmin.net   

 

Help is always appreciated and thanks!

Link to comment
Share on other sites

12 answers to this question

Recommended Posts

  • 0

Open DZMSAIConfig.sqf and do the edits there for what you want the AI to carry.

https://github.com/SMVampire/DZMS-DayZMissionSystem/blob/master/DZMS/ExtConfig/DZMSAIConfig.sqf

Each weapon is assigned randomly by category. If the dificulty is 0, a random weapon is chosen from DZMSWeps0, if it is 1 a random weapon is chosen from DZMSWeps1, and so on. 

 

The gear sets are set up by difficulty as well, however the AI in that difficulty setting gets ALL of the that gear, its not set randomly.

 

The backpacks are randomly chosen from the same array by ALL difficulty levels.

Link to comment
Share on other sites

  • 0

Open DZMSAIConfig.sqf and do the edits there for what you want the AI to carry.

https://github.com/SMVampire/DZMS-DayZMissionSystem/blob/master/DZMS/ExtConfig/DZMSAIConfig.sqf

Each weapon is assigned randomly by category. If the dificulty is 0, a random weapon is chosen from DZMSWeps0, if it is 1 a random weapon is chosen from DZMSWeps1, and so on. 

 

The gear sets are set up by difficulty as well, however the AI in that difficulty setting gets ALL of the that gear, its not set randomly.

 

The backpacks are randomly chosen from the same array by ALL difficulty levels.

 

Ah i found it, thanks very much! So if I just put the correct weapon item code in then they should have it? 

 

Also, could you help me figure out how to have the mission crates spawn some chainsaws? I need to make my whole seller sell those as well, I'll have to figure how how to get that set up.

Link to comment
Share on other sites

  • 0

Example of adding a new weapon to difficulty 0:

 

Adding SA58V Acog("Sa58V_RCO_EP1")

DZMSWeps0 = [
"M16A2",
"M16A2GL",
"AK_74",
"M4A1_Aim",
"AKS_74_kobra",
"AKS_74_U",
"AK_47_M",
"M24",
"M1014",
"DMR_DZ",
"M4A1",
"M14_EP1",
"Remington870_lamp",
"MP5A5",
"MP5SD",
"M4A3_CCO_EP1",
"Sa58V_RCO_EP1"
];

Adding chainsaw to weapons crate:

 

Open DZMSBox.sqf:

 

Place the new addition directly below load primary like this

//load primary
_scount = count DZMSprimaryList;
for "_x" from 0 to 2 do {
	_sSelect = floor(random _sCount);
	_item = DZMSprimaryList select _sSelect;
	_crate addWeaponCargoGlobal [_item,1];
	_ammo = [] + getArray (configFile >> "cfgWeapons" >> _item >> "magazines");
	if (count _ammo > 0) then {
		_crate addMagazineCargoGlobal [(_ammo select 0),(round(random 8))];
	};
};

//load Chainsaw (Adds 4 chainsaws)
	_crate addWeaponCargoGlobal ["ChainSaw",4];
};
Link to comment
Share on other sites

  • 0

 

Example of adding a new weapon to difficulty 0:

 

Adding SA58V Acog("Sa58V_RCO_EP1")

DZMSWeps0 = [
"M16A2",
"M16A2GL",
"AK_74",
"M4A1_Aim",
"AKS_74_kobra",
"AKS_74_U",
"AK_47_M",
"M24",
"M1014",
"DMR_DZ",
"M4A1",
"M14_EP1",
"Remington870_lamp",
"MP5A5",
"MP5SD",
"M4A3_CCO_EP1",
"Sa58V_RCO_EP1"
];

Adding chainsaw to weapons crate:

 

Open DZMSBox.sqf:

 

Place the new addition directly below load primary like this

//load primary
_scount = count DZMSprimaryList;
for "_x" from 0 to 2 do {
	_sSelect = floor(random _sCount);
	_item = DZMSprimaryList select _sSelect;
	_crate addWeaponCargoGlobal [_item,1];
	_ammo = [] + getArray (configFile >> "cfgWeapons" >> _item >> "magazines");
	if (count _ammo > 0) then {
		_crate addMagazineCargoGlobal [(_ammo select 0),(round(random 8))];
	};
};

//load Chainsaw (Adds 4 chainsaws)
	_crate addWeaponCargoGlobal ["ChainSaw",4];
};

 

I would much rather suggest changing some of the mission crates over to Supply and adding them to the supply tools array instead.

Link to comment
Share on other sites

  • 0

I would much rather suggest changing some of the mission crates over to Supply and adding them to the supply tools array instead.

 

Yes, but it was just a basic addition example for adding it every time rather than only some of the time. It seems he really wants the chainsaws to be heavily available.

Link to comment
Share on other sites

  • 0

Yes, but it was just a basic addition example for adding it every time rather than only some of the time. It seems he really wants the chainsaws to be heavily available.

 

Yes thank you very much, I haven't tried it yet but I will let you know! Its much appreciated, and everyone else thank you as well.

Link to comment
Share on other sites

  • 0


Adding chainsaw to weapons crate:

 

Open DZMSBox.sqf:

 

Place the new addition directly below load primary like this

//load primary
_scount = count DZMSprimaryList;
for "_x" from 0 to 2 do {
	_sSelect = floor(random _sCount);
	_item = DZMSprimaryList select _sSelect;
	_crate addWeaponCargoGlobal [_item,1];
	_ammo = [] + getArray (configFile >> "cfgWeapons" >> _item >> "magazines");
	if (count _ammo > 0) then {
		_crate addMagazineCargoGlobal [(_ammo select 0),(round(random 8))];
	};
};

//load Chainsaw (Adds 4 chainsaws)
	_crate addWeaponCargoGlobal ["ChainSaw",4];
};

Wait Im a bit confused, is this for putting chainsaws in the game period or adding it to mission crates?

Link to comment
Share on other sites

  • 0

 


Adding chainsaw to weapons crate:

 

Open DZMSBox.sqf:

 

Place the new addition directly below load primary like this

//load primary
_scount = count DZMSprimaryList;
for "_x" from 0 to 2 do {
	_sSelect = floor(random _sCount);
	_item = DZMSprimaryList select _sSelect;
	_crate addWeaponCargoGlobal [_item,1];
	_ammo = [] + getArray (configFile >> "cfgWeapons" >> _item >> "magazines");
	if (count _ammo > 0) then {
		_crate addMagazineCargoGlobal [(_ammo select 0),(round(random 8))];
	};
};

//load Chainsaw (Adds 4 chainsaws)
	_crate addWeaponCargoGlobal ["ChainSaw",4];
};

Wait Im a bit confused, is this for putting chainsaws in the game period or adding it to mission crates?

 

 

Wow never mind I wasn't paying attention. You clearly said adding to weapon crate, sorry

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Discord

×
×
  • Create New...