Jump to content

imago

Member
  • Content Count

    42
  • Joined

  • Last visited

  • Medals

Posts posted by imago


  1. BattlEye now breaks my Headless Client (won't load Extension DLL)

    C:\Program Files (x86)\Steam\steamapps\common\Arma 2 Operation Arrowhead>start /

    WAIT /ABOVENORMAL ArmA2OA_BE.exe 0 0 -client -name=ChaosBot -connect=168.62.217.44 -p

    ort=2302

    Starting BattlEye Service...

    Launching game...

    Note: File blocks can be ignored if they don't cause problems with the game.

    [iNFO] Blocked loading of file: "C:\Program Files (x86)\Steam\steamapps\common\A

    rma 2 Operation Arrowhead\gc.dll".

    gc.dll is similar to "inidb"

    Ya'll broke my mission. Please advise how to run extension dll on headless client with BattlEye enabled.


  2. It's been offline for about a year, so I've pushed everything you'd need to run a server to the Github link below. If you look hard enough you may find the GC.dll and DB + scripts. (or ask)

    Maybe next year I will push that stuff, depends on if I ever finish our evolution of Zargabad->Ensk->Stratis->Altis Life :cool: IIRC we left off at the poker table in the casino at the gang areas :yay:

    Code: https://github.com/GlobalChaosGaming

    Credits: All the helpful GC people (you know who you are)

    Giallustio

    Loyalguard

    Wolfrug

    Blanco

    norrin

    GeneralCarver

    Johnnyboy

    Pogomon

    EddieV

    Gman

    R.I.P. GC! :nerner:

    Global Chaos Zargabad Life Drug Demo

    Zargabad Life dance party (Global Chaos Gaming)


  3. I'm having trouble with A3 Fish AnimalTask. The editor fish swim fine. The dedicated server fish swim north then stop. Spent 3 days on this so far. Have repro steps I'm about to start lighting people up.

    i've had to make an addon like this:

     class CfgPatches
    {
     class GC_Animals
     {
      units[] = {"Snake_random_F_GC","Turtle_F_GC","CatShark_F_GC","Mullet_F_GC","Tuna_F_GC","Mackerel_F_GC","Salema_F_GC","Rabbit_F_GC"};
      weapons[] = {};
      requiredVersion = 0.1;
      requiredAddons[] = {"A3_Animals_F_Snakes","A3_Animals_F_Fishes","A3_Animals_F_Turtle","A3_Animals_F_Rabbit"};
     };
    };
    class CfgTasks
    {
    class AnimalMainTask_GC
    {
     name = "Chaos Animals";
     fsm = "gc\global\GC_Animals.fsm";
     condition = "gc\global\GC_createSingleTask.sqf";
     description = "Animal master task modified by Global Chaos Gaming";
     destination = "";
     resources[] = {};
    };
    };
    class CfgVehicles
    {
    class Rabbit_F;
    class Rabbit_F_GC: Rabbit_F
    {
    	agentTasks[] = {"AnimalMainTask_GC"};
    };
    class Snake_random_F;
    class Snake_random_F_GC: Snake_random_F
    {
      agentTasks[] = {"AnimalMainTask_GC"};
    };
    class Turtle_F;
    class Turtle_F_GC: Turtle_F
    {
    	agentTasks[] = {"AnimalMainTask_GC"};
    };
    class CatShark_F;
    class CatShark_F_GC: CatShark_F
    {
    	agentTasks[] = {"AnimalMainTask_GC"};
    };
    class Mullet_F;
    class Mullet_F_GC: Mullet_F
    {
    	agentTasks[] = {"AnimalMainTask_GC"};
    };
    class Tuna_F;
    class Tuna_F_GC: Tuna_F
    {
    	agentTasks[] = {"AnimalMainTask_GC"};
    };
    class Mackerel_F;
    class Mackerel_F_GC: Mackerel_F
    {
    	agentTasks[] = {"AnimalMainTask_GC"};
    };
    class Salema_F;
    class Salema_F_GC: Salema_F
    {
    	agentTasks[] = {"AnimalMainTask_GC"};
    };
    };

    i suppose because zargabad does not have water surface data.

    anyways my modified fsm just sets debug=true and a danger state once so the snakes and fish stick around. rabbits seemed fine from the get - go (yay!)

    /*%FSM<COMPILE "C:\Program Files (x86)\Bohemia Interactive\Tools\FSM Editor Personal Edition\scriptedFSM.cfg, GC Ambient Agent - Main">*/
    /*%FSM<HEAD>*/
    /*
    item0[] = {"_",-1,250,100.000000,-75.000000,250.000000,125.000000,0.000000,""};
    item1[] = {"__1",-1,250,450.000000,-75.000000,600.000000,125.000000,0.000000,""};
    item2[] = {"__2",-1,250,275.000000,-75.000000,425.000000,125.000000,0.000000,""};
    item3[] = {"Init",0,4346,300.000000,-275.000000,400.000000,-225.000000,0.000000,"Init"};
    item4[] = {"Desync",4,218,300.000000,-175.000000,400.000000,-125.000000,0.000000,"Desync"};
    item5[] = {"Reset",2,250,-50.000000,-175.000000,50.000000,-125.000000,0.000000,"Reset"};
    item6[] = {"Wait",4,218,-50.000000,-275.000000,50.000000,-225.000000,0.000000,"Wait"};
    item7[] = {"Danger",4,218,475.000000,50.000000,575.000000,100.000000,1.000000,"Danger"};
    item8[] = {"Danger",2,250,475.000000,-50.000000,575.000000,0.000000,0.000000,"Danger"};
    item9[] = {"Safe",4,218,300.000000,50.000000,400.000000,100.000000,0.000000,"Safe"};
    item10[] = {"Safe",2,250,300.000000,-50.000000,400.000000,0.000000,0.000000,"Safe"};
    item11[] = {"Delay",4,218,-50.000000,175.000000,50.000000,225.000000,0.000000,"Delay"};
    item12[] = {"Continue",2,250,300.000000,175.000000,400.000000,225.000000,0.000000,"Continue"};
    item13[] = {"Formation",4,218,125.000000,50.000000,225.000000,100.000000,2.000000,"Formation"};
    item14[] = {"Formation",2,250,125.000000,-50.000000,225.000000,0.000000,0.000000,"Formation"};
    item15[] = {"Danger",4,218,-50.000000,250.000000,50.000000,300.000000,0.000000,"Danger"};
    item16[] = {"Formation",4,218,-50.000000,325.000000,50.000000,375.000000,0.000000,"Formation"};
    item17[] = {"Task_done",4,218,-50.000000,400.000000,50.000000,450.000000,0.000000,"Task done"};
    item18[] = {"_",4,218,475.000000,-275.000000,575.000000,-225.000000,1.000000,""};
    item19[] = {"__3",1,250,475.000000,-175.000000,575.000000,-125.000000,0.000000,""};
    version=1;
    class LayoutItems
    {
    class Item0
    {
    	class ItemInfo
    	{
    		FontFace="Arial";
    		FontHeight=10;
    		lWidth=5;
    		lColor=16744448;
    	};
    	BgColor=16766378;
    };
    class Item1
    {
    	class ItemInfo
    	{
    		FontFace="Arial";
    		FontHeight=10;
    		lWidth=5;
    		lColor=255;
    	};
    	BgColor=11184895;
    };
    class Item2
    {
    	class ItemInfo
    	{
    		FontFace="Arial";
    		FontHeight=10;
    		lWidth=5;
    		lColor=65280;
    	};
    	BgColor=11206570;
    };
    };
    link0[] = {3,4};
    link1[] = {3,18};
    link2[] = {4,5};
    link3[] = {5,6};
    link4[] = {5,11};
    link5[] = {5,15};
    link6[] = {5,16};
    link7[] = {5,17};
    link8[] = {6,5};
    link9[] = {7,8};
    link10[] = {8,4};
    link11[] = {9,10};
    link12[] = {10,4};
    link13[] = {11,12};
    link14[] = {12,7};
    link15[] = {12,9};
    link16[] = {12,13};
    link17[] = {13,14};
    link18[] = {14,4};
    link19[] = {15,12};
    link20[] = {16,12};
    link21[] = {17,12};
    link22[] = {18,19};
    globals[] = {25.000000,1,0,1,16777215,640,480,1,17,6316128,1,-177.962433,530.478943,377.813202,-452.126251,793,929,1};
    window[] = {2,-1,-1,-1,-1,840,110,1370,110,3,810};
    *//*%FSM</HEAD>*/
    class FSM
    {
     fsmName = "GC Ambient Agent - Main";
     class States
     {
       /*%FSM<STATE "Init">*/
       class Init
       {
         name = "Init";
         init = /*%FSM<STATEINIT""">*/"_id = 0;" \n
          "_stateDanger = 0;" \n
          "_state = ""wait"";" \n
          "_movePos = getPos _agent;" \n
          "" \n
          "diag_log text ""GC Ambient AgentTask FSM started"";" \n
          "" \n
          "//------------------------------------------------------------------------------------------------------------" \n
          "//--- Set unique variables from config" \n
          "_type = typeof _agent;" \n
          "_root = configFile >> ""CfgVehicles"" >> _type;" \n
          "" \n
          "_config = _root >> ""VariablesScalar"";" \n
          "_n = (count _config) - 1;" \n
          "for ""_i"" from 0 to _n do" \n
          "{" \n
          "	_entry = _config select _i;" \n
          "	_name = configName _entry;" \n
          "	_value = getNumber _entry;" \n
          "	_agent setVariable [_name, _value];" \n
          "};" \n
          "" \n
          "_config = _root >> ""VariablesString"";" \n
          "_n = (count _config) - 1;" \n
          "for ""_i"" from 0 to _n do" \n
          "{" \n
          "	_entry = _config select _i;" \n
          "	_name = configName _entry;" \n
          "	_value = getText _entry;" \n
          "	_agent setVariable [_name, _value];" \n
          "};" \n
          "" \n
          "_scareLimit = _scareLimit - 0.001;" \n
          "_dangerLimit = _dangerLimit - 0.001;" \n
          "" \n
          "//------------------------------------------------------------------------------------------------------------" \n
          "//--- Get variables" \n
          "" \n
          "/*" \n
          "   _threatMaxRadius = 20;" \n
          "   _runDistanceMax = 50;" \n
          "   _movePrefer = 0.7;" \n
          "   _formationPrefer = 0.2;" \n
          "   _scareLimit = 0.2;" \n
          "   _dangerLimit = 1.0;" \n
          "" \n
          "   _expSafe = ""(0.5 * meadow) * (0.5 *  trees) * (1 - forest) * (1 - houses) * (1 - sea)"";" \n
          "   _expDanger = ""(trees) * (forest) * (1 - meadow) * (1 - houses) * (1 - sea)"";" \n
          "*/" \n
          " _scareLimit = 15;" \n
          " _runDistanceMax = 20;" \n
          "_agent setvariable[""firstrun"",true];" \n
          "" \n
          "//------------------------------------------------------------------------------------------------------------" \n
          "//--- Debug mode" \n
          "_debug = false;" \n
          "_markers = [];" \n
          "if (_debug) then {" \n
          "	_id = random 999999; //--- Generate (almost) unique number" \n
          "	[_agent,_id] spawn {" \n
          "		_agent = _this select 0;;" \n
          "		_id =_this select 1;" \n
          "		//--- Triangle" \n
          "		_marker = createmarkerlocal [format [""bis_ambient_%1"",_id],position _agent];" \n
          "		_marker setmarkertypelocal ""mil_triangle"";" \n
          "		//--- Dot" \n
          "		_dmarker = createmarkerlocal [format [""bis_ambient_%1_wp"",_id],position _agent];" \n
          "		_dmarker setmarkertypelocal ""mil_dot"";" \n
          "		_dmarker setmarkercolorlocal ""colorblack"";" \n
          "		_dmarker setmarkersize [.5,.5];" \n
          "		//--- Line" \n
          "		_lmarker = createmarker [format [""bis_ambient_%1_line"",_id],position _agent];" \n
          "		_lmarker setmarkershapelocal ""rectangle"";" \n
          "		_lmarker setmarkerbrushlocal ""solid"";" \n
          "		_lmarker setmarkercolorlocal ""colorblack"";" \n
          "" \n
          "		while {alive _agent} do {" \n
          "			_apos = position _agent;" \n
          "			_bpos = expecteddestination _agent select 0;" \n
          "" \n
          "			_marker setmarkerposlocal _apos;" \n
          "			_marker setmarkerdirlocal direction _agent;" \n
          "			//_marker setmarkertextlocal (_agent getvariable ""state"");" \n
          "" \n
          "			if ([_bpos select 0,_bpos select 1] distance [0,0] > 10) then {" \n
          "				_dmarker setmarkerposlocal _bpos;" \n
          "" \n
          "				_difX = (_apos select 0) - (_bpos select 0) +0.1;" \n
          "				_difY = (_apos select 1) - (_bpos select 1) +0.1;" \n
          "				_lx = (_bpos select 0) + _difX / 2;" \n
          "				_ly = (_bpos select 1) + _difY / 2;" \n
          "				_dis = sqrt(_difX^2 + _difY^2);" \n
          "				_dir = atan (_difX / _difY);" \n
          "				_lmarker setmarkerposlocal [_lx,_ly];" \n
          "				_lmarker setmarkersizelocal [0.5,_dis/2];" \n
          "				_lmarker setmarkerdirlocal _dir;" \n
          "			} else {" \n
          "				_dmarker setmarkerposlocal [1,1,1];" \n
          "				_lmarker setmarkerposlocal [1,1,1];" \n
          "			};" \n
          "" \n
          "			{" \n
          "				_state = _agent getvariable ""state"";" \n
          "				_color = ""colorgreen"";" \n
          "				if (_state == ""danger"") then {_color = ""colorred""};" \n
          "				if (_state == ""formation"") then {_color = ""colorblue""};" \n
          "				_x setmarkercolorlocal _color;" \n
          "			} foreach [_marker,_dmarker,_lmarker];" \n
          "" \n
          "			sleep 0.1;" \n
          "		};" \n
          "		deletemarkerlocal _marker;" \n
          "	};" \n
          "};" \n
          "" \n
          "" \n
          "" \n
          "" \n
          "//--- Delay" \n
          "_timeNow = time;" \n
          "_delay = random 1;"/*%FSM</STATEINIT""">*/;
         precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
         class Links
         {
           /*%FSM<LINK "_">*/
           class _
           {
             priority = 1.000000;
             to="__3";
             precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
             condition=/*%FSM<CONDITION""">*/"_agent isKindOf ""School_Salema"""/*%FSM</CONDITION""">*/;
             action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
           };
           /*%FSM</LINK>*/
           /*%FSM<LINK "Desync">*/
           class Desync
           {
             priority = 0.000000;
             to="Reset";
             precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
             condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
             action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
           };
           /*%FSM</LINK>*/
         };
       };
       /*%FSM</STATE>*/
       /*%FSM<STATE "Reset">*/
       class Reset
       {
         name = "Reset";
         init = /*%FSM<STATEINIT""">*/"//----- control position start -----" \n
          "" \n
          "_ctrlDepth = getTerrainHeightASL (getPos _agent);" \n
          "if ((_agent isKindOf ""Fish_Base_F"") || (_agent isKindOf ""Turtle_F"")) then {" \n
          "	if (_ctrlDepth > -0.5) then {" \n
          "		deleteVehicle _agent" \n
          "	}" \n
          "} else {" \n
          "	if (_ctrlDepth < -0.5) then {" \n
          "		deleteVehicle _agent" \n
          "	}" \n
          "};" \n
          "" \n
          "//----- control position end -----" \n
          "" \n
          "_stateDanger = 0;" \n
          "_targets = (_agent nearObjects _threatMaxRadius) - [_agent];" \n
          "" \n
          "_stateDangerList = [];" \n
          "_stateBigDangerList = [];" \n
          "{" \n
          "	if (_x iskindof ""CAManBase"") then {" \n
          "		_stateDangerList = _stateDangerList + [_x]" \n
          "	} else {" \n
          "		if ((_x iskindof ""Ship"" || _x iskindof ""LandVehicle"" || _x iskindof ""Air"") && isEngineOn _x) then {" \n
          "			_a = 0;" \n
          "			while {_a < 15} do {" \n
          "  				_stateDangerList = _stateDangerList + [_x];" \n
          "				_a = _a + 1" \n
          "			}" \n
          "		}" \n
          "	}" \n
          "} forEach _targets;" \n
          "_stateDanger = count _stateDangerList;" \n
          "" \n
          "_animals = [];" \n
          "_animalsScared = [];" \n
          "_stateFormation = 0;" \n
          "_stateScared = 0;" \n
          "" \n
          "{" \n
          "	_type = _x;" \n
          "	_object = _x;" \n
          "" \n
          "	//--- Animal" \n
          "	if (_type iskindof ""animal"" && !isnil {_object getvariable ""state""}) then {" \n
          "		//--- Same type" \n
          "		if (_type iskindof typeof _agent) then {" \n
          "" \n
          "			//--- Formation leader" \n
          "			if (!((_object getvariable ""state"") in [""formation"",""wait""]) && ((damage _object) < 0.1)) then {" \n
          "				_animals = _animals + [_object]" \n
          "			};" \n
          "		};" \n
          "	};" \n
          "		" \n
          "	if (_type iskindof ""animal"") then {" \n
          "		//--- Scared" \n
          "		if (!isnil {_object getvariable ""state""}) then {" \n
          "			if ((_object getvariable ""state"") == ""danger"") then {" \n
          "				_animalsScared = _animalsScared + [_object]" \n
          "			};" \n
          "		};" \n
          "		if ((damage _object) > 0.1) then {" \n
          "			_animalsScared = _animalsScared + [_object]" \n
          "		};" \n
          "	};" \n
          "" \n
          "} foreach _targets;" \n
          "_stateFormation = count _animals;" \n
          "_stateScared = count _animalsScared;" \n
          "" \n
          "_agent setvariable [""state"",_state];" \n
          "" \n
          "//hint format [""State: %3\nEnemies: %1\nScared animals: %2"",_stateDanger,_stateScared,_state];" \n
          "" \n
          "if (_agent getvariable ""firstrun"") then {" \n
          "	_stateDanger = 15;" \n
          "	_stateScared = 15;" \n
          "	_agent setvariable[""firstrun"",false];" \n
          "};" \n
          "" \n
          "//--- Delay" \n
          "_timeNow = time;"/*%FSM</STATEINIT""">*/;
         precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
         class Links
         {
           /*%FSM<LINK "Delay">*/
           class Delay
           {
             priority = 0.000000;
             to="Continue";
             precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
             condition=/*%FSM<CONDITION""">*/"(time - _timeNow) >= (_delay) //--- Delay" \n
              ""/*%FSM</CONDITION""">*/;
             action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
           };
           /*%FSM</LINK>*/
           /*%FSM<LINK "Danger">*/
           class Danger
           {
             priority = 0.000000;
             to="Continue";
             precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
             condition=/*%FSM<CONDITION""">*/"(_state != ""danger"" && (_stateDanger > _dangerLimit || _stateScared > _scareLimit)) //--- Danger detected"/*%FSM</CONDITION""">*/;
             action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
           };
           /*%FSM</LINK>*/
           /*%FSM<LINK "Formation">*/
           class Formation
           {
             priority = 0.000000;
             to="Continue";
             precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
             condition=/*%FSM<CONDITION""">*/"(_state != ""formation"" && _state!= ""danger"" && _stateFormation > 0) //--- Formation detected"/*%FSM</CONDITION""">*/;
             action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
           };
           /*%FSM</LINK>*/
           /*%FSM<LINK "Task_done">*/
           class Task_done
           {
             priority = 0.000000;
             to="Continue";
             precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
             condition=/*%FSM<CONDITION""">*/"(_state != ""wait"" && ((_movePos distance _agent) < 3)) //--- Move task done"/*%FSM</CONDITION""">*/;
             action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
           };
           /*%FSM</LINK>*/
           /*%FSM<LINK "Wait">*/
           class Wait
           {
             priority = 0.000000;
             to="Reset";
             precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
             condition=/*%FSM<CONDITION""">*/"(time - _timeNow) >= 2;"/*%FSM</CONDITION""">*/;
             action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
           };
           /*%FSM</LINK>*/
         };
       };
       /*%FSM</STATE>*/
       /*%FSM<STATE "Danger">*/
       class Danger
       {
         name = "Danger";
         init = /*%FSM<STATEINIT""">*/"//--- Find place to hide" \n
          "_state = ""danger"";" \n
          "_tries = if (_debug) then {10} else {3};" \n
          "_movePosList = selectbestplaces [position _agent,_runDistanceMax,_expDanger,10,_tries];" \n
          "" \n
          "//---Enemy position" \n
          "_closeEnemy = _agent;" \n
          "if ((count _stateDangerList) != 0) then {" \n
          "	_closeEnemy = _stateDangerList select 0;" \n
          "} else {" \n
          "	if ((count _animalsScared) != 0) then {" \n
          "		_closeEnemy = _animalsScared select 0;" \n
          "	} else {" \n
          "		_closeEnemy = _agent;" \n
          "	};" \n
          "};" \n
          "" \n
          "{if ((_agent distance _x) < (_agent distance _closeEnemy)) then {_closeEnemy = _x}} forEach _stateDangerList;" \n
          "_pos1 = getpos _agent;" \n
          "_pos2 = getpos _closeEnemy;" \n
          "_ret = ((_pos2 select 0) - (_pos1 select 0)) atan2 ((_pos2 select 1) - (_pos1 select 1));" \n
          "_ret = abs (_ret % 360);" \n
          "" \n
          "//---movePos" \n
          "if ((count _movePosList) != 0) then {" \n
          "	_movePos = [0,0];" \n
          "	if ((_agent isKindOf ""Fish_Base_F"") || (_agent isKindOf ""Turtle_F"")) then {" \n
          "		_dest = getPosASL _agent;" \n
          "		if ((_dest select 2) > -1) then {" \n
          "			_agent setPos [_dest select 0, _dest select 1, -3]" \n
          "		};" \n
          "		if (({(getTerrainHeightASL (_x select 0)) < -2} count _movePosList) > 0) then {" \n
          "			_depth = 0;" \n
          "" \n
          "			if ((count _movePosList) > 2) then {" \n
          "				if (_ret > 180) then {_ret = 360 - _ret};" \n
          "				_i = 0;" \n
          "				{" \n
          "					_pos1 = getpos _agent;" \n
          "					_pos2 = _x select 0;" \n
          "					_retNew = ((_pos2 select 0) - (_pos1 select 0)) atan2 ((_pos2 select 1) - (_pos1 select 1));" \n
          "					_retNew = abs (_retNew % 360);" \n
          "					_angle = _ret + _retNew;" \n
          "					if (_angle > 180) then {_angle = 360 - _angle};" \n
          "					if (_angle > _i) then {_i = _angle;_movePos = _x select 0};" \n
          "				} forEach _movePosList;" \n
          "			} else {" \n
          "				_movePos = (_movePosList select (floor random (count _movePosList))) select 0;" \n
          "			};" \n
          "" \n
          "			_depth = getTerrainHeightASL _movePos;" \n
          "			while {_depth > -2} do {" \n
          "				_movePos = (_movePosList select (floor random (count _movePosList))) select 0;" \n
          "				_depth = getTerrainHeightASL _movePos;" \n
          "			};" \n
          "			_agentDepth = (position _agent) select 2;" \n
          "			_movePos = [_movePos select 0, _movePos select 1, (_agentDepth-3)+(random 6)];" \n
          "			_agent moveto _movePos;" \n
          "		};" \n
          "	} else {" \n
          "		if ((count _movePosList) > 2) then {" \n
          "			if (_ret > 180) then {_ret = 360 - _ret};" \n
          "			_i = 0;" \n
          "			{" \n
          "				_pos1 = getpos _agent;" \n
          "				_pos2 = _x select 0;" \n
          "				_retNew = ((_pos2 select 0) - (_pos1 select 0)) atan2 ((_pos2 select 1) - (_pos1 select 1));" \n
          "				_retNew = abs (_retNew % 360);" \n
          "				_angle = _ret + _retNew;" \n
          "				if (_angle > 180) then {_angle = 360 - _angle};" \n
          "				if (_angle > _i) then {_i = _angle;_movePos = _x select 0};" \n
          "			} forEach _movePosList;" \n
          "		} else {" \n
          "			_movePos = (_movePosList select (floor random (count _movePosList))) select 0;" \n
          "		};" \n
          "" \n
          "		_water = surfaceIsWater _movePos;" \n
          "			while {_water} do {" \n
          "				_movePos = (_movePosList select (floor random (count _movePosList))) select 0;" \n
          "				_water = surfaceIsWater _movePos;" \n
          "			};" \n
          "" \n
          "		_agent moveto _movePos;" \n
          "	};" \n
          "};" \n
          "" \n
          "if (isNil ""_movepos"") then {" \n
          "	_movePos = getPos _agent;" \n
          "};" \n
          "" \n
          "if (_debug) then {" \n
          "	{" \n
          "			_dmarker = createmarkerlocal [format [""xxx%1"",round random 99999],_x select 0];" \n
          "			_dmarker setmarkertypelocal ""mil_dot"";" \n
          "			_dmarker setmarkercolorlocal ""colorgreen"";" \n
          "			_dmarker setmarkeralphalocal 0.05;" \n
          "			_size = 1 + random 1;" \n
          "			_dmarker setmarkersizelocal [_size,_size];" \n
          "	} foreach _movePosList;" \n
          "};" \n
          "" \n
          "//--- Delay" \n
          "if ((count _movePosList) != 0) then {" \n
          "	_timeNow = time;" \n
          "	_delay = 10 + random 10;" \n
          "} else {" \n
          "	_timeNow = time;" \n
          "	_delay = 1 + random 1;" \n
          "};"/*%FSM</STATEINIT""">*/;
         precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
         class Links
         {
           /*%FSM<LINK "Desync">*/
           class Desync
           {
             priority = 0.000000;
             to="Reset";
             precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
             condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
             action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
           };
           /*%FSM</LINK>*/
         };
       };
       /*%FSM</STATE>*/
       /*%FSM<STATE "Safe">*/
       class Safe
       {
         name = "Safe";
         init = /*%FSM<STATEINIT""">*/"{deletemarkerlocal _x} foreach _markers;" \n
          "" \n
          "//--- Move or wait" \n
          "_state = ""wait"";" \n
          "_ran = random 1;" \n
          "if (_ran <= _movePrefer) then {" \n
          "	_state = ""move"";" \n
          "	_movePosList = selectbestplaces [position _agent,_runDistanceMax,_expSafe,10,1];" \n
          "	if ((count _movePosList) != 0) then {" \n
          "		if ((_agent isKindOf ""Fish_Base_F"") || (_agent isKindOf ""Turtle_F"")) then {" \n
          "			_dest = getPosASL _agent;" \n
          "			if ((_dest select 2) > -1) then {" \n
          "				_agent setPos [_dest select 0, _dest select 1, -3]" \n
          "			};" \n
          "			if (({(getTerrainHeightASL (_x select 0)) < -2} count _movePosList) > 0) then {" \n
          "				_depth = 0;" \n
          "				_movePos = (_movePosList select (floor random (count _movePosList))) select 0;" \n
          "				_depth = getTerrainHeightASL _movePos;" \n
          "				while {_depth > -2} do {" \n
          "					_movePos = (_movePosList select (floor random (count _movePosList))) select 0;" \n
          "					_depth = getTerrainHeightASL _movePos;" \n
          "				};" \n
          "				_agentDepth = (position _agent) select 2;" \n
          "				_movePos = [_movePos select 0, _movePos select 1, (_agentDepth-1.5)+(random 3)];" \n
          "				_agent moveto _movePos;" \n
          "			};" \n
          "		} else {" \n
          "			_j = 0;" \n
          "			_movePos = (_movePosList select (floor random (count _movePosList))) select 0;" \n
          "" \n
          "			_water = surfaceIsWater _movePos;" \n
          "			while {_water} do {" \n
          "				_movePos = (_movePosList select (floor random (count _movePosList))) select 0;" \n
          "				_water = surfaceIsWater _movePos;" \n
          "			};" \n
          "			_agent moveto _movePos;" \n
          "	};" \n
          "};" \n
          "" \n
          "if (isNil ""_movepos"") then {" \n
          "	_movePos = getPos _agent;" \n
          "};" \n
          "" \n
          "//--- Delay" \n
          "_timeNow = time;" \n
          "_delay = 10 + random 10;"/*%FSM</STATEINIT""">*/;
         precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
         class Links
         {
           /*%FSM<LINK "Desync">*/
           class Desync
           {
             priority = 0.000000;
             to="Reset";
             precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
             condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
             action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
           };
           /*%FSM</LINK>*/
         };
       };
       /*%FSM</STATE>*/
       /*%FSM<STATE "Continue">*/
       class Continue
       {
         name = "Continue";
         init = /*%FSM<STATEINIT""">*/"if (_debug) then {{deletemarkerlocal _x} foreach _markers};"/*%FSM</STATEINIT""">*/;
         precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
         class Links
         {
           /*%FSM<LINK "Formation">*/
           class Formation
           {
             priority = 2.000000;
             to="Formation";
             precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
             condition=/*%FSM<CONDITION""">*/"_stateFormation > 0;"/*%FSM</CONDITION""">*/;
             action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
           };
           /*%FSM</LINK>*/
           /*%FSM<LINK "Danger">*/
           class Danger
           {
             priority = 1.000000;
             to="Danger";
             precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
             condition=/*%FSM<CONDITION""">*/"(_stateDanger > _dangerLimit) ||  (_stateScared > _scareLimit)"/*%FSM</CONDITION""">*/;
             action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
           };
           /*%FSM</LINK>*/
           /*%FSM<LINK "Safe">*/
           class Safe
           {
             priority = 0.000000;
             to="Safe";
             precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
             condition=/*%FSM<CONDITION""">*/"(_stateDanger < _dangerLimit) &&  (_stateScared < _scareLimit)"/*%FSM</CONDITION""">*/;
             action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
           };
           /*%FSM</LINK>*/
         };
       };
       /*%FSM</STATE>*/
       /*%FSM<STATE "Formation">*/
       class Formation
       {
         name = "Formation";
         init = /*%FSM<STATEINIT""">*/"_state = ""formation"";" \n
          "_formLeader = _animals select 0;" \n
          "_moveposNew = (expecteddestination _formLeader select 0);" \n
          "if (isNil ""_moveposNew"") then {" \n
          "	_leaderPos = getPos _formLeader;" \n
          "	_movePos = [(_leaderPos select 0)+(-5 + random 10),(_leaderPos select 1)+(-5 + random 10),0];" \n
          "	_agent moveto _movePos;" \n
          "};" \n
          "" \n
          "" \n
          "//--- Delay" \n
          "_timeNow = time;" \n
          "_delay = 10 + random 10;"/*%FSM</STATEINIT""">*/;
         precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
         class Links
         {
           /*%FSM<LINK "Desync">*/
           class Desync
           {
             priority = 0.000000;
             to="Reset";
             precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
             condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
             action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
           };
           /*%FSM</LINK>*/
         };
       };
       /*%FSM</STATE>*/
       /*%FSM<STATE "__3">*/
       class __3
       {
         name = "__3";
         init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
         precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
         class Links
         {
         };
       };
       /*%FSM</STATE>*/
     };
     initState="Init";
     finalStates[] =
     {
       "__3",
     };
    };
    /*%FSM</COMPILE>*/

    also my RPT is exploding to hundreds of megs with animals as described here: http://feedback.arma3.com/view.php?id=5897


  4. that's crazy, i made one about a month before this post:

    dllmain.cpp

    //DOA for Global Chaos Gaming <imagotrigger@gmail.com>
    #define WIN32_LEAN_AND_MEAN
    #include <time.h>
    #include <windows.h>
    #include <stdio.h>
    
    BOOL APIENTRY DllMain( HMODULE hModule, DWORD  ul_reason_for_call, LPVOID lpReserved)
    {
    switch (ul_reason_for_call)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
    	if (lpReserved != NULL) {
    		//arma2oaserver is shutdown
    	}
    	break;
    }
    return TRUE;
    }
    
    extern "C"
    {
     __declspec(dllexport) void __stdcall RVExtension(char *output, int outputSize, const char *function);
    };
    
    void __stdcall RVExtension(char *output, int outputSize, const char *function)
    {
    outputSize -= 1;
    if (!strcmp(function,"version")) {
    	strncpy(output,"gc.dll version 1.2 RAMdisk",outputSize);
    } else if(!strcmp(function,"epoch")) {
    	time_t ltime;
    	time( &ltime );
    	sprintf(output, "%ld", ltime );
    } else if(!strncmp(function,"W",1)) {
    	char input[8192] = "";
    	strcpy(input,function);
    	char * token = strtok( input, "|" );
    	char * pid = strtok( NULL, "|" );
    	char * name = strtok( NULL, "|" );
    	char *p1;
    	while((p1=strpbrk(name,"["))!=NULL)
           *p1='`';
    	char *p2;
    	while((p2=strpbrk(name,"]"))!=NULL)
           *p2='"';
    	char * key = strtok( NULL, "|" );
    	char * value = strtok( NULL, "|" );
    	char file[256] = "";
    	sprintf(file,"R:\\%s.ini",pid);
    	if (WritePrivateProfileStringA(name,key,value,file)) {
    		if (strcmp(pid,"__SERVER__") != 0) {
    			time_t ltime;
    			time( &ltime );
    			char ztime[128] = "";
    			sprintf(ztime, "%ld", ltime );
    			WritePrivateProfileStringA(".","TLS",ztime,file);
    		}
    		strncpy(output,"1",outputSize);
    	} else {
    		strncpy(output,"0",outputSize);
    	}
    } else if(!strncmp(function,"R",1)) {
    	char file[256] = "";
    	char input[8192] = "";
    	strcpy(input,function);
    	char * token = strtok( input, "|" );
    	char * pid = strtok( NULL, "|" );
    	char * name = strtok( NULL, "|" );
    	char *p1;
    	while((p1=strpbrk(name,"["))!=NULL)
           *p1='`';
    	char *p2;
    	while((p2=strpbrk(name,"]"))!=NULL)
           *p2='"';
    	char * key = strtok( NULL, "|" );
    	sprintf(file,"R:\\%s.ini",pid);
    	GetPrivateProfileStringA(name,key,NULL,output,outputSize,file);
    } else if(!strncmp(function,"D",1)) {
    	char input[8192] = "";
    	strcpy(input,function);
    	char * token = strtok( input, "|" );
    	char * pid = strtok( NULL, "|" );
    	char * key = strtok( NULL, "|" );
    	char file[256] = "";
    	sprintf(file,"R:\\%s.ini",pid);
    	WritePrivateProfileSectionA(key,NULL,file);
    } else {
       strncpy(output,"unknown function",outputSize);
    }
    }
    

    functions: "version" "epoch" "R" "W" and "D"

    example:

    _actual_server_time_in_seconds = "thedll" callExtension "epoch";

    _value_from_key_in_file = "thedll" callExtension format["R|%1|%2|%3","filename_wo_ini","section name in ini","key name"];

    _nothing = "thedll" callExtension format["W|%1|%2|%3|%4","filename_wo_ini","section name in ini","key name","value"];

    _nothing = "thedll" callExtension "D|filename_wo_ini|section_to_wipe_out";

    ---------- Post added at 13:59 ---------- Previous post was at 13:48 ----------

    here is code i use to save all weapons/ammon on ground and load it

    "gc" callExtension "D|__SERVER__|GC_WeaponHolders";
    _counter = 0;
    {
    _pos = getposASL _x;
    _dir = getdir _x;
    _weps = getWeaponCargo _x; 
    _mags = getMagazineCargo _x; 
    _class = typeof _x;
    _arr = [_pos,_dir,_weps,_mags,_class];
    "gc" callExtension format["W|%1|%2|%3|%4","__SERVER__","GC_WeaponHolders",_counter,_arr];
    _counter = _counter + 1;
    } foreach (worldCenterPosition nearObjects ["WeaponHolder", 8000]);
    diag_log text format["Wrote %1 dropped weapons/mags",_counter];

    //dropped weapons
    _counter = 0;
    while{true} do {
    _read = "gc" callExtension format["R|%1|%2|%3","__SERVER__","GC_WeaponHolders",_counter];
    if (_read == "") exitWith {};
    _read = call compile _read;
    _pos = _read select 0;
    _dir = _read select 1;
    _weps = _read select 2;
    _mags = _read select 3;
    _class = _read select 4;
    _code = "";
    if (count _weps > 0) then {
    	_weptypes = _weps select 0;
    	_wepcounts = _weps select 1;
    	{
    		_code = _code + format['this addweaponcargo ["%1",%2];',_x,(_wepcounts select _foreachindex)];
    	} foreach _weptypes;
    };
    if (count _mags > 0) then {
    	_magtypes = _mags select 0;
    	_magcounts = _mags select 1;
    	{
    		_code = _code + format['this addmagazinecargo ["%1",%2];',_x,(_magcounts select _foreachindex)];
    	} foreach _magtypes;
    };
    _holder = createVehicle [_class, _pos, [], 0, "CAN_COLLIDE"];
    diag_log _read;
    _holder setposASL _pos;
    _holder setdir _dir;
    _holder setVehicleInit format['%1',_code];
    processInitCommands;
    _counter = _counter + 1;
    };
    


  5. Read my brain dump here: http://www.armaservers.com/battleye/

    You're on your own for the most part, at least I didn't give you the whole Perl interpreter in an attempt to hide my shitty code!

    On a completely unrelated subject, this has nothing to do with that Python one. Everyone knows Perl is better than Python anyways :butbut:

    *let holy flame war ensue*

    oh and thanks BIS for the game

    and dev-heaven for the project hosting

    and battleye for the rcon protocol spec

    and GC for a kickass playground


  6. ... This new logging works well to the point i no longer need to use wireshark after all these years ...

    Wireshark/tcpdump is useless in 1.62 unless you could share how you are decoding the packets please.

    ... The filters look exactly the same as in the scripts.txt file ...

    If i make a scripts.txt with 1 "" in it, it does not work. If i make the new .txt files with 1 "" in it, it works.

    How can i make a scripts.txt that logs everything?


  7. I would also like to see more information regarding progress on the linux binary.

    We at the 15thMEU have re-provisioned one of our servers with Ubuntu 12.04. Although the binary, while it runs, is brilliant - it's nowhere near production quality.

    I'm seeing massively improved multithreading and a goodly reduction of network bandwidth as well as improved server FPS running complex missions - but the binary still cacks way too often.

    Bohemia - please. Let us know what's going on.

    - 1stSgt Reite

    15thMEU Realism Unit

    GCE BLT 2/4 [REIN]

    Echo Company HQ

    this.

    and fuck paypal

×