Jump to content

nedfox

Member
  • Posts

    1041
  • Joined

  • Last visited

Reputation Activity

  1. Like
    nedfox got a reaction from Dwarfer in [WIP]Unofficial PHP EpochRedis Tools   
    You put the PHP scripts on a webserver that has access to the Redis server.. Easiest is WAMP, install it on the gameserver or somewhere with access (firewall ports!!!!) to that Redis server.
     
    Then run the PHP script.
  2. Like
    nedfox got a reaction from KiloSwiss in block other play view map and on target   
    And here : 
    http://epochmod.com/forum/index.php?/topic/31506-remove-player-tags/?view=findpost&p=196049&hl=profile
     
    And here :
     

     
    And here : 
     

     
    And here :
     
    http://epochmod.com/forum/index.php?/topic/31136-how-do-i-remove-player-position/?view=findpost&p=192140&hl=veteran
     
    Etc etc.
  3. Like
    nedfox got a reaction from Richie in block other play view map and on target   
    And here : 
    http://epochmod.com/forum/index.php?/topic/31506-remove-player-tags/?view=findpost&p=196049&hl=profile
     
    And here :
     

     
    And here : 
     

     
    And here :
     
    http://epochmod.com/forum/index.php?/topic/31136-how-do-i-remove-player-position/?view=findpost&p=192140&hl=veteran
     
    Etc etc.
  4. Like
    nedfox reacted to prone in Database size   
    Mine is 0 kb. <_<
     
    Everyone's complaining stuff is missing...
     
    /s
  5. Like
    nedfox got a reaction from KiloSwiss in Map gives server restriction #0 when i press "M"   
    Read the stickies about arma 1.40
     
    Actually, if you would search for the very reason you get the kicks, you get straight to the proper posts that already have the solutions.
  6. Like
    nedfox reacted to Suppe in Need a help with my Projekt   
    hey,
     
    I have all the scripts together and running (Boxes, AI groups, markers and so on) , so if anyone needs help, with spawn a crates or spawn Ai groups, then notify you,
  7. Like
    nedfox reacted to shurix in How to remove ammo from vehicles at server restarts ?   
    It is possible to check every vehicle on server restart.
    You would need to wait for server to finish spawning vehicles and filling storage
    waitUntil {!isNil "EPOCH_StorageSlotsCount"}; and then you might want to do something like this
    { _veh = _x; if ((typeOf _x) == "GhostHawk") then { //remove MiniGun ammo }; } forEach (vehicles); There is no way to identify a freshly spawned vehicle at this time. With version 0.3 each spawned vehicle will contain a Jack tool (not sure about choppers though). This would be a item for me to look for in vehicle's inventory and do some actions on that vehicle. Until Epoch script adds a new variable or another attribute to a fresh spawned vehicle, there is probably no other way.
  8. Like
    nedfox got a reaction from Madbull in Community (server side) MOD   
    Introduction .
     
    Lots of times, addons need to run server side, at server init.. Examples can be: spawning of items like crates, custom missions, modified loot scripts or indestructable objects.
    To accomplish this, the best was is to have a PBO framework which resides in @EpochHive/Addons, *NEXT TO* the Epoch PBO's so it can be run without ANY modification of Epoch server files.
    Making such a PBO isn't hard, but requires lots of reading and testing and sometimes a step too far for server admins.. Having such a PBO ready to use for your own is what I'm going to post here, and explain line by line.
     
    Goal .
     
    The goal is to present something that anyone with notepadd++, PBOManager and some basic scripting knowledge can use for their own server, to implement posted scriptlets with goodies here on the forum without having to figure out how to make the basics work.. See it as a framework in which you can drag and drop community posted scripts and make them work server side.
    Also, these scripts are not transferred to clients, making it "secure" if coders don't want to share lengthy scripts, or prevent hackers looking for holes.
     
    Details. .
     
    The frameworks exists of 2 folders and some config files..
    1 Folder, called "serverside" is where you drop your scripts in.
    1 Folder, called "init" contains a file called "fn_init.sqf" in which you declare all functions/procedures
    1 File called "config.cpp" which does not need to be edited, ever.
    1 File called "PboPrefix.txt" which defines the necessary prefixes so Epoch servers understand where to look for functions etc. You will never have to edit this file either.
     
     
    * fn_init.sqf
     
    This file contains declaration of my example scripts, which spawns a set number of crates randomly on the map, with configurable settings,plus some other  scripts that could be useful.
    // Include your sqf files in here. /* spawncrates.sqf spawns random crates around a marker spawn-one-NPC.sqf puts an NPC on the map, which can be configured to "do stuff" indestructable.sqf sets certain building objects invulnerable */ diag_log format ['Starting Community MOD']; //call compile preprocessFileLineNumbers "\x\addons\custom\serverside\spawncrates.sqf"; //call compile preprocessFileLineNumbers "\x\addons\custom\serverside\spawn-one-NPC.sqf"; [] execVM '\x\addons\custom\serverside\indestructible.sqf'; When you add your own scripts, which you drop in the "serverside" folder, you add each one as an extra line, with the same path, but different name
    For example, you added a spawncustomloot.sqf in the serverside folder, you add this line :
    call compile preprocessFileLineNumbers "\x\addons\custom\serverside\spawncustomloot.sqf";  or (If you lockup the server with inifinite precompiled loops) :
    [] execVM '\x\addons\custom\serverside\spawncustomloot.sqf'; * spawncrates.sqf (example)
     
    This is the example script, which is currently set to spawn 4 crates on Sector B island on Tavi, randomly chosen within 4 randomly set green circles.. When a player starts the game, he will see 4 green circles, in which somewhere is a crate with building goodies. I'll advice to have these crates heavily guarded by Ai :) !!
    You can set size of the circles, number of crates, make it spawn shore or even water only, or hide the green circles making them totally obscured by any markers, and any lucky guy will have a field day when he finds one. The crates are filled with random (set) number of items, and is easily adaptable for guns, or ammo..
    The crates CAN be lifted with a CH-67 for example, but will NOT survive server restarts !
    I also included the normal marker and distances to be used as "map wide" spawn points. Just put "//" in front of the lines you don't want to be processed and remove them from the others.
    /* File: spawncrates.sqf Author: NedFox [TZW] Description: Custom Crates, randomly placed around a marker which is visible (or not). */ if (isServer) then { _numberofcrates = 4; // this is the number of crates that you want to spawn _spawnCenter = [22600,19600,0]; // Example : This is the center around which the crates will spawn, Sector B island on Tavi. //_spawnCenter = getmarkerpos "center"; // Use this if you want the global center of the map, it's declared in mission.sqm, island specific _min = 0; // minimum distance from the center position (Number) in meters //_max = 12000; // maximum distance from the center position (Number) in meters _max = 450; // Example : maximum range of spawned crates, to keep them INSIDE the sector B compound _mindist = 5; // minimum distance from the nearest object (Number) in meters, ie. spawn at least this distance away from anything within x meters.. _water = 0; // water mode (Number) 0: cannot be in water , 1: can either be in water or not , 2: must be in water _shoremode = 0; // 0: does not have to be at a shore , 1: must be at a shore _marker = True; // Draw a green circle in which the crate will be spawned randomly _markersize = 100; // Radius of the marker in meters diag_log format['Starting spawncrates.sqf']; //make a line in the RPT file to notify the scripts is going to run now. for "_i" from 1 to _numberofcrates do   { _pos = [_spawnCenter,_min,_max,_mindist,_water,2000,_shoremode] call BIS_fnc_findSafePos; // find a random location within range if (_marker) then {      _event_marker = createMarker [ format ["loot_marker_%1", _i], _pos];   _event_marker setMarkerShape "ELLIPSE";   _event_marker setMarkerColor "ColorGreen";   _event_marker setMarkerAlpha 0.75;   _event_marker setMarkerSize [(_markersize+15), (_markersize+15)]; //green circle slightly bigger , box can spawn just outside if not increased   _pos = [_pos,0,_markersize,0,_water,2000,_shoremode] call BIS_fnc_findSafePos;  //find a random spot INSIDE the marker area   _pos = [_pos select 0, _pos select 1, 0]; }; diag_log format['Spawncrate %1 : Location %2',_i,_pos]; // post a line in the RPT file with the exact location of the crate. _box = "CargoNet_01_box_F" createvehicle _pos;   //create the crate  .. These ARE liftable with chopper like the CH-67 , but will not stay after restarts ! // _box = "Box_NATO_Support_F" createvehicle _pos;   //create a smaller crate. Use either, not both clearMagazineCargoGlobal _box; clearWeaponCargoGlobal _box;     clearItemCargoGlobal _box; _box setVariable ["permaLoot",true]; //stay until reset _box allowDamage false; // Prevent boxes to explode when spawning _box addItemCargoGlobal ["MortarBucket", 4 + (random 2)];  // between 4-6 _box addItemCargoGlobal ["Cinderblocks", 8 + (random 4)]; // between 8-12 _box addItemCargoGlobal ["CircuitParts", (random 1)]; // between 0-1 _box addItemCargoGlobal ["ItemCorrugated", 2 + (random 3)]; // between 2-5 _box addItemCargoGlobal ["ItemCorrugatedLg", (random 2)]; // between 0-2 _box addItemCargoGlobal ["KitTipi", (random 2)]; // between 0-2 _box addItemCargoGlobal ["CSGAS", 1 + (random 1)]; // between 1-2 _box addItemCargoGlobal ["EnergyPackLg", 1 + (random 1)]; // between 1-2 _box addItemCargoGlobal ["KitShelf", 2 + (random 2)]; // between 2-4 _box addItemCargoGlobal ["KitFoundation", (random 2)]; // between 0-2 _box addItemCargoGlobal ["Chainsaw", (random 1)]; // between 0-1 _box addItemCargoGlobal ["KitCinderWall", 3 + (random 4)]; // between 3-7   } }; Attached below this post is the PBO, which simply can be dropped into the @EpochHive/Addon folder and does not require ANY other settings to activate.
     
    I hope this framework will be a standard for other coders in the future to add functions too, without having ppl to modify all kind if init.sqf, making modifications in the mission.PBO which makes the client downloads larger etc etc.
  9. Like
    nedfox got a reaction from Tom in [REQUEST] Create a box with items that I want   
    Drop this in your @EpochHive/Addons folder. It has been tested by several server admins. Everything in there is remarked with explanations, so with a bit of good reading you should be fine. You'll need to edit the crate creation.sqf since it's set for taviana!   I've made a lengthy post in the MOD section but that one still hasn't been approved by a moderator :(
  10. Like
    nedfox reacted to mgm in Notepad++ Script Checker   
    You can also use KDiff3 (free software) for 3-way file comparison if you need (nothing to do with SQF syntax though).



     
    After testing several side-by-side file comparison utilities nowadays on Windows I mostly use WinMerge (screenshot below) for 2-way comparison.
    It also is free software, really quick and it feels the best & lightest on system resources.
     
    I only use KDiff (screenshot above) when I need a threesome.



     
     
    I do not know any script syntax parsers - if anyone knows one please do share?
    I am starting to think this (restarting the server due to a missing ; or } is the one single massive timewaster in SQF scripting in my limited experience).
     
    EDIT: I am talking about a parser, an external utility that can (on-demand) go through code block by block, and confirm that all paranthesis/brackets are closed also that no typos like (whiel) etc. exist.
    Obviously this will help a lot by preventing the 2-3 minute startup time with a broken SQF file.
  11. Like
    nedfox got a reaction from Marvin Hagler in What is the vision, the "Why?" of Epoch?   
    Zombies, base building, and trying to survive for days gearing up to a point you would dare to take on players was key for me in A2.
     
    Rock monsters, Antagonists, gearing up in 5 minutes to go full PVP again and die without any repurcussions is killing the game in A3 atm.. We've had full servers, for a few weeks, then it dwindled down to pure zero, even with active admins and a good community..
     
    The game, after 2 weeks playing on a server, is BORING.  There's literally no hardcore survival, the thing that made Dayz so successful.
    This results in players asking for tanks, planes, launchers and all the other stuff that Wasteland brings, esp. since base building is 99% hard work to build followed by 1% effort by others to undo it.
     
    The game is no where close to be balanced / interesting, and the closed server files make it even worse for the real coders and admins that want to make a bit of fun out of the current state.
     
    IMO, Epoch should go back to closed beta, with a few whitelisted servers and work on balance, balance and more balance, in stead of adding more ferry wheels, poppy plants and other "cool looking things that I won't bother looking at".
  12. Like
    nedfox got a reaction from mgm in Community (server side) MOD   
    Introduction .
     
    Lots of times, addons need to run server side, at server init.. Examples can be: spawning of items like crates, custom missions, modified loot scripts or indestructable objects.
    To accomplish this, the best was is to have a PBO framework which resides in @EpochHive/Addons, *NEXT TO* the Epoch PBO's so it can be run without ANY modification of Epoch server files.
    Making such a PBO isn't hard, but requires lots of reading and testing and sometimes a step too far for server admins.. Having such a PBO ready to use for your own is what I'm going to post here, and explain line by line.
     
    Goal .
     
    The goal is to present something that anyone with notepadd++, PBOManager and some basic scripting knowledge can use for their own server, to implement posted scriptlets with goodies here on the forum without having to figure out how to make the basics work.. See it as a framework in which you can drag and drop community posted scripts and make them work server side.
    Also, these scripts are not transferred to clients, making it "secure" if coders don't want to share lengthy scripts, or prevent hackers looking for holes.
     
    Details. .
     
    The frameworks exists of 2 folders and some config files..
    1 Folder, called "serverside" is where you drop your scripts in.
    1 Folder, called "init" contains a file called "fn_init.sqf" in which you declare all functions/procedures
    1 File called "config.cpp" which does not need to be edited, ever.
    1 File called "PboPrefix.txt" which defines the necessary prefixes so Epoch servers understand where to look for functions etc. You will never have to edit this file either.
     
     
    * fn_init.sqf
     
    This file contains declaration of my example scripts, which spawns a set number of crates randomly on the map, with configurable settings,plus some other  scripts that could be useful.
    // Include your sqf files in here. /* spawncrates.sqf spawns random crates around a marker spawn-one-NPC.sqf puts an NPC on the map, which can be configured to "do stuff" indestructable.sqf sets certain building objects invulnerable */ diag_log format ['Starting Community MOD']; //call compile preprocessFileLineNumbers "\x\addons\custom\serverside\spawncrates.sqf"; //call compile preprocessFileLineNumbers "\x\addons\custom\serverside\spawn-one-NPC.sqf"; [] execVM '\x\addons\custom\serverside\indestructible.sqf'; When you add your own scripts, which you drop in the "serverside" folder, you add each one as an extra line, with the same path, but different name
    For example, you added a spawncustomloot.sqf in the serverside folder, you add this line :
    call compile preprocessFileLineNumbers "\x\addons\custom\serverside\spawncustomloot.sqf";  or (If you lockup the server with inifinite precompiled loops) :
    [] execVM '\x\addons\custom\serverside\spawncustomloot.sqf'; * spawncrates.sqf (example)
     
    This is the example script, which is currently set to spawn 4 crates on Sector B island on Tavi, randomly chosen within 4 randomly set green circles.. When a player starts the game, he will see 4 green circles, in which somewhere is a crate with building goodies. I'll advice to have these crates heavily guarded by Ai :) !!
    You can set size of the circles, number of crates, make it spawn shore or even water only, or hide the green circles making them totally obscured by any markers, and any lucky guy will have a field day when he finds one. The crates are filled with random (set) number of items, and is easily adaptable for guns, or ammo..
    The crates CAN be lifted with a CH-67 for example, but will NOT survive server restarts !
    I also included the normal marker and distances to be used as "map wide" spawn points. Just put "//" in front of the lines you don't want to be processed and remove them from the others.
    /* File: spawncrates.sqf Author: NedFox [TZW] Description: Custom Crates, randomly placed around a marker which is visible (or not). */ if (isServer) then { _numberofcrates = 4; // this is the number of crates that you want to spawn _spawnCenter = [22600,19600,0]; // Example : This is the center around which the crates will spawn, Sector B island on Tavi. //_spawnCenter = getmarkerpos "center"; // Use this if you want the global center of the map, it's declared in mission.sqm, island specific _min = 0; // minimum distance from the center position (Number) in meters //_max = 12000; // maximum distance from the center position (Number) in meters _max = 450; // Example : maximum range of spawned crates, to keep them INSIDE the sector B compound _mindist = 5; // minimum distance from the nearest object (Number) in meters, ie. spawn at least this distance away from anything within x meters.. _water = 0; // water mode (Number) 0: cannot be in water , 1: can either be in water or not , 2: must be in water _shoremode = 0; // 0: does not have to be at a shore , 1: must be at a shore _marker = True; // Draw a green circle in which the crate will be spawned randomly _markersize = 100; // Radius of the marker in meters diag_log format['Starting spawncrates.sqf']; //make a line in the RPT file to notify the scripts is going to run now. for "_i" from 1 to _numberofcrates do   { _pos = [_spawnCenter,_min,_max,_mindist,_water,2000,_shoremode] call BIS_fnc_findSafePos; // find a random location within range if (_marker) then {      _event_marker = createMarker [ format ["loot_marker_%1", _i], _pos];   _event_marker setMarkerShape "ELLIPSE";   _event_marker setMarkerColor "ColorGreen";   _event_marker setMarkerAlpha 0.75;   _event_marker setMarkerSize [(_markersize+15), (_markersize+15)]; //green circle slightly bigger , box can spawn just outside if not increased   _pos = [_pos,0,_markersize,0,_water,2000,_shoremode] call BIS_fnc_findSafePos;  //find a random spot INSIDE the marker area   _pos = [_pos select 0, _pos select 1, 0]; }; diag_log format['Spawncrate %1 : Location %2',_i,_pos]; // post a line in the RPT file with the exact location of the crate. _box = "CargoNet_01_box_F" createvehicle _pos;   //create the crate  .. These ARE liftable with chopper like the CH-67 , but will not stay after restarts ! // _box = "Box_NATO_Support_F" createvehicle _pos;   //create a smaller crate. Use either, not both clearMagazineCargoGlobal _box; clearWeaponCargoGlobal _box;     clearItemCargoGlobal _box; _box setVariable ["permaLoot",true]; //stay until reset _box allowDamage false; // Prevent boxes to explode when spawning _box addItemCargoGlobal ["MortarBucket", 4 + (random 2)];  // between 4-6 _box addItemCargoGlobal ["Cinderblocks", 8 + (random 4)]; // between 8-12 _box addItemCargoGlobal ["CircuitParts", (random 1)]; // between 0-1 _box addItemCargoGlobal ["ItemCorrugated", 2 + (random 3)]; // between 2-5 _box addItemCargoGlobal ["ItemCorrugatedLg", (random 2)]; // between 0-2 _box addItemCargoGlobal ["KitTipi", (random 2)]; // between 0-2 _box addItemCargoGlobal ["CSGAS", 1 + (random 1)]; // between 1-2 _box addItemCargoGlobal ["EnergyPackLg", 1 + (random 1)]; // between 1-2 _box addItemCargoGlobal ["KitShelf", 2 + (random 2)]; // between 2-4 _box addItemCargoGlobal ["KitFoundation", (random 2)]; // between 0-2 _box addItemCargoGlobal ["Chainsaw", (random 1)]; // between 0-1 _box addItemCargoGlobal ["KitCinderWall", 3 + (random 4)]; // between 3-7   } }; Attached below this post is the PBO, which simply can be dropped into the @EpochHive/Addon folder and does not require ANY other settings to activate.
     
    I hope this framework will be a standard for other coders in the future to add functions too, without having ppl to modify all kind if init.sqf, making modifications in the mission.PBO which makes the client downloads larger etc etc.
  13. Like
    nedfox got a reaction from fr1nk in Community (server side) MOD   
    Introduction .
     
    Lots of times, addons need to run server side, at server init.. Examples can be: spawning of items like crates, custom missions, modified loot scripts or indestructable objects.
    To accomplish this, the best was is to have a PBO framework which resides in @EpochHive/Addons, *NEXT TO* the Epoch PBO's so it can be run without ANY modification of Epoch server files.
    Making such a PBO isn't hard, but requires lots of reading and testing and sometimes a step too far for server admins.. Having such a PBO ready to use for your own is what I'm going to post here, and explain line by line.
     
    Goal .
     
    The goal is to present something that anyone with notepadd++, PBOManager and some basic scripting knowledge can use for their own server, to implement posted scriptlets with goodies here on the forum without having to figure out how to make the basics work.. See it as a framework in which you can drag and drop community posted scripts and make them work server side.
    Also, these scripts are not transferred to clients, making it "secure" if coders don't want to share lengthy scripts, or prevent hackers looking for holes.
     
    Details. .
     
    The frameworks exists of 2 folders and some config files..
    1 Folder, called "serverside" is where you drop your scripts in.
    1 Folder, called "init" contains a file called "fn_init.sqf" in which you declare all functions/procedures
    1 File called "config.cpp" which does not need to be edited, ever.
    1 File called "PboPrefix.txt" which defines the necessary prefixes so Epoch servers understand where to look for functions etc. You will never have to edit this file either.
     
     
    * fn_init.sqf
     
    This file contains declaration of my example scripts, which spawns a set number of crates randomly on the map, with configurable settings,plus some other  scripts that could be useful.
    // Include your sqf files in here. /* spawncrates.sqf spawns random crates around a marker spawn-one-NPC.sqf puts an NPC on the map, which can be configured to "do stuff" indestructable.sqf sets certain building objects invulnerable */ diag_log format ['Starting Community MOD']; //call compile preprocessFileLineNumbers "\x\addons\custom\serverside\spawncrates.sqf"; //call compile preprocessFileLineNumbers "\x\addons\custom\serverside\spawn-one-NPC.sqf"; [] execVM '\x\addons\custom\serverside\indestructible.sqf'; When you add your own scripts, which you drop in the "serverside" folder, you add each one as an extra line, with the same path, but different name
    For example, you added a spawncustomloot.sqf in the serverside folder, you add this line :
    call compile preprocessFileLineNumbers "\x\addons\custom\serverside\spawncustomloot.sqf";  or (If you lockup the server with inifinite precompiled loops) :
    [] execVM '\x\addons\custom\serverside\spawncustomloot.sqf'; * spawncrates.sqf (example)
     
    This is the example script, which is currently set to spawn 4 crates on Sector B island on Tavi, randomly chosen within 4 randomly set green circles.. When a player starts the game, he will see 4 green circles, in which somewhere is a crate with building goodies. I'll advice to have these crates heavily guarded by Ai :) !!
    You can set size of the circles, number of crates, make it spawn shore or even water only, or hide the green circles making them totally obscured by any markers, and any lucky guy will have a field day when he finds one. The crates are filled with random (set) number of items, and is easily adaptable for guns, or ammo..
    The crates CAN be lifted with a CH-67 for example, but will NOT survive server restarts !
    I also included the normal marker and distances to be used as "map wide" spawn points. Just put "//" in front of the lines you don't want to be processed and remove them from the others.
    /* File: spawncrates.sqf Author: NedFox [TZW] Description: Custom Crates, randomly placed around a marker which is visible (or not). */ if (isServer) then { _numberofcrates = 4; // this is the number of crates that you want to spawn _spawnCenter = [22600,19600,0]; // Example : This is the center around which the crates will spawn, Sector B island on Tavi. //_spawnCenter = getmarkerpos "center"; // Use this if you want the global center of the map, it's declared in mission.sqm, island specific _min = 0; // minimum distance from the center position (Number) in meters //_max = 12000; // maximum distance from the center position (Number) in meters _max = 450; // Example : maximum range of spawned crates, to keep them INSIDE the sector B compound _mindist = 5; // minimum distance from the nearest object (Number) in meters, ie. spawn at least this distance away from anything within x meters.. _water = 0; // water mode (Number) 0: cannot be in water , 1: can either be in water or not , 2: must be in water _shoremode = 0; // 0: does not have to be at a shore , 1: must be at a shore _marker = True; // Draw a green circle in which the crate will be spawned randomly _markersize = 100; // Radius of the marker in meters diag_log format['Starting spawncrates.sqf']; //make a line in the RPT file to notify the scripts is going to run now. for "_i" from 1 to _numberofcrates do   { _pos = [_spawnCenter,_min,_max,_mindist,_water,2000,_shoremode] call BIS_fnc_findSafePos; // find a random location within range if (_marker) then {      _event_marker = createMarker [ format ["loot_marker_%1", _i], _pos];   _event_marker setMarkerShape "ELLIPSE";   _event_marker setMarkerColor "ColorGreen";   _event_marker setMarkerAlpha 0.75;   _event_marker setMarkerSize [(_markersize+15), (_markersize+15)]; //green circle slightly bigger , box can spawn just outside if not increased   _pos = [_pos,0,_markersize,0,_water,2000,_shoremode] call BIS_fnc_findSafePos;  //find a random spot INSIDE the marker area   _pos = [_pos select 0, _pos select 1, 0]; }; diag_log format['Spawncrate %1 : Location %2',_i,_pos]; // post a line in the RPT file with the exact location of the crate. _box = "CargoNet_01_box_F" createvehicle _pos;   //create the crate  .. These ARE liftable with chopper like the CH-67 , but will not stay after restarts ! // _box = "Box_NATO_Support_F" createvehicle _pos;   //create a smaller crate. Use either, not both clearMagazineCargoGlobal _box; clearWeaponCargoGlobal _box;     clearItemCargoGlobal _box; _box setVariable ["permaLoot",true]; //stay until reset _box allowDamage false; // Prevent boxes to explode when spawning _box addItemCargoGlobal ["MortarBucket", 4 + (random 2)];  // between 4-6 _box addItemCargoGlobal ["Cinderblocks", 8 + (random 4)]; // between 8-12 _box addItemCargoGlobal ["CircuitParts", (random 1)]; // between 0-1 _box addItemCargoGlobal ["ItemCorrugated", 2 + (random 3)]; // between 2-5 _box addItemCargoGlobal ["ItemCorrugatedLg", (random 2)]; // between 0-2 _box addItemCargoGlobal ["KitTipi", (random 2)]; // between 0-2 _box addItemCargoGlobal ["CSGAS", 1 + (random 1)]; // between 1-2 _box addItemCargoGlobal ["EnergyPackLg", 1 + (random 1)]; // between 1-2 _box addItemCargoGlobal ["KitShelf", 2 + (random 2)]; // between 2-4 _box addItemCargoGlobal ["KitFoundation", (random 2)]; // between 0-2 _box addItemCargoGlobal ["Chainsaw", (random 1)]; // between 0-1 _box addItemCargoGlobal ["KitCinderWall", 3 + (random 4)]; // between 3-7   } }; Attached below this post is the PBO, which simply can be dropped into the @EpochHive/Addon folder and does not require ANY other settings to activate.
     
    I hope this framework will be a standard for other coders in the future to add functions too, without having ppl to modify all kind if init.sqf, making modifications in the mission.PBO which makes the client downloads larger etc etc.
  14. Like
    nedfox got a reaction from rhughes945 in Community (server side) MOD   
    Working on a indestructable base script atm, easy to configure and implement.. Some PVE servers really want this stuff, so why not :)
  15. Like
    nedfox got a reaction from BullRaider in sale value   
    As posted in the other thread, not possible since it requires modifying files we're not supposed to alter.. Hope for the best !
  16. Like
    nedfox got a reaction from BullRaider in sale value   
    Already asked if this forum could be renamed to "Server related issues" but that's too global I guess.. TBH there's no real forum for these things, unless you would drop it in scripting discussions.
     
    @ OP : Those things are locked inside the PBO's we're not supposed to alter.
    Hopefully coming soon.
  17. Like
    nedfox got a reaction from San in Community (server side) MOD   
    Introduction .
     
    Lots of times, addons need to run server side, at server init.. Examples can be: spawning of items like crates, custom missions, modified loot scripts or indestructable objects.
    To accomplish this, the best was is to have a PBO framework which resides in @EpochHive/Addons, *NEXT TO* the Epoch PBO's so it can be run without ANY modification of Epoch server files.
    Making such a PBO isn't hard, but requires lots of reading and testing and sometimes a step too far for server admins.. Having such a PBO ready to use for your own is what I'm going to post here, and explain line by line.
     
    Goal .
     
    The goal is to present something that anyone with notepadd++, PBOManager and some basic scripting knowledge can use for their own server, to implement posted scriptlets with goodies here on the forum without having to figure out how to make the basics work.. See it as a framework in which you can drag and drop community posted scripts and make them work server side.
    Also, these scripts are not transferred to clients, making it "secure" if coders don't want to share lengthy scripts, or prevent hackers looking for holes.
     
    Details. .
     
    The frameworks exists of 2 folders and some config files..
    1 Folder, called "serverside" is where you drop your scripts in.
    1 Folder, called "init" contains a file called "fn_init.sqf" in which you declare all functions/procedures
    1 File called "config.cpp" which does not need to be edited, ever.
    1 File called "PboPrefix.txt" which defines the necessary prefixes so Epoch servers understand where to look for functions etc. You will never have to edit this file either.
     
     
    * fn_init.sqf
     
    This file contains declaration of my example scripts, which spawns a set number of crates randomly on the map, with configurable settings,plus some other  scripts that could be useful.
    // Include your sqf files in here. /* spawncrates.sqf spawns random crates around a marker spawn-one-NPC.sqf puts an NPC on the map, which can be configured to "do stuff" indestructable.sqf sets certain building objects invulnerable */ diag_log format ['Starting Community MOD']; //call compile preprocessFileLineNumbers "\x\addons\custom\serverside\spawncrates.sqf"; //call compile preprocessFileLineNumbers "\x\addons\custom\serverside\spawn-one-NPC.sqf"; [] execVM '\x\addons\custom\serverside\indestructible.sqf'; When you add your own scripts, which you drop in the "serverside" folder, you add each one as an extra line, with the same path, but different name
    For example, you added a spawncustomloot.sqf in the serverside folder, you add this line :
    call compile preprocessFileLineNumbers "\x\addons\custom\serverside\spawncustomloot.sqf";  or (If you lockup the server with inifinite precompiled loops) :
    [] execVM '\x\addons\custom\serverside\spawncustomloot.sqf'; * spawncrates.sqf (example)
     
    This is the example script, which is currently set to spawn 4 crates on Sector B island on Tavi, randomly chosen within 4 randomly set green circles.. When a player starts the game, he will see 4 green circles, in which somewhere is a crate with building goodies. I'll advice to have these crates heavily guarded by Ai :) !!
    You can set size of the circles, number of crates, make it spawn shore or even water only, or hide the green circles making them totally obscured by any markers, and any lucky guy will have a field day when he finds one. The crates are filled with random (set) number of items, and is easily adaptable for guns, or ammo..
    The crates CAN be lifted with a CH-67 for example, but will NOT survive server restarts !
    I also included the normal marker and distances to be used as "map wide" spawn points. Just put "//" in front of the lines you don't want to be processed and remove them from the others.
    /* File: spawncrates.sqf Author: NedFox [TZW] Description: Custom Crates, randomly placed around a marker which is visible (or not). */ if (isServer) then { _numberofcrates = 4; // this is the number of crates that you want to spawn _spawnCenter = [22600,19600,0]; // Example : This is the center around which the crates will spawn, Sector B island on Tavi. //_spawnCenter = getmarkerpos "center"; // Use this if you want the global center of the map, it's declared in mission.sqm, island specific _min = 0; // minimum distance from the center position (Number) in meters //_max = 12000; // maximum distance from the center position (Number) in meters _max = 450; // Example : maximum range of spawned crates, to keep them INSIDE the sector B compound _mindist = 5; // minimum distance from the nearest object (Number) in meters, ie. spawn at least this distance away from anything within x meters.. _water = 0; // water mode (Number) 0: cannot be in water , 1: can either be in water or not , 2: must be in water _shoremode = 0; // 0: does not have to be at a shore , 1: must be at a shore _marker = True; // Draw a green circle in which the crate will be spawned randomly _markersize = 100; // Radius of the marker in meters diag_log format['Starting spawncrates.sqf']; //make a line in the RPT file to notify the scripts is going to run now. for "_i" from 1 to _numberofcrates do   { _pos = [_spawnCenter,_min,_max,_mindist,_water,2000,_shoremode] call BIS_fnc_findSafePos; // find a random location within range if (_marker) then {      _event_marker = createMarker [ format ["loot_marker_%1", _i], _pos];   _event_marker setMarkerShape "ELLIPSE";   _event_marker setMarkerColor "ColorGreen";   _event_marker setMarkerAlpha 0.75;   _event_marker setMarkerSize [(_markersize+15), (_markersize+15)]; //green circle slightly bigger , box can spawn just outside if not increased   _pos = [_pos,0,_markersize,0,_water,2000,_shoremode] call BIS_fnc_findSafePos;  //find a random spot INSIDE the marker area   _pos = [_pos select 0, _pos select 1, 0]; }; diag_log format['Spawncrate %1 : Location %2',_i,_pos]; // post a line in the RPT file with the exact location of the crate. _box = "CargoNet_01_box_F" createvehicle _pos;   //create the crate  .. These ARE liftable with chopper like the CH-67 , but will not stay after restarts ! // _box = "Box_NATO_Support_F" createvehicle _pos;   //create a smaller crate. Use either, not both clearMagazineCargoGlobal _box; clearWeaponCargoGlobal _box;     clearItemCargoGlobal _box; _box setVariable ["permaLoot",true]; //stay until reset _box allowDamage false; // Prevent boxes to explode when spawning _box addItemCargoGlobal ["MortarBucket", 4 + (random 2)];  // between 4-6 _box addItemCargoGlobal ["Cinderblocks", 8 + (random 4)]; // between 8-12 _box addItemCargoGlobal ["CircuitParts", (random 1)]; // between 0-1 _box addItemCargoGlobal ["ItemCorrugated", 2 + (random 3)]; // between 2-5 _box addItemCargoGlobal ["ItemCorrugatedLg", (random 2)]; // between 0-2 _box addItemCargoGlobal ["KitTipi", (random 2)]; // between 0-2 _box addItemCargoGlobal ["CSGAS", 1 + (random 1)]; // between 1-2 _box addItemCargoGlobal ["EnergyPackLg", 1 + (random 1)]; // between 1-2 _box addItemCargoGlobal ["KitShelf", 2 + (random 2)]; // between 2-4 _box addItemCargoGlobal ["KitFoundation", (random 2)]; // between 0-2 _box addItemCargoGlobal ["Chainsaw", (random 1)]; // between 0-1 _box addItemCargoGlobal ["KitCinderWall", 3 + (random 4)]; // between 3-7   } }; Attached below this post is the PBO, which simply can be dropped into the @EpochHive/Addon folder and does not require ANY other settings to activate.
     
    I hope this framework will be a standard for other coders in the future to add functions too, without having ppl to modify all kind if init.sqf, making modifications in the mission.PBO which makes the client downloads larger etc etc.
  18. Like
    nedfox got a reaction from stonXer in Most (not all) new players can't connect...what's happening?   
    it's a troll dude, ignore it :)
  19. Like
    nedfox got a reaction from Suppe in Community (server side) MOD   
    Cheers Suppe, you got me on the right track with the indestructable script.. I'll try and make it as readable as possible for admins to understand what it does, and able to alter it without breaking it. (which is HARD :P)
     
    Also, the spawn AI was due to the guy who wanted some AI's standing around doing nothing; When I have time coming days I'll comment every line (with options) so it could be used to spawn any random AI somewhere, aggressive or not etc..
    Not that it matters, but if I keep it simple, it might give insight in the AI mission scripts that have been around; Giving a simple example with easy configs will make ppl realise what all these things do to a unit.
  20. Like
    nedfox reacted to Richie in sale value   
    Yes, this would definitely help with server installation issues </sarcasm>
    or this post is in the wrong section :unsure:
  21. Like
    nedfox got a reaction from second_coming in Community (server side) MOD   
    Introduction .
     
    Lots of times, addons need to run server side, at server init.. Examples can be: spawning of items like crates, custom missions, modified loot scripts or indestructable objects.
    To accomplish this, the best was is to have a PBO framework which resides in @EpochHive/Addons, *NEXT TO* the Epoch PBO's so it can be run without ANY modification of Epoch server files.
    Making such a PBO isn't hard, but requires lots of reading and testing and sometimes a step too far for server admins.. Having such a PBO ready to use for your own is what I'm going to post here, and explain line by line.
     
    Goal .
     
    The goal is to present something that anyone with notepadd++, PBOManager and some basic scripting knowledge can use for their own server, to implement posted scriptlets with goodies here on the forum without having to figure out how to make the basics work.. See it as a framework in which you can drag and drop community posted scripts and make them work server side.
    Also, these scripts are not transferred to clients, making it "secure" if coders don't want to share lengthy scripts, or prevent hackers looking for holes.
     
    Details. .
     
    The frameworks exists of 2 folders and some config files..
    1 Folder, called "serverside" is where you drop your scripts in.
    1 Folder, called "init" contains a file called "fn_init.sqf" in which you declare all functions/procedures
    1 File called "config.cpp" which does not need to be edited, ever.
    1 File called "PboPrefix.txt" which defines the necessary prefixes so Epoch servers understand where to look for functions etc. You will never have to edit this file either.
     
     
    * fn_init.sqf
     
    This file contains declaration of my example scripts, which spawns a set number of crates randomly on the map, with configurable settings,plus some other  scripts that could be useful.
    // Include your sqf files in here. /* spawncrates.sqf spawns random crates around a marker spawn-one-NPC.sqf puts an NPC on the map, which can be configured to "do stuff" indestructable.sqf sets certain building objects invulnerable */ diag_log format ['Starting Community MOD']; //call compile preprocessFileLineNumbers "\x\addons\custom\serverside\spawncrates.sqf"; //call compile preprocessFileLineNumbers "\x\addons\custom\serverside\spawn-one-NPC.sqf"; [] execVM '\x\addons\custom\serverside\indestructible.sqf'; When you add your own scripts, which you drop in the "serverside" folder, you add each one as an extra line, with the same path, but different name
    For example, you added a spawncustomloot.sqf in the serverside folder, you add this line :
    call compile preprocessFileLineNumbers "\x\addons\custom\serverside\spawncustomloot.sqf";  or (If you lockup the server with inifinite precompiled loops) :
    [] execVM '\x\addons\custom\serverside\spawncustomloot.sqf'; * spawncrates.sqf (example)
     
    This is the example script, which is currently set to spawn 4 crates on Sector B island on Tavi, randomly chosen within 4 randomly set green circles.. When a player starts the game, he will see 4 green circles, in which somewhere is a crate with building goodies. I'll advice to have these crates heavily guarded by Ai :) !!
    You can set size of the circles, number of crates, make it spawn shore or even water only, or hide the green circles making them totally obscured by any markers, and any lucky guy will have a field day when he finds one. The crates are filled with random (set) number of items, and is easily adaptable for guns, or ammo..
    The crates CAN be lifted with a CH-67 for example, but will NOT survive server restarts !
    I also included the normal marker and distances to be used as "map wide" spawn points. Just put "//" in front of the lines you don't want to be processed and remove them from the others.
    /* File: spawncrates.sqf Author: NedFox [TZW] Description: Custom Crates, randomly placed around a marker which is visible (or not). */ if (isServer) then { _numberofcrates = 4; // this is the number of crates that you want to spawn _spawnCenter = [22600,19600,0]; // Example : This is the center around which the crates will spawn, Sector B island on Tavi. //_spawnCenter = getmarkerpos "center"; // Use this if you want the global center of the map, it's declared in mission.sqm, island specific _min = 0; // minimum distance from the center position (Number) in meters //_max = 12000; // maximum distance from the center position (Number) in meters _max = 450; // Example : maximum range of spawned crates, to keep them INSIDE the sector B compound _mindist = 5; // minimum distance from the nearest object (Number) in meters, ie. spawn at least this distance away from anything within x meters.. _water = 0; // water mode (Number) 0: cannot be in water , 1: can either be in water or not , 2: must be in water _shoremode = 0; // 0: does not have to be at a shore , 1: must be at a shore _marker = True; // Draw a green circle in which the crate will be spawned randomly _markersize = 100; // Radius of the marker in meters diag_log format['Starting spawncrates.sqf']; //make a line in the RPT file to notify the scripts is going to run now. for "_i" from 1 to _numberofcrates do   { _pos = [_spawnCenter,_min,_max,_mindist,_water,2000,_shoremode] call BIS_fnc_findSafePos; // find a random location within range if (_marker) then {      _event_marker = createMarker [ format ["loot_marker_%1", _i], _pos];   _event_marker setMarkerShape "ELLIPSE";   _event_marker setMarkerColor "ColorGreen";   _event_marker setMarkerAlpha 0.75;   _event_marker setMarkerSize [(_markersize+15), (_markersize+15)]; //green circle slightly bigger , box can spawn just outside if not increased   _pos = [_pos,0,_markersize,0,_water,2000,_shoremode] call BIS_fnc_findSafePos;  //find a random spot INSIDE the marker area   _pos = [_pos select 0, _pos select 1, 0]; }; diag_log format['Spawncrate %1 : Location %2',_i,_pos]; // post a line in the RPT file with the exact location of the crate. _box = "CargoNet_01_box_F" createvehicle _pos;   //create the crate  .. These ARE liftable with chopper like the CH-67 , but will not stay after restarts ! // _box = "Box_NATO_Support_F" createvehicle _pos;   //create a smaller crate. Use either, not both clearMagazineCargoGlobal _box; clearWeaponCargoGlobal _box;     clearItemCargoGlobal _box; _box setVariable ["permaLoot",true]; //stay until reset _box allowDamage false; // Prevent boxes to explode when spawning _box addItemCargoGlobal ["MortarBucket", 4 + (random 2)];  // between 4-6 _box addItemCargoGlobal ["Cinderblocks", 8 + (random 4)]; // between 8-12 _box addItemCargoGlobal ["CircuitParts", (random 1)]; // between 0-1 _box addItemCargoGlobal ["ItemCorrugated", 2 + (random 3)]; // between 2-5 _box addItemCargoGlobal ["ItemCorrugatedLg", (random 2)]; // between 0-2 _box addItemCargoGlobal ["KitTipi", (random 2)]; // between 0-2 _box addItemCargoGlobal ["CSGAS", 1 + (random 1)]; // between 1-2 _box addItemCargoGlobal ["EnergyPackLg", 1 + (random 1)]; // between 1-2 _box addItemCargoGlobal ["KitShelf", 2 + (random 2)]; // between 2-4 _box addItemCargoGlobal ["KitFoundation", (random 2)]; // between 0-2 _box addItemCargoGlobal ["Chainsaw", (random 1)]; // between 0-1 _box addItemCargoGlobal ["KitCinderWall", 3 + (random 4)]; // between 3-7   } }; Attached below this post is the PBO, which simply can be dropped into the @EpochHive/Addon folder and does not require ANY other settings to activate.
     
    I hope this framework will be a standard for other coders in the future to add functions too, without having ppl to modify all kind if init.sqf, making modifications in the mission.PBO which makes the client downloads larger etc etc.
  22. Like
    nedfox got a reaction from Tom in [Help] change/add crate loot   
    Yep, and I added the promised PBO now.
     

  23. Like
    nedfox got a reaction from Madbull in NEEDHELP! Willing to pay somebody to trick my epoch server   
    Give a man a fish and he lives for a day, give a man a fishing rod and he can sustain himself forever.
     
    =====
    Learn the stuff yourself and in the end, if you pay attention to details, it isn't too hard and hardens you in case of any future trouble you run into.
  24. Like
    nedfox got a reaction from Richie in Most (not all) new players can't connect...what's happening?   
    it's a troll dude, ignore it :)
  25. Like
    nedfox got a reaction from SpiRe in Server providers & responsibility to the comunity   
    @Darth_Rogue : I totally agree with your sentiment.. There's a hitch tho : Anything you want to share, either in scripts or Mod section, is moderator controlled, and can take DAYS (or even weeks) before a mod actually releases your code / post.
     
    I've posted a serverside framework PBO, which can be a vehicle for any admin who needs to implement server side scripts.. It still hasn't shown up yet.. As far as "let's all share" , the Epoch management is way too controlling over these kind of posts.
     
    I just hope the post I did is released soon, but others will have the same, it's taking too long to actually bother posting goodies to share to the community.
×
×
  • Create New...