Jump to content

jacmac

Member
  • Content Count

    173
  • Joined

  • Last visited

  • Medals

  • Medals

Posts posted by jacmac


  1. HAHAHA, I'm a meat-head for trusting other player's typo infested typing in this forum. It is NOT "-name=HC -profiles=HC"! It should read "-name=HC -profile=HC". It seems to be connecting now... The problem below is bogus, but left for posterity.

    I can't get a headless client to work with Battleye.

    I connected from a PC via the GUI using the HC profile. Even though I had battleyeLicense=1; in the HC.Arma3Profile, I was still asked to accept the Battleye License terms. After that, I connected to my dedicated server, no problem. I exited and ran the headless client command line to join the same server using the same profile:

    arma3.exe -connect=10.2.2.16 -port=2400 -client -nosound  -password=xxxxxxxxxxxxx -name=HC -profiles=HC -mod=@blah;@blah;@blah....

    Here is the log from the server (GUI first, then exit and ran the command line):

    16:00:57 BattlEye Server: Player #0 HC (10.2.2.214:2304) connected
    16:00:57 Player HC connecting.
    16:00:58 BattlEye Server: Player #0 HC - GUID: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx9 (unverified)
    16:00:58 Player HC connected (id=xxxxxxxxxxxxxxxxxx4).
    16:00:58 BattlEye Server: Verified GUID (xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx9) of player #0 HC
    16:01:05 Player HC disconnected.
    16:01:05 BattlEye Server: Player #0 HC disconnected
    16:02:03 HC uses modified data file
    16:02:03 BattlEye Server: Player #0 HC (10.2.2.214:2402) connected
    16:02:03 Player HC connecting.
    16:02:35 Player  kicked off by BattlEye: Client not responding
    16:02:35 Player HC disconnected.
    

    One thing I noticed in the log is that the message for the kick says "Player kicked off by BattlEye: Client not responding" rather than "Player HC kicked off by BattlEye: Client not responding". I don't know if that means anything or not.

    This is all that the client displays:

    16:02:05 Dedicated client created.

    There is something missing from what is generally known about setting up a headless client. So far I've checked the following:

    • battleyeLicense=1; in the server's config as well as the HC.Arma3Profile
    • Battleye client and server dlls are in every conceivable place they could be read
    • The client and server are two different machines in this case, but I changed the steamports in the server's config anyway


  2. In 2002 Suma said of the Desync value:

    It is a kind of metrics of "out-of-sync" status. The smaller, the better.

    Does anyone know how it is calculated? The max value seems to be 100,000, which I saw another player have last night during a mission. The desync values each player showed fluctuated wildly, 0 or very small numbers all the way up into the 5000-10000 range when combat action began taking place. It is a dedicated server with about 1.5Mbps up and 15Mbps down. There were only 9 clients connected.


  3. Reveal goes up, but not down, and I'm not sure about sideways (reveal times out). You might try:

    {player reveal [_x, (1.5 + (time * .0001))]}foreach allUnits;

    This keeps the reveal incrementing by a small amount as time goes by. However, I don't know if this will have a material effect on what you are seeing and after thousands of seconds, you will max out the reveal value anyway.


  4. You are in luck because "magazinesAmmo vehicle" will return an array of all magazines and their ammo counts. Also check magazinesAmmoFull and magazinesTurret. This used to be a near impossible task. You can look up the vehicle's config for magazines and the vehicle's turrets for magazines and then look up the magazines themselves to find the max ammo counts.

    When you setVehicleAmmo 1, you are basically saying to fill the vehicle and all turrets with the default ammo for that vehicle's config. If you setVehicleAmmo 0.5, I guess you would probably end up with half ammo for each magazine type in that vehicle's config, but I'm not sure how it reacts.


  5. Observer C Hotel 1-3:1 (Playername) REMOTE (civ_24) in cargo of C Hotel 1-3:1 (Playername) REMOTE (civ_24); message was repeated in last 60 sec: 34517

    If

    "message was repeated in last 60 sec: 34517" == 34517 messages in 60 seconds

    Then you have a process that is death looping. You are spawning a message, that is spawning a message, that is spawning a message, etc. Infinite recursion.

    http://upload.wikimedia.org/wikipedia/commons/b/b3/Screenshot_Recursion_via_vlc.png (367 kB)


  6. So instead of

    if (((vehicle player) != player) and (alive player)) then {

    You would do

    if (((vehicle player) != player) and (alive player) and ((_this select 1) != "cargo")) then {

    If you want players to be able to enter a vehicle in a cargo position. Keep in mind that if the game allows switching positions from cargo to pilot, then you have to handle that. You can also create different event handlers for different vehicle types. The test script I posted goes through all vehicles regardless of type, but you could create a dozen event handlers for various vehicles with different rules for each.


  7. OK, I got home and tested the idea out and this works. It's heavy handed, but it will give you an idea on how to deal with the situation. You would need to manage the variable WhiteListArray as a public variable and make sure that the player got the variable before adding the event handlers to the vehicles in an MP mission. This means something like

    WhiteListArray = [];
    waituntil {WhiteListArray != []};

    You need a server side script that publicVariable's WhiteListArray on player connected. The downside I can see is having to manage users in a static mission file; who wants to do that? You can also use player UIDs with 'getPlayerUID player' instead of 'name vehicle player' which is probably slightly better in making it difficult to bypass.

    Create an init.sqf file for a test mission and add this code:

    waitUntil {!isNull player};
    WhiteListArray = [];
    sleep 1;
    systemChat name vehicle player;
    //Assuming WhiteListArray contains a list of player names that are allowed to enter vehicles 
    { 
    if (WhiteListArray find (name vehicle player) == -1) then {
    	_x addEventHandler ["GetIn", { 
           if (((vehicle player) != player) and (alive player)) then { 
               player action ["eject", vehicle player]; 
           }; 
           hint "You aren't authorized."; 
       }]; 
    };
    } foreach entities "AllVehicles"; 

    Then try:

    waitUntil {!isNull player};
    WhiteListArray = ["Your playername"];
    sleep 1;
    systemChat name vehicle player;
    //Assuming WhiteListArray contains a list of player names that are allowed to enter vehicles 
    { 
    if (WhiteListArray find (name vehicle player) == -1) then {
    	_x addEventHandler ["GetIn", { 
           if (((vehicle player) != player) and (alive player)) then { 
               player action ["eject", vehicle player]; 
           }; 
           hint "You aren't authorized."; 
       }]; 
    };
    } foreach entities "AllVehicles"; 


  8. here is a very authoritarian, yet zen like example. You can, of course, adjust the logic to permit some vehicle type if you want to be less restrictive.

    //Assuming WhiteListArray contains a list of player names that are allowed to enter vehicles
    if (isPlayer and !(WhiteListArray find (name vehicle player)) {
    player addEventHandler ["GetOut", {
    	if ((vehicle player) != player and alive player) {
    		player action ["eject", vehicle player];
    	};
    	hint "You aren't authorized to be outside of yourself unless you are dead.";
    }];
    };


  9. I'm looking for something that can ... prevents access to a certain area if you're not on the white-list (vehicle bays for example).

    This is a good idea and very easy to do. For one thing, managing an area trigger is a whole lot less processing than having each player check every half second if they are in a vehicle. Another way to do this would be addEventHandler, where non-whitelisted players get an event handler at JIP or mission start to boot them from non-qualified vehicles if they get in the driver or pilot/co-pilot position. Players that are authorized simply don't get the event handler in the first place.

    I should add that I hate these type of servers where access is restricted, but I understand why admins do it.


  10. Jacmac Thanks for the reply, but

    I had seen this procedure and error really is no longer shown. Now when you enter the game and load the mission, the hud to use the lift of the helicopter does not appear, why is this function that uses RscTitles.

    I am in search to find the solution. Thanks for all the help.

    The HUD you are referring to must be using a display definition in RscTitles. GVS uses RscTitles and apparently so does BTC Revive. To integrate all of these, there are a couple of things to do and check.

    First make sure there is exactly one definition for RscTitles, and this means checking all hpp files included in description.ext. The method I put in the documentation from Domination is the best way I have seen so far to integrate multiple scripts that use RscTitles. It does mean that you need to possibly alter hpp files or the way the display controls have been defined. The main point is that there can be only one "class RscTitles". There can be virtually unlimited display controls defined as long as the names are unique, but only one RscTitles.

    Second, use of cutRsc without a layer number should be banned. Unfortunately, many scripts don't use a layer number because the script creators don't understand the arcane science of RscTitles. I didn't understand them for a long time until I picked apart a mission that had complex usage integrated into it. There is also the possibility of two different scripts using the same layer number(s). You have to search the script code for cutRsc and make sure the number (if any) preceding cutRsc (the layer number) does not conflict with someone else's script or your own script (if you are also using RscTitles). If you find cutRsc with no layer number in two different scripts you are integrating into your mission, there is a good chance they will interfere with each other, meaning that while one is displaying, the other will disappear. Each layer can have one display control displaying at a time and this includes a blanking control! A true one time display, such as an opening title can perhaps be forgiven, but a persistent display on the default layer of cutRsc should be a considered a sin. If I could get a biki account, I would udpate the documentation to be more clear about all of this.


  11. From the documentation:

    Display Information:
    GVS uses RscTitles for the information display. It is very possible that missions you try to integrate GVS into will also
    use RscTitles. By default layer 301 is used for GVS, you can change it if you happen to be using 301 already, numbers in 
    the tens of thousands have been tested successfully. 
    
    If you integrate GVS into a mission that is already utilizing RscTitles, for example "Domination", you will have to integrate
    the display class definitions. For example, in the Domination description.ext consider the following code:
    
    class RscTitles {
    #include "x_dlg\RscTitles.hpp"
    #include "gvs\stc_include_alt.hpp" //Alternative display class definitions
    };

    I don't know what BTC revive developers did, but the way Domination has declared RscTitles is the way to go. I included an alternative form of the display definitions specifically because different scripts using RscTitles can and will interfere with each other. If somebody wants to propose an informal standard for declarations, I'm all for it. I think the Domination method is a good way to do it


  12. I fail at createTrigger, I now realize they must be created locally. I'll update the download to E.

    If you already downloaded version D, replace the gvs_triggers.sqf with this code:

    /*=================================================================================================================
     GVS Triggers by Jacmac
    
     Version History:
     A - Initial Release 10/13/2013
     B - Removed isServer checks on trigger creation 10/13/2013
    
     Requirements:
     Called once from gvs_init.sqf on startup.
    
     Features:
     -Generates GVS Triggers for Ground Vehicles, Helecopters, and Planes
     -Generates Event handlers for display of the trigger locations when a player is within a vehicle
    
     Notes:
     Trigger location display is:
     Null on foot
     500 meters in Ground Vehicles
     1K in Helecopters
     2K in Planes
    
     The trigger variables can be adjusted, but keep in mind that sounds are fixed in duration, so adjusting a
     a setting like _veh_per_fuel_time to some value other than 2 seconds will throw off the sound loop. Sounds
     for ammo or repair ar not so much affected but times that are too low, may cause sounds to play on top of
     each other.
    
    =================================================================================================================*/
    
    //The variables below can be adjusted with caution
    _veh_trigger_diameter = 8;
    _hel_trigger_diameter = 10;
    _pla_trigger_diameter = 12;
    
    _veh_maxDistance = 6;		//distance from trigger that will cause abort
    _veh_maxHeight = 1;			//height above trigger that will cause abort
    _veh_serviceStartDelay = 8; //seconds before service starts (can abort in this time)
    _veh_per_fuel_time = 2;		//seconds per percent of fuel
    _veh_per_repair_time = 6;	//seconds per percent of repair
    _veh_per_magazine_time = 8;	//seconds per magazine reload
    
    _hel_maxDistance = 8;
    _hel_maxHeight = 4;
    _hel_serviceStartDelay = 8;
    _hel_per_fuel_time = 2;
    _hel_per_repair_time = 6;
    _hel_per_magazine_time = 8;
    
    _pla_maxDistance = 10;
    _pla_maxHeight = 6;
    _pla_serviceStartDelay = 10;
    _pla_per_fuel_time = 2;
    _pla_per_repair_time = 6;
    _pla_per_magazine_time = 8;
    
    //Do not adjust below here, unless you know what you're doing...
    _veh = 0;
    _hel = 0;
    _pla = 0;
    {
    _marker = _x;
    _marPos = getMarkerPos _marker;
    
    if (([_x, "gvs_veh"] call String_Search) == 0) then
    {
    	if (isNil (format ["Public_gvs_veh_%1", _veh])) then {call compile format ["Public_gvs_veh_%1 = 0", _veh]};
    
           call compile format ["addMissionEventHandler [""Draw3D"", {
               _pos = getMarkerPos ""%1"";
               _distp = player distance _pos;
               if (_distp < 500 and (vehicle player isKindOf ""LandVehicle"")) then {
                   _scale = 0.0251 - (_distp / 20000);
                   _pos set [2, 2 + (_distp * 0.05)];
                   _alpha = _distp / 500;
                   _texture = format [""#(rgb,1,1,1)color(0.5,0.5,0.5,%2)"", _alpha];
                   _texture = ""\A3\ui_f\data\map\markers\nato\b_armor.paa"";
                   if (_distp < 250) then {
                       _alpha = 1.001 - (_distp / 500);
                   };
                   _color = [0.85,0.65,0.13,_alpha];
                   drawIcon3D [_texture, _color, _pos, 0.5, 0.5, 0, ""Ground Vehicle Service"", 1, _scale, ""TahomaB""];
               };
           }];", _marker, "%1"];  
    
    	_con = format ["Public_gvs_veh_%1 == 0 and ({player == driver _x and _x isKindOf ""LandVehicle""} count thislist == 1)", _veh];
    	_act = format ["Public_gvs_veh_%1 = 1; publicVariable ""Public_gvs_veh_%1""; _nul = [""Public_gvs_veh_%1"", thislist, getPos thisTrigger, %2, %3, %4, %5, %6, %7] execVM ""gvs\generic_vehicle_service.sqf""", _veh, _veh_maxDistance, _veh_maxHeight, _veh_serviceStartDelay, _veh_per_fuel_time, _veh_per_repair_time, _veh_per_magazine_time];
    	_trg = createTrigger["EmptyDetector", _marPos];
    	_trg setTriggerArea[_veh_trigger_diameter, _veh_trigger_diameter, 0, false];
    	_trg setTriggerActivation["ANY", "PRESENT", true];
    	_trg setTriggerStatements[_con, _act, ""];
    
    	_veh = _veh + 1;	
    };
    
    if (([_x, "gvs_hel"] call String_Search) == 0) then
    {
    	if (isNil (format ["Public_gvs_hel_%1", _hel])) then {call compile format ["Public_gvs_hel_%1 = 0", _hel]};
    
           call compile format ["addMissionEventHandler [""Draw3D"", {
               _pos = getMarkerPos ""%1"";
               _distp = player distance _pos;
               if (_distp < 1000 and (vehicle player isKindOf ""Helicopter"")) then {
                   _scale = 0.0201 - (_distp / 50000);
                   _pos set [2, 2 + (_distp * 0.05)];
                   _alpha = _distp / 500;
                   _texture = format [""#(rgb,1,1,1)color(0.5,0.5,0.5,%2)"", _alpha];
                   _texture = ""\A3\ui_f\data\map\markers\nato\b_air.paa"";
                   if (_distp < 500) then {
                       _alpha = 1.001 - (_distp / 1000);
                   };
                   _color = [0.25,0.50,0.10,_alpha];
                   drawIcon3D [_texture, _color, _pos, 0.5, 0.5, 0, ""Helicopter Service"", 1, _scale, ""TahomaB""];
               };
           }];", _marker, "%1"];  
    
    	_con = format ["Public_gvs_hel_%1 == 0 and ({player == driver _x and _x isKindOf ""Helicopter""} count thislist == 1)", _hel];
    	_act = format ["Public_gvs_hel_%1 = 1; publicVariable ""Public_gvs_hel_%1""; _nul = [""Public_gvs_hel_%1"", thislist, getPos thisTrigger, %2, %3, %4, %5, %6, %7] execVM ""gvs\generic_vehicle_service.sqf""", _hel, _hel_maxDistance, _hel_maxHeight, _hel_serviceStartDelay, _hel_per_fuel_time, _hel_per_repair_time, _hel_per_magazine_time];
    	_trg = createTrigger["EmptyDetector", _marPos];
    	_trg setTriggerArea[_hel_trigger_diameter, _hel_trigger_diameter, 0, false];
    	_trg setTriggerActivation["ANY", "PRESENT", true];
    	_trg setTriggerStatements[_con, _act, ""];	
    
    	_hel = _hel + 1;	
    };	
    
    if (([_x, "gvs_pla"] call String_Search) == 0) then
    {
    	if (isNil (format ["Public_gvs_pla_%1", _pla])) then {call compile format ["Public_gvs_pla_%1 = 0", _pla]};
    
           call compile format ["addMissionEventHandler [""Draw3D"", {
               _pos = getMarkerPos ""%1"";
               _distp = player distance _pos;
               if (_distp < 2000 and (vehicle player isKindOf ""Plane"")) then {
                   _scale = 0.0201 - (_distp / 100000);
                   _pos set [2, 2 + (_distp * 0.05)];
                   _alpha = _distp / 2000;
                   _texture = format [""#(rgb,1,1,1)color(0.5,0.5,0.5,%2)"", _alpha];
                   _texture = ""\A3\ui_f\data\map\markers\nato\b_plane.paa"";
                   if (_distp < 1000) then {
                       _alpha = 1.001 - (_distp / 2000);
                   };
                   _color = [0.80,0.20,0.05,_alpha];
                   drawIcon3D [_texture, _color, _pos, 0.5, 0.5, 0, ""Plane Service"", 1, _scale, ""TahomaB""];
               };
           }];", _marker, "%1"];  
    
    	_con = format ["Public_gvs_pla_%1 == 0 and ({player == driver _x and _x isKindOf ""Plane""} count thislist == 1)", _pla];
    	_act = format ["Public_gvs_pla_%1 = 1; publicVariable ""Public_gvs_pla_%1""; _nul = [""Public_gvs_pla_%1"", thislist, getPos thisTrigger, %2, %3, %4, %5, %6, %7] execVM ""gvs\generic_vehicle_service.sqf""", _pla, _pla_maxDistance, _pla_maxHeight, _pla_serviceStartDelay, _pla_per_fuel_time, _pla_per_repair_time, _pla_per_magazine_time];
    	_trg = createTrigger["EmptyDetector", _marPos];
    	_trg setTriggerArea[_pla_trigger_diameter, _pla_trigger_diameter, 0, false];
    	_trg setTriggerActivation["ANY", "PRESENT", true];
    	_trg setTriggerStatements[_con, _act, ""];	
    
    	_pla = _pla + 1;	
    };	
    }forEach allMapMarkers;

×