Jump to content

Wicked AI/Mission system


Markk311

Recommended Posts

No semi colin at the end of the line

sorry wasn't paying attention when i typed that in. Fixed in original post to save someone lots of time...lol

 

If you get an error in the lines that _position is used for something like "3 expected only gave 1" or something like that.

use [ _position select 0, _position select 1, _position select 2] where _position is used in the script.

All sorted :D

Exellent mission script, some of the vehicles from missions have zero fuel, anyway to change that ?

Link to comment
Share on other sites

Is there a way to ONLY enable the missions?

 

The way I did it was to comment out all the other units, but that resulted into my missions not being guarded.

Yes. The AI part of it won't spawn in any units unless you tell it to. So if you leave it default install the only AI that will spawn will be on the missions.

Link to comment
Share on other sites

All sorted :D

Exellent mission script, some of the vehicles from missions have zero fuel, anyway to change that ?

I set it this way. You can change it back to default vehicle publish

 

Replace this

call custom_publish;

 

With this in the mission you want to change

call server_publishVeh;

Link to comment
Share on other sites

Hey mate great ai and mission system! Player response is that they love it!

Just wondering anyway of adding in a magazine ammo box?

And also with my blue Phoenix admin tools the vehicles keep despawning or blowing up has them working with dzai i just changed a part in each vehicle to stop that happening tried from DZAI to WAI and MISSION and no joy at this stage any ideas

Oh and ammo box despawn/not spawning atm

Thanks heaps!

Link to comment
Share on other sites

I cant get AI squad to spawn at fallen city, how can i do it? im trying to use the custom spawn.sqf

Not sure what that is. You need the coords you want to spawn them at. Easy way is to teleport yourself there then get your position out of the database.

Link to comment
Share on other sites

Hey mate great ai and mission system! Player response is that they love it!

Just wondering anyway of adding in a magazine ammo box?

And also with my blue Phoenix admin tools the vehicles keep despawning or blowing up has them working with dzai i just changed a part in each vehicle to stop that happening tried from DZAI to WAI and MISSION and no joy at this stage any ideas

Oh and ammo box despawn/not spawning atm

Thanks heaps!

I have never looked at the admin tools you guys are using so I'm not sure how they have that set up. The way vehicles are spawned in should be the same as they are when the server adds new vehicles on restart.

Link to comment
Share on other sites

this is how i typed it in the custom spawn.sqf

[78,[6567.69,14201.3,0.001]],                 //position
10,                        //Number Of units
1,                        //Skill level 0-1 or skill array number if using custom skills "Random" for random Skill array.
"Random",                 //Primary gun set number. "Random" for random weapon set.
4,                        //Number of magazines
"",                       //Backpack "" for random or classname here.
"Bandit2_DZ",             //Skin "" for random or classname here.
"Random"                  //Gearset number. "Random" for random gear set.

 

 

This is the sector fng (called fallen city) map addition.

 

http://opendayz.net/threads/release-sector-fng-inland-version.12541/

Link to comment
Share on other sites

this is how i typed it in the custom spawn.sqf

[78,[6567.69,14201.3,0.001]],                 //position

10,                        //Number Of units

1,                        //Skill level 0-1 or skill array number if using custom skills "Random" for random Skill array.

"Random",                 //Primary gun set number. "Random" for random weapon set.

4,                        //Number of magazines

"",                       //Backpack "" for random or classname here.

"Bandit2_DZ",             //Skin "" for random or classname here.

"Random"                  //Gearset number. "Random" for random gear set.

 

 

This is the sector fng (called fallen city) map addition.

 

http://opendayz.net/threads/release-sector-fng-inland-version.12541/

position needs to be in this format. [0,0,0]

Link to comment
Share on other sites

Hey mate great ai and mission system! Player response is that they love it!

Just wondering anyway of adding in a magazine ammo box?

And also with my blue Phoenix admin tools the vehicles keep despawning or blowing up has them working with dzai i just changed a part in each vehicle to stop that happening tried from DZAI to WAI and MISSION and no joy at this stage any ideas

Oh and ammo box despawn/not spawning atm

Thanks heaps!

Can confirm with new patch 1.0.3 that the ammo boxes are despawning with no anti-hack. Will look for a quick fix.

Link to comment
Share on other sites

Hey mate getting this error in RPT

 

_unit = _unitGroup createUnit [_aiskin, [(_position select >
 2:06:30   Error position: <createUnit [_aiskin, [(_position select >
 2:06:30   Error Type Any, expected Number
 2:06:30 File z\addons\dayz_server\WAI\compile\SpawnGroup.sqf, line 53
 2:06:30 Error in expression <{
_aiskin = _skin
};

 

this is my spawn

 

[[3066.6545, 7942.9028, 0], //Pustoshka
4,                          //Number Of units
1,                          //Skill level 0-1 or skill array number if using custom skills "Random" for random Skill array.
"2",                  //Primary gun set number. "Random" for random weapon set.
4,                          //Number of magazines
"",                          //Backpack "" for random or classname here.
"Bandit2_DZ",              //Skin "" for random or classname here.
"Random"                  //Gearset number. "Random" for random gear set.
] call spawn_group;

 

and heli patrols not running this is my helis

 

[[12877.6, 8081.0],    //Position to patrol Berezeno3
[0,0,0],                 // Postition to spawn chopper at
2000,                    //Radius of patrol
10,                     //Number of waypoints to give
"UH1H_DZ",                //Classname of vehicle (make sure it has driver and two gunners)
1                        //Skill level of units
] spawn heli_patrol;

 

thanks for your time

_unit = _unitGroup createUnit [_aiskin, [(_position select >
2:06:30 Error position: <
_unit = _unitGroup createUnit [_aiskin, [(_position select >
2:06:30 Error position: <createUnit [_aiskin, [(_position select >
2:06:30 Error Type Any, expected Number
2:06:30 File z\addons\dayz_sHEYHEY erver\WAI\compile\SpawnGroup.sqf, line 53
2:06:30 Error in expression <{
_aiskin = _skin
};
_unit = _unitGroup createUnit [_aiskin, [(_position select >
2:06:30 Error position: <createUnit [_aiskin, [(_position select >
2:06:30 Error Type Any, expected Number
2:06:30 File z\addons\dayz_server\WAI\compile\SpawnGroup.sqf, line 53
2:06:30 Error in expression <{
_aiskin = _skin
};
_unit = _unitGroup createUnit [_aiskin, [(_position select >
2:06:30 Error position: <createUnit [_aiskin, [(_position select >
2:06:30 Error Type Any, expected Number
2:06:30 File z\addons\dayz_server\WAI\compile\SpawnGroup.sqf, line 53
2:06:30 "WAI: Spawned a group of 4 Bandits at [11250.8,4274.08]"
2:06:30 "WAI: Mission Config File Loaded"
2:06:30 "WAI: Starting AI Missions Moniter"createUnit [_aiskin, [(_position select >
2:06:30 Error Type Any, expected Number
2:06:30 File z\addons\dayz_server\WAI\compile\SpawnGroup.sqf, line 53
2:06:30 Error in expression <{
_aiskin = _skin
};
_unit = _unitGroup createUnit [_aiskin, [(_position select >
2:06:30 Error position: <createUnit [_aiskin, [(_position select >
2:06:30 Error Type Any, expected Number
2:06:30 File z\addons\dayz_server\WAI\compile\SpawnGroup.sqf, line 53
2:06:30 Error in expression <{
_aiskin = _skin
};
_unit = _unitGroup createUnit [_aiskin, [(_position select >
2:06:30 Error position: <createUnit [_aiskin, [(_position select >
2:06:30 Error Type Any, expected Number
2:06:30 File z\addons\dayz_server\WAI\compile\SpawnGroup.sqf, line 53
2:06:30 "WAI: Spawned a group of 4 Bandits at [11250.8,4274.08]"
2:06:30 "WAI: Mission Config File Loaded"
2:06:30 "WAI: Starting AI Missions Moniter"

Link to comment
Share on other sites

Hey mate getting this error in RPT

 

_unit = _unitGroup createUnit [_aiskin, [(_position select >

 2:06:30   Error position: <createUnit [_aiskin, [(_position select >

 2:06:30   Error Type Any, expected Number

 2:06:30 File z\addons\dayz_server\WAI\compile\SpawnGroup.sqf, line 53

 2:06:30 Error in expression <{

_aiskin = _skin

};

 

this is my spawn

 

[[3066.6545, 7942.9028, 0], //Pustoshka

4,                          //Number Of units

1,                          //Skill level 0-1 or skill array number if using custom skills "Random" for random Skill array.

"2",                  //Primary gun set number. "Random" for random weapon set.

4,                          //Number of magazines

"",                          //Backpack "" for random or classname here.

"Bandit2_DZ",              //Skin "" for random or classname here.

"Random"                  //Gearset number. "Random" for random gear set.

] call spawn_group;

 

and heli patrols not running this is my helis

 

[[12877.6, 8081.0],    //Position to patrol Berezeno3

[0,0,0],                 // Postition to spawn chopper at

2000,                    //Radius of patrol

10,                     //Number of waypoints to give

"UH1H_DZ",                //Classname of vehicle (make sure it has driver and two gunners)

1                        //Skill level of units

] spawn heli_patrol;

 

thanks for your time

_unit = _unitGroup createUnit [_aiskin, [(_position select >

2:06:30 Error position: <

_unit = _unitGroup createUnit [_aiskin, [(_position select >

2:06:30 Error position: <createUnit [_aiskin, [(_position select >

2:06:30 Error Type Any, expected Number

2:06:30 File z\addons\dayz_sHEYHEY erver\WAI\compile\SpawnGroup.sqf, line 53

2:06:30 Error in expression <{

_aiskin = _skin

};

_unit = _unitGroup createUnit [_aiskin, [(_position select >

2:06:30 Error position: <createUnit [_aiskin, [(_position select >

2:06:30 Error Type Any, expected Number

2:06:30 File z\addons\dayz_server\WAI\compile\SpawnGroup.sqf, line 53

2:06:30 Error in expression <{

_aiskin = _skin

};

_unit = _unitGroup createUnit [_aiskin, [(_position select >

2:06:30 Error position: <createUnit [_aiskin, [(_position select >

2:06:30 Error Type Any, expected Number

2:06:30 File z\addons\dayz_server\WAI\compile\SpawnGroup.sqf, line 53

2:06:30 "WAI: Spawned a group of 4 Bandits at [11250.8,4274.08]"

2:06:30 "WAI: Mission Config File Loaded"

2:06:30 "WAI: Starting AI Missions Moniter"createUnit [_aiskin, [(_position select >

2:06:30 Error Type Any, expected Number

2:06:30 File z\addons\dayz_server\WAI\compile\SpawnGroup.sqf, line 53

2:06:30 Error in expression <{

_aiskin = _skin

};

_unit = _unitGroup createUnit [_aiskin, [(_position select >

2:06:30 Error position: <createUnit [_aiskin, [(_position select >

2:06:30 Error Type Any, expected Number

2:06:30 File z\addons\dayz_server\WAI\compile\SpawnGroup.sqf, line 53

2:06:30 Error in expression <{

_aiskin = _skin

};

_unit = _unitGroup createUnit [_aiskin, [(_position select >

2:06:30 Error position: <createUnit [_aiskin, [(_position select >

2:06:30 Error Type Any, expected Number

2:06:30 File z\addons\dayz_server\WAI\compile\SpawnGroup.sqf, line 53

2:06:30 "WAI: Spawned a group of 4 Bandits at [11250.8,4274.08]"

2:06:30 "WAI: Mission Config File Loaded"

2:06:30 "WAI: Starting AI Missions Moniter"

Primary gun set number. "Random" for random weapon set.

 

You need to use a number not in quotes. Eg. 2 not "2"

Link to comment
Share on other sites

So i wanted some items to spawn in my ammo boxes so changed some files as following:

 

WAI\missions\missionCfg.sqf

ammo_box_items=["ItemBriefcase100oz","ItemGoldBar10oz"];

This line after the tools. This is just example of items. My plan is to fill this with buildables and other stuff for epoch.

 

 

And also in

WAI\missions\complie\ammobox.sqf

private ["_mags","_tool","_position","_box","_class","_numberofguns","_numberoftools","_numberofitems","_item","_weapon","_namecfg"];
_position = _this select 0;

_box = createVehicle ["BAF_VehicleBox",[(_position select 0),(_position select 1),0], [], 0, "CAN_COLLIDE"];
clearWeaponCargoGlobal _box;
clearMagazineCargoGlobal _box;

_numberofguns = round(random 5) + 5;
_numberoftools = round(random 5) + 5;
_numberofitems = round(random 5) + 5;

for "_i" from 1 to _numberofguns do {
	_weapon = ammo_box_guns call BIS_fnc_selectRandom;
	_mags = getArray (configFile >> "cfgWeapons" >> _weapon >> "magazines");
	_box addWeaponCargoGlobal [_weapon,1];
	_box addMagazineCargoGlobal [(_mags select 0),round(random 2) + 1];
};

for "_i" from 1 to _numberoftools do {
	_tool = ammo_box_tools call BIS_fnc_selectRandom;
	_box addWeaponCargoGlobal [_tool,2];
};

for "_i" from 1 to _numberofitems do {
	_item = ammo_box_items call BIS_fnc_selectRandom;
	_box addMagazineCargoGlobal [_item,3];
};

Tested under 1.0.2.5 unfortunately DayZ.ST still using that version and cant change to 1.0.3 to test it.

 

 

Also if you duplicate the bottom part of the ammobox.sqf and make another variables for currency items only it is possible to do the same and make a seperate part from items for only the currency items. To control their spawned in number. The number of item groups is only up the the user.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
×
×
  • Create New...