Victory Screen Mods

very good work Sir...

one question about the new Apollo section: I don't recall if the original shows parts of not-known techs. Given that it is a vital piece of information to know if you are about to loose, I wonder if hiding parts related to unknown techs is a good idea.

I mean, many will be pissed off if they loose a game because they did not know that the leader was building a last part of the spaceship.

So, was it this way in vainilla? I don't recall. (too much BUG, I don't know vainilla anymore... :lol:)
 
one question about the new Apollo section: I don't recall if the original shows parts of not-known techs. Given that it is a vital piece of information to know if you are about to loose, I wonder if hiding parts related to unknown techs is a good idea.
I was using one of your games to test the SShip part and noted that I was hiding the number of parts that the AI had built (even the '0') while vanilla BtS doesn't. I've changed BUG so that it always shows the AI's count but color codes it as:

- orange if the human knows the AI has the tech
- yellow if the AI has the minimum number needed to launch
- green if the AI has the required number needed to launch
 
victory screen exposed to local text functions. I've never worked with inserting values into one of these getlocal text thingos and so, naturally, it isn't working. Can someone look at it and tell me where I went wrong?
 
victory screen exposed to local text functions. I've never worked with inserting values into one of these getlocal text thingos and so, naturally, it isn't working. Can someone look at it and tell me where I went wrong?

I've seen that EF has fixed them, but only for English lines... there is a reason for it, or may I change them in the same way also for other languages?

BTW, now I'm ready for that work of XMLizationn for Autolog, if EF has some time to teach me how to do it :)

Edit:
Not sure, but I think Dresden has answered to my question. :)
 
The localText translator seems to have something against floating-point numbers. It does understand the %f placeholder, but it's basically broken; the output is crazy as the translator displays it with 6 decimal places and then tacks *another* .1 after it. For example, the number 4.23 would display as "4.230000.1" :crazyeye: Perhaps some of the more experienced modders here know of a different way to make the translator output a float, but that's the only one I've seen.

One workaround I can suggest is to simply hardcode the float format and then just use string modifiers in the XML text. For example, you could use
Code:
<English>%s1 (%s2%%) leads by %s3%%.</English>
in the XML and then do something like this in Python.
Code:
sString += localText.getText("TXT_KEY_BUG_VICTORY_BUG_POLL_RESULT", (sWin, "%.1f" %(rVotePercent), "%.1f" %(rMargin), ))
The Firaxian Python code seems to do that a lot such as when the domination population percentage gets displayed on the victory screen.

EDIT: Oh well. It seems something very similar was already done between the time I went through the sources and the time I posted this. I blame sourceforge for not sending me the account confirmation email yet so that I can to access the SVN easily. :p
 
It does understand the %f placeholder, but it's basically broken; the output is crazy as the translator displays it with 6 decimal places and then tacks *another* .1 after it.

And sometimes it had more than 2 decimals after it: 41.782700.1. I gave up after a while of trying various combinations. I looked for an example in the original XML files but without luck. I saw that %F seems to insert an icon or character: %F_happyorhealthy.

EDIT: Oh well. It seems something very similar was already done between the time I went through the sources and the time I posted this.

Yes, but isn't it good to know you realized the same solution as my brilliant mind? ;)

I blame sourceforge for not sending me the account confirmation email yet so that I can to access the SVN easily. :p

You can access SVN without an SF.net account. Hasn't Alerum fixed those directions yet? In any case, you can also subscribe to civ4bug-commit to get email for every commit if you're so inclined. I do this and shuffle various ones off to different labels so I can know right away when someone screws up^H^H^H^H^H^H^H^H^Hcommits a new version of the INI. ;)

I've seen that EF has fixed them, but only for English lines... there is a reason for it, or may I change them in the same way also for other languages?

Ah, you'd think there would be a good reason, but sadly no. I got frustrated not finding the right way that I simply forgot to finish what I did. :( Done.
 
Very minor text bug:
Code:
					if self.VoteToggle == 0:
						sString = gc.getVoteSourceInfo(i).getSecretaryGeneralText() + ": "
					else:
						sString = localText.getText("TXT_KEY_BUG_VICTORY_DIPLOMATIC", ())
You append a colon and space to the description of a SecGen vote but not to the diplomatic victory one. So you end up with a string that looks like this:
Code:
Diplomatic VictoryName (50.0%) leads by 10.1%
A colon and space should either also be appended to the second sString assignment or added in the XML for that key.
 
I've also noticed that the first time either the AP or UN is built, the candidates are wrong. It should be the builder and the civ with the highest votes. It is actually the two civs with the highest votes. I'll take a look at it.
 
Also it says that the builder is whoever happens to control the wonder. I built neither but acquired both in my current game, and it says that I built both. I assume you didn't change this part of the code, so it may be moot. I also don't know if there's a way to find out who built it.

You can find the original owner of a city, but that doesn't mean they didn't lose it before the wonder was built. The information is certainly embedded in the replay info as wonder messages are displayed. We could also store the builder when it gets built and save it using SdToolkit in the CyGame. That would actually be quite easy.

I'll add it to my growing list if no one nabs it. :)
 
it does the builder but the actual person who gets compete in the SecGen vote is the current owner and the max size player. I didn't change that code.
 
it does the builder but the actual person who gets compete in the SecGen vote is the current owner and the max size player.

I'm sorry, I don't speak Martian. Can you please translate to English for us little people? ;)
 
ho hum ... the people who compete for the SecGen / pope are ...

1) the person who currently owns it;
2) the person with the highest number of votes (or 2nd highest if the highest also owns the UN / AP)

The victory screen says "built by X" but it actually means "currently controlled by X". I haven't changed that.
 
again, very nice work Ruff!

One thing that comes to my mind: it would be nice to see the votes needed to succeed in Pope/SecGen votings, and in Diplo Victory, directly from the members screen. That way, player does not need to switch to Resolutions only to check those numbers.

Can you add that to your Members tab?

Thanks in advance! (I know your answer is yes). :D
 
One thing that comes to my mind: it would be nice to see the votes needed to succeed in Pope/SecGen votings, and in Diplo Victory, directly from the members screen. That way, player does not need to switch to Resolutions only to check those numbers.
I was searching for a copy of the discussion that EF and I had about this. EF mentioned what you said above and I said "its on the resolution tab". He said "yes, but" and I said "bloody lazy users can just flick back and forth."

Well, ok - but if I have to do this - then you have to help. Where on the members tab do you want this pointless bit of information?
 
Well, ok - but if I have to do this - then you have to help. Where on the members tab do you want this pointless bit of information?

Latest BUG poll shows Ruff_Hi leading by 141 votes.
Ruff_Hi is projected to win (427 votes needed)

The screen already has to scroll, so adding two more lines (one to each vote) won't hurt too much.
 
ok but I'm thinking it should go first ...

"Diplomatic Victory: xxx votes required"

or

"Sec Gen Election: yyy votes required"

and then follow with the current BUG poll, percentage of votes and margin (and error margin). The actual number of votes are shown at the bottom of the tally.

PS: Was playing a game recently where BUG predicted I would win a UN victory by 8 votes, actually picked up 40 odd from someone else that was only pleased with me, but was obviously over the magic number based on the internal relationship index.
 
... and I said "bloody lazy users can just flick back and forth."

:lol::lol::lol::lol:

That's the seed of BUG, isn't it? Come on...

As for where, I agree with EF. It shouldn't add more characters than needed: only something concise and clear, like EF's suggestion.
 
I've added 'votes required' to 'CvVictoryScreen1.py'. For some reason, I cannot seem to get the XML working. Can someone tell me what I am doing wrong - it looks just like the other code that works.
 
Add a comma after sVoteReq on line 405 like so:
Code:
					sString = sSecGen + ": " + localText.getText("TXT_KEY_BUG_VICTORY_VOTES_REQUIRED", (sVoteReq,))
Parens alone aren't enough to force the argument to be a tuple, but adding a comma will do it.
 
Top Bottom