[PYTHON] Simple Game Clock Mod

Nice to know. I believe I'll move my mods before updating so they're not lost. Thanks.

Edit: Just reread your post and noticed the games from before working with the mod but new ones not. Anymore anytime I start CivIV I press Shift when loading. It's easier to load without the cache.
 
I noticed that CvMainInterface.py was updated in the patch. Would overriding this file with your older CvMainInterface.py cause any issues?
 
Yes, it will mean the updates caused by the patch to this file won't show correctly. I'm not quite sure what these updates are, but just to be on the safe side I've applied Tubby Rower's clock to the 1.52 file.

There shouldn't be any bugs... probably.

Here it is:
 

Attachments

Thanks Great Apple... I meant to do this earlier
 
The Great Apple said:
Yes, it will mean the updates caused by the patch to this file won't show correctly. I'm not quite sure what these updates are, but just to be on the safe side I've applied Tubby Rower's clock to the 1.52 file.

There shouldn't be any bugs... probably.

Here it is:
It still goes in the civ4whatever/CustomAssets/python/screens folder, right?
 
oagersnap said:
It still goes in the civ4whatever/CustomAssets/python/screens folder, right?
Yes, it just replaces the old file.

I also made a very slight change in the logic. I don't think it will have any gameplay effect, it just trims out some un-needed code. (Previously the game was checking when the timer was at 15 and at 30, resetting at 30, and, apart from that, doing the same thing, now it just goes to 15 and resets)
 
Can you please make it as addon to the original python files? I got something similar of the inquisitor mod. Only one small original file is overwritten and this calls other py files and in them there are all changes. So it is more compatible with newer patches and so.

Thanks
 
It works fine in single player games, but doesn't work in multiplayer anymore for some reason. It used to work in multiplayer.


-=R=-
 
lordroy said:
It works fine in single player games, but doesn't work in multiplayer anymore for some reason. It used to work in multiplayer.
One of the changes in 1.52 for single player games was that when the admin password is set the "My Documents\My Games\Sid Meier's Civilization 4\CustomAssets" folder is not used. I suspect (but don't know for sure) that this would apply to multiplayer games as well.
 
Dianthus said:
One of the changes in 1.52 for single player games was that when the admin password is set the "My Documents\My Games\Sid Meier's Civilization 4\CustomAssets" folder is not used. I suspect (but don't know for sure) that this would apply to multiplayer games as well.


That doesnt make sense that it would work for one and not the other tho.


I use my computer with the admin account all the time. It is the only account on my computer.


I dont think this is the reason it does that.


-=R=-
 
Hello all!

This got me on to the idea to modify the date line entirely. So I changed updateTimeText() from the previous mod to give me two things. Which era I am playing, and the year since my state religion was founded.

Code:
	def updateTimeText( self, bUseClockText ):
		
		global g_szTimeText
		
		iSHEra = gc.getActivePlayer().getCurrentEra()
		eSHReligion = gc.getActivePlayer().getStateReligion()
		if (eSHReligion == -1):
			eSHReligion = 1
		if (gc.getGame().isReligionFounded(eSHReligion)):
			iSHYearZero = gc.getGame().getTurnYear(gc.getGame().getReligionGameTurnFounded(eSHReligion))
			iSHDisplayYear = gc.getGame().getGameTurnYear() - iSHYearZero
			g_szTimeText = getClockText() + "  " + unicode(gc.getEraInfo(iSHEra).getDescription()) + "  " + localText.getText("TXT_KEY_TIME_AD", (iSHDisplayYear, ()))
		else:
			g_szTimeText = getClockText() + "  " + unicode(gc.getEraInfo(iSHEra).getDescription()) + "  " + localText.getText("TXT_KEY_TIME_TURN", (gc.getGame().getGameTurn(), ()))

And if you have not a state religion, you will either get a date based on christianity (religion with index 1) or turns from start.

It is very basic and this is first time I makes anything with python but I have looked at other scripts and think this is fairly safe.

Another note is that the timelines and all other times will still be in the 'old' time, but although possible to do something about it, you would make bigger changes to the game run.
 
btw, Dianthius, I don't mind if you use my code...

[soapbox]
IMO anyone who does mind should be working for a software company that has copyright protection. This game was meant to be moddable and people shouldn't feel as though they were ripped off by someone using their work. I enjoy this game and if it takes 10 people working off of each other's work to get a great mod out which everyone is happy with, we'll all be better in the long run. As long as people are given credit for their work, I don't think that they have any right to complain. Open source games are easy to compare the original file with the modded file and "reproduce" the results.
[/soapbox]

But thanks for the concern Dianthius. ;)
 
Caesium, in case this mod doesn't get updated, I have updated my Not Just Another Game Clock Mod to be compatible with the v1.61 patch which includes the functionality of this mod plus a lot more.
 
TheLopez have thanks.
I hoped to get this one because I had some mods in my combined mod and with 1.61 there were only 3 or 4 mods I couldn't adapt to 1.61.
 
Methos, the clock was in there prior to the patch, the problem with it is that is it displayed as alternating text with the year. So for 15 sec the year is shown and for 15 sec the clock is shown. This mod moves the clock text over so both are displayed. With my mod you can do this, set the alternating time, etc.
 
Back
Top Bottom