1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

[PYTHON] zMax Units 2016-10-05

[PYTHON] zMax Units

  1. Zebra 9
    zMax Units v0.5

    Version: v0.5
    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.
    Descussion: Here

    Description:
    This allows anyone with an understanding of INI files to prevent civs from training more then a certain number of units. The number of units is determined by, the number of cities the player has, the difficulty level, game speed, map size, and player type (AI, Human). It also displays how many military units you have and how many you are allowed to have. Now v0.3 has the auto AI unit upgrader. v0.4 now allows you have a sort of penalty for having to many cities. Now you can set it so the first city give 4 units, the next 3 and so on.

    How To Use:
    The base number of units that a city supports is controlled by world size. To set this value you must first find [City Support] in zMax Units Config.ini. After this line put an entry in this form WORLD SIZE TYPE TAG = NEW VALUE, for example WORLDSIZE_TINY = 7. Now there is also an entry that is called "iDefaultCitySupport", the game defaults to this if a map size doesn't have an entry in the file. If this entry is omited the game will default to 0.
    Next we have the line [Game Speed], all entries after this are added to the base units that a city supports. After that line put an entry in this form GAME SPEED TYPE TAG = NEW VALUE, for example GAMESPEED_QUICK = -1.
    Lastly we have the line that reads [Diff Bonus]. This section controls how many bonus units the human and AI players get on different difficulty levels. Now this is a bit different then the last 2 sections. To set a difficulty level you must go to the line following [Diff Bonus], and put an entry in this form HANDICAP TYPE TAG PLAYER TYPE = NEW VALUE, where PLAYER TYPE can be Human or AI, for example HANDICAP_CHIEFTAIN Human = 6 or HANDICAP_IMMORTAL AI = 8.
    At the very end of the file you will see a line that reads [zMax Units Data], and after this line an entry that looks like bAllowContinue = True, this entry controls whether cities should stop production on units that have already been started if you max out your units. If that entry is not found the game defaults to False. If the game doesn't find a certain GAME SPEED or HANDICAP it will default to 0. Also if you copy this MOD COMP into your MOD don't forget to change the file YOUR MOD/Assets/Python/Utils/CvModName.py to read your MOD's name. ;)

    How to use v0.4 features:
    fNumCitiesChange controls how many unit's each city will change by (set to -1 to have a 4, 3, 2, 1 system, or use a number like -0.5 to get 4, 4, 4, 3, 3, 2, 2, 1, 1) set to 0 to turn off the penalty system
    iMinNumSupported controls the minimum number of units a city can support (use this so you don't end up w/ cities that support -5 units)

    I hope you all find this to be a very useful MOD COMP. ;) :)

    Added 3 Screenies showing the counter. Basically when you hit 75% of the units allowed it displays in yellow, and when you have maxed out it displays in red, anyother time it displays in green.

    Spoiler Version Info :
    v0.5 Fixed AI auto upgrade
    v0.4 added a penalty system
    v0.3 added AI auto unit upgrading
    v0.25 fixes bug that prevented this from even working


    Credits:
    Dr. Elmer Jiggle for the INI Config Parser