Project Zomboid

Project Zomboid

Not enough ratings
Build limiter
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
450.165 KB
23 Dec, 2022 @ 2:30am
16 May, 2023 @ 1:48pm
5 Change Notes ( view )

Subscribe to download
Build limiter

Description

The number of construction is possibly limited around the player and possibly restricted to building around his safehouse.

This mod is fully configurable, and will necessarily meet your expectations, there are many editable parameters in the sandbox var.

Depending on the options you have predefined in the sandbox, you will be subject to one or more restrictions.
These restrictions may concern: The limit of the number of buildable objects around the player / If players are allowed to build, or only allowed near their claimed safehouse / If claiming a shelter gives you a bonus within the limit of constructible objects / Several types of restrictions around the dismantling or destruction of objects around shelters other than yours / ... in short, several things that will be described in detail below.

  • The buildable objects affected by the object limit rule are those found in the context menu, carpentry construction and metalworking. (fortifiable build items)

  • Door barricades and window barricades are not affected by the buildable object limit.

  • Tents and Campfires are also not affected by the buildable limit.

  • If you have the Dylan Barricade mod, it will be taken into account in the accounting if the limit of authorized objects is effective.

  • Some world objects will be taken into account, as some player-buildable objects are part of the Map Tiles, but this is rarely the case.

  • With a hammer in hand, you will have access to a context menu right click on the objects affected by the construction limit rule, giving you the possibility to count the constructions around you.

  • With a hammer in hand, you will have access to a contextual menu right click anywhere on an area, with the option "check if you are in your area", this will tell you if you are in your area around your claimed safehouse.

  • Everything is largely configurable in the SandboxVars.lua in the BuildLimiter part

  • If you go for a high radius and height, it will cause latency when placing the object, the higher the numbers, the higher the delay when placing the construct, as the code checks the environment in order to count the constructions before authorizing the installation. I advise you a height of 3 if you choose a radius greater than 200. do your tests!

  • When I say latency, I mean a small delay for the client while the code is applied. I'm not talking about the network / speed.

SandboxVars
BuildLimiter = { -- Minimum=0 Maximum=500 Par défaut=25 RadiusLimit = 25, -- Minimum=0 Maximum=7 Par défaut=3 HeightLimit = 3, -- Minimum=-1 Maximum=1000 Par défaut=20 BuildLimit = 20, StorageIsInclued = true, SafeHouseIsInclued = true, SafeZoneIsNotIncluedInBuildLimit = false, -- Minimum=0 Maximum=500 Par défaut=100 BuildPlayersBonusInSafehouse = 100, CanBuildEveryWhereIfNotNearOtherSafeHouse = true, CantDismantleIfNearOtherSafeHouse = true, CantDestroyStuffIfNearOtherSafeHouse = true, CantClaimIfNearOtherSafeHouse = true, -- Minimum=0 Maximum=500 Par défaut=25 CantClaimIfNearOtherSafeHouseRadiusAddition = 25, CantBuildArroundSafeZone = true, },
-- Minimum=0 Maximum=500 Par défaut=25 Define the radius on which the restrictions will be limited/enforced arround player.
RadiusLimit = 25
-- Minimum=0 Maximum=7 Par défaut=3 Define the height on which the restrictions will be limited/enforced.
HeightLimit = 3
-- Minimum=-1 Maximum=1000 Par défaut=20 Define limit of number of builds allowed per x-y-z area. -1 means no limit
BuildLimit = 20
Set to true, the buildable storage furniture by players will be taken into account when calculating the number of constructions allowed.
StorageIsInclued = true
If set to true, this will imply the player's claimed safehouse within the radius, depending on the options you set below, you will either be forced to build around your arbi, or the shelters may offer certain privileges.
SafeHouseIsInclued = true
-- Minimum=0 Maximum=500 Par défaut=100 if the safe house is included, Each player registered in the safehouse will give a bonus regarding the limit of objects to build allowed. x10 = 100% of the defined limit in addition
BuildPlayersBonusInSafehouse = 100
If true, and if safehouse is included, then you can build anywhere, as long as there is no safehouse other than yours in the radius.
CanBuildEveryWhereIfNotNearOtherSafeHouse = true
if true, and the safe house is included, then players will not be able to dismantle map objects/furniture/barricades/doors etc if they are within the radius of any shelter other than their own
CantDismantleIfNearOtherSafeHouse = true
if true, and the safe house is included, then players will not be able to destroy objects with the sledgehammer if they are within the radius of any cover other than their own
CantDestroyStuffIfNearOtherSafeHouse = true
If it is true, and the safe house is included, then you cannot claim if another safe house than yours is within the radius.
CantClaimIfNearOtherSafeHouse = true
-- Minimum=0 Maximum=500 Par défaut=25 this will define additional squares added to the predefined radius in the "radius limit" regarding the restriction of the claim, because there could be an overlap of the radii of each, which could be desirable in certain conditions
CantClaimIfNearOtherSafeHouseRadiusAddition = 25

Work in SP MP-COOP / Existing Save / Safety to Remove / No rewrite vanilla code

Originally posted by AuD:

I created this mod for my server, and I share it !



If you think this mod would be interesting for the community





[theindiestone.com]

Workshop ID: 2905513879
Mod ID: BuildLimiter
67 Comments
JackHowdy 1 Oct, 2023 @ 6:22pm 
Can limit MoreBuild & MoreBuildPlus ???
AuD  [author] 24 Aug, 2023 @ 5:12am 
Teddybear1848

I missed your questions, without seeing them...yes normally everything is there, you can do a lot of things about the construction restrictions by the players, normally nothing is missing, if you need an option, say the, and if I can do this, if I can add it without taking too long, I will.

the English translation is very poor, I think, I'm sorry, I don't have good English, but surely I could do better anyway.

if one day I update this mod, I will correct the English trad
Teddybear1848 23 Aug, 2023 @ 1:32pm 
I answered my own questions. If anyone else wants to know how to use this utility let me know. It works great once you get it set up to suit your needs. Props to the Author.
Teddybear1848 22 Aug, 2023 @ 8:00pm 
ok i was just a smooth brain earlier but im having a time figuring out which parameter does what. On my server I want my players only to be able to build a couple of tiles around their safe house. How Do I accomplish this?
Teddybear1848 22 Aug, 2023 @ 4:24pm 
are there sandbox options for this from the self host menu or do I have to manually set it up in the config file?
AuD  [author] 16 May, 2023 @ 1:52pm 
** UPDATED : 2 sandBox options is added :

- The safe zone is not inclued in build limit. (optionnal)

- Player building in safe zones is prohibited. (optionnal)
catchfree1225 13 May, 2023 @ 2:32am 
@AuD Yup
may i add you in discord? steam is stupid==
AuD  [author] 12 May, 2023 @ 9:57pm 
@catchfree1225
AuD  [author] 12 May, 2023 @ 9:57pm 
if you build in admin mode, you can build everywhere, and no limit .

you want an sandbox option with : no limit for everyone in safe zone area?
catchfree1225 12 May, 2023 @ 4:10am 
Yup no pvp zone