[PYTHON] zMax Units

Hey, more comments...

(sorry)

I ran into a major problem -- not with the mod comp itself, which does what it is supposed to do, but with how the AI deals with it. I suspected this might happen... apparently, the AI isn't programmed to either upgrade units or discard outdated ones and build new ones in their place.

As a result, when the AI reaches its unit max, it just stops building and stays put in most cases. Unless it happens to go to war or is attacked, it just sits there with its little army of 2, 3, or 4 pt units. If the AI gets into a protracted war, it will then replace attrition losses with the better units, but with a well-mounted invasion, a small AI-controlled CIV does not have the time to replace losses and will be overwhelmed, thus the fatal game-balance flaw.

To make the mod comp really work, it might need a routine that allows the AI to recycle its outdated units somehow. Without it, a player can defeat AI-run Civs waaaay too easily. Is that doable at all?
 
Well it should be possible to do a python unit upgrade and as soon as the AI has enough money to upgrade it would go through upgrade a bunch of random units.
 
Well it should be possible to do a python unit upgrade and as soon as the AI has enough money to upgrade it would go through upgrade a bunch of random units.

That ought to fix part of the problem. Remaining possible issues are the AI not recognizing it needs cash to upgrade obsolete units, of course, or not disbanding/"banzai-ing" worthless units for the same reason.

I reran my scenario with Zmax Units "sort-of" disabled (I had the limit set at 10 units instead of the original 5), and the AI went back to behaving in its usual warm and welcoming manner (training units like a maniac and attacking mercilessly when the occasion seemed right) ;)
 
zMax Units v0.25

Version: v0.25
Type: Python MOD COMP w/ INI Config
Created By: Zebra 9 (@ civfanatics.com)
Compatability: Warlords, and maybe Vanilla (Who knows it might even be compatable w/ Beyond the Sword. Hmmm :D)
MP Compatable: If all players are running it, maybe.
File DB Entry: Download Here (...)

Yay! Thanks a bunch for the update. :goodjob:

The auto-upgrade for the AI will sure help.

In testing the older version, the AI just stopped doing anything at all when it reached its max unit limit, and kept all its units hunkered down in its cities. I thought starting with a higher limit and then decreasing this limit for each additional city would prevent the problem, in particular in the early stages of the game. For example, the first city would allow perhaps 10 combat units (the initial default), the second city 9 extra units (default-1), the third city 8 extra units (default-2), etc... The ninth city and all other additional cities would only allow 2 extra units -- can't be less than that.

Obviously, the sequence will vary with established mods. Some might need to start with a higher initial default number (15, 20, whatever, rather than 10 I suggested above). This should help AI-run Civs in the early game turns when the AI thinks it needs lots of units. It should also help prevent a Civ being reduced to just a few cities to still have a good number of combat units despite the fewer cities.

Just a thought.
 
Added a penalty system, it allows you to have a system where the first city supports 5 the next 4, 3, 2 and so on.
 
I've been running this last version in my mod. It's very good!

It's set up as follows:

First City Supports: 15 combat units
Next Cities (-2 increment): 13, 11, 9, etc...
Minimum Support: 3

With my computer, which is not a very performing machine, I noticed a decrease in the lag between turns, from about 3 mn to 40-55 seconds in the later stages of game when lots of units are in play. That's in my mod of course (fairly large map with 20 Civs). That's awesome.

The AI's behavior was not adversely affected by the max limit, and the AI units do get upgraded on a regular basis.

Terrific work! Thanks again. :goodjob:
 
Awesome! Congratulations on the success of this component for those of us with computers of less-than-stellar-GPUs. Now perhaps I can run a huge map of the world with more than ten civs on it.
 
I wonder if this isn't a bigger problem with the AI in my mod. The reason I'm saying this is that there seems to be an ongoing issue with the AI ignoring restrictions elswhere.

For example, you had given me a Python mod comp to prevent landlocked Civs from researching Fishing & Sailing. Although this restriction works with player Civs, the AI seems to be ignoring the restriction. I also have a number of wonders that the AI contructs with Civs that shouldn't be able to. Is this the same related issue?? Maybe. :confused:
 
I'm going to double check myself, but I just checked the SDK and it appears that they use the same function calls.
 
Hi
i hava a suggestion, dont know if incorporate in that modcomp or a new one.
What annoym me is see a army composed with 10 catapults 1 spearman 1 axeman., that is completly unrrealistic. I can restrict in the CIV4UnitClassInfos but is not very flexible, so e kind of % shoud be the way to go. For exemple (not accurate)in a ancient/classical era something like for eath 10 foot units 30% for mounted and 20% for siege. I think the total army should depend not by the numbers of cities but population of each city, so i can have a big army in one city challenge or having in mind city states. This is a little exemple it could be more accurate and explored.

Good work Z :goodjob:
 
Back
Top Bottom