View Full Version : [MOD] SD Culture Conquest


Stone-D
Dec 06, 2005, 02:25 AM
(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 :


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.

Zuul
Dec 06, 2005, 04:17 AM
Sounds very nice :-) *thumbsup*.

Fachy
Dec 06, 2005, 07:48 PM
Good idea! Thought it's immoral to use the patch without thanking you :p

kurdt
Dec 06, 2005, 08:16 PM
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.

Stone-D
Dec 06, 2005, 08:24 PM
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. :)

niffweed17
Dec 07, 2005, 04:42 PM
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.

niffweed17
Dec 07, 2005, 04:49 PM
double post.

Stone-D
Dec 08, 2005, 07:45 AM
niffweed17 : Glad you like them! Also, just saw your ReligionResearch mod - I was beginning to think I was the only one who thought it was useful to split them off like that. Glad you're making use of it. :)

Lightzy
Dec 08, 2005, 09:39 AM
wonderful mod. I'll definitely be using this

Stone-D
Dec 09, 2005, 02:49 PM
Just uploaded version 1.2... see the first post for details.

Kindness
Dec 09, 2005, 07:42 PM
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?

Stone-D
Dec 09, 2005, 09:24 PM
Did you merge the changes in the newer sdEventManager? Note the lowercase s at the beginning...

If you did, could you please paste the error from pythondbg.log?

Requies
Dec 09, 2005, 09:26 PM
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

Stone-D
Dec 09, 2005, 10:28 PM
Really, I wonder why Firaxis didn't avoid this whole cache situation by comparing timestamps... if x.py is newer than the cache, then rebuild the cache.

Meh.

Kindness
Dec 10, 2005, 02:20 AM
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.

Zuul
Dec 10, 2005, 06:18 AM
Maybe have 2 versions, one year dependent and one turn dependent. Else what happens if you have scenarious that have compleatly different turn span?

Stone-D
Dec 10, 2005, 06:46 AM
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?

Stone-D
Dec 11, 2005, 12:52 PM
Just uploaded version 1.3. See the first post for details.

Paasky
Dec 11, 2005, 01:36 PM
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 ;)

Fachy
Dec 11, 2005, 07:07 PM
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!

Stone-D
Dec 11, 2005, 08:11 PM
Sorry, its a little python library I made. Its included, don't worry. :)

Fachy
Dec 11, 2005, 09:58 PM
Why did you remove population loss? You don't think invading a city (whether in old or new times) could decrease the population by several thousands? Resistence from the country-men, descrimination from the invadors, buildings destruction, spread of disease coz of dead bodies, along with some othe factors...

Btw it says cannot be played with multi-player.. is this valid even if I REPLACED the original civ files with it, and my partner did the same?

Stone-D
Dec 11, 2005, 11:27 PM
Re multiplayer, dunno... its an arbitrary toggle in Mods/sdCultureConquest/sdCultureConquest.ini - I'd forgotten about it as I don't do the MP thing.

Just 'flick' that toggle and you'll be MP capable. I'll toggle it myself for the next version.

As for the pop loss, sorry for the confusion. I don't remove the actual population loss itself, just the part of my original culture calculation that took it into account. Doing that killed off too much culture for a reason that was out of anybody's control. Besides, London's culture didn't lose overmuch due to loss of population during the Plague/Fire.

Fachy
Dec 12, 2005, 04:55 PM
I don't know the importance of the .ini file anyway.. what happens if I remove it? Especially that I combine many mods together

So you say I put multiplayer = 1 instead of 0?

Paasky
Dec 12, 2005, 04:57 PM
The ini file is autocreated when the mod is loaded. If you put mulitplayer = 1, it just means that it can be used in MP play.

I actually had a problem with one mod & deleted the .ini and it started to work!

Stone-D
Dec 14, 2005, 11:23 AM
Paasky: Sorry for being inactive recently, been a bit poorly. Still need that code?

Paasky
Dec 14, 2005, 11:27 AM
Yep.
"Squint please"
Bring it on!

Stone-D
Dec 14, 2005, 11:49 AM
Yep.
"Squint please"
Bring it on!

Attached to first post, enjoy. :)

Errr, btw, I haven't actually *tested* it, I just banged it together. Lemme know if there're problems.

Paasky
Dec 14, 2005, 11:53 AM
:lol:

But it isn't on the first post. Isn't the max for attachments 3 per post? Or was that at tt-forums...

Stone-D
Dec 14, 2005, 12:09 PM
Whups, wasn't aware of that limitation. Fixed. I checked this time. :)

Paasky
Dec 14, 2005, 12:52 PM
Got it.
980

Lightzy
Dec 14, 2005, 02:49 PM
dunno. it doesn't load the python ..cvar.. something.
put it my c:\civ\mods

Fachy
Dec 15, 2005, 03:50 AM
SD-CultureConquest.v1.30-Paasky.zip
wuts that??

Paasky
Dec 15, 2005, 05:21 AM
Doesn't work...

Perhaps because I simply put the CultureConquest & ToolKit directly into the python folder, but I don't have anything else in that folder?

Although I did figure out a new way: Edit the CIV4CultureLevelInfo.xml sothat the largest borders come from just 1 culture point & have the courthouse (auto-created in all cities by the palace) be the only building to create culture (1 per turn).

See how I'm thinking like stuff were done in civ3 ;)

Stone-D
Dec 15, 2005, 09:27 AM
You DO have the original sdCultureConquest 1.30 installed, right?

Paasky
Dec 15, 2005, 12:20 PM
No :p
I've got that in PaaskyMod. But the method I made is good for me, as every city needs the courthouse to keep city costs down.

Stone-D
Dec 15, 2005, 01:25 PM
Righty-o. Wierd, tho.

Lightzy
Dec 16, 2005, 08:03 PM
how do I freakin make this mod load?

Fachy
Dec 16, 2005, 09:47 PM
Stoned read my post!!

Stone-D
Dec 17, 2005, 12:44 AM
Fachy: About the paasky one? lol, I tried to reply to it but the internet was playing up for me that day so I figured 'later'... forgot. :P

Its a custom job for paasky, does no calculations. Simply copies the culture, no culture loss at all.

Lightzy
Dec 17, 2005, 07:00 PM
*******...

Paasky
Dec 17, 2005, 07:40 PM
How about start civ>advanced>load a mod?
:rolleyes:

Stone-D
Dec 17, 2005, 10:28 PM
Lightzy: Alternatively, inside the zip you will find an Assets folder. Copy the CONTENTS of this folder into your My Games\Civilization 4\CustomAssets folder. No need to bother with the .INI or the .TXT file.

Fachy
Dec 17, 2005, 10:32 PM
Oh ok, not very realistic hmmm

Stone-D
Dec 18, 2005, 01:04 AM
Fachy: Que?

Fachy
Dec 18, 2005, 03:04 AM
I meant pasky's request to keep the culture the same. I mean ANY invaded country loses some of its culture (think colonization spreading its coca-cola and jeans culture, or meusuems destroyed in a country I know o.o)

And those who refuse to lose their culture get..well... slaughtered

Stone-D
Dec 18, 2005, 06:03 AM
Agreed, but that's what Paasky wanted. :P

In future versions I'll add a toggle boolean switch so I don't have to make multiple versions.

Paasky
Dec 18, 2005, 06:40 AM
Don't think of it as culture, rather the border. So in a WWII scenario, the "culture" shouldn't fluctuate.

Fachy
Dec 18, 2005, 11:59 AM
aah ok now I get it, ur right

Fachy
Jan 01, 2006, 08:09 PM
Is this mod compatible with v1.52?

Darkhour
Jan 04, 2006, 07:18 PM
Yes Stoned.. I'd like to know too if this v1.52 and the attached mods are updated..?

Fachy
Jan 04, 2006, 09:31 PM
I'd be really pissed if he answered you now, but ignored me for all that time :p

Fachy
Feb 06, 2006, 03:21 AM
I really loved this mod but it isn't working with 1.52, anyone knows where did stone-D disappear?!??!

Fachy
Apr 07, 2006, 07:00 AM
*rolls his eyes* okay obviously this mod will never be available, I really hate when I take a city over and then it loses 1/2 of its area! It doesn't make sense does it?