Skip to content

Zones Config | zones.json

Daemon Forge edited this page Mar 1, 2022 · 7 revisions

Zones can be used in many ways, including PVE server to keep PvP player away from PvE Players.

If you don't want zones you can just remove zones from the list/array, and sub-zones use the same object as parents you can have as many sub-zones and sub-sub-zones as you want theoretically you can have almost unlimited sub zones but there is a JSON file limit of 64KB and nothing past 3 tiers of sub zones has been tested.

Sub Zones are only checked if the player is in the parent zone this is to help with performance if a Sub Zone clips a parent zone the part of the zone out side the parent zone will not count as a zone

Also it is important that zones at the same tier do not overlap if they do it may cause issues with warnings and kill zones.

{
    "ConfigVersion": "5",   //Config Version do not change
    "ZoneCheckTimer": 3,    //How often the mod will check for players entering the zones, for smaller if less than 1 it will disable checks all together
    "WarningMessageColor": [ 200, 255, 0, 0 ],   //Color for the warning message
    "NotificationMessageTime": 15,   // Ammount of time in seconds that the Zone Notifications will stay on the screen
    "WarningMessageImagePath": "HeroesAndBandits/gui/images/DeathWarning.paa",   // The Warning notification image
    "Zones": [  //List of zones
        {
            "Name": "Default Zone", //Name of the zone
            "X": 11250,   // The X cord for the zone
            "Z": 4300,   // The Z cord for the zone
            "WarningRadius": 75,   // This is the radius at which players will be warned at and god mode will be given to the players if god mode players are enabled (Must be larger than the kill radius)
            "KillRadius": 50,  // This is the radius for the kill zone
            "MinHumanity": -1000,  //NOT USED IN ADVANCED CONFIG
            "MaxHumanity": 1000,  //NOT USED IN ADVANCED CONFIG
            "ShowWarningMsg": 1,    // 1 Enabled|0 Disabled  If enabled this will give a player with invalid humanity a warning message
            "WarningMessage": "!!Warning!! you are about to enter Default Zone if you continue you will be shot!",  //This is the warning message to give players
            "ShowWelcomeMsg": 0,    // 1 Enabled|0 Disabled  If enabled this will give a player with valid humanity a welcome message
            "WelcomeMessage": "Welcome to the Default Zone",  //This is the welcome message to give players
            "WelcomeIcon": "HeroesAndBandits/gui/images/BambiNotification.paa",   //This is the icon for the notification for the welcome message
            "WelcomeMessageColor": [ 200, 0, 200, 200 ],  //This is the color for the Welcome message notification 
            "OverrideSafeZone": 0, // 1 Enabled|0 Disabled  If enabled this will override any safe zones for the kill radius
            "GodModPlayers": 0,    // 1 Enabled|0 Disabled  If enabled this will give god mod to any players with valid humanity when they enter the zone
            "PreventWeaponRaise": 0,  // 1 Enabled|0 Disabled  If enabled this will prevent all players from raising their weapons inside the zone
            "PreventActions": 0, // 1 Enabled|0 Disabled  If enabled this this will prevent any action from affecting humanity
            "BlockTrader": 0, // 1 Enabled|0 Disabled  If enabled and the trader add on mod is installed on the client this will prevent the player from interacting with traders
            "KillAggressors": 0, // 1 Enabled|0 Disabled If enabled the AI will kill aggressive players inside the warning zone
            "Affinities": [ //A list of allowed affinities 
                {
                    "Affinity": "bambi",
                    "MinPoints": -1,
                    "MaxPoints": -1
                }
            ],
            "Guards": [ 
                {
                    "X": 11250, // The X Cordinate of the guard
                    "Y": 290.2,  // The Y Cordinate of the guard
                    "Z": 4300,  // The Z Cordinate of the guard
                    "Orientation": 0, //The direction they are facing by default
                    "Skin": "SurvivorM_Denis",  // the Skin the player will be spawned in with
                    "WeaponInHands": "M4A1", // The weapon the AI will be holding in their hand
                    "WeaponInHandsMag": "Mag_STANAGCoupled_30Rnd", //The mag for the gun
                    "WeaponInHandsAttachments": [ // List of attachments to put on the gun
                        "M4_RISHndgrd",
                        "M4_OEBttstck",
                        "M68Optic"
                    ],
                    "GuardGear": [ //Gear to go on the AI
                        "PlateCarrierVest",
                        "JungleBoots_Black",
                        "CargoPants_Black",
                        "M65Jacket_Black"
                    ],
                    "GunSound": "M4_Shot_SoundSet", // The sound the gun will make
                    "DamagePerTickMin": 28, // The minimum damage the player will take from the shot
                    "DamagePerTickRand": 35, // The maximum damage the player will take from a shot
                    "GunTickMulitplier": 2, //how many times the AI can shoot at the player per zone Tick configured (ZoneCheckTimer)
                    "HitChance": 1, //the base hit chance, 1 = 100% 0.9 = 90% see the accuracy table in the extras folder on the github for details how range and moving affects the AI accuracy 
                    "RespawnTimer": 1200, //How many seconds from when the AI death is detected till when it respawns
                    "CanBeKilled": 0,  // 1 Enabled|0 Disabled  If enabled the AI can be killed by players
                    "RequireLineOfSight": 1  // 1 Enabled|0 Disabled  If enabled the AI will require Line of sight to track and kill the player if Disabled the AI will track and kill players through objects
                }
            ],
            "SubZones": []
        }
    ]
}