1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  3. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  4. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  5. Dismiss Notice
  6. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

[PY] Main Screen Mod

Discussion in 'Civ4 - Mod Components' started by NeverMind, Aug 3, 2007.

  1. NeverMind

    NeverMind Proud to be Russian

    Joined:
    Apr 29, 2005
    Messages:
    618
    Gender:
    Male
    Location:
    Moscow, Russia
    MAIN SCREEN MOD
    Version 2.33
    + CIV 1.64-1.71
    + Warlords 2.08-2.13
    + BtS 3.19


    Main Screen Mod is a collection of useful tweaks for CvMainInterface.py, which defines the look of Civ4 in-game screen.

    Features


    - Show Turn Number (and *Max Turns)
    - Show Current Era (financial panel)
    - Combat XP Counter (Great General Birth) - W, B
    - GP Generation Counter or GP Info Bar* (Impaler) - B

    Scoreboard
    - Show Civ names or Leader names
    - Show Attitude Color Text or Icons
    - Show *Score per Turn (Caesium) or *Hide Score (numbers)
    - Dead Civs score removed - C, W

    City Screen

    - Raw Commerce Display (Sevo)
    - Show Turns Left: Cultural Expansion and GP Birth (Chinese American)

    External files supported
    - *Extra Attitude Icons (Porges, Turlute)
    - *AI Attitude Value dll (Blacksun)

    Options changed (Options--Other--Clock)
    = Clock On - Civ/Leader names (scoreboard)
    = 24 Hour Clock - Attitude Color Text or Icons (scoreboard)




    * - features that could be turn on by simple switches in modified CvMainInterface.py ->


    MSM Options

    Spoiler :
    ############################################################
    ##########===Main Screen Mod===Options===0===
    ############################################################
    # Show Era (default = true)
    g_bShowEra = true

    # City Cultural Expansion Turns (default = true)
    g_bCityExpansionTurns = true

    # City GP Birth Turns (default = true)
    g_bGPBirthTurns = true

    # Combat XP Counter (default = true)
    g_bCombatXPCounter = true

    # Main Screen City Scroll (default = true)
    g_bMainCityScroll = true

    #-----------------------------------------------------------

    # Show Turn Options
    # 0 = Standard BtS
    # 1 = Show Turn Number (default)
    # 2 = Show Turn Number and Max Turns
    g_iShowTurn = 1

    # Show Score Options
    # 0 = Hide Score
    # 1 = Show Score (default, standard)
    # 2 = Show Score and Score per Turn
    g_iShowScore = 1

    # Show Attitude Options
    # 0 = Hide Attitude (standard)
    # 1 = Show Attitude Text or Icons (default)
    # 2 = Show Attitude Text or Extra Icons (!! Porges' GameFont.tga required !!)
    g_iShowAttitude = 1

    # Show GPinfo Options
    # 0 = Hide GPinfo (standard)
    # 1 = Show GPinfo Text (default)
    # 2 = Show GP Bar
    g_iGPinfo = 1

    # Attitude Value (default = false)
    # !!! Blacksun's AttitudeValue .dll required !!!
    g_bAttitudeValue = false



    >> Downloads >> Vanilla || Warlords || BtS << Downloads <<

    Credits
    Caesium, Chinese American, Impaler, Porges, Sevo, SimCutie, Snaitf, TheLopez, Tubby Rower ​
     
  2. Ket

    Ket Composite Of A Composite

    Joined:
    Jul 26, 2006
    Messages:
    899
    Location:
    Austin, TX
    2 Strange Things I have attempted to do a merge on this....

    My cvMainInterface.py was clean before adding this, so I was just able to put the new one in.

    1) Adding Gamefont_75.tga or gamefont.tga seems to have no effect with the setting of g_iShowAttitude = 2
    res/font/ is located in the mod directory in this case is this what the issue is?

    2) Mouse scrolling of the map seems to have gone away.
     
  3. NeverMind

    NeverMind Proud to be Russian

    Joined:
    Apr 29, 2005
    Messages:
    618
    Gender:
    Male
    Location:
    Moscow, Russia
    1) I suppose you use wrong (or different or standard BtS one) gamefont file. For BtS get this one by turlute (GameFont_75.tga), place it in (CustomAssets/)res/fonts folder, change g_iShowAttitude setting to 2 and turn on '24 Hour Clock' in the game.

    Here is a result
    Civ4ScreenShot0013.JPG

    2) NEVER heard about this problem. Are you sure it is caused by CvMainInterface.py? You can check pythonerr.log to find out something.
     
  4. Ket

    Ket Composite Of A Composite

    Joined:
    Jul 26, 2006
    Messages:
    899
    Location:
    Austin, TX
    I have the updated game font file, but did not know that some how 24 hours clock was tied into it, I'll do some more testing. <tested>

    Wow i feel stupid that worked fine. It was me not turning the options on.....



    Can you upload the original cvMainInterface.py I over wrote mine and i want to test and see if its the cvMainInterface.py that is causing the loss of scrolling via the mouse or something else...

    :)
     
  5. NeverMind

    NeverMind Proud to be Russian

    Joined:
    Apr 29, 2005
    Messages:
    618
    Gender:
    Male
    Location:
    Moscow, Russia
  6. Impaler[WrG]

    Impaler[WrG] Civ4:Col UI programmer

    Joined:
    Dec 5, 2005
    Messages:
    1,750
    Location:
    Vallejo, California
    EDIT: scroll down 2 more posts for the file
     
  7. Ket

    Ket Composite Of A Composite

    Joined:
    Jul 26, 2006
    Messages:
    899
    Location:
    Austin, TX
    All good stuff, going to try to get both Impaler and Never Minds versions in the Unaltered Gameplay team mod I am involved in as well as my composite.

    :) Looking forward to it...

    I determined that the scrolling issue was a side effect of me switching to window mode, so I don't think thats actually a bug, but more to do with my insane screen resolution running wide screen none the less it is not influenced by any of this code.
     
  8. Impaler[WrG]

    Impaler[WrG] Civ4:Col UI programmer

    Joined:
    Dec 5, 2005
    Messages:
    1,750
    Location:
    Vallejo, California
    Heres a MainScreen that incorporates a few additional improvments

    GreatPerson Bar - appears under the Tech bar and give the ETA and City of the next Great Person, by Impaler[WrG]

    MainScreenCityLoopButtons - two small white arrows above the flag loop you between cities while on the main screen, by SimCutie

    Specialist Stacker - Specialists icons don't max out and instead overlap and squeeze in until all are displayed, additionally Specialist other then Citizens are split into two columns for more efficient use of space, by TheLopez

    SpeclistButtons - The total number of available specialist 'slots' are indicated by translucent specialist heads and 'real' specialists by solids. Increasing and decreasing specialists is done by clicking the heads rather then + or - buttons which have been removed, by Impaler[WrG]

    TradeRouteTotal - The TradeRoute Label header displays the total commerce from TradeRoutes, by Impaler[WrG]

    GoldenAgeSign - When in a golden age the cities Name banner displays the Golden age character before the name, by Impaler[WrG]

    Slight repositioning of the City Screen Culture, Nationality and GreatPeopleBars for greater length and symmetry to accommodate turn counters.

    I've also removed most of the configuration options as I felt they were unnecessarily complexifiying the code. I didn't include the Great Greneral xp counter as I don't like the look of it or Sevo Raw Commerce because I'm planning on doing a better version some day.

    UPDATED: Specialists can be properly assigned when in caste system
     

    Attached Files:

  9. NeverMind

    NeverMind Proud to be Russian

    Joined:
    Apr 29, 2005
    Messages:
    618
    Gender:
    Male
    Location:
    Moscow, Russia
    Wow. &#1057;ool stuff, Impaler!

    I especially like this GP Bar. Was thinking about implementing GP points counter for next version. Combat XP Bar also could be ported direct from MilitaryAdvisor Screen, but I dont think there is enough room for it on Main Screen.

    I will implement some of these tweaks in next version and try to keep configuration options in, so that players (not modders;)) could easily change settings for their own.

    And I think you should start a new thread for this, since your changes are quite different and more complex than mine. :)
     
  10. Ket

    Ket Composite Of A Composite

    Joined:
    Jul 26, 2006
    Messages:
    899
    Location:
    Austin, TX
    Simple Merge.... With Both Impaler and NeverMinds Work
     

    Attached Files:

  11. Dancing Hoskuld

    Dancing Hoskuld Chieftain

    Joined:
    Jul 5, 2004
    Messages:
    20,649
    Gender:
    Male
    Location:
    Canberra, Australia
    Ket, I tried to download your file twice. ZIP says it is broken!
     
  12. DrJambo

    DrJambo Crash-test dummy

    Joined:
    Dec 27, 2001
    Messages:
    922
    Location:
    Athens of the North (Edinburgh)
    I'm really liking Nevermind's mainscreen mod and I would love to see the GP bar on the mainscreen *hint*hint*! :)

    I've not yet tried Impaler's, but it doesn't appear to have the Attitude icons, which is something I couldn't do without.

    Ket, what does the combination contain exactly and are all the options you've combined configurable? The file doesn't open.
     
  13. Ket

    Ket Composite Of A Composite

    Joined:
    Jul 26, 2006
    Messages:
    899
    Location:
    Austin, TX
    Open the file using winrar, due to the forum not accepting .rar files I just changed the name to zip. Should work fine.

    Nothing was removed in the merge, but attitude icons are still in there.
     
  14. DrJambo

    DrJambo Crash-test dummy

    Joined:
    Dec 27, 2001
    Messages:
    922
    Location:
    Athens of the North (Edinburgh)
    How do I get to use the GP bar in the merged file?
     
  15. DrJambo

    DrJambo Crash-test dummy

    Joined:
    Dec 27, 2001
    Messages:
    922
    Location:
    Athens of the North (Edinburgh)
    Nevermind, any chance of you adding the GP bar to your excellent main screen mod? :)
     
  16. NeverMind

    NeverMind Proud to be Russian

    Joined:
    Apr 29, 2005
    Messages:
    618
    Gender:
    Male
    Location:
    Moscow, Russia
    I'm going to update MSM in a few days, now busy with some other mods for BtS :)

    And you could use merged file by Ket. GP Bar is shown not right from the start, but since one of your cities generates first GP point.
     
  17. DrJambo

    DrJambo Crash-test dummy

    Joined:
    Dec 27, 2001
    Messages:
    922
    Location:
    Athens of the North (Edinburgh)
    I tried replacing Ket's merged file with yours in a saved game and the GP bar didn't materialise. Moreover, after examining at city, the layout of the specialists was producing some strange graphical artifacts on the main screen when the city view was closed. So I reverted back.
     
  18. Ket

    Ket Composite Of A Composite

    Joined:
    Jul 26, 2006
    Messages:
    899
    Location:
    Austin, TX
    Im currently looking into those artifacts...
     
  19. DrewTate

    DrewTate Chieftain

    Joined:
    Sep 4, 2005
    Messages:
    596
    This would be a whole lot easier if you would just throw attitude icons in there yourself since you seem a lot better with computers than folks like me.

    I don't know what to do and I don't want to try and get tricky with my computer and ruin the game.
     
  20. NeverMind

    NeverMind Proud to be Russian

    Joined:
    Apr 29, 2005
    Messages:
    618
    Gender:
    Male
    Location:
    Moscow, Russia
    I would like to keep this mod in simple "one-file" mode, but maybe you are right..."Attitude Icons" is a must have enhancement.

    Here is MSM including Attitude Icons file by Turlute. Just unpack it right to your CustomAssets folder (...My Documents\My Games\Beyond the Sword\CustomAssets). And dont forget to turn on 24 Hours Clock in Options.
     

Share This Page