Zen's Territories - ZenarchistCode/ZenModPack GitHub Wiki
What Is This?
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 Explanation:
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.
}
},
"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.
}
},
"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"
]
}
Master Config
To disable this mod set "ZenTerritories": 0
in %server_profile/Zenarchist/Utilities/ZenModPackConfig.json