Good, that's pretty much what my thoughts were.
why reduce the height of the screen to show the sliders - why not offset the screen to the right a little.
thxHi guys, great project! Just updated to BUG 3.5 -- I love all the info and graphs.
That is a lot of improvements in 13 minutes of play - and only 1 city However, that sounds like a great idea. Do you have some python code to generate that screen - stealing code is what I do best!How about some more, a 3rd table in the statistics screen showing the number of improvements in our territory?
Yeah, it took me just 13 µs to press Ctrl+W
Thx - got it.However, here it is (altered CvInfoScreen.py of BUG 3.5).
Column widths might need some refinement...
Ruff playing with python and after losing the ability to hot swap into and out of Civ4 / python said:dang it - a little too high
[add 10 pixels]
@#%@ - now it is a little low
[take off 4 pixels]
oh bother - close enough
[SIZE="3"]if (currentPlayer.canTradeItem(self.iActiveLeader, tradeData, False)):
if (currentPlayer.canTradeItem(self.iActiveLeader, tradeData, (not currentPlayer.isHuman()))): # will trade
self.resIconGrid.addIcon( currentRow, self.willTradeCol, gc.getBonusInfo(iLoopBonus).getButton()
, 64, WidgetTypes.WIDGET_PEDIA_JUMP_TO_BONUS, iLoopBonus )
else: # won't trade
try:
self.resIconGrid.addIcon( currentRow, self.wontTradeCol, gc.getBonusInfo(iLoopBonus).getButton()
, 64, WidgetTypes.[COLOR="RoyalBlue"]WIDGET_TRADEDENIAL_BONUS, iLoopBonus, iLoopPlayer[/COLOR] )
except:
self.resIconGrid.addIcon( currentRow, self.wontTradeCol, gc.getBonusInfo(iLoopBonus).getButton()
, 64, WidgetTypes.WIDGET_PEDIA_JUMP_TO_BONUS, iLoopBonus )
##############
if (currentPlayer.canTradeItem(self.iActiveLeader, tradeData, False)):
if (currentPlayer.getTradeDenial(self.iActiveLeader, tradeData) == DenialTypes.NO_DENIAL): # will trade
self.techIconGrid.addIcon( currentRow, 4, gc.getTechInfo(iLoopTech).getButton()
, 64, WidgetTypes.WIDGET_PEDIA_JUMP_TO_TECH, iLoopTech )
else: # won't trade
try:
self.techIconGrid.addIcon( currentRow, 5, gc.getTechInfo(iLoopTech).getButton()
, 64, WidgetTypes.[COLOR="RoyalBlue"]WIDGET_TRADEDENIAL_TECHNOLOGY, iLoopTech, iLoopPlayer[/COLOR] )
except:
self.techIconGrid.addIcon( currentRow, 5, gc.getTechInfo(iLoopTech).getButton()
, 64, WidgetTypes.WIDGET_PEDIA_JUMP_TO_TECH, iLoopTech )[/SIZE]
[SIZE="3"]case WIDGET_TRADEDENIAL_BONUS:
case WIDGET_TRADEDENIAL_TECHNOLOGY:
CvWString szTempBuffer;
TradeData item;
DenialTypes eDenial;
if ((widgetDataStruct.m_eWidgetType) == WIDGET_TRADEDENIAL_BONUS)
{
GAMETEXT.setBonusHelp(szBuffer, ((BonusTypes)widgetDataStruct.m_iData1));
setTradeItem(&item, ((TradeableItems)TRADE_RESOURCES), widgetDataStruct.m_iData1);
}
else
{
GAMETEXT.setTechHelp(szBuffer, ((TechTypes)widgetDataStruct.m_iData1));
setTradeItem(&item, ((TradeableItems)TRADE_TECHNOLOGIES), widgetDataStruct.m_iData1);
}
eDenial = GET_PLAYER((PlayerTypes)widgetDataStruct.m_iData2).getTradeDenial(GC.getGameINLINE().getActivePlayer(), item);
if (eDenial != NO_DENIAL)
{
szTempBuffer.Format(L"%s: " SETCOLR L"%s" ENDCOLR, GET_PLAYER((PlayerTypes)widgetDataStruct.m_iData2).getName(), TEXT_COLOR("COLOR_WARNING_TEXT"), GC.getDenialInfo(eDenial).getDescription());
szBuffer.append(NEWLINE);
szBuffer.append(szTempBuffer);
}
break;[/SIZE]
[SIZE="3"]case WIDGET_TRADEDENIAL_BONUS:
doPediaBonusJump(widgetDataStruct);
break;
case WIDGET_TRADEDENIAL_TECHNOLOGY:
doPediaTechJump(widgetDataStruct);
break;[/SIZE]
How about some more, a 3rd table in the statistics screen showing the number of improvements in our territory?
Improvements info added to Info Screen.Thx - got it.
Stop being so modest Dan; I can't even count how many of my Unofficial Patch fixes contain code that was either suggested or improved by you.My programming skills are rather limited (especially Python) but maybe this is somewhat helpful, attaching the 3 *.py files.
Cool!@DanF - I've added your IconGrids to BUG, thanks!
I think this is fine, because it parallels the display behaviour of the glance screen = show me the info of the column-leader together with his diplo modifiers toward the row-leader. It also allows me to get to know MY leader's attitude toward another when I'm the worst enemy of or have an active war with someone else .I also changed all the leaderhead icons to show the diplomatic modifiers, but on the SitRep tab the non-header icons are backwards. For example, on Peter's row (Peter's LH shows his attitude toward you, which is fine) if his Worst Enemy is Palin, then it shows Palin's attitude toward Peter.
I'm afraid I don't really understand what you mean here. Say Peter has the ID 4 and Palin has ID 6 then the current call of [pre]self.iconGrid.addIcon(iRow, self.Col_WEnemy, gc.getLeaderHeadInfo(pWorstEnemy.getLeaderType()).getButton(), 45, WidgetTypes.WIDGET_LEADERHEAD, pWorstEnemy.getID(), iLeader )[/pre] displays Palin's button with the string from CvGameTextMgr:: parseLeaderHeadHelp(&szBuffer, eThisPlayer = 6, eOtherPlayer = 4). Reversing the last 2 arguments in the addIcon Python call would give Peter's attitude toward Palin but also resolve the connection between the button graphics and the info text. So you want to pass something like -14 = 4*(-1) - 10 instead of +4 for Peter as the iLeader argument and modify parseLeaderHeadHelp to detect the negative ID and reverse the players in getAttitudeString(szBuffer, eThisPlayer, eOtherPlayer) only?...reversing it would be possible with a small DLL change: negating the second leaderhead and offset it further negative by 2 or 10 or some value > 1* would reverse the attitude check.
Say Peter has the ID 4 and Palin has ID 6
I like the whip assistant in v3.5, but I regularly wish it had a next turn estimation, too.
[SIZE="3"]iRow = screen.appendTableRow(szTable)
iVoteTimer = gc.getGame().getVoteTimer(iActiveVote)
sString = u"<font=3b>" + "Turns until next Vote: %i" % iVoteTimer + "</font> "
screen.setTableText(szTable, 0, iRow, sString, "", WidgetTypes.WIDGET_GENERAL, -1, -1, CvUtil.FONT_LEFT_JUSTIFY)
iRow = screen.appendTableRow(szTable)
iSecGenTimer = gc.getGame().getSecretaryGeneralTimer(iActiveVote)
sString = u"<font=3b>" + "Votes until next Election: %i" % iSecGenTimer + "</font> "
screen.setTableText(szTable, 0, iRow, sString, "", WidgetTypes.WIDGET_GENERAL, -1, -1, CvUtil.FONT_LEFT_JUSTIFY)
iRow = screen.appendTableRow(szTable)[/SIZE]
[SIZE="3"]def getVoteAvailable(self):
iRelVote = -1
iRelVoteIdx = -1
iUNVote = -1
iUNVoteIdx = -1
for i in range(gc.getNumVoteSourceInfos()):
if gc.getGame().isDiploVote(i):
if (gc.getGame().getVoteSourceReligion(i) != -1):
iRelVote = i
else:
iUNVote = i
if (gc.getGame().canHaveSecretaryGeneral(i)
[COLOR="Red"]and gc.getGame().getSecretaryGeneral(i) != -1):[/COLOR]
for j in range(gc.getNumVoteInfos()):
if gc.getVoteInfo(j).isVoteSourceType(i):
if gc.getVoteInfo(j).isSecretaryGeneral():
if (gc.getGame().getVoteSourceReligion(i) != -1):
iRelVoteIdx = j
else:
iUNVoteIdx = j
break
[/SIZE]
I don't think it is exploitable - but I would consider it spoilerish. The duration between UN votes is pretty much fixed but the AP votes and resolutions completely confuses me - it just seems to turn up. I guess that if you know a vote was coming up, you might rush a religion spread or swap into a certain religion.I was just looking into the AP-in-hibernation problem and thought it might be useful to have the F8-Members screen display the values of getVoteTimer and getSecretaryGeneralTimer (added 2 more rows with hard coded text to the members table):
<snip>
Or do you consider this information spoilerish / exploitable?