Jump to content

shurix

Member
  • Posts

    119
  • Joined

  • Last visited

Posts posted by shurix

  1. This may be a new feature in 0.3.7 as I did not see it in 0.3.5.

     

    It looks like there is a check on the mission startup for any heavy armor on the map. If present, the message shows. I did not see the message for a while after a database wipe. Now it's back.

     

    When I see the message, I press [ESC] + [`] + [`] and then it goes away. There's gotta be a mission setting for this but because RHS http://doc.rhsmods.org/is offline there is no way to find out.

     

    I also noticed that on server restart all RHS armor is fully repaired. Must be another "feature". 

  2. Hi All,

     

    I'm using the latest RHS Escalation mod on my server and I get a message every time my client connects saying that I need to disable Extended Armor in Game Difficulty settings otherwise tanks are indestructible. I'm not using tanks on my server but once in a while I enjoy a ride on BTR-70.

     

    Anyways, I cannot get the annoying message to go away even though I disabled Extended Armor under every Difficulty profile as per this message http://forums.bistudio.com/showthread.php?184842-RHS-Escalation-(AFRF-and-USAF)-Release-0-3-7-(UPDATED)&p=2854470&viewfull=1#post2854470

     

    I also added:

     
    //check if "Enhanced Armor" is enabled
    hint str(difficultyEnabled "armor");
     
    into my mission file and I see "true" every time I log in. Seems like something is changing "Extended Armor" setting to Enabled when my Epoch client loads.
     
    Any idea what this may be?
  3. I updated a3_epoch_server\compile\epoch_vehicle\EPOCH_load_vehicles.sqf with:

     

    //_vehicle enableSimulationGlobal false;

     

    I then started my server and tried getting into 20 or so different helis - NO BOOM!

     

    I'll run this updated script on my production server and see if if helps. I also did not notice any drop in FPS.

     

    Edit: I tried getting into the pilot seat of Mi-8T (RHS), Taru, M900, and multiple Hummingbirds. Still no boom!

  4. I made a couple of a3_epoch_server changes and it works ok now.

     

    At the bottom of EPOCH_load_vehicles.sqf I added

    EPOCH_VehicleSlotsLimit = count _allVehicles;

     

    and in the middle of server_init.sqf I changed the line that loads vehicles from the database effectively increasing the max number of vehicles to load up to the current storage limit (1500 in my case)

    diag_log "Epoch: Loading vehicles";
    //_workload2=EPOCH_VehicleSlotsLimit spawn EPOCH_load_vehicles;
    _workload2=EPOCH_StorageSlotsLimit spawn EPOCH_load_vehicles;
     
    I'm using the following script to save mission vehicles into the database:

    private ['_velimit','_isAir','_isShip','_position','_dir','_marker','_vehObj','_slot','_vehClass','_colors','_color','_config','_selections','_textures','_forEachIndex','_textureSelectionIndex','_vehicleFound','_randomVehicleIndex','_randomVehicle','_vehicleCount','_count'];



    _instanceID = call EPOCH_fn_InstanceID;
    diag_log format["WAI: _instanceID:%1",_instanceID];
    diag_log format["WAI: initial EPOCH_VehicleSlotsLimit:%1",EPOCH_VehicleSlotsLimit];
    diag_log format["WAI: initial EPOCH_VehicleSlotCount:%1",EPOCH_VehicleSlotCount];
    diag_log format["WAI: initial EPOCH_VehicleSlots:%1",EPOCH_VehicleSlots];

    _vehObj = _this;

    _vehObj setVariable["LASTLOGOUT_EPOCH",1000000000000];
    _vehObj setVariable["LAST_CHECK",1000000000000];

    _vehClass = typeOf _vehObj;

    EPOCH_VehicleSlotsLimit = EPOCH_VehicleSlotsLimit + 1;
    EPOCH_VehicleSlots pushBack str(EPOCH_VehicleSlotsLimit);
    _slot = EPOCH_VehicleSlots select 0;

    diag_log format["WAI: _slot=%1",_slot];

    _vehObj setVariable['VEHICLE_SLOT',_slot,true];
    EPOCH_VehicleSlots = EPOCH_VehicleSlots - [_slot];
    EPOCH_VehicleSlotCount = count EPOCH_VehicleSlots;
    publicVariable 'EPOCH_VehicleSlotCount';

    diag_log format["WAI: new EPOCH_VehicleSlotsLimit:%1",EPOCH_VehicleSlotsLimit];
    diag_log format["WAI: new EPOCH_VehicleSlotCount:%1",EPOCH_VehicleSlotCount];
    diag_log format["WAI: new EPOCH_VehicleSlots:%1",EPOCH_VehicleSlots];

    _config = (configFile >> 'CfgVehicles' >> _vehClass >> 'availableColors');
    if(isArray(_config)) then{
    _textureSelectionIndex = configFile >> 'CfgVehicles' >> _vehClass >> 'textureSelectionIndex';
    _selections = if(isArray(_textureSelectionIndex)) then {
    getArray(_textureSelectionIndex)
    } else { [0] };
    _colors = getArray(_config);
    _textures = _colors select 0;
    _color = floor (random (count _textures));
    _count = (count _colors)-1;
    {
    if(_count >= _forEachIndex) then {
    _textures = _colors select _forEachIndex;
    };
    _vehObj setObjectTextureGlobal [_x, (_textures select _color)];
    } forEach _selections;
    _vehObj setVariable['VEHICLE_TEXTURE',_color];
    };

    _vehObj call EPOCH_server_setVToken;


    clearWeaponCargoGlobal _vehObj;
    clearMagazineCargoGlobal _vehObj;
    clearBackpackCargoGlobal _vehObj;
    clearItemCargoGlobal _vehObj;

    // if(!isNull _vehObj) then {
    // _aa=_vehObj;
    // // _ac=_vehObj getVariable["VEHICLE_SLOT","ABORT"];
    // // if(_ac !="ABORT")then{
    // _ad=format["%1:%2",_instanceID,_slot];
    // _aj=[];
    // _ak=_aa call EPOCH_getHitpoints;
    // {
    // _aj pushBack(_aa getHitPointDamage _x);
    // }forEach _ak;
    // _wepsItemsCargo=weaponsItemsCargo _aa;
    // if(isNil "_wepsItemsCargo")then{
    // _wepsItemsCargo=[];
    // };
    // _magsAmmoCargo=magazinesAmmoCargo _aa;
    // if(isNil "_magsAmmoCargo")then{
    // _magsAmmoCargo=[];
    // };
    // _aq=[[],[]];
    // {
    // _ar=_aq find(_x select 0);
    // if(_ar >=0)then{
    // (_aq select 1)set[_ar,((_aq select 1)select _ar)+(_x select 1)];}
    // else{(_aq select 0)pushBack(_x select 0);(_aq select 1)pushBack(_x select 1);};
    // }forEach _magsAmmoCargo;
    // _al=[_wepsItemsCargo,_aq,getBackpackCargo _aa,getItemCargo _aa];
    // _ap=_aa getVariable["VEHICLE_TEXTURE",0];
    // _am=[typeOf _aa,[getposATL _aa,vectordir _aa,vectorup _aa],damage _aa,_aj,fuel _aa,_al,magazinesAmmo _aa,_ap];
    // ["Vehicle",_ad,EPOCH_expiresVehicle,_am] call EPOCH_server_hiveSETEX;
    // //};
    // };

    _vehObj call EPOCH_server_save_vehicle;
    _vehObj call EPOCH_server_vehicleInit;

  5. Both scripts that I posted earlier save vehicles into the database. The problems start when all vehicle slots from epochconfig file are filled and there are no empty slots left. At that point the following script doesn't seem to work properly.

    EPOCH_VehicleSlotsLimit = EPOCH_VehicleSlotsLimit + 1;
    EPOCH_VehicleSlots pushBack str(EPOCH_VehicleSlotsLimit);
    _slot = EPOCH_VehicleSlots= select 0;
    
    diag_log format["WAI: _slot=%1",_slot];
    	
    _vehObj setVariable['VEHICLE_SLOT',_slot,true];
    EPOCH_VehicleSlots = EPOCH_VehicleSlots - [_slot];
    EPOCH_VehicleSlotCount = count EPOCH_VehicleSlots;
    publicVariable 'EPOCH_VehicleSlotCount';
    

    This is an extract from my log file. As you can see I'm getting new slots created and the vehicles are actually being saved into the database. I know because I downloaded and opened my database file.

    20:07:39 "WAI: Spawning a B_Heli_Light_01_armed_F with 10 units to be paradropped at [22268,19879.4,0.001]"
    20:07:39 "WAI: found Turrets [] in B_Heli_Light_01_armed_F"
    20:07:40 "WAI Perm Sector B: _countVeh5:0 _countVeh6:0"
    20:07:40 "WAI Perm Sector B: Armed Vehicle spawned a B_G_Offroad_01_armed_F"
    20:07:40 "WAI Perm Sector B: Repair Vehicle spawned a rhs_prp3_vdv"
    20:07:40 "WAI: _instanceID:7545"
    20:07:40 "WAI: initial EPOCH_VehicleSlotsLimit:267"
    20:07:40 "WAI: initial EPOCH_VehicleSlotCount:0"
    20:07:40 "WAI: initial EPOCH_VehicleSlots:[]"
    20:07:40 "WAI: _slot=268"
    20:07:40 "WAI: new EPOCH_VehicleSlotsLimit:268"
    20:07:40 "WAI: new EPOCH_VehicleSlotCount:0"
    20:07:40 "WAI: new EPOCH_VehicleSlots:[]"
    20:07:40 "WAI: _instanceID:7545"
    20:07:40 "WAI: initial EPOCH_VehicleSlotsLimit:268"
    20:07:40 "WAI: initial EPOCH_VehicleSlotCount:0"
    20:07:40 "WAI: initial EPOCH_VehicleSlots:[]"
    20:07:40 "WAI: _slot=269"
    20:07:40 "WAI: new EPOCH_VehicleSlotsLimit:269"
    20:07:40 "WAI: new EPOCH_VehicleSlotCount:0"
    20:07:40 "WAI: new EPOCH_VehicleSlots:[]"
    20:07:40 "WAI: _instanceID:7545"
    20:07:40 "WAI: initial EPOCH_VehicleSlotsLimit:269"
    20:07:40 "WAI: initial EPOCH_VehicleSlotCount:0"
    20:07:40 "WAI: initial EPOCH_VehicleSlots:[]"
    20:07:40 "WAI: _slot=270"
    20:07:40 "WAI: new EPOCH_VehicleSlotsLimit:270"
    20:07:40 "WAI: new EPOCH_VehicleSlotCount:0"
    20:07:40 "WAI: new EPOCH_VehicleSlots:[]"
    20:07:40 "WAI: _instanceID:7545"
    20:07:40 "WAI: initial EPOCH_VehicleSlotsLimit:270"
    20:07:40 "WAI: initial EPOCH_VehicleSlotCount:0"
    20:07:40 "WAI: initial EPOCH_VehicleSlots:[]"
    20:07:40 "WAI: _slot=271"
    20:07:40 "WAI: new EPOCH_VehicleSlotsLimit:271"
    20:07:40 "WAI: new EPOCH_VehicleSlotCount:0"
    20:07:40 "WAI: new EPOCH_VehicleSlots:[]"
    20:07:45 "WAI Perm: Sector B Ended At [22268,19879.4,0.001]"
    

    The weirdest thing happens after the restart. All newly created vehicles are gone!

     

    Does anyone have any ideas what may have caused it. Is there a hard limit in Epoch for number of vehicles?

  6. Does anyone have it working on a fully populated server with EPOCH_VehicleSlots=[] (zero empty slots)
    to save a new mission vehicle to the database?
     
    I'm getting the new vehicles recorded into the database, but after the restart my vehicle disappear (???).

     

    private ['_velimit','_isAir','_isShip','_position','_dir','_marker','_vehObj','_slot','_vehClass','_colors','_color','_config','_selections','_textures','_forEachIndex','_textureSelectionIndex','_vehicleFound','_randomVehicleIndex','_randomVehicle','_vehicleCount','_count'];



    _instanceID = call EPOCH_fn_InstanceID;
    diag_log format["WAI: _instanceID:%1",_instanceID];
    diag_log format["WAI: initial EPOCH_VehicleSlotsLimit:%1",EPOCH_VehicleSlotsLimit];
    diag_log format["WAI: initial EPOCH_VehicleSlotCount:%1",EPOCH_VehicleSlotCount];
    diag_log format["WAI: initial EPOCH_VehicleSlots:%1",EPOCH_VehicleSlots];

    _vehObj = _this;

    _vehObj setVariable["LASTLOGOUT_EPOCH",1000000000000];
    _vehObj setVariable["LAST_CHECK",1000000000000];

    _vehClass = typeOf _vehObj;

    EPOCH_VehicleSlotsLimit = EPOCH_VehicleSlotsLimit + 1;
    EPOCH_VehicleSlots pushBack str(EPOCH_VehicleSlotsLimit);
    _slot = EPOCH_VehicleSlots= select 0;

    diag_log format["WAI: _slot=%1",_slot];

    _vehObj setVariable['VEHICLE_SLOT',_slot,true];
    EPOCH_VehicleSlots = EPOCH_VehicleSlots - [_slot];
    EPOCH_VehicleSlotCount = count EPOCH_VehicleSlots;
    publicVariable 'EPOCH_VehicleSlotCount';

    diag_log format["WAI: new EPOCH_VehicleSlotsLimit:%1",EPOCH_VehicleSlotsLimit];
    diag_log format["WAI: new EPOCH_VehicleSlotCount:%1",EPOCH_VehicleSlotCount];
    diag_log format["WAI: new EPOCH_VehicleSlots:%1",EPOCH_VehicleSlots];

    _config = (configFile >> 'CfgVehicles' >> _vehClass >> 'availableColors');
    if(isArray(_config)) then{
    _textureSelectionIndex = configFile >> 'CfgVehicles' >> _vehClass >> 'textureSelectionIndex';
    _selections = if(isArray(_textureSelectionIndex)) then {
    getArray(_textureSelectionIndex)
    } else { [0] };
    _colors = getArray(_config);
    _textures = _colors select 0;
    _color = floor (random (count _textures));
    _count = (count _colors)-1;
    {
    if(_count >= _forEachIndex) then {
    _textures = _colors select _forEachIndex;
    };
    _vehObj setObjectTextureGlobal [_x, (_textures select _color)];
    } forEach _selections;
    _vehObj setVariable['VEHICLE_TEXTURE',_color];
    };

    _vehObj call EPOCH_server_setVToken;


    clearWeaponCargoGlobal _vehObj;
    clearMagazineCargoGlobal _vehObj;
    clearBackpackCargoGlobal _vehObj;
    clearItemCargoGlobal _vehObj;

    // if(!isNull _vehObj) then {
    // _aa=_vehObj;
    // // _ac=_vehObj getVariable["VEHICLE_SLOT","ABORT"];
    // // if(_ac !="ABORT")then{
    // _ad=format["%1:%2",_instanceID,_slot];
    // _aj=[];
    // _ak=_aa call EPOCH_getHitpoints;
    // {
    // _aj pushBack(_aa getHitPointDamage _x);
    // }forEach _ak;
    // _wepsItemsCargo=weaponsItemsCargo _aa;
    // if(isNil "_wepsItemsCargo")then{
    // _wepsItemsCargo=[];
    // };
    // _magsAmmoCargo=magazinesAmmoCargo _aa;
    // if(isNil "_magsAmmoCargo")then{
    // _magsAmmoCargo=[];
    // };
    // _aq=[[],[]];
    // {
    // _ar=_aq find(_x select 0);
    // if(_ar >=0)then{
    // (_aq select 1)set[_ar,((_aq select 1)select _ar)+(_x select 1)];}
    // else{(_aq select 0)pushBack(_x select 0);(_aq select 1)pushBack(_x select 1);};
    // }forEach _magsAmmoCargo;
    // _al=[_wepsItemsCargo,_aq,getBackpackCargo _aa,getItemCargo _aa];
    // _ap=_aa getVariable["VEHICLE_TEXTURE",0];
    // _am=[typeOf _aa,[getposATL _aa,vectordir _aa,vectorup _aa],damage _aa,_aj,fuel _aa,_al,magazinesAmmo _aa,_ap];
    // ["Vehicle",_ad,EPOCH_expiresVehicle,_am] call EPOCH_server_hiveSETEX;
    // //};
    // };

    _vehObj call EPOCH_server_save_vehicle;

    _vehObj call EPOCH_server_vehicleInit;

     

    another option I'm running on my Production server is to find a Kart or a Boat to replace it with my custom vehicle in the database. This works, but I'm running out of Karts :(

    _instanceID = call EPOCH_fn_InstanceID;


    diag_log format["WAI: _instanceID:%1",_instanceID];
    diag_log format["WAI: EPOCH_VehicleSlotCount:%1",EPOCH_VehicleSlotCount];
    diag_log format["WAI: EPOCH_VehicleSlots:%1",EPOCH_VehicleSlots];
    // _allowedVehicleList = EPOCH_allowedVehiclesList;
    // diag_log format["WAI: EPOCH_allowedVehiclesList:%1",_allowedVehicleList];
    _vehObj = _this;
    _randomVehicleIndex = -1;

    if (EPOCH_VehicleSlotCount==0) then {

    if (!isNil "EPOCH_allowedVehiclesList") then {
    _countAllowedVeh=count EPOCH_allowedVehiclesList;
    _randomVehicleIndex=floor(random(_countAllowedVeh));
    _randomVehicle=EPOCH_allowedVehiclesList select _randomVehicleIndex;
    _vehClass=_randomVehicle select 0;
    _velimit=_randomVehicle select 1;
    _vehicleCount={typeOf _x==_vehClass}count vehicles;
    if(_vehicleCount >=_velimit)then{
    EPOCH_allowedVehiclesList deleteAt _randomVehicleIndex;
    } else {
    if(_vehicleCount==(_velimit-1))then{
    EPOCH_allowedVehiclesList deleteAt _randomVehicleIndex;
    };
    };
    } else {
    _vehlist = nearestObjects [getMarkerPos "center", ["C_Rubberboat_EPOCH","C_Rubberboat_02_EPOCH","C_Rubberboat_03_EPOCH","C_Rubberboat_04_EPOCH""C_Boat_Civil_01_EPOCH","K01","K02","K03","K04","jetski_epoch"], 10000];
    diag_log format["WAI: count _vehlist:%1 | _randomVehicle:%2",count _vehlist,_vehlist select 0];
    _vehToDelete = _vehlist select 0;
    _randomVehicleIndex = _vehToDelete getVariable["VEHICLE_SLOT","ABORT"];
    deleteVehicle _vehToDelete;
    };

    };
    _slot = "";
    if !(EPOCH_VehicleSlots isEqualTo[]) then {
    _slot = EPOCH_VehicleSlots select 0;
    EPOCH_VehicleSlots = EPOCH_VehicleSlots - [_slot];
    EPOCH_VehicleSlotCount = count EPOCH_VehicleSlots;
    publicVariable 'EPOCH_VehicleSlotCount';
    } else {
    diag_log format["WAI: _slot = _randomVehicleIndex:%1",_randomVehicleIndex];
    _slot = _randomVehicleIndex;
    };

    if (str(_slot) != "") then {
    _vehObj setVariable["VEHICLE_SLOT",_slot,true];

    private["_aa","_ab","_ac","_ad","_ae","_af","_ag","_ah","_ai","_aj","_ak","_al","_am","_an","_ao","_ap","_aq","_ar"];
    if(!isNull _vehObj) then {
    _aa=_vehObj;
    // _ac=_vehObj getVariable["VEHICLE_SLOT","ABORT"];
    // if(_ac !="ABORT")then{
    _ad=format["%1:%2",(call EPOCH_fn_InstanceID),_slot];
    _aj=[];
    _ak=_aa call EPOCH_getHitpoints;
    {
    _aj pushBack(_aa getHitPointDamage _x);
    }forEach _ak;
    _wepsItemsCargo=weaponsItemsCargo _aa;
    if(isNil "_wepsItemsCargo")then{
    _wepsItemsCargo=[];
    };
    _magsAmmoCargo=magazinesAmmoCargo _aa;
    if(isNil "_magsAmmoCargo")then{
    _magsAmmoCargo=[];
    };
    _aq=[[],[]];
    {
    _ar=_aq find(_x select 0);
    if(_ar >=0)then{
    (_aq select 1)set[_ar,((_aq select 1)select _ar)+(_x select 1)];}
    else{(_aq select 0)pushBack(_x select 0);(_aq select 1)pushBack(_x select 1);};
    }forEach _magsAmmoCargo;
    _al=[_wepsItemsCargo,_aq,getBackpackCargo _aa,getItemCargo _aa];
    _ap=_aa getVariable["VEHICLE_TEXTURE",0];
    _am=[typeOf _aa,[getposATL _aa,vectordir _aa,vectorup _aa],damage _aa,_aj,fuel _aa,_al,magazinesAmmo _aa,_ap];
    ["Vehicle",_ad,EPOCH_expiresVehicle,_am] call EPOCH_server_hiveSETEX;
    //};
    };

    _vehObj call EPOCH_server_vehicleInit;

    };

  7. To make this script play only once and not repeat the messages/intro music every time the player respawns, add the following piece of code into welcome.sqf

    waitUntil {!isNuLL(uiNameSpace getVariable ["EPOCH_loadingScreen",displayNull])};

    waitUntil {isNuLL(uiNameSpace getVariable ["EPOCH_loadingScreen",displayNull])};
     
     
    _welcomeAlreadyPlayed = missionNamespace getVariable ["Welcome_Already_Played",[]];
    diag_log format["DEBUG::: _welcomeAlreadyPlayed=%1",_welcomeAlreadyPlayed];
     
    if (!((name player) in _welcomeAlreadyPlayed)) then {
    _welcomeAlreadyPlayed pushBack (name player);
    missionNamespace setVariable ["Welcome_Already_Played", _welcomeAlreadyPlayed];
    publicVariable "Welcome_Already_Played";
     

    sleep _Delay;

  8. I upgraded my GTX Epoch server to 0.3.0.3 build 4 and my server stopped loading past this line:

    3:54:51 "Epoch: Starting ArmA3 Epoch Server, Version 0.3.0.3"
    3:54:51 Unable to get file version size: C:\TCAFiles\Users\IgorT\8204\@EpochHive\epochserver.dll

     

    Once the serer reaches this line in the loading process, it restarts. I suspect that there may be a database configuration issue bu the hoster assures me that everything looks good (GTX does not give me access to EpochServer.ini or redis.conf)

     

    I also see the following errors in EpochServer.log:

    2015-05-14 03:54:52 [Redis] The system tried to join a drive to a directory on a joined drive.
    2015-05-14 03:54:53 [Redis] The system tried to join a drive to a directory on a joined drive.
    2015-05-14 03:54:54 [Redis] The system tried to join a drive to a directory on a joined drive.
    2015-05-14 03:54:54 [Redis] Server not reachable

     

    Can anyone explain what this error means and what is the possible solution?

    Thanks!

  9. If you are searching for the list of ~300 objects on each server/client load, it will take lots of extra processing time and will not return all of these objects. I've been through that on Altis when some odd fuel pumps were still operational :(

     

    I got the script from here http://forums.bistudio.com/showthread.php?172888-Fuel-%28Gas%29-Station-Disable

     

    It makes sense to load the script into the editor and add 

    copyToClipboard str _arr;

    in the end 

     

    This is another example how I get nearest map locations using the editor:

    _allLocations = nearestLocations [[13999.6,12240.2,0.01],["NameCityCapital","NameCity","Airport","NameVillage","CityCenter","NameMarine","Name","NameLocal"], 500];  _arr = [];  {   _location=_x;   _locationPos= getPos _location;   _locationPos = [(_locationPos select 0),(_locationPos select 1),0.01];   _locName = name _location;   _arr pushBack [_locName,_locationPos];  } foreach _allLocations;  copyToClipboard str _arr;
    
  10. I'm working hard on making my player's life very hard and miserable.

     

    Please note I don't use BattleEye because I'm running a private server. So any BA filters are yours to add.

     

    This is how I disable all auto-fueling on all gas stations.

    In init.sqf on each client call another file called vehicle_actioons.sqf

    _fuelPump_locations = [[3888.8,7079.71,-0.0704308],[3888.79,7082.39,-0.0704308],[3881.87,7079.7,-0.0704384],[3881.86,7082.39,-0.0704231],[3874.81,7079.56,-0.0704384],[3874.81,7082.55,-0.0704231],[7428.45,4596.29,-0.0704155],[7429.87,4597.94,-0.0704155],[7432.89,4590.98,-0.0704308],[7434.84,4592.93,-0.0704193],[7437.99,4586.2,-0.0704231],[7439.85,4588.13,-0.0704231],[7959.49,4246.67,-0.0641632],[7961.17,4245.27,-0.0641632],[7964.41,4251.73,-0.0641632],[7966.39,4249.81,-0.0641632],[7969.12,4256.82,-0.0641632],[7971.08,4254.99,-0.0641632],[7841.69,3883.56,-0.0704231],[7846.29,3888.82,-0.0704308],[7843.69,3881.77,-0.0704231],[7848.31,3886.94,-0.0704193],[7851.44,3893.45,-0.0704155],[7853.14,3892.08,-0.0704155],[8062.5,6556.21,-0.0698013],[8063.96,6553.95,-0.0698013],[8068.36,6559.91,-0.0697937],[8069.82,6557.65,-0.0697937],[8074.22,6563.68,-0.0698013],[8075.67,6561.42,-0.0698013],[5738.11,8702.44,-0.0620461],[5735.5,8703.08,-0.0620461],[5739.79,8709.16,-0.0620461],[5737.17,8709.8,-0.0620461],[5741.67,8715.96,-0.0620461],[5738.77,8716.68,-0.0620461],[5325.21,8842.28,-0.0704308],[5332.07,8843.3,-0.0704231],[5324.81,8844.94,-0.0704308],[5339.07,8844.16,-0.0704231],[5331.66,8845.96,-0.0704384],[5338.66,8846.82,-0.0704384],[5765.86,9618.7,-0.0685463],[5759.49,9621.73,-0.0685463],[5766.94,9621.16,-0.0685463],[5753.15,9624.54,-0.0685463],[5760.57,9624.19,-0.0685463],[5754.25,9627,-0.0685463],[6679.88,9808.49,-0.0230637],[6682.57,9808.49,-0.0208664],[6679.86,9815.41,-0.0495453],[6682.54,9815.43,-0.0473251],[9512.7,7795.21,-0.0704346],[9514.83,7793.56,-0.0704346],[9516.94,7800.73,-0.0704346],[9519.07,7799.09,-0.0704346],[9521.21,7806.19,-0.0704346],[9523.34,7804.55,-0.0704346],[9786.52,1587.92,-0.045022],[9792.16,1592.17,-0.045022],[9788.41,1585.68,-0.045022],[9797.59,1596.48,-0.045022],[9793.83,1589.98,-0.045023],[9799.25,1594.38,-0.045022],[671.463,804.077,3.83854e-005],[8510,10808.4,-0.0939789],[8508.14,10810.3,-0.0939713],[8515.2,10813.1,-0.0939789],[8513.35,10815.1,-0.0939713],[8520.23,10817.9,-0.0939713],[8518.34,10819.8,-0.0939713],[11792.8,9042.78,-0.0691109],[11795,9041.92,-0.0691109],[11795.5,9049.2,-0.0691109],[11797.6,9048.32,-0.0691109],[11798.1,9055.61,-0.0691118],[11800.3,9054.71,-0.0691109],[11644.8,788.857,-0.0444136],[11644.3,785.913,-0.0444136],[11651.8,787.459,-0.0444136],[11651.3,784.808,-0.0444136],[11658.6,786.251,-0.0444136],[11658.1,783.607,-0.0444136],[11218,10105.6,-0.0543022],[11218,10108,-0.0543022],[11224.9,10105.4,-0.0543022],[11225,10107.7,-0.0543022],[11231.8,10105.1,-0.0543022],[11231.9,10107.5,-0.0543022],[15270.1,7872.65,-0.0960541],[15271.8,7874.22,-0.0960541],[12822.3,12438.6,-0.04105],[12824.7,12438.6,-0.04105],[12822.2,12445.5,-0.04105],[12824.6,12445.5,-0.04105],[12822.2,12452.4,-0.04105],[12824.6,12452.5,-0.04105],[15464.1,9377.74,-0.0704327],[15464.1,9380.42,-0.0704327],[15471,9377.73,-0.0704327],[15471,9380.42,-0.0704327],[15478,9377.79,-0.0704327],[15478,9380.48,-0.0704327],[15133.2,10205.7,-0.0560942],[15135.9,10205.7,-0.0560942],[15133.2,10212.6,-0.0560942],[15135.9,10212.6,-0.0560942],[15132.9,10219.6,-0.0560942],[15135.6,10219.6,-0.0560942],[15701.1,9075.31,-0.0704327],[15701.9,9077.9,-0.0704327],[15707.7,9073.28,-0.0704327],[15703.9,9084.32,-0.0704327],[15708.5,9075.87,-0.0704327],[15704.8,9086.89,-0.0704327],[15714.4,9071.14,-0.0704327],[15710.6,9082.41,-0.0704327],[15715.2,9073.73,-0.0704327],[15711.4,9084.97,-0.0704327],[15717.2,9080.15,-0.0704327],[15718,9082.71,-0.0704327],[13885.5,12371.3,-0.0589409],[13887.6,12370.3,-0.0589409],[13888.5,12377.5,-0.0589409],[13890.6,12376.5,-0.0589409],[11450.7,14973,-0.077179],[11452.8,14971.9,-0.077179],[11454,14979.1,-0.0771713],[11456,14977.9,-0.077179],[11457.3,14985.1,-0.0771561],[11459.4,14984,-0.0771866],[11252.5,15650.2,-0.0771866],[11254.4,15651.5,-0.0771561],[11248.8,15656.1,-0.077179],[11250.7,15657.4,-0.0771713],[11245.1,15661.9,-0.077179],[11247,15663.2,-0.077179],[12494.9,15013.5,-0.0771866],[12490.8,15019.1,-0.077179],[12496.8,15015,-0.0771561],[12486.6,15024.7,-0.077179],[12492.7,15020.5,-0.0771713],[12488.5,15026.1,-0.077179],[17206.5,7659.29,-0.0772247],[17206.5,7661.64,-0.0772247],[17213.4,7659.36,-0.0772247],[17213.4,7661.71,-0.0772247],[17220.4,7659.37,-0.0772247],[17220.3,7661.72,-0.0772247],[12152.8,15536.4,-0.077179],[12155.1,15537,-0.077179],[12151.1,15543.1,-0.0771713],[12153.4,15543.7,-0.077179],[12149.4,15549.9,-0.0771561],[12151.7,15550.5,-0.0771866],[16276.6,11706.3,-0.0771713],[16276.6,11708.7,-0.0771713],[16283.5,11706.3,-0.0771713],[16283.5,11708.6,-0.0771637],[16290.5,11706.2,-0.077179],[16290.5,11708.5,-0.0771484],[10630.5,17323.5,-0.0425072],[10632.3,17325.1,-0.0425072],[10626,17328.7,-0.0425072],[10627.7,17330.3,-0.0425072],[10621.4,17333.9,-0.0425072],[10623.1,17335.5,-0.0425072],[16219.8,13677.6,-0.0771751],[16219.7,13680,-0.0771751],[16226.7,13677.7,-0.0771751],[16226.6,13680.1,-0.0771751],[16233.6,13677.8,-0.0771828],[16233.6,13680.1,-0.0771561],[10842,18943.4,-0.0693188],[10843.9,18944.7,-0.0693188],[10838.2,18949.3,-0.0693188],[10840.2,18950.6,-0.0693192],[10834.4,18955.1,-0.0693188],[10836.4,18956.3,-0.0693188],[15419.4,16091.6,-0.0771713],[15421.2,16090.1,-0.0771713],[15423.9,16096.9,-0.0771637],[15425.7,16095.4,-0.0771713],[15428.4,16102.2,-0.0771484],[15430.2,16100.7,-0.077179]];
    diag_log "Start flushing Gas Stations";
    systemChat(format["Start flushing Gas Stations"]);
    {
    	
    	_trg=createTrigger["EmptyDetector",_x];
    	_trg setTriggerArea[10,10,0,false];
    	_trg setTriggerActivation["NONE","PRESENT",false];
    	_trg setTriggerStatements["true", "{if ((typeof _x) in ['FuelPump_DZ','Land_A_FuelStation_Feed','Land_Ind_FuelStation_Feed_EP1','Land_FuelStation_Feed_PMC','FuelStation','Land_ibr_FuelStation_Feed','Land_fuelstation_army','Land_fuelstation','land_fuelstation_w','Land_benzina_schnell']) then {_x enableSimulation false; _x allowDamage false; _x setFuelCargo 0;}} forEach nearestObjects [thisTrigger,[],10]", ""]; 
    } forEach _fuelPump_locations;
    diag_log "Finished flushing Gas Stations";
    systemChat(format["Finished flushing Gas Stations"]);	
    

    ====================================================================================

     

    I also replaced standard teleporting from the box with a map of Altis that teleports player to random locations. This code could be added to the same vehicle_actions.sqf file

    	_teleportList = [24470.4,24614.2, 0.23] nearObjects ["MapBoard_altis_F",10];
    	{
    		_x addAction ["<t color=""#008000"">Take me to Krasnoznamenk Airport Market</t>","custom\teleportMe.sqf",["krasno"],0,false,true,"",""];
    		_x addAction ["<t color=""#008000"">Take me to Yaroslavl Airport Market</t>","custom\teleportMe.sqf",["yaroslavl"],0,false,true,"",""];
    		_x addAction ["<t color=""#008000"">Take me to Big Island North</t>","custom\teleportMe.sqf",["big_north"],0,false,true,"",""];
    		_x addAction ["<t color=""#008000"">Take me to Big Island South</t>","custom\teleportMe.sqf",["big_south"],0,false,true,"",""];
    		_x addAction ["<t color=""#008000"">Take me to Small Island</t>","custom\teleportMe.sqf",["small"],0,false,true,"",""];
    		_x addAction ["<t color=""#008000"">Take me to Novi Islands</t>","custom\teleportMe.sqf",["novi"],0,false,true,"",""];
    		_x addAction ["<t color=""#008000"">Take me to Sector B</t>","custom\teleportMe.sqf",["sector"],0,false,true,"",""];
    		_x addAction ["<t color=""#008000"">Take me anywhere (random)</t>","custom\teleportMe.sqf",["random"],0,false,true,"",""];
    		_x addAction ["<t color=""#008000"">Take me close to my dead body for 1000 Crypto</t>","custom\teleportMe.sqf",["body"],0,false,true,"",""];
    	} forEach _teleportList;
    

    custom\teleportMe.sqf

    private ["_position","_teleportType","_price","_errorMsg"];
    
    _teleportType = _this select 3 select 0;
    //systemChat(format["Teleporting...%1",_teleportType]);
    _price = 1000;
    _errorMsg = "";
    
    _position = getPosATL player;
    
    _small_island=[7966,5392,0];
    _novi_island=[4326,17023,0];
    _big_north=[11309,17905,0];
    _big_south=[17205,7153,0];
    
    _center_pos=_position;
    
    _findPos = {
    	 private ["_goodPosFound","_height"];
    	_position1 = [_center_pos,0,3000,10,0,0,1] call BIS_fnc_findSafePos;
    	diag_log format["DEBUG FIND POS::: initial _position=%1",_position1];
    	_goodPosNotFound = true;
    	while { _goodPosNotFound } do {
    		_shortPos = [(_position1 select 0),(_position1 select 1)];
    		if (((getTerrainHeightASL _shortPos) > 100)) then
    		{
    			_position1 = [_center_pos,0,4000,10,0,0,1] call BIS_fnc_findSafePos;
    		} else {
    			diag_log format["DEBUG FIND POS::: goodPosFound _position=%1",_position1];
    			_goodPosNotFound = false;
    		};
    	};
    	_height = 0.1;
    	_position = [(_position1 select 0),(_position1 select 1),_height];
    	diag_log format["DEBUG FIND POS::: final _position=%1",_position];
    	
    	_position
     };
    
    switch (_teleportType) do {
    		case "random" : {_position = [getMarkerPos "center",0,10000,10,0,1,0] call BIS_fnc_findSafePos;	};
    		case "krasno" : { _position = [[6859.07,8190.65,0],0,50,1,0,10,0] call BIS_fnc_findSafePos; };
    		case "yaroslavl" : { _position = [[10438.1,18009.6,0],0,50,1,0,10,0] call BIS_fnc_findSafePos; };
    		case "big_north" : { _center_pos=_big_north; _position = [] call _findPos; };
    		case "big_south" : { _center_pos=_big_south; _position = [] call _findPos; };
    		case "small" : { _center_pos=_small_island; _position = [] call _findPos; };
    		case "novi" : { _center_pos=_novi_island; _position = [] call _findPos; };
    		case "sector" : { _position = [[22053,19143,0],0,50,10,0,10,0] call BIS_fnc_findSafePos; };
    		case "body" : {
    			if ((EPOCH_playerCrypto-_price) >= 0) then {	
    				_DeadPlayer_LIST = [] + allDeadMen;
    				//diag_log format["DEBUG::: _DeadPlayer_LIST=%1",_DeadPlayer_LIST];
    				for '_i' from 0 to (count _DeadPlayer_LIST)-1 do { 
    					_c = _DeadPlayer_LIST select _i;
    					_txt = _c getVariable['realname','DEAD'];
    					_playername = name player;
    					//diag_log format["DEBUG::: realname=%1",_txt];
    					if(_txt == _playername) then
    					{
    						_posBody = getPos _c;
    						_position = [_posBody,100,500,10,0,10,0] call BIS_fnc_findSafePos;
    						EPOCH_playerCrypto = EPOCH_playerCrypto - _price;
    						_errorMsg = "Player body found";
    					};
    				};
    				if (_errorMsg == "") then {
    					_errorMsg = 'Cannot find recent players body';
    					0 = [format["<t size='0.8' shadow='0' color='#99ffffff'>%1</t>", _errorMsg], 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext;
    				};
    			} else {
    				_errorMsg = 'Not enough Krypto';
    				0 = [format["<t size='0.8' shadow='0' color='#99ffffff'>%1</t>", _errorMsg], 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext;
    			};	
    		};
    };
    if (_errorMsg == "" || _errorMsg == "Player body found") then {
    	player setPosATL [(_position select 0),(_position select 1),0.01];
    	_errorMsg = 'Player was teleported';
    	0 = [format["<t size='0.8' shadow='0' color='#99ffffff'>%1</t>", _errorMsg], 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext;
    };
    
    
    

    Please note that this script allows you to teleport player close to the player's latest place of death (for 1000 crypto). I also added an ATM machine to the respawn box.

     

    =====================================================================

     

    To make things realistic I remove gas from and damage every vehicle that contains a Jack tool (since there is no variable that identifies a freshly spawned vehicle). I borrowed the idea from DayZ Epoch with some modifications.

     

    In init.sqf you need to pre-define these two functions

    if (isServer) then {
    	vehicle_getHitpoints =	compile preprocessFileLineNumbers "custom\vehicle_getHitpoints.sqf";
    	vehicle_genRandDamage = compile preprocessFileLineNumbers "custom\vehicle_genRandDamage.sqf";
    
    	//server-side vehicle actions
    	execVM "\q\addons\custom_server\custom\vehicle_actions_server.sqf"
    };
    

    vehicle_getHitpoints.sqf

    private ["_cfgHitPoints", "_hps", "_funcGetHitPoints"];
    _cfgHitPoints = configFile >> "CfgVehicles" >> (typeOf _this) >> "HitPoints";
    _hps = [];
    
    _funcGetHitPoints = 
    {
    	for "_i" from 0 to ((count _this) - 1) do 
    	{
    		private ["_hp"];
    		_hp = configName (_this select _i);
    		
    		if (!(_hp in _hps)) then 
    		{
    			_hps set [count _hps, _hp];
    		};
    	};
    };
    
    //Explore inheritance structure fully
    while {(configName _cfgHitPoints) != ""} do 
    {
    	_cfgHitPoints call _funcGetHitPoints;
    	_cfgHitPoints = inheritsFrom _cfgHitPoints;
    };
    
    _hps
    

    vehicle_genRandDamage.sqf

    // Create randomly damaged parts
    _object = _this;	
    _totaldam = 0;
    _array = [];
    _hitpoints = _object call vehicle_getHitpoints;
    
    _DynamicVehicleDamageHigh = 80;
    _DynamicVehicleDamageLow = 10;
    
    generate_new_damage = {
    	private ["_damage"];
    	_damage = ((random(_DynamicVehicleDamageHigh-_DynamicVehicleDamageLow))+_DynamicVehicleDamageLow) / 100;
    	_damage;
    };
    
    
    {
    	// generate damage on all parts
    	_dam = call generate_new_damage;
    	_class = typeOf _object;
    	_selection = getText(configFile >> "cfgVehicles" >> _class >> "HitPoints" >> _x >> "name");
    	
    	if (_dam > 0) then {
    		//_array set [count _array,[_selection,_dam]];
    		_object setHit [_selection, _dam];
    		_totaldam = _totaldam + _dam;
    	};
    	
    	//diag_log format["Vehicle %1 is getting %2 damaged to %3",_object,_selection,_dam];
    	
    } forEach _hitpoints;
    
    _numberOfHitPoints = count _hitpoints;
    _totaldam = _totaldam / _numberOfHitPoints;
    
    _object setDamage _totaldam;
    
    //diag_log format["Total Vehicle %1 | Damage is %2",_object,_totaldam];
    
    _object call EPOCH_server_save_vehicle;
    

    vehicle_actions_server.sqf

    waitUntil {!isNil "EPOCH_StorageSlotsCount"};
    
    diag_log "Removing fuel and Damaging vehicles containing a Jack Item...";
    {
    	_vehicle = _x;
    	_hasJack = false;
    	_hasJack = "JackKit" in (magazineCargo _vehicle);
    	if (!isNil "_hasJack") then
    	{
    		if (_hasJack) then {
    			_vehicle setFuel ((random 0.3) MIN 0.1);
    			if ((damage _vehicle) < 0.5) then
    			{
    				//diag_log format["Vehicle %1 is getting random damage",_vehicle];
    				_vehicle call vehicle_genRandDamage;
    				sleep 0.1;
    			};
    		};
    	};
    } forEach (vehicles);
    diag_log "Finished removing fuel from vehicles with a Jack Item";
    
    
    
  11. How about filling a 200-liter barrel from a big rusty fuel container like in DayZ Epoch?

    I figured the rusty barrel class should be along the lines of:

    nearby[] = {{"noclass", {"barrelwater_f.p3d", "water_source_f.p3d", "pumpa.p3d", "misc_wellpump.p3d"}, 3, 1, "Water Source","water"}};

    Alternatively, it also means adding to Epoch client to allow to Siphon/Fill vehicle from the 200-liter barrel as well. Oh boy...

  12. The video in the first post is from my server. I originally took Infected script http://forums.bistudio.com/showthread.php?181485-Infected-Script-by-Gulozwood/page13by Gulozwood and re-wrote it to create a trigger in every location on the map. The triggers are sent to clients and the actual scripts that trigger Zs to spawn are running on the client side. The original script was server-side.

     

    I created a custom FSM file for zombie brains too to make them think a bit faster and chase the players all over the map.

    I am able to control client FPS by limiting total number of zombies spawned for each player and by deleting zombies if player has left the trigger zone. This works well for cases with more than one player in the same trigger zone. Zombies also re-spawn at set intervals so my players to not get a break. I'm getting feedback that it's too hard to play because they are chased by zombies and stumble upon an AI patrol. At least the game is about survival again and not about stocking the warehouse with loot.

     

    The worst part is that there is no good zombie model I could use and I'm not a 3DMax guy. I did not want to adapt DayZ model from Arma 2 because of the license limitations listed above.

     

    At this time I have no plans to share/release this script. Sorry.

  13. To create a fuel station do you need to use a trigger also?

     

    not sure, but I know if I simply wanted to setFuelCargo=0 on all Land_fs_feed_F objects it wouldn't work. need a trigger to do it on the client when a player is near

  14. This code has worked for me on Altis. Flushing all fueling stations when client connects.

    _fuelPump_locations = [
    	[14173.2,16542.1,0.01],
    	[9205.75,12112.2,-0.0487213],
    	[11831.6,14155.9,-0.0342026],
    	[12024.7,15830,-0.0298138],
    	[12026.6,15830.1,-0.0342979],
    	[12028.4,15830,-0.0388718],
    	[9025.78,15729.4,-0.0206451],
    	[9023.75,15729,-0.027153],
    	[9021.82,15728.7,-0.0293427],
    	[16750.9,12513.1,-0.0525188],
    	[6798.15,15561.6,-0.0441475],
    	[6198.83,15081.4,-0.0912437],
    	[14181.6,16549.3,0.00917625],
    	[5023.26,14429.6,-0.0978947],
    	[5019.68,14436.7,-0.0114822],
    	[4001.12,12592.1,-0.0966644],
    	[17417.2,13936.7,-0.10652],
    	[3757.14,13477.9,-0.0540285],
    	[3757.54,13485.9,-0.010498],
    	[16875.2,15469.4,0.0373325],
    	[16871.7,15476.6,0.0102873],
    	[8481.69,18260.7,-0.0266876],
    	[15297.1,17565.9,-0.2838],
    	[14221.4,18302.5,-0.0697174],
    	[15781,17453.2,-0.285282],
    	[19961.3,11454.6,-0.0349312],
    	[19965.1,11447.6,-0.0483704],
    	[5768.99,20085.7,-0.0189667],
    	[21230.4,7116.56,-0.0604248],
    	[20784.8,16665.9,-0.0521202],
    	[20789.6,16672.3,-0.0213318],
    	[23379.4,19799,-0.0544052],
    	[25701.2,21372.6,-0.0774155]
    ];
    	systemChat(format["Start flushing Gas Stations"]);
    	{
    		
    		_trg=createTrigger["EmptyDetector",_x];
    		_trg setTriggerArea[10,10,0,false];
    		_trg setTriggerActivation["NONE","PRESENT",false];
    		_trg setTriggerStatements["true", "{if (_x isKindOf 'Land_fs_feed_F') then {_x enableSimulation false; _x allowDamage false; _x setFuelCargo 0;}} forEach nearestObjects [thisTrigger,[],10]", ""]; 
    	} forEach _fuelPump_locations;
    	systemChat(format["Finished flushing Gas Stations"]);	
    
    };
    
×
×
  • Create New...