Requests for new components (and features)

The tables update just fine when you change the commerce sliders (although it's a little slow). Perhaps we could make the amount of room to leave at the top a configurable option.
 
Or we could add the sliders to the screen at the bottom along with the specialists and culture table (could be removed I think) so each page could specify when they show up. We wouldn't need to show the calculated values of each -- just the percentages with buttons.

For more work, but a possible future idea.
 
why reduce the height of the screen to show the sliders - why not offset the screen to the right a little.
 
Good, that's pretty much what my thoughts were.

I'm certainly in favour of making it bigger. At 1920 X 1200 it's pretty small on my system. I actually tried to make mine bigger but I couldn't quite figure out how to.
 
why reduce the height of the screen to show the sliders - why not offset the screen to the right a little.

This might work at the larger sizes, but at 1024x768 the horizontal space for columns is far more important.
 
Hi guys, great project! Just updated to BUG 3.5 -- I love all the info and graphs.
How about some more, a 3rd table in the statistics screen showing the number of improvements in our territory?


I find this info interesting in general and think that it is especially useful for the Bureaucracy-vs-Free Speech decision (number of towns in empire).

The other thing I'd love to see implemented in an official BUG-Release is the leaders giving me their individual trade denials for resources and technologies in the "Won't Trade" columns of the respective F4 screens.



But I'm not sure whether that could be done without altering the dll. My Trial'n'Traceback attempts included the addition of 2 new WidgetTypes (WIDGET_TRADEDENIAL_BONUS, WIDGET_TRADEDENIAL_TECHNOLOGY) plus the extension of the addIcon methods in IconGrid.py and IconGrid_BUG.py to take two arguments for iData (Bonus/Tech + Player).
Maybe you experts can think of a python only solution (or include it into a future BUG-dll)? Would be great!
 
Hi guys, great project! Just updated to BUG 3.5 -- I love all the info and graphs.
thx
How about some more, a 3rd table in the statistics screen showing the number of improvements in our territory?
That is a lot of improvements in 13 minutes of play - and only 1 city :D However, that sounds like a great idea. Do you have some python code to generate that screen - stealing code is what I do best!
 
Yeah, it took me just 13 µs to press Ctrl+W ;)
Glad that you like the idea!
Stealing code is how I got it to work - I have no real clue about Python nor am I able to produce some cool diffs/patches.
However, here it is (altered CvInfoScreen.py of BUG 3.5).
Column widths might need some refinement...
 

Attachments

  • CvInfoScreen.rar
    18.2 KB · Views: 71
here is a request ... I'm adding features to various screens (main, advisor, etc) and it can be a real pain to try and position some of them ...

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

So, how do I add an in-game grid that shows every 10 or 20 pixels? I would like to be able to hit Alt-Ctrl-G and a nice yellow grid pops up so that I can work out exactly where I want a particular icon / text / panel to start ...

So - can / how do we do this?
 
Great ideas! Yes, the hovers would require a DLL, but we're getting close to the tipping point I think. :)

Alerum and I had discussed an empire-wide improvement report as a new F2 tab (change screen name to Economic Advisor). Other things I want on it include

  • Total # of each plus # being worked
  • Mines/Lumbermills/Quarries without RR
  • Average # of turns for cottages to reach next stage
    For example: 2 Hamlets--with 5 and 10 turns to become Villages--shows "7.5 turns"
  • Workable forest plots to assess gains of Replaceable Parts
  • A minimap to show the locations of selected items
Also, could you please post your IconGrid changes. At least for now we can show the diplomatic modifiers when hovering over leaderheads. :)
 
:eek: wow - that amount of info will truly enable the player to know his empire like the back of his hand. Something I often experience and regret in the later stages of my games (especially after some conquests) is that I more and more lose touch with my land and neglect worker management.

My changes in IconGrid.py and IconGrid_BUG.py consisted of the replacement of iData with iData1, iData2=-1 everywhere
so that in CvExoticForeignAdvisor.py I can call
Code:
[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]
so that CvDLLWidgetData:: parseHelp can do this:
Code:
[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]
The pedia-jump via click still works because in CvDLLWidgetData::executeAction:
Code:
[SIZE="3"]case WIDGET_TRADEDENIAL_BONUS:
	doPediaBonusJump(widgetDataStruct);
	break;
case WIDGET_TRADEDENIAL_TECHNOLOGY:
	doPediaTechJump(widgetDataStruct);
	break;[/SIZE]
My programming skills are rather limited (especially Python) but maybe this is somewhat helpful, attaching the 3 *.py files.
 

Attachments

  • ExoticIconGrids.rar
    19.4 KB · Views: 65
My programming skills are rather limited (especially Python) but maybe this is somewhat helpful, attaching the 3 *.py files.
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. :D
 
@DanF - I've added your IconGrids to BUG, thanks!

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 figure I'll leave it since more info is better than none, but 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.

* This is needed since -1 means "don't show attitude in hover", and 1 is a valid player ID.
 
@DanF - I've added your IconGrids to BUG, thanks!
Cool! :cool:
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 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 ;).
...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.
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?
 
I like the whip assistant in v3.5, but I regularly wish it had a next turn estimation, too (because I'd say it is more important to "cook" a maximum whipping overflow a turn before with the right number of hammers spend rather than to see what you'll get by whipping right now). Alternating at cursor rollover, perhaps, if possible.
 
Say Peter has the ID 4 and Palin has ID 6

Then I would pass in 6, -14, yes. The first number still determines which icon to display whereas the second number being <= -10 tells the DLL to undo that munging, turning it back to 4, and reverse the IDs passed to parseLeaderHeadHelp() so it tells us Peter's attitude towards Palin.

The thing is that Palin isn't in the row heading at the top, her LH is shown in Peter's row. If Palin is Peter's worst enemy, I want to see why. If Peter is willing to go to war against Palin or join an embargo, I want to see why.

I like the whip assistant in v3.5, but I regularly wish it had a next turn estimation, too.

This was my initial goal for it, but I couldn't find a good way to present the information. Check out this WhipAssist thread for further discussion.
 
Hi again ;)
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):
Spoiler :
Code:
[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]

Or do you consider this information spoilerish / exploitable?
I also ran into a problem concerning the number of votes displayed for each member. In the screenshot you can see a certain DanF with 24 votes and Justinian with 12 votes (total 36) and the number of votes required for a diplomatic victory surprises with a value of 54. The AP was built by Justinian but I got elected as Resident. Switching to Free Religion made me lose that position together wit the Full Member status (with double votes). Switching back to OR and Christianity did bring me back to Full Member status but did nothing to my displayed number of votes. Also Justinian's votes are currently not doubled in spite of remaining in Christianity all the time. So we actually have 48 / 24 votes (total 72) indicating that the 54 required votes are correct (these numbers 54/72 are also given in the F8-Resolutions screen). The problem seems to be, that the AP is currently without a valid Resident (gc.getGame().getSecretaryGeneral(1) = -1) which will make getVoteAvailable(self) return -1 for iRelVoteIdx, so that pPlayer.getVotes(iVoteIdx, iActiveVote) will not take the doubling for full members into account.
Spoiler :
Code:
[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 know whether the gc.getGame().getSecretaryGeneral(i) != -1 condition is really necessary here, when omitted the numbers of votes are correct.
Still the AP is quite a mystery to me...
To shed some more light on this subject I'd love if the F8-Resolutions screen could display the individual resolutions color coded according to their validity in a certain situation in a game. But I found that stuff like CvGame::canDoResolution or CvGame::isValidVoteSelection isn't exposed to Python so I guess chances are not too good to accomplish something like that. :dunno:

~~~~~~~~~~~~~~~~~

Edit Peter & Palin: maybe reversing the last 2 arguments would be the best then (when not changing the dll) so that the button has Palin's picture but displays the Peter-toward-Palin info text. :dunno:
 
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?
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.

Guess I am voting to NOT include this info on BUG.
 
Top Bottom