[PYTHON] Simple Game Clock Mod

After testing my mods.... apparently they need a little tweaking.

I've deleted the references above to any mod I've made. I'll post something once I get it working. :blush:
 
I have a version that works in Single Player mode but for some reason it crashes civ4 when running it in Multiplayer mode. :hmm:

I'll continue to scrath my head and try things, but if anyone has any ideas. please come forward.
 
I think that my PBEM that I was using to test the multiplayer part was corrupt (bad Whomp!!). I tried a previous save and it opened fine.

here is my revision 1.2 to homegrown initial mod.

Installation

Unzip the contents to your My Documents/My Games/Sid Meiers Civilization 4/CustomAssets/python/screens folder.

The zip file contains 2 file

CvMainInterface.py
readme

Spoiler readme :
Tubby's mod of Homegrowns Civilization 4 Game Clock Mod v.1.2

This modification displays the clock time and the game date at the same time, instead of flashing every 15 seconds.

Installation

Unzip the contents to your My Documents/My Games/Sid Meiers Civilization 4/CustomAssets/python/screens folder.

The zip file contains 1 file

CvMainInterface.py

revision 1.2:
added the turn number to the display
make the display always show the time


red highlighted is what I changed
Code:
	def updateTimeText( self, bUseClockText ):
		
		global g_szTimeText
		
		ePlayer = gc.getGame().getActivePlayer()
		[COLOR="red"]iturn = gc.getGame().getGameTurn() + 1[/COLOR]

		if ([COLOR="Red"]true[/COLOR]):
			g_szTimeText = getClockText() + [COLOR="red"]"  (Turn %i) " % (iturn) + [/COLOR]unicode(CyGameTextMgr().getInterfaceTimeStr(ePlayer))
		else:
			g_szTimeText = getClockText() + "   "  + unicode(CyGameTextMgr().getInterfaceTimeStr(ePlayer))
 

Attachments

  • CvMainInterface_1.2.zip
    21.2 KB · Views: 533


screenshot for the doubters
 
Tubby Rower said:
After testing my mods.... apparently they need a little tweaking.

Yeah, I was going to inform you that I had a, er... little problem with your mod. :lol: It showed the map and map only. Both the top bar and the bottom bar didn't show up.

Just ran the new one and everything works great. Thanks! :)
 
Methos said:
Yeah, I was going to inform you that I had a, er... little problem with your mod. :lol:
at least you got that... I had to pull the power on mine it locked up so bad :D
 
Just had to reinstall my game so... bumpitty!
 
underseer said:
Just had to reinstall my game so... bumpitty!
because of this mod? if so, you mind giving an explanation of what was happening?
 
:king:

homegrown, you rock the casbah!

I'm so anal about the little details in my game interfaces, and this one was a huge pet peeve, a blight on otherwise blissful hours of Machiavellian maneuvering.

Thankyouthankyouthankyouthankyou!

Yours in perpetual adoration,

Wysdom :worship:
 
FexFX said:
My solution was to simply make it so there was no "off" state for the clock, so that at all times it would display both the time and the Year. Presto, the problem of the vanishing clock was solved!

As those who use this mod are unlikely to want the Clock to be turned off at any point this is a great solution!

Hi FexFX,

can you tell me and others with the 'disappearing clock problem' how you worked this out? How did you 'simply make it so there was no 'off' state for the clock?

thanks!
 
@rjen said:
Hi FexFX,

can you tell me and others with the 'disappearing clock problem' how exactly you worked this out?

thanx!
see post 43. If you don't want the turn number take that part out.
 
Thanks Tubby Rower, I scrolled over your revision notes!
Keep up the good work! :goodjob:
 
Tubby Rower, your clock doesn't work after I´ve installed version 1.52 of the game. Should I download and install it again, or will you make a new version of the mod?
 
That's odd. I haven't upgraded yet but I wouldn't think the patch would affect files in your Custom Assets folder.

Did you relace the mod with the original files located in the Assets folder or did you place them in the Custom Assets folder?
 
Methos said:
That's odd. I haven't upgraded yet but I wouldn't think the patch would affect files in your Custom Assets folder.

Did you relace the mod with the original files located in the Assets folder or did you place them in the Custom Assets folder?

I placed it in the exact place described in the post. My old games form before the patch have the modded clock, but if I start a new game, it has the original clock released with the game.

EDIT: Just checked the file, the code is edited so it should be Tubby Rowers clock, but it's still the original one. Perhaps I should just clear the cache.
 
Top Bottom