graywarden
King
- Joined
- Dec 6, 2007
- Messages
- 819
I've made two changes to the scoreboard, which I've been wanting to have. The first one is to show both name of the leader and the civ name like "Viriato of Iberian Tribes". Sometimes I forgot who is leading which civ (and particularly useful, if you are forgetful like me).
Another one is showing AI's attitude toward the player. It's always useful to know right away everyone's feeling toward you when dealing in diplo, or simply wants to get the general feeling of the rest of the world toward you without the need of going into foreign advisor screen. I don't use smilies because that will require changing the gamefont_75.tga, which I don't particularly feel like doing. So, they are showing as text only (Frnd/Plsd/Caus/Annd/Furs) in different colors.
The scoreboard now looks like:
The (trade) (rel) are just representation of the actual icon which the forum doesn't have this icons as smilies.
I include my CvMainInterface.py in this post if anyone want it.
If you want to change it yourself, for the leader/civ naming, in Mods/TAM/Assets/Python/Screens/CvMainInterface.py, around line 2786, you find:
Code:if (not CyInterface().isFlashingPlayer(ePlayer) or CyInterface().shouldFlash(ePlayer)): if (ePlayer == gc.getGame().getActivePlayer()): szTempBuffer = u"%d: [<color=%d,%d,%d,%d>%s</color>]" %(gc.getGame().getPlayerScore(ePlayer), gc.getPlayer(ePlayer).getPlayerTextColorR(), gc.getPlayer(ePlayer).getPlayerTextColorG(), gc.getPlayer(ePlayer).getPlayerTextColorB(), gc.getPlayer(ePlayer).getPlayerTextColorA(), gc.getPlayer(ePlayer).getName()) else: szTempBuffer = u"%d: <color=%d,%d,%d,%d>%s</color>" %(gc.getGame().getPlayerScore(ePlayer), gc.getPlayer(ePlayer).getPlayerTextColorR(), gc.getPlayer(ePlayer).getPlayerTextColorG(), gc.getPlayer(ePlayer).getPlayerTextColorB(), gc.getPlayer(ePlayer).getPlayerTextColorA(), gc.getPlayer(ePlayer).getName()) else: szTempBuffer = u"%d: %s" %(gc.getGame().getPlayerScore(ePlayer), gc.getPlayer(ePlayer).getName()) szBuffer = szBuffer + szTempBuffer
Make changes to the following (insert a line in the begining, as well as changing the parameter in the end of the line of 2nd ifs, and 1st else):
Code:szTempName = gc.getPlayer(ePlayer).getName() + " of " + gc.getPlayer(ePlayer).getCivilizationShortDescription(0) if (not CyInterface().isFlashingPlayer(ePlayer) or CyInterface().shouldFlash(ePlayer)): if (ePlayer == gc.getGame().getActivePlayer()): szTempBuffer = u"%d: [<color=%d,%d,%d,%d>%s</color>]" %(gc.getGame().getPlayerScore(ePlayer), gc.getPlayer(ePlayer).getPlayerTextColorR(), gc.getPlayer(ePlayer).getPlayerTextColorG(), gc.getPlayer(ePlayer).getPlayerTextColorB(), gc.getPlayer(ePlayer).getPlayerTextColorA(), szTempName) else: szTempBuffer = u"%d: <color=%d,%d,%d,%d>%s</color>" %(gc.getGame().getPlayerScore(ePlayer), gc.getPlayer(ePlayer).getPlayerTextColorR(), gc.getPlayer(ePlayer).getPlayerTextColorG(), gc.getPlayer(ePlayer).getPlayerTextColorB(), gc.getPlayer(ePlayer).getPlayerTextColorA(), szTempName) else: szTempBuffer = u"%d: %s" %(gc.getGame().getPlayerScore(ePlayer), szTempName) szBuffer = szBuffer + szTempBuffer
For the AI attitude, go down below around 10-15 lines further, and you'll find:
Code:if (gc.getTeam(eTeam).isAlive()): if ( not (gc.getTeam(gc.getGame().getActiveTeam()).isHasMet(eTeam)) ): szBuffer = szBuffer + (" ?") if (gc.getTeam(eTeam).isAtWar(gc.getGame().getActiveTeam())): szBuffer = szBuffer + "(" + localText.getColorText("TXT_KEY_CONCEPT_WAR", (), gc.getInfoTypeForString("COLOR_RED")).upper() + ")"
Press enter after that last line, and insert the following code (make sure the "if" has the same indent has the previous "if"):
Code:#attitude if not gc.getPlayer(ePlayer).isHuman(): iAtt = gc.getPlayer(ePlayer).AI_getAttitude(gc.getGame().getActivePlayer()) if iAtt == 0: iAttWord = localText.getColorText("Furs", (), gc.getInfoTypeForString("COLOR_RED")) elif iAtt == 1: iAttWord = localText.getColorText("Annd", (), gc.getInfoTypeForString("COLOR_PLAYER_DARK_CYAN")) elif iAtt == 2: iAttWord = localText.getColorText("Caus", (), gc.getInfoTypeForString("COLOR_LIGHT_GREY")) elif iAtt == 3: iAttWord = localText.getColorText("Plsd", (), gc.getInfoTypeForString("COLOR_YELLOW")) else: iAttWord = localText.getColorText("Frnd", (), gc.getInfoTypeForString("COLOR_GREEN")) szTempBuffer = " [" + iAttWord + "] " szBuffer = szBuffer + szTempBuffer #attitude end
It's not pretty, but it does what I want it to do. Hope this helps other players too.
Edit: Almost forgot to provide my file as attachment.
Ono-Neko,
nice work, looking forward to it being integrated. are you familar with BUG? its a modified HUD being used in FFH/Wild Mana. With it you can customize a lot of features such as the score board, where it uses the various smiley faces to indicate your diplomatic status. might check it out, and see if there is anything there that would fit.