1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Great General Progress Bar (BTS 3.19)

Discussion in 'Civ4 - Graphics Modpacks' started by stolenrays, Sep 7, 2011.

  1. stolenrays

    stolenrays Deity

    Joined:
    Aug 2, 2009
    Messages:
    2,061
    Great General Progress Bar v1.3 (BTS 3.19)​


    This is a very simple mod that adds a Great General Progress Bar underneath the Research bar. It keeps a running tab of the XP accuumulated by units in comparison to XP needed for the next Great General. There is also a mouseover for the bar. Oh and don't worry, it appears after the first turn.

    There are only two files in the mod: CvMaininterface.py and the .xml text file. They are easily mergable.

    ----Notes to Modmakers-----
    Changes are commented as PIE Great General

    ------Version History--------
    Spoiler :
    Version 1.3
    -Add a Checkbox
    -Hover Text
    -Fix for initial Turn

    Version 1.2
    -Fixed for High Resolutions

    Version 1.1
    -Standalone Port

    Version 1.0
    -PIE's original integrated version


    -----------Credits-----------
    It was developed by the BUG team, ported by Pie_at for Pie's Ancient Europe so that BugUtils/EventManager are no longer needed. I simply changed the location of the bar, its demensions, and icons. Great thanks to Pie_at for porting this.:goodjob:

    Download
     

    Attached Files:

  2. isenchine

    isenchine Empress

    Joined:
    Oct 18, 2010
    Messages:
    1,774
    Location:
    Brussels, Belgium
    Thank you for this!

    By the way, do you know where is the code for the calculation of the next Great General? In Python or in the DLL?
     
  3. stolenrays

    stolenrays Deity

    Joined:
    Aug 2, 2009
    Messages:
    2,061
    Thanks and enjoy.

    I am not sure about that. The BUG/RevDCM team might have more information on that. I want to say some of it is in python because this mod adds a python element. I think it is at the end of my CvMaininterface.py file under defupdateGreatGeneralBar. I think those functions might call on the sdk code parts it coresponds to?

    Code:
    Spoiler :
    Code:
    	def updateGreatGeneralBar(self, screen):
    		if not CyInterface().isCityScreenUp():
    			pPlayer = gc.getActivePlayer()
    			iCombatExp = pPlayer.getCombatExperience()
    			iThresholdExp = pPlayer.greatPeopleThreshold(True)
    			szText = u"<font=2>" + localText.getText("TXT_NEXT_GG_EXPERIENCE", (iCombatExp, iThresholdExp)) + u"</font>"
    
    			szGreatGeneralBar = "GreatGeneralBar"
     
  4. isenchine

    isenchine Empress

    Joined:
    Oct 18, 2010
    Messages:
    1,774
    Location:
    Brussels, Belgium
    OK, thank you. You're probably right but then I can't do a thing about the sdk :(
     
  5. stolenrays

    stolenrays Deity

    Joined:
    Aug 2, 2009
    Messages:
    2,061

Share This Page