TrainingBarracks mod
Ver. 1.0
1/01/2006

by Roger Bacon
with special thanks to Bhruic and Kael on the civfanatics forum for their help with Python.

What it does:

This mod replaces the 4 exp which barracks and drydock give to land and naval units with a chance of getting 1 exp every turn (see next section on how to change this) if they are in a city with a barracks (land units) or drydock (naval units). Units with 10 or more exp will not receive any further increases. Again, this number can be changed by the user.

How to change the default values:

Open "TrainingBarracks.py" with Notepad.exe or any other text viewer.
On line15 of "TrainingBarracks.py" you will see the following:
		# change this number to alter the chance of getting an experiece point. A unit has 1 out of [this value] chance of getting an exp each turn
		# For example, if you set it to 10 a unit has a 1 in 10 chance of getting an exp point each turn. 
		#Setting it to 1 means units gain an exp point every turn (1 in 1 chance)
		barracksChance = 10
		drydockChance = 10
		# Units with exp higher than this number will not gain any more exp from a barracks or drydock.
		barracksMaxExp = 10
		drydockMaxExp = 10
Just change those values to whatever you like if you want faster or slower exp gain. By the way, you can even open this file and chance these values in-game and the changes will take place immediately when you alt-tab back to civ4.

How to install it:

Copy the TrainingBarracks folder to your "mods" folder wherever you installed Civ4. For example, on my system that is: E:\Games\Civ4\Mods\

How to run it:

When you load Civ4, go to "Advanced" and then select "Load a Mod". Select "TrainingBarracks" and Civ4 will tell you it needs to restart. Select "yes" and that's all there is to it.

How to make TrainingBarracks your default setup so you don't have to load it each time:

copy  "CvCustomEventManager.py" and "TrainingBarracks.py" to  ..\My Documents\My Games\Civ4\CustomAssets\python
copy "CvEventInterface.py" to ..\My Documents\My Games\Civ4\CustomAssets\python\entrypoints
copy "CIV4BuildingInfos.xml" to My Documents\My Games\Civ4\CustomAssets\xml\buildings

Once you have done that you will have the TrainingBarracks loaded even if you load another mod.

Version history:

Version 1.01 (1/02/2006)
Optimized some code to help with make it compatible with future patches.
Added code to make sure the units in the city belonged to the player before giving the exp bonus.

Version 1.0 (1/01/2006)
Initial release. Designed to work with Civ4 version 1.52