(Also posted on CivFanatics)
I thought it was unrealistic for a city's culture to drop to zero upon capture. So, to fix that, I implemented this.
Upon capture, the city's culture is reset to one half of the original, PLUS a random number whose maximum is half of the original. Prior to this calculation, the original number is adjusted to account for the lost population.
NewCulture = ( OriginalCulture / 2 ) + ( Random(OriginalCulture / 4) ) + ( Random(OriginalCulture / 4) )
If the conqueror is also the original founder, this calculation becomes :
NewCulture = OldCulture x ((Current_year - Loss_year) / (Max_years * 0.25))
If the conqueror is NOT the original founder AND the losing civilization is also NOT the original founder AND the city's culture is at least double what it was when the founder lost it, the loser becomes the founder.
If you build a city on the same plot as that of an older city that got itself razed, the new city will gain some of the older city's culture to a maximum of 80%, depending on how long ago the razing took place.
NewCulture = (Culture_old x ((Current_year - Loss_year) / (Max_years * 0.15))) * 0.8
Additionally, if you check the logs, each city now has a capture count.
Now, instead of a city being completely written off after capture due to zero culture, you can fight over it!
History
=-=-=-=
v1.00 :
Initial Release.
v1.10 :
Uses SdToolKit.
Better motive to regain lost cities. 80% of ORIGINAL culture is restored to the founder, minus a small chunk for population depletion and building loss. If the original culture is less than the current culture, then the current culture is used.
If a city is captured from a previous conqueror by someone other than the original founder AND the current culture value is equal to or over 200% of the original culture, then the loser becomes the 'founder' and gains the aforementioned motive.
Adjusted loss calculation from (0.25 + rand(0.25) + rand(0.25)) to (0.5 + rand(0.25) + rand(0.25))
v1.20 :
Requires sdToolKit 1.10+
Implemented safeguards to allow continuation of current savegames with no disruption.
Eliminated a potential exploit. A city's data is no longer dependant on the city's name.
Removed population loss adjustment. T'was a silly idea.
New variable, fDateLost. Stores the date the city was taken from the founder.
Founder recapture culture redone : Culture_new = Culture_old x ((Current_year - Loss_year) / (Max_years * 0.25)). NOT turn based... year based.
If founder's restored culture is less than the non-founder culture, the non-founder culture is used.
Included two mods by Bhruic for the user's convenience. Please see the "Included Mods" section.
v1.30 :
Requires sdToolKit 1.20+
Implemented version control. Will no longer perform a fix-loop every game turn, causing a slowdown.
Some minor cleanups and optimizations.
Founding a city where an older city once stood will give some (max 80%) of that older city's culture to the new city.
Rebuilt culture is : Culture_new = (Culture_old x ((Current_year - Loss_year) / (Max_years * 0.15))) * 0.8
Included Mods
=-=-=-=-=-=-=
In order to avoid a deluge of queries and requests, I have decided to include a number of 3rd party mods... however, they have been disabled. To enable them, open "sdEventManager.py" in your favourite TEXT (ASCII) editor. Notepad should suffice. Search the content for the mod's opening and closing tags (for example, #) and uncomment everything WITHIN those tags. There may be multiple occurances, depending on the mod. The included mods are :
Note that there are a number of other commented mod tags. The components for these you will have to download separately, the tags are there to serve as a guide and example.
I thought it was unrealistic for a city's culture to drop to zero upon capture. So, to fix that, I implemented this.
Upon capture, the city's culture is reset to one half of the original, PLUS a random number whose maximum is half of the original. Prior to this calculation, the original number is adjusted to account for the lost population.
NewCulture = ( OriginalCulture / 2 ) + ( Random(OriginalCulture / 4) ) + ( Random(OriginalCulture / 4) )
If the conqueror is also the original founder, this calculation becomes :
NewCulture = OldCulture x ((Current_year - Loss_year) / (Max_years * 0.25))
If the conqueror is NOT the original founder AND the losing civilization is also NOT the original founder AND the city's culture is at least double what it was when the founder lost it, the loser becomes the founder.
If you build a city on the same plot as that of an older city that got itself razed, the new city will gain some of the older city's culture to a maximum of 80%, depending on how long ago the razing took place.
NewCulture = (Culture_old x ((Current_year - Loss_year) / (Max_years * 0.15))) * 0.8
Additionally, if you check the logs, each city now has a capture count.
Now, instead of a city being completely written off after capture due to zero culture, you can fight over it!
History
=-=-=-=
v1.00 :
Initial Release.
v1.10 :
Uses SdToolKit.
Better motive to regain lost cities. 80% of ORIGINAL culture is restored to the founder, minus a small chunk for population depletion and building loss. If the original culture is less than the current culture, then the current culture is used.
If a city is captured from a previous conqueror by someone other than the original founder AND the current culture value is equal to or over 200% of the original culture, then the loser becomes the 'founder' and gains the aforementioned motive.
Adjusted loss calculation from (0.25 + rand(0.25) + rand(0.25)) to (0.5 + rand(0.25) + rand(0.25))
v1.20 :
Requires sdToolKit 1.10+
Implemented safeguards to allow continuation of current savegames with no disruption.
Eliminated a potential exploit. A city's data is no longer dependant on the city's name.
Removed population loss adjustment. T'was a silly idea.
New variable, fDateLost. Stores the date the city was taken from the founder.
Founder recapture culture redone : Culture_new = Culture_old x ((Current_year - Loss_year) / (Max_years * 0.25)). NOT turn based... year based.
If founder's restored culture is less than the non-founder culture, the non-founder culture is used.
Included two mods by Bhruic for the user's convenience. Please see the "Included Mods" section.
v1.30 :
Requires sdToolKit 1.20+
Implemented version control. Will no longer perform a fix-loop every game turn, causing a slowdown.
Some minor cleanups and optimizations.
Founding a city where an older city once stood will give some (max 80%) of that older city's culture to the new city.
Rebuilt culture is : Culture_new = (Culture_old x ((Current_year - Loss_year) / (Max_years * 0.15))) * 0.8
Included Mods
=-=-=-=-=-=-=
In order to avoid a deluge of queries and requests, I have decided to include a number of 3rd party mods... however, they have been disabled. To enable them, open "sdEventManager.py" in your favourite TEXT (ASCII) editor. Notepad should suffice. Search the content for the mod's opening and closing tags (for example, #
Code:
MOD Title Author Tag ----------------------------------------------- Cultural Decay BhruicTechConquest Bhruic
Note that there are a number of other commented mod tags. The components for these you will have to download separately, the tags are there to serve as a guide and example.
Comment