Cleanup zombie_agent formatting

It is much easier to compare with the 1.8.7 file now.
This commit is contained in:
ebaydayz
2016-03-20 16:37:14 -04:00
parent ef873c2340
commit 92c09e5c7b

View File

@@ -1,4 +1,4 @@
/*%FSM<COMPILE "C:\Program Files (x86)\Steam\steamapps\common\Arma 3 Tools\FSMEditor\scriptedFSM.cfg, DayZ Zombie Agent">*/
/*%FSM<COMPILE "C:\Program Files (x86)\Bohemia Interactive\Tools\FSM Editor Personal Edition\scriptedFSM.cfg, DayZ Zombie Agent">*/
/*%FSM<HEAD>*/
/*
item0[] = {"init",0,250,50.000000,-400.000000,150.000000,-350.000000,0.000000,"init"};
@@ -17,7 +17,7 @@ item12[] = {"",7,210,-29.000006,-29.000004,-20.999996,-20.999996,0.000000,""};
item13[] = {"",7,210,-354.000092,-29.000004,-345.999908,-20.999996,0.000000,""};
item14[] = {"",7,210,-329.000031,208.500000,-321.000000,216.500000,0.000000,""};
item15[] = {"Has_Target",4,218,-150.000000,275.000000,-50.000000,325.000000,5.000000,"Has" \n "Target"};
item16[] = {"Chase",2,250,-150.000000,375.000000,-50.000000,425.000000,0.000000,"Chase"};
item16[] = {"Chase",2,4346,-150.000000,375.000000,-50.000000,425.000000,0.000000,"Chase"};
item17[] = {"Time_Check",4,218,50.000000,75.000000,150.000000,125.000000,1.000000,"Time" \n "Check"};
item18[] = {"",7,210,-29.000006,208.500000,-20.999996,216.500000,0.000000,""};
item19[] = {"",7,210,-29.000006,296.000000,-20.999996,304.000031,0.000000,""};
@@ -65,8 +65,8 @@ item60[] = {"Start_Attack",4,218,-725.000000,175.000000,-625.000000,225.000000,0
item61[] = {"End_Attack",4,218,-725.000000,100.000000,-625.000000,150.000000,0.000000,"End Attack"};
item62[] = {"TargetMoved",4,218,50.000000,300.000000,150.000000,350.000000,3.000000,"TargetMoved"};
item63[] = {"Not_moving",4,218,-300.000000,150.000000,-200.000000,200.000000,1.000000,"Not moving"};
item64[] = {"TimeOut",8,4314,-300.000000,375.000000,-200.000000,425.000000,2.000000,"TimeOut"};
item65[] = {"____FAKE____",9,32,0.000000,0.000000,0.000000,0.000000,0.000000,"____FAKE____"};
item64[] = {"TimeOut",8,218,-300.000000,375.000000,-200.000000,425.000000,2.000000,"TimeOut"};
item65[] = {"____FAKE____",9,2600,0.000000,0.000000,0.000000,0.000000,0.000000,"____FAKE____"};
link0[] = {0,10};
link1[] = {0,55};
link2[] = {2,3};
@@ -156,8 +156,8 @@ link85[] = {62,65};
link86[] = {65,62};
link87[] = {63,65};
link88[] = {65,63};
globals[] = {0.000000,0,0,0,0,640,480,1,157,6316128,1,-710.729492,237.694336,750.737427,47.068176,806,1004,1};
window[] = {2,-1,-1,-1,-1,805,104,1312,104,3,824};
globals[] = {25.000000,1,0,0,0,640,480,1,157,6316128,1,-640.890259,559.593506,704.095276,-186.586182,806,598,1};
window[] = {2,-1,-1,-1,-1,727,26,1234,26,3,824};
*//*%FSM</HEAD>*/
class FSM
{
@@ -168,14 +168,13 @@ class FSM
class init
{
name = "init";
itemno = 0;
init = /*%FSM<STATEINIT""">*/"_position = _this select 0;" \n
"_agent = _this select 1;" \n
"_secondHand = false;" \n
"" \n
"if (count _this > 2) then {" \n
" _secondHand = true;" \n
" //diag_log (""Second Hand Zombie Initialized: "" + str(_this));" \n
" diag_log (""Second Hand Zombie Initialized: "" + str(_this));" \n
"};"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
@@ -183,7 +182,6 @@ class FSM
/*%FSM<LINK "is_Dedicated">*/
class is_Dedicated
{
itemno = 55;
priority = 5.000000;
to="End";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
@@ -194,7 +192,6 @@ class FSM
/*%FSM<LINK "true">*/
class true
{
itemno = 10;
priority = 0.000000;
to="Begin";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
@@ -209,7 +206,6 @@ class FSM
class End
{
name = "End";
itemno = 1;
init = /*%FSM<STATEINIT""">*/"if (!isDedicated) then {" \n
" if (!isNull _agent) then {" \n
" deleteVehicle _agent;" \n
@@ -228,7 +224,6 @@ class FSM
class Looking_for_Targ
{
name = "Looking_for_Targ";
itemno = 3;
init = /*%FSM<STATEINIT""">*/"_isAlive = alive _agent;" \n
"_target = _agent call zombie_findTargetAgent;" \n
"_timeN = diag_tickTime;" \n
@@ -249,7 +244,6 @@ class FSM
/*%FSM<LINK "Nobody_Near">*/
class Nobody_Near
{
itemno = 5;
priority = 6.000000;
to="Cleanup_";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
@@ -260,7 +254,6 @@ class FSM
/*%FSM<LINK "Has_Target">*/
class Has_Target
{
itemno = 15;
priority = 5.000000;
to="Chase";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
@@ -290,7 +283,6 @@ class FSM
/*%FSM<LINK "Not_Alive">*/
class Not_Alive
{
itemno = 4;
priority = 5.000000;
to="Cleanup_";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
@@ -301,7 +293,6 @@ class FSM
/*%FSM<LINK "player_check">*/
class player_check
{
itemno = 54;
priority = 2.000000;
to="Looking_for_Targ";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
@@ -315,7 +306,6 @@ class FSM
/*%FSM<LINK "Time_Check">*/
class Time_Check
{
itemno = 17;
priority = 1.000000;
to="Looking_for_Targ";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
@@ -330,7 +320,6 @@ class FSM
class Loiter
{
name = "Loiter";
itemno = 7;
init = /*%FSM<STATEINIT""">*/"_isAlive = alive _agent;" \n
"_timeN = diag_tickTime;" \n
"" \n
@@ -374,7 +363,6 @@ class FSM
/*%FSM<LINK "Nobody_Near">*/
class Nobody_Near
{
itemno = 5;
priority = 6.000000;
to="Cleanup_";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
@@ -385,7 +373,6 @@ class FSM
/*%FSM<LINK "Has_Target">*/
class Has_Target
{
itemno = 15;
priority = 5.000000;
to="Chase";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
@@ -415,7 +402,6 @@ class FSM
/*%FSM<LINK "Not_Alive">*/
class Not_Alive
{
itemno = 4;
priority = 5.000000;
to="Cleanup_";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
@@ -426,7 +412,6 @@ class FSM
/*%FSM<LINK "player_check">*/
class player_check
{
itemno = 53;
priority = 2.000000;
to="Loiter";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
@@ -440,7 +425,6 @@ class FSM
/*%FSM<LINK "Time_Check">*/
class Time_Check
{
itemno = 20;
priority = 0.000000;
to="Loiter";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
@@ -455,7 +439,6 @@ class FSM
class Begin
{
name = "Begin";
itemno = 11;
init = /*%FSM<STATEINIT""">*/"_hasMoved = _agent getVariable[""doLoiter"",true];" \n
"" \n
"_myDest = [_agent,_position] call zombie_loiter;" \n
@@ -505,7 +488,6 @@ class FSM
/*%FSM<LINK "loiter">*/
class loiter
{
itemno = 6;
priority = 0.000000;
to="Loiter";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
@@ -517,7 +499,6 @@ class FSM
/*%FSM<LINK "wait">*/
class wait
{
itemno = 2;
priority = 0.000000;
to="Looking_for_Targ";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
@@ -532,10 +513,10 @@ class FSM
class Chase
{
name = "Chase";
itemno = 16;
init = /*%FSM<STATEINIT""">*/"_timeN = diag_tickTime;" \n
"" \n
"_agent forceSpeed (_agent getVariable [""speedLimit"", 3]);" \n
"_adjustSpeed = if (DZE_slowZombies) then {2} else {_agent getVariable [""speedLimit"", 3]};" \n
"_agent forceSpeed _adjustSpeed;" \n
"" \n
"_target = _agent call zombie_findTargetAgent;" \n
"_targetPos = getPosATL _target;" \n
@@ -543,27 +524,23 @@ class FSM
"_isTargetAlive = alive _target;" \n
"" \n
"//Move to location" \n
"if (_movingTo distance _targetPos > 2) then {" \n
"if (_movingTo distance _targetPos > .5) then {" \n
" //diag_log format[""Chase - %1 - [%2,%3] - Range %4"",(typeof _agent),_myDest,_movingTo,(_myDest distance _movingTo)];" \n
"" \n
" _agent moveTo _targetPos;" \n
"_speed = if (!isNil ""DZE_slowZombies"" && {DZE_slowZombies}) then { 2 } else { 10 };" \n
"_agent forceSpeed _speed;" \n
" _movingTo = _targetPos;" \n
"};" \n
"" \n
"if ((moveToCompleted _agent) or (Speed _agent == 0) or ((_agent distance _target) <= 2)) then {" \n
" _agroCheck= _agroCheck + 1;" \n
"" \n
"" \n
"//Check if LOS" \n
" if ((_agroCheck % 6) == 0) then {" \n
"if ((_agroCheck % 8) == 0) then {" \n
" _agroCheck = 0;" \n
" _cantSee = [_target,_agent] call dayz_losCheck;" \n
" _target = _agent call zombie_findTargetAgent;" \n
" };" \n
"};" \n
"" \n
"" \n
"" \n
"//diag_log format[""%1"",(typeof _agent)];"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
@@ -571,7 +548,6 @@ class FSM
/*%FSM<LINK "Nobody_Near">*/
class Nobody_Near
{
itemno = 5;
priority = 6.000000;
to="Cleanup_";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
@@ -582,7 +558,6 @@ class FSM
/*%FSM<LINK "Not_Alive">*/
class Not_Alive
{
itemno = 4;
priority = 5.000000;
to="Cleanup_";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
@@ -593,7 +568,6 @@ class FSM
/*%FSM<LINK "No_Target">*/
class No_Target
{
itemno = 22;
priority = 3.000000;
to="Reset_Targeting";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
@@ -604,7 +578,6 @@ class FSM
/*%FSM<LINK "Target_Dead">*/
class Target_Dead
{
itemno = 58;
priority = 3.000000;
to="Reset_Targeting";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
@@ -615,7 +588,6 @@ class FSM
/*%FSM<LINK "cant_see">*/
class cant_see
{
itemno = 30;
priority = 2.000000;
to="Finish_Move";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
@@ -626,13 +598,12 @@ class FSM
/*%FSM<LINK "TimeOut">*/
class TimeOut
{
itemno = 64;
priority = 2.000000;
to="Chase";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"(diag_tickTime - _timeN) > 3" \n
condition=/*%FSM<CONDITION""">*/"(diag_tickTime - _timeN) > 1" \n
""/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
action=/*%FSM<ACTION""">*/"_agroCheck= _agroCheck + 1;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
@@ -642,7 +613,6 @@ class FSM
class Cleanup_
{
name = "Cleanup_";
itemno = 27;
init = /*%FSM<STATEINIT""">*/"_waitStart = diag_tickTime;" \n
"" \n
"_list = (getposATL _agent) nearEntities [[""CAManBase"",""AllVehicles""],300];" \n
@@ -653,7 +623,6 @@ class FSM
/*%FSM<LINK "nobody_around">*/
class nobody_around
{
itemno = 28;
priority = 0.000000;
to="End";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
@@ -664,7 +633,6 @@ class FSM
/*%FSM<LINK "someone_here">*/
class someone_here
{
itemno = 36;
priority = 0.000000;
to="wait";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
@@ -679,7 +647,6 @@ class FSM
class Finish_Move
{
name = "Finish_Move";
itemno = 31;
init = /*%FSM<STATEINIT""">*/"_timeN = diag_tickTime;" \n
"" \n
"_list = (getposATL _agent) nearEntities [[""CAManBase"",""AllVehicles""],300];" \n
@@ -690,7 +657,6 @@ class FSM
/*%FSM<LINK "Nobody_Near">*/
class Nobody_Near
{
itemno = 5;
priority = 6.000000;
to="Cleanup_";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
@@ -701,7 +667,6 @@ class FSM
/*%FSM<LINK "finished">*/
class finished
{
itemno = 32;
priority = 1.000000;
to="Reset_Targeting";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
@@ -712,7 +677,6 @@ class FSM
/*%FSM<LINK "too_long">*/
class too_long
{
itemno = 44;
priority = 0.000000;
to="Reset_Targeting";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
@@ -727,7 +691,6 @@ class FSM
class wait
{
name = "wait";
itemno = 37;
init = /*%FSM<STATEINIT""">*/"_list = (getposATL _agent) nearEntities [[""CAManBase"",""AllVehicles""],300];" \n
"_isSomeone = ({isPlayer _x} count _list) > 0;" \n
"" \n
@@ -738,7 +701,6 @@ class FSM
/*%FSM<LINK "time_up">*/
class time_up
{
itemno = 38;
priority = 0.000000;
to="End";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
@@ -749,7 +711,6 @@ class FSM
/*%FSM<LINK "nobody_around">*/
class nobody_around
{
itemno = 28;
priority = 0.000000;
to="End";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
@@ -760,7 +721,6 @@ class FSM
/*%FSM<LINK "deleted">*/
class deleted
{
itemno = 49;
priority = 0.000000;
to="End";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
@@ -771,7 +731,6 @@ class FSM
/*%FSM<LINK "Time_Check">*/
class Time_Check
{
itemno = 41;
priority = 0.000000;
to="wait";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
@@ -786,7 +745,6 @@ class FSM
class Reset_Targeting
{
name = "Reset_Targeting";
itemno = 47;
init = /*%FSM<STATEINIT""">*/"// reset stance to favorite one" \n
"_agent setUnitPos (_agent getVariable [""stance"", ""UP""]);" \n
"" \n
@@ -820,7 +778,6 @@ class FSM
/*%FSM<LINK "true">*/
class true
{
itemno = 48;
priority = 0.000000;
to="Loiter";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
@@ -837,7 +794,6 @@ class FSM
class ____FAKE____
{
name = "____FAKE____";
itemno = 65;
init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
@@ -845,7 +801,6 @@ class FSM
/*%FSM<LINK "MoveCompleted_">*/
class MoveCompleted_
{
itemno = 56;
priority = 3.000000;
to="____FAKE____";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
@@ -858,7 +813,6 @@ class FSM
/*%FSM<LINK "Failed_Move">*/
class Failed_Move
{
itemno = 57;
priority = 3.000000;
to="____FAKE____";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
@@ -871,7 +825,6 @@ class FSM
/*%FSM<LINK "TargetMoved">*/
class TargetMoved
{
itemno = 62;
priority = 3.000000;
to="____FAKE____";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
@@ -883,7 +836,6 @@ class FSM
/*%FSM<LINK "Not_moving">*/
class Not_moving
{
itemno = 63;
priority = 1.000000;
to="____FAKE____";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
@@ -895,7 +847,6 @@ class FSM
/*%FSM<LINK "Check">*/
class Check
{
itemno = 21;
priority = 1.000000;
to="____FAKE____";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
@@ -920,7 +871,6 @@ class FSM
/*%FSM<LINK "End_Attack">*/
class End_Attack
{
itemno = 61;
priority = 0.000000;
to="____FAKE____";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
@@ -932,7 +882,6 @@ class FSM
/*%FSM<LINK "Start_Attack">*/
class Start_Attack
{
itemno = 60;
priority = 0.000000;
to="____FAKE____";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;