Jump to content

blckeagls' AI Mission - Version 2.0.2 Release (1/2/2015)


blckeagls

Recommended Posts

I have managed to add some of the DLC weapons in, and the AI do use them, and yeah, what I have found is they are ridiculously deadly with the Cyrus with unlimited ammo..lol. They seem to be okay with the Navid, and the .338 MMG. As for adding the DLC weapons to the loot crate, I mostly just added the ammo, as there seem to be a lot of guns spawning either by epoch, or other scripts.

would you mind terribly sending me a PM with your modified AIConfig.sqf ? I would be very curious to take a look.

Thanks !

Link to comment
Share on other sites

A3AI does work with this as i have this and A3AI 0.5.8 running

Glad to hear you have it up and running. As far as compatability with other mods, so far we have been able to run this mission together with SEM 0.8.1, VEMF, Helicrashs and on one server A3AI. We have not conflicts thus far. FPS on bornholm becomes an issue with all of them running on some occaisions though I am not sure if some of that has to do with the periodic bottlenecks of Arma 1.42.

Link to comment
Share on other sites

I also suggest turning off AI being able to get back on the static weapon as it seems (from watching my players) you just keep killing them and the AI will focuse on getting back on the static weapon

I found that you can place the class name for the vehicles in the static turrets location & they spawn just Fine.

Do you have any word on why the medical camps & objects aren't spawning ??

Link to comment
Share on other sites

@DarthVonTrap:

  You can reduce the number of times that AI try to man the static weapons on line 20 of vehicleMonitor.sqf  by reducing the 20 to anything you like. set this to 0 to disable.

 

       

while {(({alive _x} count crew _veh) < 1) && _count < 20} do

 

 

@SASR Ryan,

 

  I took out the armed pickups because they were very glitchy. While AI could use the 50 cal players got kicked or worse if they tried to. However, you can substitute the 50 cal with any other weapon or vehicle you like.  Just put the item code for the vehicle or weapon you wish to use to  on line 71 on AIConfig.sqf.

 

    blck_staticWeapons = ["B_HMG_01_high_F"/*,"B_GMG_01_high_F"*/];  // [0.50 cal, grenade launcher]

 

With the default timers it can take a while for missions to spawn. Turn down the timers in AIConfig.sqf to make them appear more promptly.

 

The medical camp and other missions are examples of what you could do. I have not yet had a chance to fully sort them out. I have disabled them (just comment out the entry in the appropriate SM1.sqf file) because not all objects spawn. I suspect that additional calls need to be made in the addons section of the mission.sqm.

 

 

 

 

 

@

Link to comment
Share on other sites

@DarthVonTrap:

  You can reduce the number of times that AI try to man the static weapons on line 20 of vehicleMonitor.sqf  by reducing the 20 to anything you like. set this to 0 to disable.

 

       

 

@SASR Ryan,

 

  I took out the armed pickups because they were very glitchy. While AI could use the 50 cal players got kicked or worse if they tried to. However, you can substitute the 50 cal with any other weapon or vehicle you like.  Just put the item code for the vehicle or weapon you wish to use to  on line 71 on AIConfig.sqf.

 

    blck_staticWeapons = ["B_HMG_01_high_F"/*,"B_GMG_01_high_F"*/];  // [0.50 cal, grenade launcher]

 

With the default timers it can take a while for missions to spawn. Turn down the timers in AIConfig.sqf to make them appear more promptly.

 

The medical camp and other missions are examples of what you could do. I have not yet had a chance to fully sort them out. I have disabled them (just comment out the entry in the appropriate SM1.sqf file) because not all objects spawn. I suspect that additional calls need to be made in the addons section of the mission.sqm.

 

 

 

Okay, thank you. Appreciate the quick response.

Link to comment
Share on other sites

thanks for this great work, it´s really good work.

runs up to one thing for me.

 

 

although ai wear grenate launcher on his back, but they don t use them.

 

i tested with different cars and helicopter and have no solution, where is my mistake.

 

bucki

 

Link to comment
Share on other sites

=@ Mr.Skynet:

 

I was not aware one could disassemble them and not sure how one could prevent disassembly other than despawning after the first AI was killed.

 

@bucki and DonVonTrap

 

They should be loaded with a few rounds of RPGs in spawnUnit.sqf at around line 124. However, I have not checked their inventories to confirm that this occurs.

Link to comment
Share on other sites

/*
	Code by blckeagls
	Modified by Ghostrider
	Code to delete dead AI bodies moved to AIKilled.sqf
	Everything having to do with spawning and configuring an AI should happen here
*/

//Defines private variables so they don't interfere with other scripts
private ["_pos","_i","_weap","_ammo","_other","_skin","_aiGroup","_ai1","_magazines","_players","_owner","_ownerOnline","_nearEntities","_skillLevel","_aiSkills","_Launcher","_launcherRound","_Vests","_vest","_index","_backpack"];

_Vests = [
"V_1_EPOCH","V_2_EPOCH","V_3_EPOCH","V_4_EPOCH","V_5_EPOCH","V_6_EPOCH","V_7_EPOCH","V_8_EPOCH","V_9_EPOCH","V_10_EPOCH","V_11_EPOCH","V_12_EPOCH","V_13_EPOCH","V_14_EPOCH","V_15_EPOCH","V_16_EPOCH","V_17_EPOCH","V_18_EPOCH","V_19_EPOCH","V_20_EPOCH","V_21_EPOCH","V_22_EPOCH","V_23_EPOCH","V_24_EPOCH","V_25_EPOCH","V_26_EPOCH","V_27_EPOCH","V_28_EPOCH","V_29_EPOCH","V_30_EPOCH","V_31_EPOCH","V_32_EPOCH","V_33_EPOCH","V_34_EPOCH","V_35_EPOCH","V_36_EPOCH","V_37_EPOCH","V_38_EPOCH","V_39_EPOCH","V_40_EPOCH"
];
_backpack =[
"B_TacticalPack_rgr","smallbackpack_red_epoch","smallbackpack_green_epoch"
];
//Gets variables passed from spawnai.sqf/spawnai1.sqf
_pos = _this select 0;  // Position at which to spawn AI
_weap = _this select 1;  // Weapon to give AI
_ammo = _this select 2;  // Ammo to give AI
_other = _this select 3;  // Other stuff to give AI
_skin = _this select 4;  // Skin to give AI
_aiGroup = _this select 5;  // Group to which AI belongs
_skillLevel = [_this,6,"blue"] call BIS_fnc_param;   // "blue", "red", "green", "orange"
_Launcher = _this select 7; // If true then add a launcher to the unit

//Creating the AI Unit
_ai1 = ObjNull;
//Creates the AI unit from the _skin passed to it
"i_g_soldier_unarmed_f" createUnit [_pos, _aiGroup, "_ai1 = this", 0.7, "COLONEL"];
//Cleans the AI to a fresh spawn
removeBackpackGlobal _ai1;
removeAllItemsWithMagazines  _ai1;
//_ai1 AddUniform _skin;
_ai1 forceAddUniform _skin;

//Stops the AI from being cleaned up
_ai1 setVariable["LASTLOGOUT_EPOCH",1000000000000];
_ai1 setVariable["LAST_CHECK",1000000000000];

//Sets AI Skills
_ai1 enableAI "TARGET";
_ai1 enableAI "AUTOTARGET";
_ai1 enableAI "MOVE";
_ai1 enableAI "ANIM";
_ai1 enableAI "FSM";
_ai1 allowDammage true;
_ai1 setBehaviour "COMBAT";
_ai1 setunitpos "AUTO";
_ai1 setVariable ["Engaged", 0, true];

sleep 1; //For some reason without this sometimes they don't spawn the weapon on them

// Add a vest to AI for storage
_backpack = _backpack call BIS_fnc_selectRandom;
_ai1 addBackpack _backpack;

if (_Launcher == "none") then
{
	if (blck_debugON) then 
	{
	};
};
if (_Launcher != "none") then
{
	_launcherRound = getArray (configFile >> "CfgWeapons" >> _Launcher >> "magazines") select 0;
	for "_i" from 1 to 3 do 
	{
		_ai1 addItemToBackpack _launcherRound;
	};
	_ai1 addWeaponGlobal _Launcher;
	_ai1 selectWeapon (secondaryWeapon _ai1);
};

//Adds 5 magazines to AI Unit
_ai1 addMagazine [_ammo,5];

// Add items to the AI unit
_i = 0;
while {_i < 4} do {
	_i = _i + 1;
	_ai1 addItem _ammo;
};

//Adds the weapon specified to it from spawnai.sqf/spawnai1.sqf
_ai1 addWeaponGlobal  _weap; 

sleep 1; //For some reason without this sometimes they don't spawn the weapon on them


//adds items to AI.  _other = ["ITEM","COUNT"]
_i = 0;
while {_i < (_other select 1)} do {
	_i = _i + 1;
	_ai1 addItem (_other select 0)
};
if (blck_debugON) then
{
	
};

// Infinite ammo
_ai1 addeventhandler ["fired", {(_this select 0) setvehicleammo 1;}];

// Do something if AI is killed
_ai1 addEventHandler ["Killed",{ [(_this select 0), (_this select 1)] execVM blck_AIKilled; }]; // changed to reduce number of concurrent threads, but also works as spawn blck_AIKilled; }];

_index = 0;

switch (_skillLevel) do 
{
	case "blue": {_index = 0;_aiSkills = blck_SkillsBlue;};
	case "red": {_index = 1;_aiSkills = blck_SkillsRed;};
	case "green": {_index = 2;_aiSkills = blck_SkillsGreen;};
	case "orange": {_index = 3;_aiSkills = blck_SkillsOrange;};
	default {_index = 0;_aiSkills = blck_SkillsBlue;};
};

_alertDist = blck_AIAlertDistance select _index; 
_intelligence = blck_AIIntelligence select _index;


[_ai1,_aiSkills] call blck_setSkill;
_ai1 setVariable ["alertDist",_alertDist,true];
_ai1 setVariable ["intelligence",_intelligence,true];

if (blck_debugON) then
{
//diag_log format["[spawnUnit.sqf] -->> aiSkills are %1",_aiSkills];
//diag_log format["[spawnUnit.sqf] -->> alertDist = %1 and intelligence = %2",_alertDist,_intelligence];
//diag_log "=============================================================================================";
};

_ai1

I think i found the problem.

you cant put the rockets for granate launcher into a vest, You need backpack for this.

hope i make the changes correct. on my testserver it runs.

and sorry for my bad english.

Link to comment
Share on other sites

@bucki,

  Thanks, let me know what you find out. I will include your fix in the next update if it looks promising.

 

@hakimos00

  I don't know but suspect that it is arma.

 

@Sonin,

  you can edit the loot arrays or wait for the next update, which will probably be out tomorrow if no further glitches appear, and includes most DLC content.

 

@Mr.SkyNet,

  in vehicleMonitor.sqf, set the loop to stop when count < 1.

 

Lin 15:

while {(({alive _x} count crew _veh) < 1) && _count < 3} do

 

As far as players dismantling the 50 cal, I believe there is a fix for it that will be included in the next update.

Link to comment
Share on other sites

Hay thanks for your awesome work.
 
But my missions are spawning out of map ? Im on Chernarus and used the Chernarus Files.

Screenshot

2015-04-27_000016iuy3.jpg


 
How can i fix that. Thanks for you help !
 
Kind Regards
Dominik

 

 

Edit:

Sorry for posting fixed it my self. I did not see the map center radius in init.sqf.

Edited by mumys
Link to comment
Share on other sites

Hay thanks for your awesome work.

 

But my missions are spawning out of map ? Im on Chernarus and used the Chernarus Files.

Screenshot

2015-04-27_000016iuy3.jpg

 

How can i fix that. Thanks for you help !

 

Kind Regards

Dominik

 

 

Edit:

Sorry for posting fixed it my self. I did not see the map center radius in init.sqf.

The map center and radius are in findWorld.sqf. Looks like I need to reduce the radius ! Thanks for reporting this.

Link to comment
Share on other sites

The update is in the final stages of testing. It should be available this evening. Please see the changelog below for details as to what will be included.

 

    Build 3.0 4-25-15 - substantial redesign of some parts of the code
    Thank you cyncrwler for help with many issues and for testing and troubleshooting the pre-release versions.

    - added: Marksman DLC weapons and ammo added to crates and AI Weapons, added DLC uniforms to AI.
    - added blck_Initialized variable which can be used to check if the mission system is fully loaded.
    - added: blck_useNVG option which when true will cause AI to spawn with NVG when it is dark. NVG will be removed from AI bodies when they are killed (the deletion of NVG from AI is not yet working).
    - added: blck_useSmokeAtCrates option when when true will spawn a smoking object near the crate.

    - changed: a new start_blck.sqf which must be used to replace the existing start_blck.sqf in yoru mission.pbo.
        - Changed: reduced the number of times AI will try to man static weapons to 1.

    - Changed: complete re-working of the system for selecting and adding weapons and ammo to AI which includes adding HE grenade rounds if the AI spawn with an M203 equiped weapon
    - Changed: Complete re-working of the code for adding items to AI which includes adding food and drink;  
        
    - fixed: added a getOut event handler to static weapons which should prevent players from accessing them. vehicleMonitor is not presently used.
    - fixed: FAK or grenade are now added based on chance, and the situation whereby AI would be loaded with many grenades has been fixed.

    - Known Issues:
        missions and helicrashes sometimes spawn together. When they do, the mission loot and AI will not spawn. Only a server restart will correct this.
        AI do not use their launchers.

Link to comment
Share on other sites

hello mates,

 

i got kicked with #0 when i click on Take "[NATO] Waffen" => Take "[NATO] Weapons" infront of the lootchest. There is nothing in the scripts.log which i could add in the scripts.txt.

 

ideas?

 

ive edited the attachto.txt with this:

 

!"Box_NATO_Wps_F"

 

works

Link to comment
Share on other sites

hello mates,

 

i got kicked with #0 when i click on Take "[NATO] Waffen" => Take "[NATO] Weapons" infront of the lootchest. There is nothing in the scripts.log which i could add in the scripts.txt.

 

ideas?

 

ive edited the attachto.txt with this:

 

!"Box_NATO_Wps_F"

 

works

Very interesting. I would have not predicted that to be a kick caused by the mission system. Are you lifting the crates using R3F logistics or another script ?

Link to comment
Share on other sites

Nice work but noticing no fix for AI and rpg. Does that mean giving AI back bags did not work because as you may know from playing you can't put an rpg round in your chest rig

 

I have not had a chance to look into the RPG issue. If anyone stumbles on a solution it would be great if they posted it here.

 

This is one of two unresolved issues with the update. The other is, I think, object not found messages in the .RPT. This has to do with ensuring that a client owns the AI and will take a little research to to address.

Link to comment
Share on other sites

Hi Ghostrider

 

First of all, thank you for the amazing missions. I love them. I still use the old version and I'm very happy with it. I don't know if it was discussed here earlier as i didn't read all 30 pages but here are some suggestions:
1. The mission messages should be in a box top right so they match all other mission messages (like SEM, ZEV, ZCF etc.(seems easier for the players to spot missions)

2. Personally I would either see a mission name in the circle or a more defined and clear message what the mission is. Players joining a server later have no idea what orange is unless they are regulars

3. It would be awesome if you can pack most important settings in one setting file to easier adapt a mission with spawn time, AI settings, locations etc.

 

You asked in an earlier post about suggestions for missions. I host a server for 10 days now, started with no knowledge at all and work my way through. Its kind of a jungle on the beginning lol. Well here is my ideas:
1. I would love to see a simple mission script that people can adapt very easy on their own, maybe even rename the file so they can create multiple ones. Maybe one strong hold mission, for example a building supply mission down on the south airfield with a crashed helicopter or a stronghold of 25-30 AI in Kavala that hunt you down door to door if you are in the area. Then people can adapt this single mission script to whatever they want to do (change loot, change location, change items, change AI)

2. I would love to see a dynamic transport mission. For example players have to transport a pick up truck with a crate on the back from location A to B. If successful the loots spawns in the crate and they can grab it. Could be either way. If player transport then they are attacked by AI on that particular route and if AI transports they can be attacked by players.

 

Keep up the great work, all players appreciate of what you are doing!
LuZ
 

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
  • Advertisement
×
×
  • Create New...