Michael Cullen

Member
  • Content count

    6
  • Donations

    0.00 EUR 
  • Joined

  • Last visited

  • Days Won

    1

Michael Cullen last won the day on September 9 2016

Michael Cullen had the most liked content!

Community Reputation

12 Neutral

About Michael Cullen

  • Rank
    Bambi
  • Birthday 01/23/1987

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Michael Cullen

    Fixed Vehicle Spawns

    I discovered yesterday that the default vehicle spawn script has a couple of bugs in it. It's not too much of a problem with island maps, but on maps with land in the debug area, it's a bit of a nightmare; vehicles end up spawning outside of the map, needlessly eating performance and just generally looking extremely messy So, I fixed it up. Replace your ExileServer_world_spawnVehicles.sqf with the following code. /** * ExileServer_world_spawnVehicles * * Exile Mod * exile.majormittens.co.uk * © 2015 Exile Mod Team * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. * * Fixed by Michael Cullen, no rights reserved. */ private["_mapsizeX","_mapsizeY","_gridSize","_gridVehicles","_gridHalf","_vehicleCount","_debugMarkers","_vehicleClassNames","_maximumDamage","_damageChance","_xSize","_ySize","_position","_spawned","_spawnedPositions","_positionReal","_spawnControl","_vehicleClassName","_vehicle","_hitpointsData","_hitpoints","_debugMarker"]; _mapsizeX = worldSize; _mapsizeY = worldSize; _gridSize = getNumber(configFile >> "CfgSettings" >> "VehicleSpawn" >> "vehiclesGridSize"); _gridVehicles = getNumber(configFile >> "CfgSettings" >> "VehicleSpawn" >> "vehiclesGridAmount"); format ["Spawning Dynamic Vehicles. GridSize: %1 Vehs/Grid: %2",_gridSize,_gridVehicles] call ExileServer_util_log; _gridHalf = _gridSize / 2; _vehicleCount = 0; _debugMarkers = ((getNumber(configFile >> "CfgSettings" >> "VehicleSpawn" >> "vehiclesDebugMarkers")) isEqualTo 1); _vehicleClassNames = getArray (configFile >> "CfgSettings" >> "VehicleSpawn" >> "ground"); _maximumDamage = getNumber (configFile >> "CfgSettings" >> "VehicleSpawn" >> "maximumDamage"); _damageChance = getNumber (configFile >> "CfgSettings" >> "VehicleSpawn" >> "damageChance"); for "_xSize" from _gridHalf to (_mapsizeX - _gridHalf) step _gridSize do { for "_ySize" from _gridHalf to (_mapsizeY - _gridHalf) step _gridSize do { _position = [_xSize,_ySize]; _spawned = 0; _spawnedPositions = []; while {_spawned < _gridVehicles} do { _positionReal = [_position, 25, _gridHalf, 5, 0 , 1 , 0 , _spawnedPositions] call BIS_fnc_findSafePos; if(count _positionReal isEqualTo 3)exitWith{}; _spawnControl = [[(_positionReal select 0) - 50, (_positionReal select 1) + 50],[(_positionReal select 0) + 50,(_positionReal select 1) - 50]]; _spawnedPositions pushBack _spawnControl; _positionReal pushBack 0; _vehicleClassName = selectRandom _vehicleClassNames; _vehicle = [_vehicleClassName, _positionReal, random 360, true] call ExileServer_object_vehicle_createNonPersistentVehicle; _hitpointsData = getAllHitPointsDamage _vehicle; if !(_hitpointsData isEqualTo []) then { _hitpoints = _hitpointsData select 0; { if ((random 100) < _damageChance) then { _vehicle setHitPointDamage [_x, random _maximumDamage]; }; } forEach _hitpoints; }; if (_debugMarkers) then { _debugMarker = createMarker ["vehicleMarker#"+str _vehicleCount, _positionReal]; _debugMarker setMarkerColor "ColorOrange"; _debugMarker setMarkerType "mil_dot_noShadow"; }; _spawned = _spawned + 1; _vehicleCount = _vehicleCount + 1; }; }; }; format ["Dynamic vehicles spawned. Count : %1",_vehicleCount] call ExileServer_util_log; true
  2. Michael Cullen

    Realtime Restarts

    Updated to 1.0.2 Again, both files have changed, so don't forget to edit config.cpp if you want the broadcast functionality.
  3. Michael Cullen

    Realtime Restarts

    Post updated; please make sure you update BOTH files, as there's been a name change on one of the config entries to avoid a duplicate var. Cheers!
  4. Michael Cullen

    Realtime Restarts

    Cheers BDTZ; I haven't done any work with Exile so didn't even know they'd implemented overrides like that. Your method of applying it would definitely be preferable.
  5. Michael Cullen

    Realtime Restarts

    Want to restart your server at specific times of the day? Sick of manual restarts buggering up your restart cycle? Then "Realtime Restarts" has got you covered! Changelog 1.0.2 Added the ability to broadcast the time remaining (in minutes) to the next restart to all clients on the server. In client-side scripts (statusbars, alerts, etc) use the following code to retrieve this value. missionNameSpace getVariable "TimeTilRestart" 1.0.1 Fixed bug causing endless restart cycle after the last entry in the realtimeRestartHours array. 1.0 Initial release! Installation Replace your ExileServer_system_rcon_thread_check.sqf - found in \exile_server\code\ - with this: /** * ExileServer_system_rcon_thread_check * * Exile Mod * exile.majormittens.co.uk * © 2015 Exile Mod Team * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. * * "Realtime Restarts" 1.0.2 by Michael Cullen. No rights reserved. */ private["_restartTime","_useAutoKick","_kickTime","_lockTime","_uptime","_timeTilRestart","_time","_i","_realtime","_realtimeHours","_realtimeMinutes","_realtimeSinceMidnight","_realtimeRestartHours","_hourCount","_firstRestartHour","_restartHour"]; _restartTime = _this select 0; _useAutoKick = _this select 1; _kickTime = _this select 2; _lockTime = _this select 3; if(getNumber(configFile >> "CfgSettings" >> "RCON" >> "realtimeRestarts") isEqualTo 1) then { _realtime = (call compile ("extDB2" callExtension format["9:TIME:%1", getNumber(configFile >> "CfgSettings" >> "RCON" >> "realtimeOffset")])) select 1; _realtimeHours = _realtime select 3; _realtimeMinutes = _realtime select 4; _realtimeSinceMidnight = (_realtimeHours * 60) + _realtimeMinutes; _realtimeRestartHours = getArray (configFile >> "CfgSettings" >> "RCON" >> "realtimeRestartHours"); _hourCount = (count _realtimeRestartHours) - 1; _firstRestartHour = (_realtimeRestartHours select 0) * 60; for "_i" from 0 to _hourCount do { _restartHour = (_realtimeRestartHours select _i) * 60; if (_restartHour > _realtimeSinceMidnight) exitWith {_restartTime = _restartHour}; if ((_i == _hourCount) && (((24 * 60) + _firstRestartHour) > _realtimeSinceMidnight)) exitWith { _restartTime = (24 * 60) + _firstRestartHour}; }; _timeTilRestart = _restartTime - _realtimeSinceMidnight; } else { _uptime = call ExileServer_util_time_uptime; _timeTilRestart = _restartTime - _uptime; }; if(getNumber(configFile >> "CfgSettings" >> "RCON" >> "broadcastTimeTilRestart") isEqualTo 1) then { missionNamespace setVariable ["TimeTilRestart", _timeTilRestart, true]; }; if (typeName ExileServerRestartMessages isEqualTo "ARRAY") then { if !(ExileServerRestartMessages isEqualTo []) then { { _time = _x; if (_timeTilRestart < _time) then { if (count ExileSessionIDs > 0) then { ["toastRequest", ["InfoTitleAndText", ["Restart incoming!", format["Server is going to restart in %1 min! Log out before the restart to prevent gear loss.", _time] ]]] call ExileServer_system_network_send_broadcast; }; ExileServerRestartMessages deleteAt _forEachIndex; format ["Restart Warnings for %1min sent",_time] call ExileServer_util_log; }; } forEach ExileServerRestartMessages; }; }; if (_timeTilRestart < _lockTime) then { if !(ExileServerIsLocked) then { "#lock" call ExileServer_system_rcon_event_sendCommand; "Server locked for restart" call ExileServer_util_log; ["toastRequest", ["ErrorTitleAndText", ["Server will restart now!", "You will be kicked off the server due to a restart."]]] call ExileServer_system_network_send_broadcast; ExileServerIsLocked = true; }; if (_timeTilRestart < _kickTime) then { if !(ExileServerRestartMode) then { call ExileServer_system_rcon_event_kickAllrestart; "Everyone kicked for restart" call ExileServer_util_log; ExileSystemSpawnThread = []; call ExileServer_system_rcon_event_clearBuffers; "Buffers cleared!" call ExileServer_util_log; for "_i" from 0 to 49 do { "SERVER READY FOR RESTART!!" call ExileServer_util_log; }; ExileServerRestartMode = true; if(getNumber(configFile >> "CfgSettings" >> "RCON" >> "useShutdown") isEqualTo 1)then { '#shutdown' call ExileServer_system_rcon_event_sendCommand; }; }; }; }; true NOTE: You can also use @BetterDeadThanZed's method below to keep the changes in your Mission PBO (may be useful for upgrades, etc). And add this into the RCON section of your server's config.cpp. /* Restart on a realtime cycle */ realtimeRestarts = 1; realtimeOffset = 1; //Offset from UTC realtimeRestartHours[] = {0, 4, 8, 12, 16, 20}; broadcastTimeTilRestart = 1; Adjust your offset and restart times to your liking, repack your PBOs, and you're good to go!
  6. Michael Cullen

    [Release] Custom Esseker TradeZones 1

    Good to hear Setting up an Esseker server at the moment, you're currently working on the last piece of the puzzle