[MOD] SD Culture Conquest

Stone-D

Chieftain
Joined
Dec 4, 2005
Messages
68
(Also posted on Apolyton)

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 (Included)
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+ (Included)
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+ (Included)
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, # <sdTechConquest>) and uncomment everything WITHIN those tags. There may be multiple occurances, depending on the mod. The included mods are :

Code:
MOD Title       Author          Tag
-----------------------------------------------
Cultural Decay  Bhruic          <CulturalDecay>
TechConquest    Bhruic          <TechConquest>


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.
 

Attachments

  • SD-CultureConquest.v1.20.zip
    10.6 KB · Views: 314
  • SD-CultureConquest.v1.30.zip
    12.1 KB · Views: 445
  • SD-CultureConquest.v1.30-Paasky.zip
    6.4 KB · Views: 338
Good idea! Thought it's immoral to use the patch without thanking you :p
 
What about making the culture lost time dependant? So if you re-capture it the next turn, you only lose say 5%, but if you wait for 10 turns, it's like 15%, and so on and so on. You could do 5% + 1%/turn, I guess with the reasoning that as the years go by the displaced socialites are less and less likely to return.
 
Thanks for the praise guys!

sportybrain, good point, I'll work on it later tonight (morning now, got work!).

In my current game I just made Catherine a very happy girl - when I discovered her, she only had St. petersburg left with 2 archer units. Five other cities had been taken/razed by the barbss. So I grabbed them and gave them to her. Instantly jumped up the rankings several notches. :)
 
thank you! you seem to be coming up with some of the most useful, sensible mods. restarting the culture at zero always seemed kind of ridiculous to me, especially when the city was gained by peaceful means, because the old city is still populated, still has the same ruins, and so on. your mod, again, is historically accurate, because the conquering civ can't possibly keep all of the culture maintained (i.e. tenochtitlán to mexico city, constantinople to istanbul all made significant changes), but getting rid of it all is ridiculous. like take mexico city, there is significant aztec heritage there, in addition to what the mexicans have built.


keep making mods, man, they tend to be quite useful.
 
I get a "Failed to load python module CvEventInterface" error on startup.
I had recombined a bunch of mods together under SdEventManager instead of CustomEvent after downloading a few new versions and assumed I broke it.
But I just cleaned up the python folder and reinstalled just this mod - still comes up.
Any ideas? Is it just me?
 
Kindness said:
I get a "Failed to load python module CvEventInterface" error on startup.
I had recombined a bunch of mods together under SdEventManager instead of CustomEvent after downloading a few new versions and assumed I broke it.
But I just cleaned up the python folder and reinstalled just this mod - still comes up.
Any ideas? Is it just me?

Clear the cache?

Req
 
ok well I fixed the problem.
Turns out Random Events 1.3 has 2 files in the python/screens folder that need to be in the /python folder.
I think the problem I was having when I just had SD Culture loaded was the Sd vs sd thing - as I really can't think of anything else.
Anyways it works now, I didn't know about those logs - turns out they are very useful.
 
Maybe have 2 versions, one year dependent and one turn dependent. Else what happens if you have scenarious that have compleatly different turn span?
 
I've allowed for that, it calculates how many years there are by taking gamespeed settings etc into account.

I feel that this is pretty realistic - in the early stages of a civilization, it takes quite a while to muster up a sufficiently large force to retake a captured city, if they ever do.

In the modern era, its pretty much an instant smackdown. Kuwait, for example, or even Baghdad.

Its because of this I left version 1.1 there - I want feedback on this method!

Have you looked at the debug log examples?
 
I downloaded it for the normal civ-games, but could you give me a small code which would simply make the city have the same culture as it had before conquest? Like Retain Culture On Capture in [c3c]. I need it for my WWII scenario, perhaps you could PM it?

I'm guessing that it's not too difficult, especially after this ;)
 
hi, I'm very interested in your mod that I even removed the technology-conquest mod coz they didn't work together (over lapping file or two which I couldn't merge)

But a bit of a silly question: for versions 1.2 and 1.3.. what exactly is "have sdTools" and "require sdTools" etc? Is this something some people have and some people don't? I don't wanna update to versino 1.3 without being able to play it!
 
Top Bottom