Tech Era Limit

Thanks for information ! That with the very simple air, but I did not know them… Otherwise, I believe to understand that you do not want to answer my second question… Danke trotzdem !!!

I would answer your second question, but i can't, because i don't know, what the reason is :dunno:. Sorry, that's up to jdog.
 
This is a great utility and I use it to keep my Hundred Years' War within the Middle Ages. However, the AI does not turn down research as expected and intended, but continues to waste resources on research although everything is done and he would need to put dosh on other things.

I saved a game in the World Builder and then opened it as a scenario and played as the other civilization only to discover that he had been keeping his research at 100% all the time.
 
Hello again! I now have BTS and followed all the above instructions. I've tried many variants and can't get the mod to work correctly.

I would like to stay in the Ancient era, so I set the number to = 0. When I play the game, it blows right through the Ancient era and keeps going forward into future eras. I've loaded the mod and tried it in Single Player (Play Now!) and Custom Game - neither let me stay in a specified era.

Any suggestions on why it's not working?
 
I can't help you with your specific problem. Sorry. But if you like test CCV. You can choose at game start (custom game) where the technology development will stop.
 
This is something we've been wanting to incorporate into the RevDCM core for some time (it's on the 3.0 todo list). If you have this component working could you upload the source for it? No sense in reinventing the wheel.
 
This is something we've been wanting to incorporate into the RevDCM core for some time (it's on the 3.0 todo list). If you have this component working could you upload the source for it? No sense in reinventing the wheel.

Well, I have no time to grab all code parts from CCV although it's a mini mod. Really. There are just some new game options and a check for the tech era and bdisable. (This is needed for the future tech being available without future era as there are more future techs from Next War in CCV).

But I don't want my code to be public. But as friend of mine I'll send you a PM with a link to my code from CCV 4.09!

Search for: // Thomas SG - ES: Era Stopper

:) Thomas :)
 
ElderWolf

you cant just merge mods like that.
you need to merge the source code, recompile the dll and merge xml changes and only then it will work.

plus i think this mod isnt for BTS, so some more adjustments are in order.

Even if the mod has no dll files? Btw this does work on BTS since I tested it on it.
 
oh i see,
i didnt even notice this is tech era limit of jdog and not of jackel...

this is a python mod base, so might be even easier to merge to realism invictus acctually.
ht mods added tags are marked. all you need to do is add them to the RI same files same place.
same goes for xml if any.
 
oh i see,
i didnt even notice this is tech era limit of jdog and not of jackel...

this is a python mod base, so might be even easier to merge to realism invictus acctually.
ht mods added tags are marked. all you need to do is add them to the RI same files same place.
same goes for xml if any.

Yeah that's the thing, I have merged everything but for some reason nothing happens in game. I can still progress through eras normally. Thats what I was asking about in the other thread since I can't get it to work with Realism Invictus. I spent like 4 hours looking through the files to see if I can maybe find something that I could add something somewhere but nothing has worked so far.
 
Realism Invictus is based on BUG, and Python callbacks work differently in BUG; see comments in BUG\BugGameUtils.py. Or, if you're (like me) not well familiar with Python, it's probably better to simply re-enable the BtS handler for the cannotResearch callback – by changing
Code:
def cannotResearch(argsList):
   #CvUtil.pyPrint( "CvGameInterface.cannotResearch" )
   return gameUtils().cannotResearch(argsList)
in Python\EntryPoints\CvGameInterface.py (which Realism Invictus has already copied from BtS) to
Code:
def cannotResearch(argsList):
   #CvUtil.pyPrint( "CvGameInterface.cannotResearch" )
   return CvGameUtils.CvGameUtils().cannotResearch(argsList)
(i.e. replace the gameUtils() call)
 
Realism Invictus is based on BUG, and Python callbacks work differently in BUG; see comments in BUG\BugGameUtils.py. Or, if you're (like me) not well familiar with Python, it's probably better to simply re-enable the BtS handler for the cannotResearch callback – by changing
Code:
def cannotResearch(argsList):
   #CvUtil.pyPrint( "CvGameInterface.cannotResearch" )
   return gameUtils().cannotResearch(argsList)
in Python\EntryPoints\CvGameInterface.py (which Realism Invictus has already copied from BtS) to
Code:
def cannotResearch(argsList):
   #CvUtil.pyPrint( "CvGameInterface.cannotResearch" )
   return CvGameUtils.CvGameUtils().cannotResearch(argsList)
(i.e. replace the gameUtils() call)
YOU ARE MY HERO! THIS ACTUALLY WORKED!
THANK YOU <3
 
Hello,
I was able to edit the code so you don't have to go stop the game to advance to the next era when it's time/when you want to.
I can't attach it because .py files extensions aren't allowed, so you'll have to copy/paste into CvGameUtils.py file provided in this mod, in the section outlined with tech limit changes. The code to copy paste is this:

iCurrentYear = gc.getGame().getGameTurnYear()
if(iCurrentYear < -2000) :
iMaxEra = 0
elif(iCurrentYear < 250) :
iMaxEra = 1
elif(iCurrentYear < 1250) :
iMaxEra = 2
elif(iCurrentYear < 1700) :
iMaxEra = 3
elif(iCurrentYear < 1905) :
iMaxEra = 4
elif(iCurrentYear < 1980) :
iMaxEra = 5
else:
iMaxEra = 6

Simply paste this code between iTechEra = gc.getTechInfo(eTech).getEra() and if( iTechEra > iMaxEra ), like so:

# <---------- begin tech limit changes ----------------->
# Change the following number to limit eras civs can tech to
# 0 = Ancient, 1 = Classical, 2 = Medieval, 3 = Renaissance, 4 = Industrial, 5 = Modern, 6 = Future
iMaxEra = 0
iTechEra = gc.getTechInfo(eTech).getEra()

iCurrentYear = gc.getGame().getGameTurnYear()
if(iCurrentYear < -2000) :
iMaxEra = 0
elif(iCurrentYear < 250) :
iMaxEra = 1
elif(iCurrentYear < 1250) :
iMaxEra = 2
elif(iCurrentYear < 1700) :
iMaxEra = 3
elif(iCurrentYear < 1905) :
iMaxEra = 4
elif(iCurrentYear < 1980) :
iMaxEra = 5
else:
iMaxEra = 6

if( iTechEra > iMaxEra ) :
# True means cannot research
return True

# <---------- end tech limit changes ----------------->
The numbers in the code represent the year you can advance to the next era, e.g. -2000 is 2000 BC, 250 is 250 AD, etc. These values are the starting dates for a game starting in each era on Marathon. So the code reads, "If the current year is before 2000 BC, limit to Ancient Era tech. Else if it is less than 250 AD, limit to Classical Era tech. Etc." So, you can change the dates if you want.
 
Top Bottom