Sid Meier's Civilization VI

Sid Meier's Civilization VI

Unit Limit Enforcement (without top panel)
33 Comments
TC  [author] 27 Mar, 2020 @ 3:39pm 
Hey everyone, I'm excited to release the new version found here:
https://gtm.steamproxy.vip/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.
Parker Posey's Mouth 13 Mar, 2020 @ 5:06pm 
[cont] often not even the holy city. I'm not certain how that would happen, but when a city-state emergency revealed the whole world to me, only one AI player had apparently succeeded in spreading any religion to any cities, even passively. Has anyone else has seen similar effects? This is the only mod added to my list since my last functioning games, so I'm curious.
Parker Posey's Mouth 13 Mar, 2020 @ 5:02pm 
I've run a few test games with this on, and I'm a little skeptical it's working well. It might just be that the limits for land units are too permissive for my taste, but I see very little different about the AI behavior. They're still building absurd piles of units, which in many cases, they can't support with resources.

What's more, I think it's causing some problems with the AI and religion. In my last game, myself and AI Japan founded and spread religions. But while AI Poland, Arabia, France, and Spain also founded religions, I could find no evidence of any cities in the world following them.
TC  [author] 10 Mar, 2020 @ 12:10pm 
You're correct that it is 6.

It is very easy to change those values too, so if different numbers work better for you then you can swap it out no problem.
Prophet Bridge 10 Mar, 2020 @ 11:16am 
Hey, to clarify for myself. Is this chart saying that the limit after settling your first city 6 for land combat units. Or does the "Base" row include that first city?
TC  [author] 10 Mar, 2020 @ 9:07am 
Updated mod to add support for limitting Settlers, Builders, and Naturalists. Also removed limit to aerial units, since it was stupid to impose a secondary limit(already limited by aerodrome/airstrip space).

This update will likely break any saved games using the old version. If you would like the old version to manually install and finish your saved game, send me a message and I'll provide that to you.
MrTango 9 Mar, 2020 @ 9:45am 
Loads fine now, and did a quick unit spam test, 7 units, cant build anymore :) woo. Thankyou. <3
TC  [author] 9 Mar, 2020 @ 8:15am 
@A Choomah:

The problem was Real Era Stop. It sets a load order of 999999 on it's database altering files. The high load order was deleting units out of the game's unit table, after the unit limit enforcement tables were being populated. That was causing a nil index error when my scripts were trying to compare the two tables. I changed the load order on my mod to 1000000, which from my testing has fixed the issue. I uploaded the new version here.

Let me know if everything works for you now.
TC  [author] 9 Mar, 2020 @ 7:37am 
I'm seeing the same issues you are, but haven't been able to diagnose the issue yet. The database tables are populating correctly, but it's having problems evaluating the units via lua. Still looking into it, no ETA on solution though.
MrTango 9 Mar, 2020 @ 6:49am 
Fast Forward AI Turns by Zugaikotsu + Sukritact's Resources by Deliverator23 & sukritact + Removable Districts RaF by Baradar67 (works with GS) + This mod = Working together, no issue.

The others I mentioned, If I add a single other to the list above, I get a crash to main menu.
TC  [author] 9 Mar, 2020 @ 6:30am 
@A Choomah:

Thank you very much for the feedback.

If you would take the time to enable your mods 1 at a time to see which one causes the conflict, I would happily look at the code for that mod and find the issue. Then I will be able to propose a solution to get them all to work together.
MrTango 9 Mar, 2020 @ 6:28am 
I have all dlc enabled (both RaF & GS, and all smaller packs).

With all community content disabled, and only this one active, I *can* train slinger, warrior & scout on turn 0.

With all of the mods I mentioned on, together with this, I *can't* train warrior, slinger or scout.
TC  [author] 9 Mar, 2020 @ 6:02am 
@A Choomah:
I am unfamiliar with several of those. Will you please try starting a game with this mod a only and letting me know if it works for you?

Are you using R&F and/or GS?
MrTango 9 Mar, 2020 @ 5:28am 
Turn 0, city founded, but cannot recruit any warriors (only have 1 warrior). Might one of the following mods be interfering? : Fast Forward AI Turns by Zugaikotsu, PerfectWorld6 by ricardo & p0kiehl, Sukritact's Resources by Deliverator23 & sukritact, SM’s Citizen Slots Rework by Social Mechanic, Real Era Stop by infixo, Removable Districts RaF by Baradar67 (works with GS), Konosuba - Aqua's Axis Order by Liberty.
TC  [author] 9 Mar, 2020 @ 4:34am 
In my opinion, no. I only play tall, and use this in all of my games. It requires less troops to protect a smaller kingdom.

If you find that you prefer all civs to have the same limit, the numbers are easily edited in the lua file. Instead of the standard 6/1/1/.5 for land units, you could change it to something like 12/0/0/0.
Axiom 8 Mar, 2020 @ 9:12pm 
Is this theoretically a disadvantage for players who like to play with "tall" civs?
Prophet Bridge 8 Mar, 2020 @ 4:09pm 
Didn't know I wanted this until now. Thank you.
TC  [author] 8 Mar, 2020 @ 12:14pm 
@A Choomah:
I like that idea quite a bit. Whenever I get time to work on this mod, I'll consider how to implement and balance that. It could get out of hand with the huge AI population later in the game.
MrTango 8 Mar, 2020 @ 11:10am 
Any chance of population adding to the limits? every x number of pop (what seems fair) = + 1 to land & + to naval.
TC  [author] 8 Mar, 2020 @ 8:15am 
Hi Kenraali.

Yes, this mod works with modded units - not sure how I forgot to put that in the desc.

I use this mod currently with the Steel and Thunder units mods.
Kenraali #BringBackQP 8 Mar, 2020 @ 5:11am 
Does this work with mods that add new units, unique or not?
TC  [author] 6 Mar, 2020 @ 3:12pm 
Good idea, I'll look into that. Thank you for the observation
acdcisnice 6 Mar, 2020 @ 2:50pm 
One problem I seem to be seeing is that after they hit their unit limit and the AI has build everything it could, it seems just spams settlers. It might be useful to limit the settler spam too, to prevent AI from just draining their pop with settler spamming and make them spam builders if they must spam something.
acdcisnice 6 Mar, 2020 @ 10:08am 
Very cool mod, thanks for posting !