MikeDanielsson
Play in this new game changing world where more focus is on how you choose your risks.

Supported Games

What is Layers of Risk?

Click here for a 3 minute long video about this mod!

Introduction:

Players are divided in different tiers depending on what gear they have. The stronger your gear is the higher tier you get. The map is divided in different zones and the closer you are to the middle of the map, the wider that range of tiers you can attack/get attacked by will be. In the outer zone for example, only players within the same tier can attack each other.

Note: You can use whatever map you want. Download this map here.


Configurations

(config/layersOfRisk.json)

World:

Note: Zone 1 is everything else outside zone 2.

InnerWall - 182 | The length in meters of zone 4 will be counted from the middle of the map.
middleWall - 437 | The length in meters of zone 3 will be counted from the middle of the map.
outerWall - 723 | The length in meters of zone 2 will be counted from the middle of the map.
distanceToBuildFromWalls - 25 | How long in meters you need to be from a wall to build anything.
enableZoneIndicators - false | When enabled zone indicators will be created.
zoneIndicatorStrength - 12 | The visibility of zone indicators. Higher = more visible. Max value is 50.

Tiers:

updateTierTime - 20 | The time it takes for a player to change tier.

Warzones:

canDieWhenEnteringWarZone - false | If this is false you will not take any damage when entering a warzone when your health is under "warZoneEnterDamage".
playerWarZone1Delay - 3600 | If you start a warzone while in zone 1 you can't do it again for X seconds.
playerWarZone2Delay - 2100 | If you start a warzone while in zone 2 you can't do it again for X seconds.
playerWarZone3Delay - 1500 | If you start a warzone while in zone 3 you can't do it again for X seconds.
playerWarZone4Delay - 900 | If you start a warzone while in zone 4 you can't do it again for X seconds.
startWarZoneAfterDamageToStructure - 25 | After X amount of damage dealt to another players building a warzone will spawn.
timeBeforePlayerTakeDamageWhenEnterWarZone - 6 | After this time players will start to take damage when entering a warzone.
warZoneEnterDamage - 20 | Damage dealt to players when entering a war zone.
warZoneRaidAliveTimer - 600 | How long a warzone can be alive.
warZoneSize - 150 | The size of a warzone.

Hackable crates:

hackableCratesSpawedAtPluginStart - 8 | Number of hackable crates that will spawn at server start. Max value is 500.
maxHackableCrateSpawns - 25 | Max amount of hackable crates that can be spawned on the map at the same time.
timeBetweenHackableSpawnTries - 300 | It will try to spawn a hackable crate at one of the set spawn positions. If that position is empty it will spawn. Min value is 2.
hackableCrateZone1Time - 780 | Hack time (900 minus 780) for hackable crates in zone 1.
hackableCrateZone2Time - 660 | Hack time (900 minus 660) for hackable crates in zone 2.
hackableCrateZone3Time - 480 | Hack time (900 minus 480) for hackable crates in zone 3.
hackableCrateZone4Time - 180 | Hack time (900 minus 180) for hackable crates in zone 4.
hackAbleWarZoneExtraTime - 20 | Warzone alive time after the hackable crate has been hacked.

Hackable crates content:

Note: Items are listed in data/layersOfRiskArmours.json / data/layersOfRiskWeapons.json

hackableCrateZone1ArmourStart - 0 / hackableCrateZone1ArmourEnd - 4 | Will choose a random armour item between 0 and 4 and add it to hackable crates in zone 1.
hackableCrateZone2ArmourStart - 2 / hackableCrateZone2ArmourEnd - 10 | Will choose a random armour item between 2 and 10 and add it to hackable crates in zone 2.
hackableCrateZone3ArmourStart - 9 / hackableCrateZone3ArmourEnd - 16 | Will choose a random armour item between 9 and 16 and add it to hackable crates in zone 3.
hackableCrateZone4ArmourStart - 15 / hackableCrateZone4ArmourEnd - 22 | Will choose a random armour item between 15 and 22 and add it to hackable crates in zone 4.
hackableCrateZone1WeaponStart - 1 / hackableCrateZone1WeaponEnd - 21 | Will choose a random weapon item between 1 and 21 and add it to hackable crates in zone 1.
hackableCrateZone2WeaponStart - 17 / hackableCrateZone2WeaponEnd - 30 | Will choose a random weapon item between 17 and 30 and add it to hackable crates in zone 2.
hackableCrateZone3WeaponStart - 25 / hackableCrateZone3WeaponEnd - 35 | Will choose a random weapon item between 25 and 35 and add it to hackable crates in zone 3.
hackableCrateZone4WeaponStart - 32 / hackableCrateZone4WeaponEnd - 44 | Will choose a random weapon item between 32 and 44 and add it to hackable crates in zone 4.

Add hackable create spawns:

/cratepos | Writing /cratepos in chat will create a spawn point for hackable crates. This spawn point will be saved in data/layersOfRiskHackableCratePositions.json.

File data/layersOfRiskHackableCratePositions.json:

All hackable crate spawns are saved in this file. You can manually edit it if you want. If deleted an empty file will be created at the next server start.


Files data/layersOfRiskArmours.json / data/layersOfRiskWeapons.json:

These files are used for 2 things.

  1. Items on this list will be added to newly spawned hackable crates.
  2. Players' tiers are calculated from them.

Items not in one of those lists will not have any impact on player tiers. If one of those files is deleted a new one with default values will be created at the next server start. You can add or remove items from them if you want. But you need to follow 2 rules or else it will not work correctly.

  1. Items need to be listed from worst to best.
  2. If you have 38 items they need to be listed from 1, 2 , 3... to 38. You cant skip any number in between.
id - the id of the item listed.
shortName - the shortName of the item listed.
value - the value that will be used to calculate players tiers when they have this item in their inventory.
followItem - This item will also be added to hackable crates with the main item. Mostly ammo or medic related items.

File data/layersOfRiskTierData.json:

Here are all five player tiers (A, B, C, D, E) listed. You can change the min and max values to what you think suits your server. If this file is deleted a new one with default values will be created at the next server start.

Note: This file needs 5 items or it will not work correctly.

min - Minimum value to be in this tier.
max - Maximum value value to be in this tier.
tier - The tier letter.

Custom level

Layers of Risk works perfectly well with any level. But I have made a custom one for this mod to display the borders of each zone better. If you want you can download it here and use it however you want.

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.