[MODCOMP]Enhanced Tech Conquest

TheLopez

Deity
Joined
Jan 16, 2006
Messages
2,525
Location
Oregon
Enhanced Tech Conquest
By: TheLopez

Last Updated 09/14/06

Version: v0.5
Patch Compatibility: v1.61
MP Compatible: ?
Download Mod v0.5

Version: v0.5w
Patch Compatibility: Warlords v2.0.0.0
MP Compatible: ?
Download Mod v0.5w


Description:

The Enhanced Tech Conquest Mod is designed to give a tech boost from conquering
enemy cities. When an enemy city is conquered, a list of techs the enemy has
that your empire doesn't is created. From that list a random tech is selected.


Installation Instructions:

1) Unzip this into the "civ4_install_folder\Mods\" folder.
2) Open the CivilizationIV.ini configuration file
3) Change the Mod line to read: Mod = Mods\Enhanced Tech Conquest
4) Load the game.
5) Then play as normal.

-----Game Play-----
Spoiler :

- Captured cities always give a minimum of 25% towards the cost of a tech plus
a random amount

- The random amount is from 0 to <city size * 5>%. For example a city of size 4
would give between 25% and 45% of the tech cost. This assumes the default
configuration values have not been changed

- Cities greater than size 15 increase the chance of getting a full tech. For
example a city of size 20 would give between 25% and 125% of the tech cost.
This assumes the default configuration value has not been changed.

- Several configurable options allow tuning of how technology will get
transfered from the conquered city to the conquering civilization.


-----Notes to Modmakers-----

In the Python files I have added # < Enhanced Tech Conquest Start > and
# < Enhanced Tech Conquest End > in all of the places that I have made changes
to the original files.


-----Version Information-----

-----v0.5------

- Fixed several areas of the code that were not working correctly leading to
technology being given from one civ to another civ with the mod is configured
to prevent this.

Spoiler :

-----v0.4.x------

- Integrated Dr. Elmer Jiggle's event handler and INI parser code

- Added the configurable option allowing players to specify if technology
should be handed completely over from the conquered city to their new owners
or not.

- Added the configurable option allowing players to specify the number of or
part of technologies conquered cities will hand over to their new owners.

- Added the configurable option allowing players to specify the amount of
technologies conquered cities will hand over to their new owners should not
be random.

- Added the configurable option allowing players to specify if the conquering
civilization can receive technology without the appropriate prerequisites or
ignore their civilization technology restrictions.

- Added the configurable option allowing players to specify if full technology
transfer should be allowed. By setting the value to true this will force
players to spend at least one turn researching pillaged technology.

- Added the configurable option allowing players to specify the base technology
transfer percentage amount.

- Added the configurable option allowing players to specify the percent amount
per city population that will be used to transfer technology to the new owners
of the conquered city.

- Added the popup informing players that they did not learn anything from a
conquered city if there was nothing to learn. Requested by woodelf.

- Changed removed the popups from the mod and replaced them with messages
instead. The popups are displayed for all human players even if they are not
the currently active players. Requested by Shqype, reported by TheLopez.

-----v0.3------

- base tech cost wasn't reflecting modifications from game speed/map size/difficulty level

- altered percentages to give higher tech points for smaller cities

- fixed a bug preventing the popup from displaying

- only techs for which the player has the prerequisites are included in tech list


-----v0.2------

- changed from a flat percentage system to one based on the city size


-----v0.1------

- first release


----- Todo -----

- Add a configurable option allowing players to choose which technology to
receive from a conquered city.

-----===Credits & Thanks===-----

- Exavier
[TAB]Composite Mod - readme.txt format

- Bhruic
[TAB]For his original Tech Conquest code
[TAB]
- Dr Elmer Jiggle
[TAB]For providing the INI file parser code allowing for players to
[TAB]customize this mod without having to touch the python code!!!

[TAB][TAB]

- Testers
[TAB]Shqype and woodelf
 
Thanks for updating this and all the other python mods that have been abandoned. It is definitely appreciated :goodjob:
 
You're very welcome, let me know if there are other abandoned mods that you would like to see updated.
 
This looks like one of the better MODs...
has it been tested with other MODs for compatiability ?
 
Yep, it is fully compatible.
 
Fully compatable? But when I:
2) Open the CivilizationIV.ini configuration file
3) Change the Mod line to read: Mod = Mods\Enhanced Tech Conquest
Doesn't that make civilizationIV.ini load this mod only? Or what's the purpose of this step?

Anyway I always use the mods in the customAssets folder (to keep them permenant), I don't know if such step would be necessary in that case..
 
Fachy said:
Fully compatable? But when I:
2) Open the CivilizationIV.ini configuration file
3) Change the Mod line to read: Mod = Mods\Enhanced Tech Conquest
Doesn't that make civilizationIV.ini load this mod only? Or what's the purpose of this step?
Yes, that is true, it does make Civ4 load the mod.

Fachy said:
Anyway I always use the mods in the customAssets folder (to keep them permenant), I don't know if such step would be necessary in that case..
You are correct, the step wouldn't be necessary but some people don't use the custom assets folder at all.
 
Evil idea: Why not make this available if the conquered civ has a % of the new tech as well? For example if you aquired 90% of rocketry, and someone conquered your city, they'd be able to gain about 23%-->90% of rocketry depending on the population and random seed (the only problem is, when the minimum 25% + random seed exceeds 100%, they might be able to get 100% of rocketry when you -the researcher- have only 90%!)
 
How come there's no CvModName.py file,shouldn't we add the mod's name?
 
Fachy, there is a CvModName.py file. It's in the "Enhanced Tech Conquest\Assets\Python" directory.
 
Crap! I meant to ask that question in the TechCost mod, terribly sorry!
 
Hi TheLopez (and everyone else),

I'm looking forward to using this component with my favourite mod (Fall From Heaven II). However, I've come across an issue that is above my current level of Python understanding. I'd appreciate any help with it.

Basically, the problem came when I was trying to integrate the CvCustomEventManager.py file. FfHII uses it's own such event manager, called CvFFHSpellsEventManager.py. Right now I'm looking at the CvEventInterface.py file, and am wondering if there is any way to reconcile the two - I'm assuming that it wouldn't be as simple as adding the TechConquest code (i.e., normalEventManager = CvCustomEventManager.CvCustomEventManager()) after the CvFFHSpellsEventManager does its thing. Any ideas?

Here is the FfHII code:
CvEventInterface.py
Spoiler :
# Sid Meier's Civilization 4
# Copyright Firaxis Games 2005
#
# CvEventInterface.py
#
# These functions are App Entry Points from C++
# WARNING: These function names should not be changed
# WARNING: These functions can not be placed into a class
#
# No other modules should import this
#
import CvUtil
import CvFFHSpellsEventManager
from CvPythonExtensions import *

normalEventManager = CvFFHSpellsEventManager.CvFFHSpellsEventManager()

def getEventManager():
return normalEventManager

def onEvent(argsList):
'Called when a game event happens - return 1 if the event was consumed'
#eventType,mx,my,px,py,interfaceConsumed,screens = argsList
return getEventManager().handleEvent(argsList)

def applyEvent(argsList):
#CyInterface().addImmediateMessage("applyEvent","")
context, playerID, netUserData, popupReturn = argsList
return getEventManager().applyEvent(argsList)

def beginEvent(context, argsList=-1):
#CyInterface().addImmediateMessage("beginEvent","")
return getEventManager().beginEvent(context, argsList)


And CvFFHSpellsEventManager.py
Spoiler :
from CvPythonExtensions import *
import sys

import FFHSpells
import pickle
import CvEventManager

from CvScreenEnums import *
from PyHelpers import *
import CvUtil
import CvSpellInterface
# globals
gc = CyGlobalContext()
localText = CyTranslator()

class CvFFHSpellsEventManager(CvEventManager.CvEventManager):
def __init__(self):
CvEventManager.CvEventManager.__init__(self)
self.Events[FFHSpells.EventPickUnit]= ('PickUnit',self.__eventPickUnitApply,self.__eventPickUnitBegin)
#### overriden event handlers

def __eventPickUnitApply(self, playerID, userData, popupReturn):
if popupReturn.getSelectedListBoxValue(0) == -1:
return
id,eSpell,pX,pY = userData
player = gc.getPlayer(playerID)
(loopUnit, iter) = player.firstUnit(false)
while( loopUnit ):
if ( not loopUnit.isDead() and loopUnit.getID() == id):
break
(loopUnit, iter) = player.nextUnit(iter, false)
CvSpellInterface.castAtUnit(loopUnit,eSpell,CyMap().plot(pX,pY).getUnit(popupReturn.getSelectedListBoxValue( 0 )))

def __eventPickUnitBegin(self):
pass


Thanks for your time.

- Niilo


Edit: Nevermind, Dr. Jiggle's and his Civ4lert modcomp helped me through this problem.
 
Updated with a new version and a warlords version!!!
 
I'm suddenly getting pink circles on city takeover, obviously I have screwed something up, any thoughts? This was when I updated to .5w
 
sounds like you are missing files.
 
Certified to work with warlords patch v2.0.8.0
 
Hi The Lopez:

Excellent mod component! I've integrated it into my own mod, of course, but one config component doesn't seem to be working:

- Added the configurable option allowing players to specify if full technology
transfer should be allowed. By setting the value to true this will force
players to spend at least one turn researching pillaged technology.

I have my config set to "Disable Full Technology Transfer = False" but in-game I never acquire full techs when conquering a city, rather stopping 1 research point shy as before I changed the config setting. Any thoughts?

P.S. Have you ever considered updating Sevo's Tech Leak mod to Warlords as well?
 
Top Bottom