[MODCOMP] Not Just Another Game Clock Mod

Ok, that sounds good to me. Let me do this first, I need to finish fixing the military bases mod so:
1) It is compatible with the v1.61 patch
2) It works like it is supposed to
and then I will assemble those components for you, does that sound fair to you?
 
Your a prince, that would put me back on track, even ahead of, where I was pre-v1.61 patch. :D

Does anyone else get a great feeling when they look at the assets folder and see a bunch of config.ini s? All the choices, simply spectacular. :>
 
Man TheLopez, Random Great Person Births, No Name Great Person renamer, MAD Nukes, can I dream that these will be included in the Great Options Mod.. :D
 
Only if you want them to be in there... so do you?
 
Wow, I'm humbled that you would put so much power in my hands. Then yes, I think those would make great additions. Seeing as you have put out quite a few new ones I will give a updated list of the ones I think should be included.

GP Trickle Plus Mod (The one I am currently useing and absolutely awesome)
Mercenaries Mod
Dead Civ Scoreboard Mod
Not Just Another Game Clock Mod (My all time fav, so simple, so wonderful)
Military Bases Mod
Random Great Person Births Mod
No Name Great Person Renamer Mod
M.A.D. Nukes Mod

That would be arguably the best combination mod ever and would have to earn you a couple more places in Civ heaven. :D

And I'm assuming your going to include, in the Great Options.ini file, a true/false option to on or off each included mod. If not I think this would be a valuble addition. Thanx again. :>
 
Jeckel said:
Wow, I'm humbled that you would put so much power in my hands. Then yes, I think those would make great additions. Seeing as you have put out quite a few new ones I will give a updated list of the ones I think should be included.

GP Trickle Plus Mod (The one I am currently useing and absolutely awesome)
Mercenaries Mod
Dead Civ Scoreboard Mod
Not Just Another Game Clock Mod (My all time fav, so simple, so wonderful)
Military Bases Mod
Random Great Person Births Mod
No Name Great Person Renamer Mod
M.A.D. Nukes Mod

That would be arguably the best combination mod ever and would have to earn you a couple more places in Civ heaven. :D

And I'm assuming your going to include, in the Great Options.ini file, a true/false option to on or off each included mod. If not I think this would be a valuble addition. Thanx again. :>
You are correct, I am going to include all of the above mods in the great options mod. And again, yes, I am going to include as many on-off switches for the different mods as possible.

Oh, BTW, one of the mods that isn't on your list is the Sniper mod that should be released pretty soon!!!
 
*grins widely* All that and the sniper mod to, I don't think my heart is going to survive the release of the GO mod, it just might burst ringht in my chest. :D
 
i have set-up by default showing game completed percent and when i switch off time victory, i'v got this message. it is from line(s):
Code:
			if(g_bShowGameCompletedPercent):
				g_szTimeText = g_szTimeText + "  " + " %2.2f" % (100 *(float(gc.getGame().getGameTurn()) / float(gc.getGame().getMaxTurns())))+ "%"
in method updateTimeText , because getMaxTurn in this case (no time victory) always return 0
(i know, that i can set no percentage in ini file, but this is for all games)

possibly workaround: when reading/setiing global variables, if getMaxTurn() return 0, set "percentage variables" to false for preventing showing them

Mexico from Realism team
 
Well since you asked for it... I'll see what I can whip up...
 
Updated with link to Warlords compatible version!!!
 
TheLopez, did you know that there are several changes in CvMainInterface.py that are not marked by "# < NJAGCM Start >" and "# < NJAGCM End>"? Could you let us know whether they are accidental carry-overs from another mod, or intentional (and you just forgot the NJAGCM Start/End tags)? I'm experimenting with the mod, and I'm not sure how to deal with these parts of the code.

Below is the WinMerge patch file with the relevant diffs. (This is your version 0.3.3w compared to Warlords v2.08, which hasn't changed since v1.61 by the way). Thanks!

Spoiler :
diff w /v208-061031(original)/Assets/Python/Screens/CvMainInterface.py /Not Just Another Game Clock(TheLopez)-v033w/extracted/Not Just Another Game Clock Mod/Assets/Python/Screens/CvMainInterface.py
337a468
> for j in range(gc.getDefineINT("MAX_PLOT_LIST_ROWS")):
339,340c470,473
< szString = "PlotListButton" + str(i)
< screen.addCheckBoxGFC( szString, ArtFileMgr.getInterfaceArtInfo("INTERFACE_BUTTONS_GOVERNOR").getPath(), ArtFileMgr.getInterfaceArtInfo("BUTTON_HILITE_SQUARE").getPath(), 315 + (i * 34), yResolution - 169, 32, 32, WidgetTypes.WIDGET_PLOT_LIST, i, -1, ButtonStyles.BUTTON_STYLE_LABEL )
---
> k = j*self.numPlotListButtons()+i
> yRow = (j - gc.getDefineINT("MAX_PLOT_LIST_ROWS") + 1) * 34
> szString = "PlotListButton" + str(k)
> screen.addCheckBoxGFC( szString, ArtFileMgr.getInterfaceArtInfo("INTERFACE_BUTTONS_GOVERNOR").getPath(), ArtFileMgr.getInterfaceArtInfo("BUTTON_HILITE_SQUARE").getPath(), 315 + (i * 34), yResolution - 169 + yRow, 32, 32, WidgetTypes.WIDGET_PLOT_LIST, k, -1, ButtonStyles.BUTTON_STYLE_LABEL )
344c477
< screen.addStackedBarGFC( szStringHealth, 315 + (i * 34), yResolution - 146, 32, 11, InfoBarTypes.NUM_INFOBAR_TYPES, WidgetTypes.WIDGET_GENERAL, i, -1 )
---
> screen.addStackedBarGFC( szStringHealth, 315 + (i * 34), yResolution - 146 + yRow, 32, 11, InfoBarTypes.NUM_INFOBAR_TYPES, WidgetTypes.WIDGET_GENERAL, k, -1 )
983a1140
> for j in range(gc.getDefineINT("MAX_PLOT_LIST_ROWS")):
985c1142
< szString = "PlotListButton" + str(i)
---
> szString = "PlotListButton" + str(j*self.numPlotListButtons()+i)
999a1157
>
1002a1161,1169
> if (CyInterface().isCityScreenUp()):
> iMaxRows = 1
> iSkipped = (gc.getDefineINT("MAX_PLOT_LIST_ROWS") - 1) * self.numPlotListButtons()
> iCount += iSkipped
> else:
> iMaxRows = gc.getDefineINT("MAX_PLOT_LIST_ROWS")
> iCount += CyInterface().getPlotListOffset()
> iSkipped = 0
>
1009c1176
< elif ((iCount == (self.numPlotListButtons() - 1)) and ((iVisibleUnits - iCount - CyInterface().getPlotListColumn()) > 1)):
---
> elif ((iCount == (gc.getDefineINT("MAX_PLOT_LIST_ROWS") * self.numPlotListButtons() - 1)) and ((iVisibleUnits - iCount - CyInterface().getPlotListColumn() + iSkipped) > 1)):
1012c1179
< if ((iCount >= 0) and (iCount < self.numPlotListButtons())):
---
> if ((iCount >= 0) and (iCount < self.numPlotListButtons() * gc.getDefineINT("MAX_PLOT_LIST_ROWS"))):
1061c1228
< screen.addDDSGFC( szStringIcon, szFileName, 312 + (iCount * 34), yResolution - 172, 12, 12, WidgetTypes.WIDGET_PLOT_LIST, iCount, -1 )
---
> screen.addDDSGFC( szStringIcon, szFileName, 312 + ((iCount % self.numPlotListButtons()) * 34), yResolution - 172 + (iCount / self.numPlotListButtons() - gc.getDefineINT("MAX_PLOT_LIST_ROWS") + 1) * 34, 12, 12, WidgetTypes.WIDGET_PLOT_LIST, iCount, -1 )
1066c1233
< if (iVisibleUnits > self.numPlotListButtons()):
---
> if (iVisibleUnits > self.numPlotListButtons() * iMaxRows):
1487a1655,1658
> iFreeSpecialistCount = 0
> for i in range(gc.getNumSpecialistInfos()):
> iFreeSpecialistCount += pHeadSelectedCity.getFreeSpecialistCount(i)
>
1490a1662,1673
>
> if (iFreeSpecialistCount > MAX_CITIZEN_BUTTONS):
> for i in range(gc.getNumSpecialistInfos()):
> if (pHeadSelectedCity.getFreeSpecialistCount(i) > 0):
> if (iCount < MAX_CITIZEN_BUTTONS):
> szName = "FreeSpecialist" + str(iCount)
> screen.setImageButton( szName, gc.getSpecialistInfo(i).getTexture(), (xResolution - 74 - (34 * iCount)), yResolution - 216, 32, 32, WidgetTypes.WIDGET_FREE_CITIZEN, i, 1 )
> screen.show( szName )
> bHandled = true
> iCount += 1
>
> else:
1495c1678
< screen.setImageButton( szName, gc.getSpecialistInfo(i).getTexture(), (xResolution - 74 - (34 * iCount)), yResolution - 216, 32, 32, WidgetTypes.WIDGET_CITIZEN, i, -1 )
---
> screen.setImageButton( szName, gc.getSpecialistInfo(i).getTexture(), (xResolution - 74 - (34 * iCount)), yResolution - 216, 32, 32, WidgetTypes.WIDGET_FREE_CITIZEN, i, -1 )
1512c1695
< if (pHeadSelectedCity.isSpecialistValid(i, 1) and iSpecialistCount < (pHeadSelectedCity.getPopulation() + pHeadSelectedCity.totalFreeSpecialists())):
---
> if (pHeadSelectedCity.isSpecialistValid(i, 1) and (pHeadSelectedCity.isCitizensAutomated() or iSpecialistCount < (pHeadSelectedCity.getPopulation() + pHeadSelectedCity.totalFreeSpecialists()))):
>
1873c2123
< szBuffer = u"%d%c" %(pHeadSelectedCity.getBaseYieldRate(YieldTypes.YIELD_PRODUCTION), gc.getYieldInfo(YieldTypes.YIELD_PRODUCTION).getChar())
---
> szBuffer = u"%d%c" %(pHeadSelectedCity.getYieldRate(YieldTypes.YIELD_PRODUCTION), gc.getYieldInfo(YieldTypes.YIELD_PRODUCTION).getChar())
1917c2167
< szBuffer = u"%d%c" %(pHeadSelectedCity.getCommerceRate(eCommerce), gc.getCommerceInfo(eCommerce).getChar())
---
> szBuffer = u"%d.%02d %c" %(pHeadSelectedCity.getCommerceRate(eCommerce), pHeadSelectedCity.getCommerceRateTimes100(eCommerce)%100, gc.getCommerceInfo(eCommerce).getChar())
2144c2394
< iMaintenance = pHeadSelectedCity.getMaintenance()
---
> iMaintenance = pHeadSelectedCity.getMaintenanceTimes100()
2151c2401
< szBuffer = u"%d%c" %(-(pHeadSelectedCity.getMaintenance()), gc.getCommerceInfo(CommerceTypes.COMMERCE_GOLD).getChar())
---
> szBuffer = u"-%d.%02d %c" %(iMaintenance/100, iMaintenance%100, gc.getCommerceInfo(CommerceTypes.COMMERCE_GOLD).getChar())
2215c2465
< for h in range( gc.getMAX_CIV_PLAYERS() ):
---
> for h in range( gc.getMAX_PLAYERS() ):
2218d2467
< fPercent = fPercent / 100.0
2219a2469
> fPercent = fPercent / 100.0
2244c2494,2499
< szBuffer = localText.getText("INTERFACE_CITY_COMMERCE_RATE", (gc.getCommerceInfo(CommerceTypes.COMMERCE_CULTURE).getChar(), gc.getCultureLevelInfo(pHeadSelectedCity.getCultureLevel()).getTextKey(), pHeadSelectedCity.getCommerceRate(CommerceTypes.COMMERCE_CULTURE)))
---
> iRate = pHeadSelectedCity.getCommerceRateTimes100(CommerceTypes.COMMERCE_CULTURE)
> if (iRate%100 == 0):
> szBuffer = localText.getText("INTERFACE_CITY_COMMERCE_RATE", (gc.getCommerceInfo(CommerceTypes.COMMERCE_CULTURE).getChar(), gc.getCultureLevelInfo(pHeadSelectedCity.getCultureLevel()).getTextKey(), iRate/100))
> else:
> szRate = u"+%d.%02d" % (iRate/100, iRate%100)
> szBuffer = localText.getText("INTERFACE_CITY_COMMERCE_RATE_FLOAT", (gc.getCommerceInfo(CommerceTypes.COMMERCE_CULTURE).getChar(), gc.getCultureLevelInfo(pHeadSelectedCity.getCultureLevel()).getTextKey(), szRate))
2256c2511
< iFirst = float(pHeadSelectedCity.getGreatPeopleProgress()) / float( gc.getPlayer( pHeadSelectedCity.getOwner() ).greatPeopleThreshold() )
---
> iFirst = float(pHeadSelectedCity.getGreatPeopleProgress()) / float( gc.getPlayer( pHeadSelectedCity.getOwner() ).greatPeopleThreshold(false) )
2259c2514
< screen.setBarPercentage( "GreatPeopleBar", InfoBarTypes.INFOBAR_RATE, ( float(pHeadSelectedCity.getGreatPeopleRate()) / float( gc.getPlayer( pHeadSelectedCity.getOwner() ).greatPeopleThreshold() ) ) )
---
> screen.setBarPercentage( "GreatPeopleBar", InfoBarTypes.INFOBAR_RATE, ( float(pHeadSelectedCity.getGreatPeopleRate()) / float( gc.getPlayer( pHeadSelectedCity.getOwner() ).greatPeopleThreshold(false) ) ) )
2261c2516
< screen.setBarPercentage( "GreatPeopleBar", InfoBarTypes.INFOBAR_RATE, ( ( float(pHeadSelectedCity.getGreatPeopleRate()) / float( gc.getPlayer( pHeadSelectedCity.getOwner() ).greatPeopleThreshold() ) ) ) / ( 1 - iFirst ) )
---
> screen.setBarPercentage( "GreatPeopleBar", InfoBarTypes.INFOBAR_RATE, ( ( float(pHeadSelectedCity.getGreatPeopleRate()) / float( gc.getPlayer( pHeadSelectedCity.getOwner() ).greatPeopleThreshold(false) ) ) ) / ( 1 - iFirst ) )
2264c2519
< iFirst = float(pHeadSelectedCity.getCulture(pHeadSelectedCity.getOwner())) / float(pHeadSelectedCity.getCultureThreshold())
---
> iFirst = float(pHeadSelectedCity.getCultureTimes100(pHeadSelectedCity.getOwner())) / float(100 * pHeadSelectedCity.getCultureThreshold())
2410a2666,2667
> if (len(szBuffer) > 60):
> szBuffer = "<font=2>" + szBuffer + "</font>"
2604c2861
< if (((gc.getPlayer(ePlayer).getTeam() == gc.getGame().getActiveTeam()) and (gc.getTeam(gc.getGame().getActiveTeam()).getNumMembers() > 1)) or gc.getGame().isDebugMode()):
---
> if (((gc.getPlayer(ePlayer).getTeam() == gc.getGame().getActiveTeam()) and (gc.getTeam(gc.getGame().getActiveTeam()).getNumMembers() > 1)) or (gc.getTeam(gc.getPlayer(ePlayer).getTeam()).isVassal(gc.getGame().getActiveTeam())) or gc.getGame().isDebugMode()):
 
I just happened upon an extremely bizarre glitch. If your mod folder is named "playpen", then this mod does not work! Name it anything else you want, like Fred or Nancy or Baloney or even Playpen A, but Playpen breaks something. I wonder if Firaxis hard-coded that keyword.
 
jray said:
TheLopez, did you know that there are several changes in CvMainInterface.py that are not marked by "# < NJAGCM Start >" and "# < NJAGCM End>"? Could you let us know whether they are accidental carry-overs from another mod, or intentional (and you just forgot the NJAGCM Start/End tags)? I'm experimenting with the mod, and I'm not sure how to deal with these parts of the code.

To follow up on this, I tried reverting back to the original Firaxis code in all such places (where you don't have your NJAGCM tags). As a consequence, the plot list is malfunctioning. I can only control the first listed unit on each tile.

This seems totally counter-intuitive. When I look carefully at all the CvMainInterface.py code within the NJAGCM tags that changed, it is all totally related to the game clock, and not to the plot lists. Yet, the CvMainInterface.py code NOT within NJAGCM tags that changed IS all related to plot lists. So, did your game clock changes somehow break the plot list code, and so you made additional modifications to correct that? I'm confused!
 
jray, first or all are you using the vanilla Civ4 version or warlords version? If you are using the warlords version are you trying to use the current version with the v2.0.8 patch? If you are then that is the problem because it works fine for me in the unpatched warlords version. I will release a v2.0.8.0 compatible version soon. To answer your question, no, this mod does not touch any of the plot list code so I don't know why you are having those problems. Maybe you should post your CvMainInterface.py file so I can take a look at it.
 
TheLopez said:
jray, first or all are you using the vanilla Civ4 version or warlords version? If you are using the warlords version are you trying to use the current version with the v2.0.8 patch? If you are then that is the problem because it works fine for me in the unpatched warlords version. I will release a v2.0.8.0 compatible version soon. To answer your question, no, this mod does not touch any of the plot list code so I don't know why you are having those problems. Maybe you should post your CvMainInterface.py file so I can take a look at it.

I'm using your v0.3.3.w and a Warlords 2.08 installation. The 2.08 part is not the problem... your mod works just fine for me in v2.08, which isn't surprising, since CvMainInterface.py didn't change between v2.00 and v2.08.

But I think your mod DOES touch the plot list code, or else I belong in the looney bin :). For example, look at line 338 in your v0.3.3w version of CvMainInterface.py:

Code:
for i in range(self.numPlotListButtons()):

and then the corresponding line (468) in the Firaxis-supplied CvMainInterface.py:

Code:
for j in range(gc.getDefineINT("MAX_PLOT_LIST_ROWS")):

That's only the first of many diffs involving plot lists.

So here's the strange thing: If I go through and revert the diffs NOT enclosed in your NJAGCM tags (i.e., the plot list diffs) back to the Firaxis code, then the plot list is messed up when I play. So... I'm just wondering why you altered the plot list code in the first place in this mod for the game clock... and why IT works and Firaxis's plot list code does NOT :).

I'm attaching three different versions, to make sure we're on the same page with all this:

CvMainInterface(njagcm-clock-and-plotlist).txt is the one that works well for me. It pretty much just takes your v0.3.3w and tweaks some things to make the clock different. And BTW, I'm not trying to steal your mod! It's just for my own practicing. So don't take the re-naming to "jrayGameClock" personally :).

CvMainInterface(njagcm-clock-only).txt is the result of me reverting the diffs I saw with Firaxis's CvMainInterface.py NOT enclosed by your NJAGCM tags back to how Firaxis had it. It results in plotlist problems (e.g., only being able to control the first unit on each tile).

CvMainInterface(all-firaxis).txt is the Firaxis-provided version.
 

Attachments

And FYI in case you're curious, here's how I tweaked things. I scrunched up the text a little bit so everything could fit without alternating, and dropped one decimal place and used EraColor for turns to make it a bit more readable. Now in the worst possible case (largest number of characters displaying), it all barely fits, at least on my computer with 1024x768 game resolution.
 

Attachments

  • jrayGameClock.jpg
    jrayGameClock.jpg
    12 KB · Views: 147
Update: the plot list is messed up in both of my modified files. The CvMainInterface(njagcm-clock-and-plotlist).txt file results in all units getting icons in the plot list, not just the ones on the selected square.

I give up... maybe Firaxis changed something weird in the C code such that messing around with the game clock breaks the plot list. Or else I'm just making some dumb mistake. Please enlighten me if you can!
 
Back
Top Bottom