Tech By Conquest

I like this, it reminds me of old-school civ.

One thing though, I think in a way it could be a bit overpowered (I assume the AI also benefits from this too right?), is there a way you could make it so that you get X amount of beakers (similar to money) and the civ whose city you conquer loses X amount of beakers?

This mod provides equal opportunity for all civs and is not overpowered. Every player, human or AI, can gain technical knowledge through conquest. If the conquered civ has a tech the conquering civ does not, then the conquering civ will receive a free tech. This provides greater incentive for all players to protect their cities, with adequate defenders to minimize the risk of technical knowledge being transfered to the enemy.

In reality, city size has nothing to do with the transfer of knowledge from one scientist to another. Therefore, there is absolutely no need to figure out percentages of beakers to transfer or what size city has been conquered.

Bottom Line is: In the tradition of previous versions of Civ, I have purposely kept this mod very simple: Either you get a free tech or you don't.

Respectfully,


Orion Veteran :cool:
 
When used in conjunction with the Immigration mod, I have to rename the MasterModList.xml to match the mod. Both use the same filename.

:goodjob: on those!

I have redesigned the MasterModList.xml to include everything I have... so far. So it is intentional that both mods use the same file name. See below:

Spoiler :

Code:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!--
	MasterModList
	by Orion Veteran
-->
<mod id="MasterModList" 
	name="MasterModList"
	author="OrionVeteran"
	version="1.0"
	date="04/14/2010"
	url="">
	
<!--Orion's Mods start -->
	<!--gameutils -->	
	<gameutils module="AgricultureGameUtils" class="AgricultureGameUtils" override="False"/>	
	<gameutils module="LeonardosWSGameUtils" class="LeonardosWSGameUtils" override="False"/>
	<gameutils module="LimitedReligionsGameUtils" class="LimitedReligionsGameUtils" override="False"/>	
	<gameutils module="ImmigrationGameUtils" class="ImmigrationGameUtils" override="False"/>
	<gameutils module="OIMGameUtils" class="OIMGameUtils" override="False"/>
	<gameutils module="SlaveCageGameUtils" class="SlaveCageGameUtils" override="False"/>
	<gameutils module="SlaveAuctionGameUtils" class="SlaveAuctionGameUtils" override="False"/>
	<gameutils module="SphinxGameUtils" class="SphinxGameUtils" override="False"/>	
	
	<!--events -->
	<load mod="Abandon City Mod"/>	
	<events module="AgricultureEvents"/>
	<events module="AIAutoPlay" class="AIAutoPlay"/>
	<events module="ChangePlayer" class="ChangePlayer"/>
	<events module="ImmigrationEvents"/>
	<events module="LimitedReligionsEvents"/>	
	<events module="OIMEvents"/>
	<events module="PetraEvents"/>
	<events module="TerraformingEvents"/>
	<events module="Tester" class="Tester"/>	
	<events module="WaterWellEvents"/>
	<events module="TechByConquestEvents"/>
<!--	
-->	
</mod>
 
Ok, good deal! I'll redo my files then. So I removed the load events for Agriculture, etc.. in init.xml and have just the load=MasterModList.cml?

There is only one entry required in the init.xml file (shown below in red)

Spoiler :

Code:
	<load mod="Autolog"/>
	<load mod="Reminder"/>  <!-- requires Autolog -->
	<load mod="Civ4lerts"/>
	<load mod="MoreCiv4lerts"/>
	<load mod="Unit Naming"/>
	<load mod="FavoriteCivicDetector"/>
	<load mod="EventSigns"/>
	<load mod="Strategy Overlay"/>
	<load mod="StatusDump"/>
<!--Orion's Master Mod List start -->
	[COLOR="Red"][B]<load mod="MasterModList"/>[/B][/COLOR]


All other entries go into the MasterModList.xml (one easy place for all entries).
 
Bottom Line is: In the tradition of previous versions of Civ, I have purposely kept this mod very simple: Either you get a free tech or you don't.

Respectfully,


Orion Veteran :cool:

Fair enough, I think I'll be adding this to Diplomacy II. :goodjob:
 
Thank you very much OrionVeteran for this excellent addition. I like it also that you kept it simple.

I'd like to report a small problem that I encountered. I play in French and it does not work when the technology has non ASCII letters in their description (like "méditation" with an accent on the e). I changed all é and è to e and it works (something like half of the names had to be changed). Would there be a simpler method to avoid this?
 
Thank you very much OrionVeteran for this excellent addition. I like it also that you kept it simple.

I'd like to report a small problem that I encountered. I play in French and it does not work when the technology has non ASCII letters in their description (like "méditation" with an accent on the e). I changed all é and è to e and it works (something like half of the names had to be changed). Would there be a simpler method to avoid this?



Hmmm. I have never tried playing any mod in a language other than English. The code looks for the tech description on this code line:

Code:
TechDescription = PyInfo.TechnologyInfo(iTech).getDescription()

This is normally good code. I'm not sure why it would fail on the French description. You might want to ask the experts on the Python forum.
 
Thanks for the reply. No big deal but I just thought that it could be interesting for you to know.

A small thing: I noticed that the message was showing up when the AI is playing (not that it matters much - it keeps you updated on the level of the research by the AI)!
 
Ooooo I like this one a lot!

Is there a way to make this NOT work on a city that has been recently captured? (Like as long as they show that fist or possibly an amount of turns) because it wouldn't be realistic if I'd take a city for 1 turn and they learn a lot from that in my opinion. I don't know if it's really difficult but it seems important to me ;o

And though you said you believe it's better that it takes the first technology, is there a way to only allow technology's the attacker doesn't have yet? Or if that's too difficult maybe the technology that requires the least bakers?

With kind regards :)
 
Ooooo I like this one a lot! Is there a way to make this NOT work on a city that has been recently captured?
With kind regards :)

The function that triggers the code is onCityAcquired. This is triggered when you first capture a city. I don't have a way to delay the function from running. So if you receive a tech, it will be immediately after you capture a city.
 
Thanks for the reply. No big deal but I just thought that it could be interesting for you to know.

A small thing: I noticed that the message was showing up when the AI is playing (not that it matters much - it keeps you updated on the level of the research by the AI)!

Hmm.. So you are saying AI takes AI city then the message pops up for everyone? Hmm... The tech conquest message might not be appropraite in that case.
 
@smeagolheart: yes, exactly, but you should know that I'm playing multi-player / 'hotseat', I did not test it single yet.

The message appears briefly and sometimes you don't have enough time to read it. It all depends how long the computer takes to process the various civs played. But it appears.
 
Hmm.. So you are saying AI takes AI city then the message pops up for everyone? Hmm... The tech conquest message might not be appropraite in that case.

You can replace the message with the following:

Code:
TechByConquestMessage = "You received the knowledge of " + str(TechDescription) + " from scientists of the city of " + str(pCity.getName())
CyInterface().addMessage(CyGame().getActivePlayer(),True,25,str(TechByConquestMessage),'AS2D_DISCOVERBONUS',1,'Art/Interface/Buttons/TerrainFeatures/Forest.dds',ColorTypes(8),0,0,False,False)
 
I currently still have the problem of the tech notice showing up when AIs conquer each others cities, so I'm not sure if I added used the new code correctly. Can anyone take a look for me? Thanks.

Code:
if FoundTransferTech:
TechDescription = PyInfo.TechnologyInfo(iTech).getDescription()
TechByConquestMessage = "You have learned " + str(TechDescription) + " from the capture of " + str(pCity.getName())
					CyInterface().addMessage(CyGame().getActivePlayer(),True,25,str(TechByConquestMessage),'AS2D_DISCOVERBONUS',1,
'Art/Interface/Buttons/TerrainFeatures/Forest.dds',ColorTypes(8),0,0,False,False)
pTeam2.setHasTech(iTech,True,iNewOwner,False,False)
 
Top Bottom