Dynamic Experience Mod

The Great Apple

Big Cheese
Joined
Mar 24, 2002
Messages
3,361
Location
Oxford, England
UPDATED: 28/12/05

NOTE: This is the first time I ever coded something proper in python, and the code is well below my current standard. I may update this mod in the future if people request it.

I've never really liked how you, the player, gets to decide which promotions a unit gets - it seems somehow wrong that you can determine how battles in the field determine how a unit gains expereince. I also didn't like the way you could hang onto your promotions until you wanted to use them.

This mod takes that aspect out of the game. It's up to you to decide if that's a good thing or a bad thing - I just thought it would be a cool mod to make! As this mod does take something from the game, I would recommend it go alongside that adds something to the game, to keep the overall level of tactics and complexity roughly the same... but it's your choice!

Instead of the player deciding which promotions a unit get, it is instead decided by looking at what the unit has done in the past. If a unit, for example, has defeated an archery unit, it will be more likely to get the Cover promotion, giving it a bonus against archery units.

If you open up DynExp.py with a text editor, you will notice a few values near the start of the file. Which values they are should be quite clear. Changing these values will make the mod perform differently.

I hope you enjoy it!

NOTE: This mod has not been tested with 1.52. The code is also pretty shabby, and needs a facelift. This may cause slowdowns at later levels. It's also not very flexible.

Release notes:
Spoiler Release Notes :

Version 0.1:
*Initial Release
*Makes promotions based on events in the unit's history

Version 0.2:
*Many many bugfixes. The mod now works better.

Version 0.3:
*More bugfixes.
*Tweaked some values


Compatability:
This mod will not work with any mod that changes the names of promotions. Nor will it work with any mods that add promotions, change what units combat types can get which promotions, or fiddle around with the promotions prequesites.

To do:
*Work out some sort of event to make drill promotion more likely. At the moment it is rather crudely done as half the chance you'll get a combat promotion)
*Work out how to add "bombard" points when a unit bombards. At the moment the Accuracy promotion is done like the Drill promotion
*Add some more options to change the way promotions are allocated:- maybe give experience from more events except combat? I'm not sure what other events I should use though!
*Make the mod more compatable with other mods.
*Tweak the likelyhood of promotions - some come too often some not enough.
*Increase chances for units to get promotions based on inbuild game bonuses (archers more likely to get City Garrison, for example)

I welcome any comments or suggestions. If you find any bugs, I welcome reports of them as well.

I'm particularily interested in how people find the balancing of the promotions (if a promotion comes up too often or not enough).
 

Attachments

Ok, this seems very interesting... however, at the cost of sounding like promoting my own product, which I am I guess, PLEASE use sdToolKit. You'll avoid the whole incompatible_with_other_pickle_mods problem!

http://forums.civfanatics.com/showthread.php?t=146130

I'll be uploading a newer version tomorrow with an entity deletion function (for destroyed/dead units), improved backwards compatibility (avoid new game requirements) and a funky little turn_to_decimal_date function which I made for my sdCultureConquest mod.
 
Stone-D said:
Ok, this seems very interesting... however, at the cost of sounding like promoting my own product, which I am I guess, PLEASE use sdToolKit. You'll avoid the whole incompatible_with_other_pickle_mods problem!

http://forums.civfanatics.com/showthread.php?t=146130

I'll be uploading a newer version tomorrow with an entity deletion function (for destroyed/dead units), improved backwards compatibility (avoid new game requirements) and a funky little turn_to_decimal_date function which I made for my sdCultureConquest mod.
Ah, great - hadn't seen this. I'll convert it to use this!
 
Stone-D said:
LOL, that's true enough... but this one does the promotion based on the unit's active history, not randomly like that option... right? ;)
Yeah.

I thing auto-promote bases it on what the AI would promote the unit to. This does it based on what the unit has done in the past (it's experiences). It's similar... but different!

EDIT: First post has updated version using SD-Toolkit. I haven't tested it, as I'm not home... but it should work!
 
The Great Apple said:
Yeah.

I thing auto-promote bases it on what the AI would promote the unit to. This does it based on what the unit has done in the past (it's experiences). It's similar... but different!

EDIT: First post has updated version using SD-Toolkit. I haven't tested it, as I'm not home... but it should work!

OIC, nifty idea, I like it...
 
Very nice. I was thinking about doing the same thing, but got to adicted to the game and had no time for coding :p.

Would be very nice if you/we could combind this mod with mine:
http://forums.civfanatics.com/showthread.php?t=142086


Getting extra exp: when healing units, unit been around long time, much scouting, and so on.

Having new types of promotions like:

Barbarian Raider: +50% vs barbarians, +50% vs animals.
Fortify I: Can fortify up to 40%, double fortify speed (10% instead of 5% per turn).
Fortify II: Heal +5% in friendly lands, fortify up to +50%.
Hide I: When fortified in forrest/jungle (halv chance in other terrain) in neutral land there is a 50% (75% in friendly and 25% in enemy)
chans the unit becomes hidden and can only be seen by other units trying to move into same tile. 25% supprice attack strength.
Hide II: 90/60/30% chans to hide fortified in forrest/jungle. Halv chance to stay hidden while moving from forrest to forrest (or jungle).
30% supprice attack strength.
Hide III: 95/75/40%. 40% supprice attack strength.
Spot: Be able to se hidden units.

And other things suggested in my mod threads.
 
Zuul said:
Very nice. I was thinking about doing the same thing, but got to adicted to the game and had no time for coding :p.

Would be very nice if you/we could combind this mod with mine:
http://forums.civfanatics.com/showthread.php?t=142086


Getting extra exp: when healing units, unit been around long time, much scouting, and so on.

Having new types of promotions like:

Barbarian Raider: +50% vs barbarians, +50% vs animals.
Fortify I: Can fortify up to 40%, double fortify speed (10% instead of 5% per turn).
Fortify II: Heal +5% in friendly lands, fortify up to +50%.
Hide I: When fortified in forrest/jungle (halv chance in other terrain) in neutral land there is a 50% (75% in friendly and 25% in enemy)
chans the unit becomes hidden and can only be seen by other units trying to move into same tile. 25% supprice attack strength.
Hide II: 90/60/30% chans to hide fortified in forrest/jungle. Halv chance to stay hidden while moving from forrest to forrest (or jungle).
30% supprice attack strength.
Hide III: 95/75/40%. 40% supprice attack strength.
Spot: Be able to se hidden units.

And other things suggested in my mod threads.

Sure, shouldn't be too hard to do - just to make it compatable. To program those other promotions might take a bit of work.

You'd have to tell me what triggers you want to make gaining your custom promotions more likely.
 
Are upgraded promotions likely to occur alongside new level one promotions? IE: If I have an archer unit defending a city and earns city defense 1 by your coding, then I attack with him to kill a wounded unit in the field near the city earning another promotion will there be a chance of getting the city defense 2 promotion even though he wasn't defending?
 
ghen said:
Are upgraded promotions likely to occur alongside new level one promotions? IE: If I have an archer unit defending a city and earns city defense 1 by your coding, then I attack with him to kill a wounded unit in the field near the city earning another promotion will there be a chance of getting the city defense 2 promotion even though he wasn't defending?
In the default mode, yes - though the chance is likely to be quite small. There is an option in the python file which will switch this off (near the top, under mod config)
 
Back
Top Bottom