Sid Meier's Civilization VI

Sid Meier's Civilization VI

36 ratings
Unit Limit Enforcement (without top panel)
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
42.024 KB
6 Mar, 2020 @ 7:08am
22 Mar, 2020 @ 9:48pm
6 Change Notes ( view )

Subscribe to download
Unit Limit Enforcement (without top panel)

Description


I am no longer supporting this version of the mod. For the new version which includes all updates and the top panel extension(pictured below), unsubscribe to this mod and go grab the new one:
(click picture for link)


BASICS
This gameplay mod sets dynamic limits to the number of units each civ may have at a given time. The purpose of this mod is to prevent an overcrowded map due to AI unit spam.

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

Each civilization has a maximum of each group of units, which increases throughout the game, based on:
  • # Cities
  • # Districts (encampments for land/support, harbors for naval, holy sites for religious)
  • # District Buildings (corresponding districts, listed above)
Note: Individual civilian unit limits do not increase with additional districts/buildings.

Default limit variables are listed in the table in the image above. Limits are easily adjusted by editing the values in TCUnitLimit.sql.


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.

The only limitations to unit compatibility are:
  • Units must fall within the standard formation classes (Land_Combat, Naval, Support, etc)
  • Unit building prereqs will be removed. Modded units that have only building prereqs, and not a tech/civic prereq, will then be buildable from turn 1.

This mod has been tested with the Steel and Thunder mods and verified compatible.

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

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)



33 Comments
TC  [author] 27 Mar, 2020 @ 3:39pm 
Hey everyone, I'm excited to release the new version found here:
https://steamproxy.com/sharedfiles/filedetails/?id=2037735359

It includes a new Top Panel which gives a visual indication of the unit limits, including detailed tooltips on your limit and the units you currently own. Go take a look, and if you want to try it out in a new game be sure to unsubscribe from this one.
TC  [author] 27 Mar, 2020 @ 3:26pm 
Hey sd, it must be in a game expansion file then. See if you can find a file path to what looks like expansion files, where you may find another Units.xml.

Or better yet, maybe first just try a new game with the most recent version of the mod and see if it's working there. If not, then I'll look more into it with you.
sdcarey2222 27 Mar, 2020 @ 3:22pm 
I changed the numbers on your mod so I am not sure if I had the most current version so I deleted it and reloaded it. I could not find Ikanda in the units.xml so I think I was not clear enough. The Ikanda is the Zulu replacement for the encampment. I am assuming that it needs to be added somehow to your code but I am a total novice at this so I could be wrong.
TC  [author] 27 Mar, 2020 @ 3:03pm 
Hey sdcarey, did you start the game after having the most up to date mod version? (from march 22)
Could you copy the Ikanda line of data from units.xml and paste here so I can have a look to see if I can tell what happened? You will find units.xml in your game data folder at:
Program Files (x86)\Steam\steamapps\common\Sid Meier's Civilization VI\Base\Assets\Gameplay\Data
sdcarey2222 27 Mar, 2020 @ 3:00pm 
Love the mod but I am playing the Zulu and built the Ikanda but did not get an increase in the land units. Not sure what to change/add to the XML to fix this.
TC  [author] 22 Mar, 2020 @ 2:46pm 
Updated with a fix for Warrior Monks, and any modded religious/combat units. Now these unit types will only be considered as Land Combat, as far as unit limits are concerned.

Thanks ChrisMartin for the feedback!
ChrisMartin 18 Mar, 2020 @ 12:15am 
Hmmm.... I'm not sure, to be honest. I was surprised that I could not get any religion spreading units, after getting several Warrior Monks, even if I was caped on land combat units.
So in the civ choosing Warrior Monk belief, will be much stronger then other civs in the Medieval era. Having 1-3 extra land combat units pr city, that early could rake havoc with other civs.
So I think the simple answer should be Warrior Monk = Land Combat.
Ideally Warrior Monk should count as Land Combat, but can't buy more then allowed Religious Cap. But at the same time, the 4 normal religious units can be bought with faith under the same Religious unit cap.
So 2 cities with 1 Encampment (/w Barracks) in city #2 and 1 Holy site (/w shrine + temple) in capital = 8 (5 base + 2 city + 1 district + 0,5 barracks) Land combat units, including 3 (1 base + 2 district in capital) Warrior Monks, and 3 (1 base + 2 district in capital) missionary/apostle/inquisitor/guru.
TC  [author] 17 Mar, 2020 @ 3:21pm 
@ChrisMartin:

Glad to see you over here! So, I was going to say it falls under the Land Combat units, which it does... but I double checked, and it is actually currently being put in both Land Combat and Religious. I'm going to edit it (in the next couple of days) so that it is only considered Land Combat, unless you convince me that it belongs in Religious instead. Thoughts?
ChrisMartin 17 Mar, 2020 @ 3:04pm 
I really like this! :)
Does Warrior Monk fall under religious column?
TC  [author] 13 Mar, 2020 @ 5:28pm 
Holy cities are lost when that city is converted. Perhaps the other AI simply dominated the rest of the civs before your map was revealed.

If you are unhappy with the unit limits, adjust the values to better match your personal preference. I currently have a game on turn 900 that I'm playing with this mod, and it's so nice to be able to play this far into the game without every tile being cluttered with units. To build on that, there are at least 6 active religions currently in that game.

If you see evidence of AI having more units than they should, please provide details of the issue including #units/cities/districts, and if the problem seems confirmed them please friend me and follow up with logs and screenshots so I may diagnose any potwntial issue.