-
Notifications
You must be signed in to change notification settings - Fork 6
ZenTerritories
NOTE: This mod is included in my modpack and can be enabled/disabled via ZenTerritories in ZenModPackConfig.json
This mod adds a basic territory management feature to the game.
It requires my Combination Lock Overhaul mod to work.
To create a territory use a combination lock on any fully-built vanilla territory flag.
Once a lock is added to a flag, you can share the code with friends to let them into your territory (they must enter the code on the flag to be added).
Territories mainly prevent other players from building or performing certain actions within the territory radius, and will teleport anyone who logs in within the territory who is not a member of that territory outside of the territory radius to prevent logout-raiders.
They are also a way for server admins to moderate how many base items/cargo items are stored within a territory radius. The flag controls how many basebuilding items a player can deploy, and how much loot they can hoard to reduce server lag near big bases.
To prevent certain actions within a territory, turn DebugOn in the config and load up a test server - any actions you perform will display their classname in the action GUI (where your cursor is).
Config file: profiles/Zenarchist/ZenTerritoriesConfig.json
{
"DebugOn": 0, // Enable/disable debug messages for admins and also debug action/recipe names for the action blacklists
"CanCutFlagWhileAttachedToPole": 0, // Disables the ability to cut flags into armbands/rags off a pole directly
"AllowRaisingFlagWithoutTerritory": 0, // Disables ability to raise a flag if it hasn't been turned into a territory yet
"TeleportPlayerOutOfTerritoryDistance": 60, // Teleports any players who login within X meters of a territory they don't belong to
"TerritoryFlagScanIntervalSecs": 3600, // How often (in seconds) to update the object count around the flag
"TerritoryStopForeignBuildZone": 100, // How far around a territory flag non-members cannot build
"TerritoryFlagObjectCountLimit": 100, // How many base objects a flag can contain within its radius
"TerritoryFlagCargoCountLimit": 1000, // How many individual loot items within cargo storage a flag can contain within its radius
"TerritoryFlagRefresherRadius": 0, // This will override vanilla's 60-meter persistence radius. Only takes effect if radius is > 60
"MaxTerritoriesPerPlayer": 2, // Maximum number of territories any one player can create on the map
"AllowPlayerToDeleteOldTerritories": 1, // If a player tries to create a territory and they've exceed the limit, allow them to delete old territories
// Stringtable for notifications
"TerritoryBuiltTitle": "TERRITORY CREATED",
"TerritoryBuiltText": "You have created a territory! Now other survivors cannot build within your area. There is a limit of %territorylimit% per player. You have built %territorycount%/%territorylimit% territories.",
"TerritoryLimitText": "You have reached the territory limit! You currently own %territorycount%/%territorylimit% territories. Dismantle old territories to create new ones.",
"TerritoryDeletedTitle": "TERRITORY DELETED",
"TerritoryDeletedText": "You deleted %count% old territories. You can now build up to %territorylimit% new territories.",
"LimitTitle": "LIMIT REACHED!",
"CantPlace": "YOU CAN'T PLACE THAT HERE!",
"ObjectLimitText": "Cannot build! Territory contains %objectcount% total allowed base objects and %cargocount% cargo items.\n\nThis limit exists to maintain server performance.\n\nDismantle non-essential objects to continue building.",
"BlockedActionTitle": "YOU CAN'T DO THAT HERE!",
"TooManyTerritoriesText": "You have too many territories already! You can only build %territorycount% territories. Dismantle your old ones to make more.",
"MovedTitle": "YOU HAVE BEEN MOVED!",
"MovedText": "You previously disconnected inside someone else's territory. To prevent raid abuse, you have been moved to a new location outside of the territory.",
"AnyTerritoryBlacklist": {
"MessageText": "You can't place that %itemname% this close to another territory! You must move %distance% meters away.",
"BlockedActionText": "You can't do that this close to another territory! You must move %distance% meters away.",
"ItemBlacklist": {
"TerritoryFlagKit": 300 // Items which cannot be deployed within ANY existing territory
},
"ActionBlacklist": {} // Actions or crafting recipes which cannot be performed within ANY existing territory.
},
"ForeignTerritoryBlacklist": {
"MessageText": "You can't place that %itemname% this close to someone else's territory! You must move %distance% meters away.",
"BlockedActionText": "You can't do that this close to a territory you don't belong to! You must move %distance% meters away.",
"ItemBlacklist": {
"AnyItem": 0 // Items NOT ON THE WHITELIST which cannot be deployed inside a territory YOU DO NOT belong to. Number is distance in meters from the territory - zero means within the default territory radius
},
"ActionBlacklist": {
"ActionLowerFlag": 0 // Actions/crafting recipes which cannot be performed inside a territory YOU DO NOT belong to. This is the classname of the action/recipe. Number value is meters to search for territory flag - 0 = use default refresher radius
}
},
"RequiresTerritoryBlacklist": {
"MessageText": "You require a territory to do that! Create a territory by using a combination lock on a fully built Territory Flag.",
"BlockedActionText": "You require a territory to do that! Create a territory by using a combination lock on a fully built Territory Flag.",
"ItemBlacklist": {}, // Items which can ONLY be deployed within a territory you belong to.
"ActionBlacklist": {
"ActionRaiseFlag": 0 // Actions/crafting recipes which can ONLY be performed within a territory you belong to. Number value is meters to search for territory flag - 0 = use default refresher radius
}
},
"ItemWhitelist": [ // List of items which can be placed anywhere inside territories you don't belong to.
"ZenNote",
"FireplaceBase",
"TrapBase",
"ExplosivesBase",
"TrapSpawnBase"
],
"TerritoryDismantleTools": [ // Items which can be used to destroy a territory flag (can be used by anyone including raiders!)
"Sledgehammer"
]
}All my mods are open-source and published under the Mozilla Public License Version 2.0. Any mods based on my code must be open-source - no obfuscation!
You can modify/reupload/repack my mods if you like, but please credit any original authors/3D model/3rd-party asset creators, and keep in mind any future updates I make will not be automatically applied to repacked mods so make sure to check back from time to time for bugfixes and improvements.
If you find my mods useful, please consider buying me a coffee - it's not expected but very much appreciated: https://buymeacoffee.com/zenarchist
- General Setup Guide
- Core Mod Setup Guide
- ZenModPack Master Config
- Various Info
- Known Bugs & Issues
- Report Bug
My utility style mods for debugging etc.
Mods which affect game mechanics:
- ZenAlcohol
- ZenAllowMapBagSlot
- ZenAntiCombatLogout
- ZenAutoConvertStash
- ZenAutoStackItems
- ZenAutoWinterDetect
- ZenAutoRun
- ZenBasebuildingConfig
- ZenBatteryPASPersistence
- ZenBetterChatFont
- ZenBrokenGlasses
- ZenBuildingDescription
- ZenCarAttachments
- ZenCarBatteryIcon
- ZenCarCompass
- ZenCarGlovebox
- ZenCarsCutDownTrees
- ZenCanteenTablets
- ZenCatchRain
- ZenCauseOfDeath
- ZenChickenCoops
- ZenCraftingSounds
- ZenCraftRagHands
- ZenComboLocks
- ZenCombineJSON
- ZenDropRuinedClothing
- ZenDynamicZoneLoot
- ZenEarPlugs
- ZenFireFuel
- ZenFireWood
- ZenFireplaceStick
- ZenFishingConfig
- ZenFixCarAttachmentGUI
- ZenGraves
- ZenGroundCleaning
- ZenHideGearInCars
- ZenHints
- ZenHologram
- ZenHologramControls
- ZenImmersiveChatHUD
- ZenImmersiveLogin
- ZenInformWeaponStateBug
- ZenInventoryAnimation
- ZenKnifeGardens
- ZenLeftovers
- ZenLogPiles
- ZenMagObfuscation
- ZenMap
- ZenMicCheck
- ZenNotifications
- ZenOpenCansRock
- ZenPainting
- ZenPimpMyRide
- ZenRadioPlugin
- ZenRebuildableWells
- ZenRepairJSON
- ZenRepairPumps
- ZenRepairWells
- ZenServerGUI
- ZenShove
- ZenSplitUI
- ZenSleep
- ZenStaminaSlope
- ZenTerritories
- ZenWeaponEngrave
- ZenWoodHealth
- ZenZombieDoors
Mods which add gear to the game:
- ZenArtillery
- ZenBackwardsCaps
- ZenBookshelf
- ZenBunnyMasks
- ZenCamoCamp
- ZenCarWorkbench
- ZenChess
- ZenChristmasTreeCraft
- ZenConcussionGrenade
- ZenDoubleArmbands
- ZenFlask
- ZenFlint
- ZenGhillie
- ZenJameson
- ZenLadders
- ZenMusic
- ZenNotes
- ZenRaidAlarm
- ZenRaybans
- ZenRunes
- ZenStaticObjects
- ZenSwissKnife
- ZenTimeBomb
- ZenTireRack
- ZenTreasure
- ZenTreehouse
- ZenVikingAxe
- ZenZippoLighter
Mods which run purely server-side:
- ZenBloodDrips
- ZenCampSites
- ZenDynamicZoneLoot
- ZenLootCyclingDetection
- ZenNightConfig
- ZenPersistentTrees
- ZenShelterCargo
- ZenTreesplosions
- ZenZombieController
- ZenZombieConfig
- ZenJameson
My standalone mods