D dewell Warlord Joined Jun 29, 2007 Messages 171 Jun 17, 2010 #1 Hi there, how can I make 2 techs mutually exclusive? The player can't explore tech1 if he explores tech2 and the other way round ... is this possible in FFH2?
Hi there, how can I make 2 techs mutually exclusive? The player can't explore tech1 if he explores tech2 and the other way round ... is this possible in FFH2?
Valkrionn The Hamster King Joined May 23, 2008 Messages 14,450 Location Crestview FL Jun 17, 2010 #2 Not via XML, but easy enough to do in CvGameUtils.py.
D dewell Warlord Joined Jun 29, 2007 Messages 171 Jun 17, 2010 #3 mh got no experience with python, will try it later ... perhaps you can give me a hint how to implement it?
mh got no experience with python, will try it later ... perhaps you can give me a hint how to implement it?
Valkrionn The Hamster King Joined May 23, 2008 Messages 14,450 Location Crestview FL Jun 17, 2010 #4 Something like this, in CvGameUtils.py, def cannotResearch. Code: ePlayer = argsList[0] eTech = argsList[1] pPlayer = gc.getPlayer(ePlayer) eTeam = gc.getTeam(pPlayer.getTeam()) if eTech == gc.getInfoTypeForString('TECH_X'): if eTeam.isHasTech(gc.getInfoTypeForString('TECH_Y'): return True The initial four lines should be taken care of for you, important part is the last three; Says that if you have Tech_Y, you cannot research Tech_X.
Something like this, in CvGameUtils.py, def cannotResearch. Code: ePlayer = argsList[0] eTech = argsList[1] pPlayer = gc.getPlayer(ePlayer) eTeam = gc.getTeam(pPlayer.getTeam()) if eTech == gc.getInfoTypeForString('TECH_X'): if eTeam.isHasTech(gc.getInfoTypeForString('TECH_Y'): return True The initial four lines should be taken care of for you, important part is the last three; Says that if you have Tech_Y, you cannot research Tech_X.
D dewell Warlord Joined Jun 29, 2007 Messages 171 Jun 17, 2010 #5 hey, great you took the time .. will try it tomorrow thanks a lot
Valkrionn The Hamster King Joined May 23, 2008 Messages 14,450 Location Crestview FL Jun 17, 2010 #6 Heh, wasn't much time. Only took around 30seconds to write out that bit of python.