Space Race Tab

mystyfly

Knight of Cydonia
Joined
Aug 29, 2007
Messages
3,669
Location
CH
There has been a request for a more detailed Space Race Screen, as people complain that seeing only one AI's progress is not enought to contain possible threats.

I agree and tried to do something about it (and in the meantime learning python - never wrote a single python line before :D Thanks EF and ruff for your support ).

I open that thread to ask for suggestions and show what I have done so far.



Some explanations:
red numbers:
1) Leader names: every active leader's name is displayed here. If a player hasn't built, his name is written in grey (Darius here). The player who controls the SE has his name in red (me here). All other names are white.

2) - 8) Columns showing detailed progress of all AIs. Also you see here I use colors for different states:
* That player has built all possible parts of that type

* That player hasn't yet built all parts of that type but has the resource that accelerates it's build time.

White simply means that neither of the above is true :)

9) Raw hammer column. The sum of the hammers the player needs to complete his SS. These values can be a bit misleading and are mainly here to show the player's progress relative to the human player. And because of that, I use colors again:

If the player has less hammers spent on his SS than the active player, that player's name is written in green (linc and sury here).

If the player has less than 3/4 of the hammers left to complete the SS (comparing to the human player), it's written in yellow.

If the player even has less than 1/2 of the hammers left to complete the SS, it's in red.

10) Espionage Column. No colors here :)(). Just the raw amounts of EPs you have versus those civs. Useful for determing where you need to spend more EPs.

11) That columns' called "Estimated Arrival" for lack of better ideas :rolleyes:. It's quite simple: shows a "-" if the player can't launch, a red "X" if the player can launch (you'll only see this in the human player's column...) and a red number if a player has launched, while that number is the amount of turns it takes to reach AC.


If you have any suggestions/criticisms/etc, be my guest :D

Here's my modified version of CvVictoryScreen.py:
View attachment CvVictoryScreen.rar
 
Looks good :goodjob:

... some comments
  • we should look at using icons in the heading instead of names (less room, nicer, no need to translate, etc)
  • think about 2 lines at the top to show min and max number of parts required
  • estimated arrival ... maybe change this to 'Flight Time' and then showing 'x turns after launch' if can launch but haven't and 'x turns' if they have launched
  • we should look at making the format and colors for the parts consistent with the victory conditions tab (the VC tab shows parts under construction for the player and if the AI has the required tech) - could even show parts under construction if the player has enough EPs against an AI for city build visibility
  • how have you sorted the players? think human should be first, then blank line and then AIs in 'SS Threat' order (how ever the VC tab defines 'SS Threat')
  • not completely sold on no background - makes some of the numbers had to see - maybe put a panel behind the table

On a totally off topic note, why are all of the formats used for tab names across the bottom of each tab different for each tab? Take a look at each tab and you will see that some are upper case, some lower, some font 3, some font 2, some with fixed spacing, some with spread spacing, etc, etc.

We really should settle on one layout and then force each tab to be the same.
 
Okay, having looked at the icons, a lot of them are too detailed to work on a small scale (copying the original icons) so I'd welcome ideas for those. However, I can do life support and thrusters . I hope those two are recognisable enough.
 
Ruff covered most everything I was going to suggest. One thing left out is I would like to see some color consistency. Green should mean good for the player; red should mean bad; yellow should mean warning.

I'd like to see which resources boost which parts. Perhaps add it as a row under the headings, along with the min/max parts. Then you don't need the "/x" on each player row.
 
here is your file back with a bunch of 'ruff' comments scattered thru it - search for 'ruff'
 

Attachments

  • CvVictoryScreen.zip
    16.5 KB · Views: 61
ruff_hi said:
we should look at using icons in the heading instead of names (less room, nicer, no need to translate, etc)
That is being worked on :)
BTW I like these icons though I don't know how you could do the others, NikNaks, I'd just draw simple versions of the parts in the original icons and show us here afterwards :D I like the two you've done so far :thumbsup:

ruff_hi said:
think about 2 lines at the top to show min and max number of parts required
EmperorFool said:
I'd like to see which resources boost which parts. Perhaps add it as a row under the headings, along with the min/max parts. Then you don't need the "/x" on each player row.
With icons, there is enought space for everything without having to add another row though that is possible. However, if I should add the resource boosting it I don't know how to display it nicely (unless I get a small icon for copper and alu (hint hint :D)).

ruff_hi said:
estimated arrival ... maybe change this to 'Flight Time' and then showing 'x turns after launch' if can launch but haven't and 'x turns' if they have launched
Changed it to "Turns to Alpha Centauri". I find this more fitting.

ruff_hi said:
we should look at making the format and colors for the parts consistent with the victory conditions tab (the VC tab shows parts under construction for the player and if the AI has the required tech) - could even show parts under construction if the player has enough EPs against an AI for city build visibility
I see that completed parts are shown in green (which is why I picked green too) but don't know about the other colors. Where is the overview of the used colors used there?

ruff_hi said:
how have you sorted the players? think human should be first, then blank line and then AIs in 'SS Threat' order (how ever the VC tab defines 'SS Threat')
I think I have that worked out. Only the player can't sort by the column he likes but the table gets automatically sorted by that threat index, which, I think, is fine (you don't need to sort by anything else).

ruff_hi said:
not completely sold on no background - makes some of the numbers had to see - maybe put a panel behind the table
I tried attaching it on a panel but it didn't work. Will try again later. I have no problem seing the values though...


I have a shot here of the most recent version:



Some notes:
- The first column, "#", probabely is only temporary and displayed to check that the table is sorted properly. I have the human player still between the AI players as that might help. I can put him on the top easily though.
- You can see that those "threat index numbers" (code copied and modified (the variable names mostly) from the original victory screen) don't represent the progress hammerwise exactly: Brennus and Bismarck have different hammer values but the same threat index. This might be due to a rounding error (their hammers only differ by 200) or because Biz has a tech edge...
- I deleted the "/y" and added "(1-y)" in the header (though you can't see that atm). I agree that looks better (less crumped together).
- See the changed column to the very right.

A general note about the layout: I use a 1280*1024 resolution in civ so it might be indeed way to much text in the header so icons really are necessary. How about putting a resource icon and the number of required parts under the header though without making it too long?

Now, I'm off to including ruff's many suggestions (thank you very much) :salute:
 
With icons, there is enought space for everything without having to add another row though that is possible. However, if I should add the resource boosting it I don't know how to display it nicely (unless I get a small icon for copper and alu (hint hint :D)).
I think those two are already in the font file so no problem there!
I see that completed parts are shown in green (which is why I picked green too) but don't know about the other colors. Where is the overview of the used colors used there?
check the code - I usually put in comments describing what I think I am doing. Or check the 'victory conditions' thread - should be around here somewhere :D.
I tried attaching it on a panel but it didn't work. Will try again later. I have no problem seing the values though...
Check the new religious advisor - I have a table on a panel - works fine.
 
OK - great to know where to look ;)

Another thing I was wondering: How do I find out what icons are in that font file and how do I get access to them?

Also I've seen some of the functions related to some xml files (like one you mention in the code comments), but how do I understand them? I have no clue what they do or how they work...
 
The font file is in Assets/Res/Fonts. It's a TGA file which is a type of graphics file. You can open it in IrfanView or Paint.NET and some other paint programs.

You can put the resource icons into a string for a single project using this:

Code:
# you'll actually be looping over all projects
eProject = gc.getInfoTypeForString("PROJECT_SS_COCKPIT")
project = gc.getProjectInfo(eProject)
# build a string containing all bonuses that boost it
szText = u""
for eBonus in range(gc.getNumBonusInfos()):
    if project.getBonusProductionModifier(eBonus) != 0:
        bonus = gc.getBonusInfo(eBonus)
        szText += u"%c" % [B]bonus.getChar()[/B]
 
@EF: I'll look into that. Any other suggestions to the tab?

@NikNaks: I like them. Once I manage to add them I'll show a screen with them and we can see how they look beside eachother. I have no idea for the missing two icons however...

@rolo: What do you mean by a column for apollo? Civs that haven't finished apollo have "-" everywhere in their row (besides the espionage column) and their name in gray. I think that ought to do.
If you have specific ideas for the espionage screen (or a link to where you wrote them down before) I might be able to do something...
 
It doesn't do completely, since having Apollo and not the techs that allow SS parts, if I understand correctly, will give the same output. Or am I wrong and the "-" will only appear when apollo is not built?

About espionage, i dropped some sugestions here. I already started looking for it and it looks quite straight forward, but haven't got the time to make me confortable with Civ IV structure in this moment ( where are the things I want to get, the slider .... that kind of stuff )
 
Whether or not the player has apollo built determines whether the player has his name in grey and the columns with "-". It resembles that the player hasn't yet "entered the space race".

I'll see what I can do abt the esp screen, but don't expect too much (or too quickly :p) but it seems like you've been waiting for some time so it won't matter waiting a bit more, will it? :lol:
 
:lol:

My idea was to do the espionage screen myself... ;) But I would need to lose some time getting me familiar with the places were to get the things I need , and I pretty much don't have that time .
 
Yes, I've read that you don't have time in post #13 :p

I dunno much about my leisure time as I'll be having my written and oral matura in a bit more than a month but I should manage to find time still... Oh, and if you're not familiar with python and that API stuff and so on, plan on spending lots of time reading, trying, failing, asking, and finally, eventually, succeeding :D:D
 
You need to add <symbol> tags to Config/init.xml. It's not too hard to follow the examples. Mystyfly is doing it now.

As for the AP being built, I understand r_rolo1's point. If they don't have the techs for the parts but have built the AP, the only difference between them and a rival who hasn't built the AP is the gray name. This might be too subtle, but I dunno.
 
Thing is, often in space races, production is more limiting what with trade partners and/or inet around. If the player hasn't built apollo he surely is quite a bit away from launching and shouldn't be considered much of a threat yet. Also, apollo seems to have such a high priority on the AI build queues that it nearly gets started instantly after rocketry is researched (and no SS part can be built before it finishes).
 
I have made, again, a few changes. Unfortounately I couldn't get the icons to display :(



You can see in the SS parts columns there's only the integer showing the number of parts built. I didn't change the coloring of those numbers yet as I'm not convinced I really should (at least not until I see a way to display what resources the AI have, and that's not until the SS parts icons display in the header of the table.

I've now added a panel behind the table.

There is first a nearly empty row. There will be icons of the resources that boost production of these parts (I already put in placeholders).

The human player is on top. Again, I'm not convinced that's "nice" but I'll leave it at that for now.

In the header there's now "(x-y)" parts behind the name (that will be replaced by icons) where x is the min # of parts and y the max # of parts to build for a SS.
BTW the hammers column calculates its values based on a complete ship not on a ship that is just ready to launch. I don't think the AI launches before it completed the very whole SS. Has anyone ever seen an AI launch before it has a 100% complete ship?

I made the hammer and espionage icons a bit smaller so that they fit now.
 
Top Bottom