Sid Meier's Civilization VI

Sid Meier's Civilization VI

212 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)



210 Comments
ChrisMartin Apr 7 @ 12:15am 
@faber_avgust Change the Hard Cap number in the mod files.
@petr.surgay No. I use a mod for make building Settler harder
petr.surgay Mar 31 @ 9:07am 
Is it possible with this mod to set up limit of cities per player to certain ammount? Let say hard cap settlers to 3 minus number of build cities?
faber_avgust Jan 20 @ 6:33am 
How i can expand the HARD CAP? I don't want to disable, just increase
faber_avgust Jan 20 @ 4:01am 
Seems like this mod disable some battle sounds of units. Is it someone mentioned this?
Raiin Jan 16 @ 2:59am 
Thank you.
ChrisMartin Jan 15 @ 10:40am 
The limitations are for all players in the game, AI included.
Raiin Jan 15 @ 4:55am 
I'm sorry this might be a dumb question, but this mod help stop the AI from spamming units everywhere?
ChrisMartin Dec 10, 2024 @ 12:36am 
I don't know. Maybe try set allowed number of units to zero?
Personally, I use other mods to stagger the religious spread.
Like extra cost of the religious units, must have open boarders in move religious units into other territories.
Fannypak Dec 9, 2024 @ 1:54pm 
@ChrisMartin is there anyway to modify the LUA to completely remove the ability to build religious units?
ChrisMartin Nov 22, 2024 @ 3:07am 
Whats to say?
The mod works for me, and if it doesn't for you, I can't help you. You have to fix it your self.