Sid Meier's Civilization VI

Sid Meier's Civilization VI

187 ratings
Unit Limit Enforcement
4
3
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
83.877 KB
Mar 27, 2020 @ 3:06pm
Apr 22, 2020 @ 9:34am
6 Change Notes ( view )

Subscribe to download
Unit Limit Enforcement

Description


BASICS
This gameplay mod sets dynamic limits to the number of units each civ may have at a given time. A new top panel is included showing your current #units and the limit for that unit type. The purpose of this mod is to prevent an overcrowded map due to AI unit spam.

Units are broken into 5 main groups:
  • Land Combat
  • Naval Combat
  • Air Combat
  • Support
  • Religious
Additional limits placed on individual units:
  • Settlers
  • Builders
  • Naturalists

Each player has a maximum of each group of units, which changes throughout the game, based on:
  • # Cities
  • # Districts (encampments for land/support, harbors for naval, aerodromes for air, holy sites for religious)
  • # District Buildings (corresponding districts, listed above)
Beyond the variable limits, there is a hard cap for each type. This hard cap is based on the size of the map(smaller maps = fewer units). Default hard cap values are shown in an image above. To disable the hard caps, see notes below.

Note: Individual civilian unit limits do not increase with additional districts/buildings.

Default limit variables are listed a the table in the images above. Limits are easily adjusted by editing the values in TCUnitLimit.lua and TCUnitLimitTopPanel.lua.

Top Panel
The new top panel shows your current units and unit limits for Land Combat, Support, Naval, Airforce, and Religious Units. I decided against tracking the builder, settler, and naturalist limits up there, because I didn't want to clog it up with too much info. Those limits should be easily tracked without the UI element.

Since the Top Panel will replace any other modded top panel you may be using, I have also included a indicator for overall amenities. On that indicator's tooltip, you will find a full list of the luxury resources you currently have. I was using the CQUI top panel before this, so I couldn't live without luxury resources being accessible up there.


HOW DOES IT WORK?
Upon reaching the limit of any unit type, that type will no longer be producible in your cities. When you drop back below that limit, or the limit increases due to a new city/disrict/building, you'll once again be able to produce that unit type.

If a civ surpasses their unit limit (from losing a city, being rewarded units from villages, etc), the extras will not be removed.

Under the hood:
  • All units have been given a prereq building, such as "Army Unit Unlock", "Settler Unit Unlock", etc.

  • While below the unit limit, this building will be placed in your cities and allow creation of the corresponding units.

  • Once the limit has been reached, this building will be removed from your cities, and those units will no longer be producible.

  • When you are no longer at or above the limit, the building will be created in your cities again, unlocking unit production.

Important: In order for this mod to work, units may no longer require a separate building to produce. Therefore, all units that previously required a building (missionary, apostle, military engineer, etc) now require the tech/civic of those buildings instead. For all practical purposes, the only gameplay difference is now you may create an Apostle before building a Temple.

COMPATIBILITY
This mod IS COMPATIBLE with DLC and modded units.

Compatibility has been confirmed with the following unit mods:
Steel and Thunder Units
Steel and Thunder Unique Units
Warfare Expanded: Complete Edition

Potential compatibility issues:
  • Building prereqs for modded units will be removed. Those units that have only building prereqs, and not a tech/civic prereq, will then be buildable from turn 1.
  • This mod will overwrite any other top panel mods you are using.

HOW TO CHANGE THE LIMITS:
  • Navigate to your steam workshop folder(Program Files -> Steam -> steamapps -> workshop -> content)
  • Find the folder which contains this mod's files. Locate TCUnitLimit.lua and TCUnitLimitTopPanel.lua. Open the files with your choice of text editor.
  • The variables within this file are well documented. Read the notes and change whichever values you wish. MAKE SURE the values match in both files.

HOW TO DISABLE THE HARD CAP:
  • Navigate to your steam workshop folder(Program Files -> Steam -> steamapps -> workshop -> content)
  • Find the folder which contains this mod's files. Locate TCUnitLimit.lua and TCUnitLimitTopPanel.lua. Open the files with your choice of text editor.
  • Towards the top of the files, find the variable "bEnableHardCap" and set it = false. Make sure you change it it both files.

Check out my other mods here:
Strategic Forts (Updated 2020)
Expanded Initial Vision (Verified 2020)
Removable Districts (Updated 2020)
Removable Resources and Features (Updated 2020)
City State Introductions Reworked (Updated 2020)



180 Comments
ChrisMartin Apr 20 @ 6:15am 
I have all the DLC's and Season passes.
VModBAddict Apr 20 @ 2:00am 
Not using any other mods, except Expanded Initial Vision (by same author!) to expedite finding CSs for testing. Using GS, all DLCs. Are there any you aren't using?
ChrisMartin Apr 19 @ 2:44pm 
Regarding CS, only edits ib TCUnitLimit.lua.
My guess is loadorder of this mod vs other mods you are using.
VModBAddict Apr 19 @ 2:22pm 
@ChrisMartin - so it's a mystery. Bummer, will just have to leave this mod off. Thanks for taking the time to check if you had the same issue, it's appreciated!

...Sorry one last thing, just because you didn't specifically reply to that point, can you just confirm that you didn't change anything in TCUnitLimitTopPanel.lua? It's mentioned in the instructions above under 'How to Change the Limits' but I don't see how - there isn't a clear section on CSs like there is in TCUnitLimit.lua.
ChrisMartin Apr 19 @ 1:46am 
Did a quick check, loaded up a very early save in my latest game:
Found several CS with Builders on the map, and still had the Unlock. And almost every CS had used its builder-actions at this point in the game.
ChrisMartin Apr 18 @ 11:40pm 
I will look into my lates game, and see if this "Builder Unit Unlock" are present. I totally forgot to check before my previous reply.
VModBAddict Apr 18 @ 5:22pm 
@ChrisMartin - Thanks for the reply. I've done further testing, using GS, all DLC and no other mods. I noticed that for the first ~10-12 turns or so CSs had the 'building' - "Builder Unit Unlock" listed in the tooltip when hovering over them. But when they produce their first builder, it disappears. The same happens to my capital when I build (or capture) three builders. I think this is the mod working as intended, and both I and the CSs lose the unlock because we're maxed - them at 1, me at 3. But this is despite my changing the CS Builder limit to 10 in the TCUnitLimit.lua file. As mentioned before, I can't find an equivalent line to change in the TCUnitLimitTopPanel.lua file. In fact 'Builder', 'Unlock', 'CityState' are never mentioned in the code. There are references to 'CS', but they don't seem to have anything to do with Builder limits.

I just use Notepad to open and edit the files. Is there anything I could be doing different?
ChrisMartin Apr 18 @ 6:37am 
I've changed the CS caps of civilian and military units, to 10 of each type (sivil, land, air, sea) and have no issues with CS not using builders. I still have the hardcap enabled.
My guess is something else is interfering with your game.
VModBAddict Apr 18 @ 2:15am 
I love this mod, but I've encountered the issue with City States not developing their territory (apart from, sometimes, a single improvement).

Yes, I have read deep into the comments below and am aware of - and have tried to implement - the change to the Builder limits in the TCUnitLimit.lua as per the instructions above. I couldn't find an equivalent in TCUnitLimitTopPanel.lua, so maybe that's my problem. If anyone knows how to also increase the CS Builder limit in the ''' TopPanel.lua file, please post noob-proof instructions in this comment thread!

Anyone else had this issue, or better yet have devised a fix?? I've already increased the CS Builder unit cap to 10, as per comments 3-4 pages below, in TCUnitLimit.lua (only) and removed the hard limits for everything across both .lua files.

I'm gutted, this mod is an awesome change to fundamental gameplay, but having CSs that don't develop is game-breaking. Please help!
ChrisMartin Apr 2 @ 5:20am 
The mod only limits the number of units "alive".
For settlers you can use a mod that alters the requirements and consequence of building the settler.