Jump to content

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


blckeagls

Recommended Posts

Fixed the AI1.SQF error that fuct up the rpt and lagged the server.  Below is the Fixed pbo for you all enjoy!!! 

Cyncrwler and Dwarfer this fixes that issue.

 

Fix below getPOS added


//Prevents players from having AI God Mode
while {true} do {
	_players = [];
	_nearEntities = count ((getPos _ai1) nearEntities [["MAN"],1000]);
	//diag_log format["_nearEntities: %1",_nearEntities];  //Used for testing
	{
		if (isPlayer _x) then {
		 _players = _players + [_x];
		};
	} foreach ((getPos _ai1) nearEntities [["MAN"],1000]);
	//diag_log format["Nearplayers: %1",_players]; //Used for testing
	if ((count _players) > 0) then {
		_owner = _players call BIS_fnc_selectRandom;
		_ai1 setOwner (owner _owner);
	};
	//diag_log format["_ai1 %2 Owner: %1",owner _ai1, _ai1]; //Used for testing
	waitUntil{_nearEntities != count ((getPos _ai1) nearEntities [["MAN"],1000])};
};

This PBO has this error below fixed no more RPT errors AI WILL PWN YOU

};>
 7:55:18   Error 0 elements provided, 3 expected
 7:55:18 File q\addons\custom_server\AIMission\AI1.sqf, line 91
 7:55:18 Bad conversion: array
 7:55:18 Error in expression <
waitUntil{_nearEntities != count (_ai1 nearEntities [["MAN"],1000])};
};>

Mister T

 

AssholesOfAmerica.com

Link to comment
Share on other sites

Fixed the AI1.SQF error that fuct up the rpt and lagged the server. Below is the Fixed pbo for you all enjoy!!!

Cyncrwler and Dwarfer this fixes that issue.

Click this link below

http://s000.tinyupload.com/?file_id=93964325298358194065

This PBO has this error below fixed no more RPT errors AI WILL PWN YOU

};>
 7:55:18   Error 0 elements provided, 3 expected
 7:55:18 File q\addons\custom_server\AIMission\AI1.sqf, line 91
 7:55:18 Bad conversion: array
 7:55:18 Error in expression <
waitUntil{_nearEntities != count (_ai1 nearEntities [["MAN"],1000])};
};>
Mister T

AssholesOfAmerica.com

Do we need to just replace that sqf or was there just more than that?
Link to comment
Share on other sites

Fixed the AI1.SQF error that fuct up the rpt and lagged the server.  Below is the Fixed pbo for you all enjoy!!! 

Cyncrwler and Dwarfer this fixes that issue.

Click this link below

 

http://s000.tinyupload.com/?file_id=93964325298358194065

 

 

 

This PBO has this error below fixed no more RPT errors AI WILL PWN YOU

};>
 7:55:18   Error 0 elements provided, 3 expected
 7:55:18 File q\addons\custom_server\AIMission\AI1.sqf, line 91
 7:55:18 Bad conversion: array
 7:55:18 Error in expression <
waitUntil{_nearEntities != count (_ai1 nearEntities [["MAN"],1000])};
};>

Mister T

 

AssholesOfAmerica.com

Oh man, too cool. Thank you...I'll be testing soon! But yeah, like 1Man asked..was it just the ai1 file or was there more?

Link to comment
Share on other sites

added getPOS

 

This is all you need to change in ai1.sqf


//Prevents players from having AI God Mode
while {true} do {
	_players = [];
	_nearEntities = count ((getPos _ai1) nearEntities [["MAN"],1000]);
	//diag_log format["_nearEntities: %1",_nearEntities];  //Used for testing
	{
		if (isPlayer _x) then {
		 _players = _players + [_x];
		};
	} foreach ((getPos _ai1) nearEntities [["MAN"],1000]);
	//diag_log format["Nearplayers: %1",_players]; //Used for testing
	if ((count _players) > 0) then {
		_owner = _players call BIS_fnc_selectRandom;
		_ai1 setOwner (owner _owner);
	};
	//diag_log format["_ai1 %2 Owner: %1",owner _ai1, _ai1]; //Used for testing
	waitUntil{_nearEntities != count ((getPos _ai1) nearEntities [["MAN"],1000])};
};
Link to comment
Share on other sites

 

added getPOS

 

This is all you need to change in ai1.sqf


//Prevents players from having AI God Mode
while {true} do {
	_players = [];
	_nearEntities = count ((getPos _ai1) nearEntities [["MAN"],1000]);
	//diag_log format["_nearEntities: %1",_nearEntities];  //Used for testing
	{
		if (isPlayer _x) then {
		 _players = _players + [_x];
		};
	} foreach ((getPos _ai1) nearEntities [["MAN"],1000]);
	//diag_log format["Nearplayers: %1",_players]; //Used for testing
	if ((count _players) > 0) then {
		_owner = _players call BIS_fnc_selectRandom;
		_ai1 setOwner (owner _owner);
	};
	//diag_log format["_ai1 %2 Owner: %1",owner _ai1, _ai1]; //Used for testing
	waitUntil{_nearEntities != count ((getPos _ai1) nearEntities [["MAN"],1000])};

Holy Crap, that was it. You rock MisterT  !! I've been fiddling with this issue for most the weekend.

Link to comment
Share on other sites

That stumps me..  I checked the vanilla files where this is called in AI1.sqf and it matches exactly what I have running on my server without any errors...  

Is anyone else getting this?

Can you provide the changes you put in the init.sqf?

==========

Can you also do this:

in the ai1.sqf file

change:
//Prevents players from having AI God Mode
while {true} do {
	_players = [];
	_nearEntities = count (_ai1 nearEntities [["MAN"],1000]);
	//diag_log format["_nearEntities: %1",_nearEntities];  //Used for testing
	{
		if (isPlayer _x) then {
		 _players = _players + [_x];
		};
	} foreach (_ai1 nearEntities [["MAN"],1000]);
	//diag_log format["Nearplayers: %1",_players]; //Used for testing
	if ((count _players) > 0) then {
		_owner = _players call BIS_fnc_selectRandom;
		_ai1 setOwner (owner _owner);
	};
	//diag_log format["_ai1 %2 Owner: %1",owner _ai1, _ai1]; //Used for testing
	waitUntil{_nearEntities != count (_ai1 nearEntities [["MAN"],1000])};
};

to:


//Prevents players from having AI God Mode
while {true} do {
	_players = [];
	_nearEntities = count (_ai1 nearEntities [["MAN"],1000]);
	//diag_log format["_nearEntities: %1",_nearEntities];  //Used for testing
	{
		if (isPlayer _x) then {
		 _players = _players + [_x];
		};
	} foreach _nearEntities;
	//diag_log format["Nearplayers: %1",_players]; //Used for testing
	if ((count _players) > 0) then {
		_owner = _players call BIS_fnc_selectRandom;
		_ai1 setOwner (owner _owner);
	};
	//diag_log format["_ai1 %2 Owner: %1",owner _ai1, _ai1]; //Used for testing
	waitUntil{_nearEntities != count (_ai1 nearEntities [["MAN"],1000])};
};

 

The RPT says the error is in these two spaces:

while {true} do {
	_players = [];
	_nearEntities = count (_ai1 nearEntities [["MAN"],1000]);  //HERE -- IS ERROR
	{
		if (isPlayer _x) then {
		 _players = _players + [_x];
		};
	} foreach (_ai1 nearEntities [["MAN"],1000]);
	if ((count _players) > 0) then {
		_owner = _players call BIS_fnc_selectRandom;
		_ai1 setOwner (owner _owner);
	};
	waitUntil{_nearEntities != count (_ai1 nearEntities [["MAN"],1000])};  //HERE -- IS ERROR
};

Are you running any Anti-Hack that isnt allowing the nearEntities command?

Black I am also getting this exact error on my server. We however have not edited anything in the mission at all. Only thing that was added was your update was installed. Seems like every other restart the error spamms the RPT and kills the server. On top of that the AI seem to be not even there. I sniped a whole mission from within 200m withough them firing any shots. All they are doing is laying there. THose with the trucks stand next to it. We have never had them in the truck and driving or patroling with the truck.

Link to comment
Share on other sites

hi this works perfect if i turn battle eye off they spawn and have loot and shoot at you but soon as i turn battle eye back on i get lots of script restrictions and when i fix one i get difrent one every time i tried altering my script.txt and tried to use yours still carnt fix the battle eye issues

Link to comment
Share on other sites

Steven1230,

 

This is what i do in the top of the init.sqf

DMR_Worldname = toLower format ["%1",worldName];
diag_log format["[DMR]Server Loading init configuration file loaded. World %1", DMR_Worldname];
//Variables to Edit Below
	//This defines the range from center to spawn
	if(DMR_Worldname == "altis") then {
		mapRange = 12000;
	}else{
		mapRange = 6000;
	};

Obviously you don't need the DMR as that is my CLAN :-) but show you what you can do. i like the debug as well.

Link to comment
Share on other sites

Alright, I read through this entire thread to see about BE Filters for the standard admin tools that came with Epoch. I couldn't find anything on it. I decided to spend the day trying to fix everything. So, for everyone who wants to use these, understand this is for VANILLA Epoch with the exception of the @MAS loot script! Have fun and I hope this helps you guys!
 
 
 

7 "BIS_fnc_" !"animalBehaviour" !"guiEffectTiles_coef" !"GUImessage" !"guiEffectTiles" !"param" !"setIDCStreamFriendly" !"overviewauthor" !"diagAARrecord" !"diagKey" !"feedbackMain" !"missionHandlers" !"getServerVariable" !"missionFlow" !"initParams" !"initRespawn" !"missionTasksLocal" !"missionConversationsLocal" !"missionCon" !"preload" !"logFormat" !"recompile" !"moduleInit" !"feedback_allowPP" !"feedback_allowDeathScreen" !"feedbackInit" !"initMultiplayer" !"MP" !"displayMission" !"feedback_fatiguePP" !"respawnBase" !"dirTo" !"secondsToString" !"guiMessage_status" !"selectRespawnTemplate" !"guiMessage_defaultPositions" !"startLoadingScreen_ids" !"damageChanged" !"incapacitatedEffect" !"invRemove" !"relpos" !"inString" !"findSafePos" !"isPosBlacklisted" !"timeToString" !"distance2D" !"effectKilled" !"dynamictext" !"inAngleSector" !="_this call (uinamespace getvariable 'BIS_fnc_effectFired');" !"lbSelChanged_"


7 "BIS_fnc_dynamictext" !", 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext;" !", 0, 0.4, 5, 2, 0, 2] spawn bis_fnc_dynamictext;" !"snil '_fnc_scriptName') then {_fnc_scriptName}" !"addPublicVariableEventHandler {(_this select 1) spawn bis_fnc_dynamictext;};"
7 forceRespawn
7 moveInDriver
7 moveInCargo
7 moveInCommander
7 moveInGunner
7 moveInTurret
7 setDammage !"player setDammage 0"
7 attachTo !"EP_light attachTo [player];" !"_bomb attachTo [_unit, [0,0,0],\"Pelvis\"];" !"_dogHolder attachTo [_dog, [-0.2,1.2,0.7]];" !"EPOCH_staticTarget attachTo[player];" !"EPOCH_target attachTo[player];"
7 enableCollisionWith
7 hideObjectGlobal
7 setFriend
7 setAmmo
7 RscDebugConsole_watch
7 enableFatigue
7 setUnitRecoilCoefficient
7 allMissionObjects
7 callExtension
7 createVehicleCrew
7 exec !="7 "call compile preprocessFileLineNumbers" !"\"A3\" !"\"\x\addons\a3_epoch_code\""
7 playableunits !"{getplayeruid _x == _ownerVar} count playableunits" !="lbSetData[21500, _index, netId _x];\n} forEach(playableUnits - [player]);"
7 allUnits !="{_x allowFleeing 0} forEach allUnits;"
7 allowDamage !="player allowDamage true;vehicle player allowDamage true;"
7 showCommandingMenu
7 exec !="execVM "\A3\Soft_F_Bootcamp\Offroad_01\scripts\randomize_colors.sqf" !"RscDebugConsole_execute" !"execFSM" !"_executeStackedEventHandler" !"fn_execVM" !"fn_moduleExecute" !"fn_execRemote" !"fn_MPexec" !"bis_fnc_moduleExecute_activate" !"fn_tridentExecute" !"randomize_civ1" !"executed from" !"EPOCH_DebugGUI_exec" !"_handle = [_display] execVM _script;" !"execVM \"\\A3\\Structures_F\\scripts\\" !"execVM \"\\x\\addons\\a3_epoch_config\\scripts\\" !"e preprocessfilelinenumbers \"A3\ui_f\scripts\initDisplay.sqf\";" !"execVM \"\x\addons\a3_epoch_code\system\dummy.sqf\"},{[\"onUnload\",_t\"" !"execVM \"\A3\soft_F\Offroad_01\scripts\randomize.sqf\"" !"if (isServer) then {[(_this select 0)] execVM \"\A3\Structures_F\Ind\PowerLines\Scripts\column_ruins.sqf\"};" !"([this, 1] execVM \"\A3\Structures_F_EPC\Civ\PlayGround\scripts\Carousel_spin.sqf\")"
7 addWeaponCargo
7 onMapSingleClick !="onMapSingleClick '';"
7 addMagazineCargo !"_dogHolder addMagazineCargo [\"RabbitCarcass_EPOCH\", 1]" !"_dogHolder addMagazineCargo [\"Pelt_EPOCH\", 1]" !"_dogHolder addMagazineCargo [\"Venom_EPOCH\", 1]" !"_dogHolder addMagazineCargo [\"SnakeCarcass_EPOCH\", 1]" !"_dogHolder addMagazineCargo [\"ChickenCarcass_EPOCH\", 1]"
7 addItemCargo
7 addBackPackCargo
7 removeAllWeapons
7 removeAllItems
7 removeBackpack
7 setTerrainGrid
7 setViewDistance !"setViewDistance 1600"
7 deleteMarker !="Marker = createMarker ["MainMarker", Ccoords];_MainMarker setMarkerColor "ColorWhite";_MainMarker setMarkerShape "ELLIPSE";_M
1 setMarker !="Marker = createMarker ["MainMarker", Ccoords]; !="Marker = _MainMarker setMarkerColor "ColorWhite"; !="Marker = _MainMarker setMarkerShape "ELLIPSE";_M
7 createMarker !="mpmissions\__CUR_MP.Altis\debug\addmarkers.sqf" !="mpmissions\__CUR_MP.Altis\debug\addmarkers2.sqf" !="mpmissions\__CUR_MP.Altis\debug\addmarkers75.sqf" !="mpmissions\__CUR_MP.Altis\debug\addmarkers752.sqf" !="mpmissions\__CUR_MP.Altis\debug\addmarkersR1.sqf" !="mpmissions\__CUR_MP.Altis\debug\remmarkers.sqf" !="mpmissions\__CUR_MP.Altis\debug\remmarkers2.sqf" !="mpmissions\__CUR_MP.Altis\debug\remmarkers75.sqf" !="mpmissions\__CUR_MP.Altis\debug\remmarkers752.sqf"
7 createUnit !="_unit = _copterSupportGrp createUnit[(_arrUnits select _i), _pos, [], 0, \"FORM\"];" !=_unit = _group createUnit [_unitClass, _targetPos, [], 100, \"CAN_COLLIDE\];" !"nHeight 600;_grp = createGroup RESISTANCE;_driver = _grp createUnit["I_UAV_AI", position _unit, [], 0, "CAN_COLLIDE"];
7 createAgent !="_unit = createAgent[_unitClass, _targetPos, [], 256, \"FORM\"];" !=_unit = createAgent [_unitClass, _targetPos, [], 120, \"FORM\];" !="_animal = createAgent[_randomAIClass, _animalPos, [], 5, \"NONE\"];" !=_unit = createAgent [\"Epoch_Cloak_F\", _pos, [], 0, \"CAN_COLLIDE\];"
7 createTeam
7 deleteMarker
3 setMarkerBrush !="hite"_MainMarker setMarkerShape "ELLIPSE";_MainMarker setMarkerBrush "Grid";_MainMarker setMarkerSize [175,175];"
7 setMarkerDir
7 setMarkerPos
7 setMarkerShape !"s];_MainMarker setMarkerColor "ColorWhite";_MainMarker setMarkerShape "ELLIPSE";_MainMarker setMarkerBrush "Grid";_MainMarke"
7 setMarkerSize !"ELLIPSE";_MainMarker setMarkerBrush "Grid";_MainMarker setMarkerSize [175,175];"
7 setMarkerText
7 setMarkerType
7 setMarkerAlpha
7 createMarkerLocal
7 setMarkerBrushLocal
7 setMarkerColorLocal
7 setMarkerDirLocal
7 setMarkerPosLocal
7 setMarkerShapeLocal
7 setMarkerSizeLocal
7 setMarkerTextLocal
7 setMarkerTypeLocal
7 setMarkerAlphaLocal
7 deleteMarkerLocal
7 displayRemoveAllEventHandlers
7 displaySetEventHandler
7 ctrlSetEventHandler !"BIS_fnc_guiMessage_status"
7 ctrlRemoveAllEventHandlers !="(uiNamespace getVariable 'ESP_map') ctrlRemoveAllEventHandlers 'Draw';"
7 ctrlRemoveEventHandler
7 addMPEventHandler
7 addEventHandler !"displayAddEventHandler" !"ctrlAddEventHandler" !" [\"local\"" !" [\"Respawn\"" !" [\"Put\"" !" [\"Take\"" [\"Fired\"" [\"Killed\"" !" [\"PostReset\",{BIS_EnginePPReset = true;} ];" !"_logic addeventhandler [\n\"local\""
7 displayAddEventHandler !"[_display] call _fnc_animate;" !"tVersion select 4) == \"Development\") then" !"_display displayaddeventhandler\n[\n\"mousemoving\"," !"(findDisplay 46) displayAddEventHandler [\"KeyDown\",\"true\"];" !"(findDisplay 46) displayAddEventHandler [\"KeyDown\",\"_this call EPOCH_KeyDown\"];" !"_display displayaddeventhandler [\"unload\",\"uinamespace setvariable ['BIS_fnc_guiMess"
7 ctrlAddEventHandler !"rCfg >> \"refreshDelay\");" !" [\n\"draw\"," !" [\"buttonclick\"," !="(uiNamespace getVariable 'ESP_map') ctrlAddEventHandler['Draw', '_esp_targets = EPOCH_ESPMAP_TARGETS;" !"aponInfo_weaponClasses = _weaponClasses;" !"_listWeapons ctrladdeventhandler [\"lbselchanged\",\"with uinamespace do {['lbSelChanged_w\""
7 removeAllEventHandlers !="ctrlRemoveAllEventHandlers" !="_vehicle removeAllEventHandlers \"GetOut\";"
7 removeAllMissionEventHandlers
7 removeEventHandler !="player removeEventHandler ['Fired', 0];" !="displayRemoveEventHandler" !"_currentTarget removeEventHandler[\"EpeContactStart\", _onContactEH]" !" [_adminVar,objnull];\npublicvariable _adminVar;\nplayer removeeventhandler [\"respawn\",_respawn];"
7 displayRemoveEventHandler !"BIS_fnc_guiMessage_status"
7 switchCamera
7 remoteControl !"fn_moduleRemoteControl.sqf"
7 drawIcon3D !"drawIcon3D[format[\"\x\addons\a3_epoch_code\Data\UI\loading_bar_%1.paa\",_stability],_color,(getPosATL EPOCH_stabilityTarget),5,5,0,\"\",1,0.05,\"PuristaMedium\"];" !"drawIcon3D[format[\"\x\addons\a3_epoch_code\Data\UI\loading_bar_%1.paa\",_num],_color,_pos,4,4,0,\"\",1,0.05,\"PuristaMedium\"];" !"EPOCH_drawIcon3dStability" !"EPOCH_drawIcon3d" !"if (_condition) then {\ndrawIcon3D [_icon, _color, _position, _sizeX, _sizeY, _angle, _text,"
7 drawLine3D !"{\nfor [{_i = 1}, {_i < count _x}, {_i = _i + 1}] do {\ndrawLine3D [_x select (_i - 1), _x select _i, ((BIS_tracedShooter getVari"
7 ctrlCreate
7 ctrlDelete
7 ctrlClassName
7 ctrlModel
7 ctrlModelDirection
7 ctrlModelSide
7 ctrlModelUp
7 ctrlSetDirection
7 ctrlSetModel
7 deleteVehicleCrew !="[\"A3\functions_f\MP\fn_deleteVehicleCrew.sqf\",\".sqf\",0,false,false,false,\"A3\",\"MP\",\"deleteVehicleCrew\"]"
7 loadFile !"_FRnd = compile loadFile \"\\A3\\animals_f"
7 setGroupIconsVisible
7 setGroupIconsSelectable
7 setGroupIconParams
7 addGroupIcon
7 EPOCH_whitelist
7 EPOCH_defaultVars_SEPXVar
7 EPOCH_group_upgrade_lvl_SVar
7 EPOCH_GROUP_Delete_PVS !="EPOCH_GROUP_Delete_PVS = [player,Epoch_personalToken];"
7 Dayz_GUI_R
7 dayz_originalPlayer
7 zZombie_Base
7 GodMode
7 shazbot
7 _typeofHookMonky
7 _allocMemory !"_allocMemory103"
7 _d3d9multipliervariable
7 _runASM
7 _addGFX_hookD3D9eventhandler
7 _BEhookBYPASSBOB
7 JJMMEE_INIT_MENU
3 addMagazine !"addMagazineCargo" !="player addMagazine _craftItem;" !="player addMagazine \"jerrycanE_epoch\";" !="player addMagazine \"emptyjar_epoch\";" !="player addMagazine \"jerrycan_epoch\";" !="player addMagazine \"Hatchet_swing\";" !="player addMagazine [(_x select 0),(_x select 1)]" !="player addMagazine _x;" !="_unit addMagazine configName _item"

Link to comment
Share on other sites

Steven1230,

 

This is what i do in the top of the init.sqf

DMR_Worldname = toLower format ["%1",worldName];
diag_log format["[DMR]Server Loading init configuration file loaded. World %1", DMR_Worldname];
//Variables to Edit Below
	//This defines the range from center to spawn
	if(DMR_Worldname == "altis") then {
		mapRange = 12000;
	}else{
		mapRange = 6000;
	};

Obviously you don't need the DMR as that is my CLAN :-) but show you what you can do. i like the debug as well.

 

Thanks :). Is there anyway to change the view range Ai have on when they spot players? It seems to be not that good at times.

Link to comment
Share on other sites

First off, thanks for this.   I have installed as per your instructions but get no missions spawning.

 

Downloaded the files,  custom_server.pbo is in @EpochHive/Addons (along with the a3_epoch_server.pbo & a3_epoch_server_settings.pbo)

In MPMissions I have placed the init.sqf file and the debug folder.

 

Nothing.  Server loads but no missions.  Any help is appreciated.

Link to comment
Share on other sites

First off, thanks for this.   I have installed as per your instructions but get no missions spawning.

 

Downloaded the files,  custom_server.pbo is in @EpochHive/Addons (along with the a3_epoch_server.pbo & a3_epoch_server_settings.pbo)

In MPMissions I have placed the init.sqf file and the debug folder.

 

Nothing.  Server loads but no missions.  Any help is appreciated.

 

unpack altis.pbo

place files in there (init.sqf file and the debug folder.)

repack altis.pbo

Link to comment
Share on other sites

Getting kicked #110  this happens as soon as you get into lobby.... not game.

 

 

06.01.2015 17:01:18: Jason Stirling (86xx04) 7f0xx03a4c53 - #110 "
                _display = _this select 0;
                (_display displayctrl 1015) ctrlsettext str (lbsize (_display displayctrl 114));    
            "
06.01.2015 17:11:21: Jason Stirling (86xx04) 7f04xx03a4c53 - #109 "
with uinamespace do {
disableserialization;
_display = _this select 0;

 

 

any ideas?

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...