Jump to content

Janski

Member
  • Posts

    7
  • Joined

  • Last visited

Posts posted by Janski

  1. Please delete this post :(

    Keep the post!!!

    It was a good question. 

     

    The post said;

     

    I dont see the 4 teleporters / spawnpoints on the ground.

    But i have them in my tavi.h and the position is correct:

    "Transport_C_EPOCH", { 11576.1, 15305.8, 0.233429}, "", { 10183, 12409.6, 0.00926781 } }, //Central

    { "Transport_W_EPOCH", { 11560.5, 15315, 0.233429 }, "", { 8959.54, 3568.74, 0.0698853 } }, // West

    { "Transport_E_EPOCH", { 11544.7,15306.1,0.363586 }, "", { 17843.7, 8450.91, 0.0698853 } }, // East

    { "Transport_N_EPOCH", { 11560.6, 15296.9, 0.233429 }, "", { 8710.33, 20052.7, 0.190186 } } // North

     

    Answer to the question if anyone else wonders :D

     

    The new syntax for telepos is

    1: Enter class - Drain cover class name

    2: Position for enter class - When placing teleport objects it is relative to the debug box(spawn box) position. E.g. { -14.4316, 0.112793, -10.3098 }

    3: Exit class - An object where you teleport to

    4: Position for exit class 

     

    The result is 

    telePos[] = {
       { "Transport_C_EPOCH", { -0.286865, 8.17383, -10.3098 }, "", { 13326.5, 14515.2, 0.16426 } }
    };
    

    Notice the second input, not an ordinary position but instead the position relative to the spawn box.

  2. @mumys 

     

    This is because you have two files in the @taviana mod that needs to be removed. 

     

    @renren1000

     

    you must delete two files . look at :\Steam\SteamApps\common\Arma 3\@Taviana\addons

    and delete emod.pbo and emod.pbo.A3_Tavi_v02.bisign.

    Do this both on the server and in your client files.

     

    An addition to help connecting players with the wrong mod files is to add 

    if(isClass(configFile >> "cfgPatches" >> "A3_emod")) then {
    	"Attention - Very important!!" hintC "Please check your @Taviana\addons folder and remove any files called emod.pbo or emod.bisignkey. Otherwise you get kicked after ca 4 min in-game! :(";
    };
    

    Some where appropriate in you mission file. It will execute if you have the emod files and alert an warning to the player.

     

    In the future please read the thread before asking something that probably occurs like 10 times in the thread. 

  3. okay janski i have a problem with you vehicle spwan fix my EPOCH_spawn_vehicles have no more 2 lines ......

     

    I must you code in this sqf or ?

     

    If you take the code I provided in my example above, your vehicles will spawn randomly all over the map.

    That code is the same code as in "EPOCH_spawn_vehicles.sqf" minus some rows that's screws everything up. If you just replace the code you displayed with mine above it will solve your problem.  

     

    I'm working on a new trading system so don't have much time over otherwise I would have made a more persistent fix but that have to wait since this is only a small hobby. 

     

    If anyone wanna try it. It's displayed at SP4R.com's server. Haven't added the sell options yet but by tonight you should be able to buy all weapons, vehicles, items and gear that's provided by the server mods. Its running epoch, tavi, mas and both rhs mods. All the mods can be downloaded at their site http://www.sp4r.com . The mods on their site are the most correct once you can find and always up to date. 

     

    Won't give out the server files until the whole script is ready so don't bother trying to borrow/steal it. 

  4. @renren1000

     

     

    But I have a quick question can be the memory of the Redis database upgrade the saveing and often should I let the db at each restart to restart?

     

    If I understand you right, you wanna know how often you need to restart redis and how often epoch writes to it? 

     

    We only restart it once every 24 hours and it works great.

    Don't really know how often epoch writes the player objects to redis but almost all other actions are written to redis at the same time they are executed.

     

    If you wanna change how often redis should make a dump file of the db, you can do this in the "redis.conf", usually lies in the db folder in ArmaServer root files. 

     

    Here's an example of "redis.conf"

    bind 127.0.0.1
    maxmemory 1gb
    save 30 1
    save 20 10
    save 10 1000
    requirepass #####
    appendonly no
    dbfilename ####.rdb 

    Which is, correct me if I'm wrong;

    1 change in redis, create a dump file within an interval of  30 sec.

    10 change in redis, create a dump file within an interval of  20 sec.

    1000 change in redis, create a dump file within an interval of  10 sec.

     

    With dump file I mean when it's saved to a file. In the example above "dbfilename ####.rdb " and it's saved to the same folder as the "redis.conf".

  5. ok thanks  jus one more question. How do you do all that and or can you do it for me.  haha JK  thanks for the help. I wasn't sure that we could edit any of those files so I never tried. Ill give it a shot

    If you unpack a3_epooch_server.pbo, found in @epochhive\addons. You can find the spawn script in ..\sp4rhive\@epochhive\addons\a3_epoch_server\compile\epoch_vehicle\EPOCH_spawn_vehicles.sqf. 

     

    There are multiple ways to solve this issue but the easiest is to remove the code that spawns vehicles near cities and let them spawn randomly with BIS_fnc_findSafePos

     

    By beatifying the code you will be able to find  

    if (_isShip || (_vehClass isKindOf "Air")) then { 

    on line 49 (depending on how you beatify it), remove it and then remove everything from

    } else {
    if (_increaseLimit) then { 
    on line 56 to 103
    };

    And it should look something like this

    private["_spawnPositionSize", "_spawnPositions", "_type", "_position", "_range", "_roads", "_maxSpawnSize", "_vehicleFound", "_vehClass", "_countAllowedVeh", "_randomVehicleIndex", "_randomVehicle", "_velimit", "_vehicleCount", "_isShip", "_spawnPositionIndex", "_spawnPosition", "_roadPosition", "_dir", "_vehObj", "_config", "_textureSelectionIndex", "_selections", "_colors", "_textures", "_color", "_count", "_marker"];
    _spawnPositionSize = [
    	["FlatAreaCity", 1],
    	["FlatAreaCitySmall", 1],
    	["NameCity", 2],
    	["NameVillage", 1],
    	["NameCityCapital", 4],
    	["Airport", 5]
    ];
    if (worldName in ["Bornholm"]) then {
    	_spawnPositionSize append[["NameLocal", 2], ["StrongpointArea", 1], ["VegetationBroadleaf", 1], ["VegetationFir", 1], ["ViewPoint", 1]];
    };
    _allowedTypes = []; 
    {
    	_allowedTypes pushBack(_x select 0)
    }forEach _spawnPositionSize;
    _allCitys = (configfile >> "CfgWorlds" >> worldName >> "Names") call BIS_fnc_returnChildren;
    _allCitysDync = _allCitys;
    _increaseLimit = false; 
    {
    	if (count EPOCH_VehicleSlots <= EPOCH_storedVehicleCount) exitWith {};
    	_vehicleFound = false;
    	_vehClass = "";
    	while {
    		!_vehicleFound
    	}
    	do {
    		_countAllowedVeh = count EPOCH_allowedVehiclesList;
    		if (_countAllowedVeh == 0) exitWith {};
    		_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;
    			};
    			_vehicleFound = true;
    		};
    	};
    	if (!_vehicleFound) exitWith {};
    	_isShip = _vehClass isKindOf "Ship";
    
    	if (_isShip) then {
    		_position = [epoch_centerMarkerPosition, 0, EPOCH_dynamicVehicleArea, 10, 0, 4000, 1] call BIS_fnc_findSafePos;
    		_position = [_position, 0, 100, 10, 2, 4000, 0] call BIS_fnc_findSafePos;
    	} else {
    		_position = [epoch_centerMarkerPosition, 0, EPOCH_dynamicVehicleArea, 10, 0, 1000, 0] call BIS_fnc_findSafePos;
    	};
    
    	if (count _position == 2) then {
    		_vehObj = createVehicle[_vehClass, _position, [], 0, "CAN_COLLIDE"];
    		_vehObj call EPOCH_server_setVToken;
    		_vehObj setdir(random 360);
    		clearWeaponCargoGlobal _vehObj;
    		clearMagazineCargoGlobal _vehObj;
    		clearBackpackCargoGlobal _vehObj;
    		clearItemCargoGlobal _vehObj;
    		_vehObj disableTIEquipment true;
    		_vehObj lock true;
    		_position set[2, 0];
    		if (surfaceIsWater _position) then {
    			_vehObj setposASL _position;
    		} else {
    			_vehObj setposATL _position;
    		};
    		_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];
    		};
    		if (_vehClass isKindOf "Ship") then {
    			[_vehObj, "VehicleBoat"] call EPOCH_serverLootObject;
    		} else {
    			[_vehObj, "Vehicle"] call EPOCH_serverLootObject;
    		};
    		_vehObj addMagazineCargoGlobal["JackKit", 1];
    		_vehObj setVariable["VEHICLE_SLOT", _x, true];
    		_vehLockHiveKey = format["%1:%2", (call EPOCH_fn_InstanceID), _x];
    		["VehicleLock", _vehLockHiveKey] call EPOCH_server_hiveDEL;
    		_vehObj call EPOCH_server_save_vehicle;
    		_vehObj call EPOCH_server_vehicleInit;
    		if (EPOCH_DEBUG_VEH) then {
    			_marker = createMarker[str(_position), _position];
    			_marker setMarkerShape "ICON";
    			_marker setMarkerType "mil_dot";
    			_marker setMarkerText _vehClass;
    		};
    		EPOCH_VehicleSlots set[_forEachIndex, "REM"];
    		addToRemainsCollector[_vehObj];
    	};
    }forEach EPOCH_VehicleSlots;
    EPOCH_VehicleSlots = EPOCH_VehicleSlots - ["REM"];
    EPOCH_VehicleSlotCount = count EPOCH_VehicleSlots;
    publicVariable "EPOCH_VehicleSlotCount";
    EPOCH_allowedVehiclesList = nil;
    true
    

    Save the file and then repack the pbo. 

     

    Don't forget to delete all cars on the bottom of the sea first.

     

    ATTENTION: When a new build of the server files arrive you may need to redo this procedure if they haven't got a fix for it in the new release. 

     

     

×
×
  • Create New...