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

Enhanced Great People

Discussion in 'Civ4 - Mod Components' started by platyping, Apr 27, 2013.

  1. platyping

    platyping Sleeping Dragon

    Joined:
    Oct 22, 2010
    Messages:
    4,626
    Location:
    Emerald Dreams
    I created 5 each not for users to add all to same mod :D
    It is just a choice for modders to choose which effects they want.
    Usually, I think 2 each is more than enough.

    Also, it is up to modders to add more requirements like I mentioned, civic, religion, civilization, leader, war status etc to restrict when the abilities can be used.

    I only made these as a base, then it is up to individuals to design and modify to suit their mods :D
     
  2. hrochland

    hrochland Prince

    Joined:
    Apr 9, 2006
    Messages:
    2,142
    Location:
    Czech Kingdom
    Of course . If your Modcomp was bad, I did not write here my comments. :)
    It is possible - please - add an event , the birth of a great person with no added features?
    thanks, Platy.
    I appreciate your work , but I'm watching how balanced is my mod :)
     
  3. platyping

    platyping Sleeping Dragon

    Joined:
    Oct 22, 2010
    Messages:
    4,626
    Location:
    Emerald Dreams
    Done, special service since 80% of my artwork came from you :D
    Only 20% of Great People has access to new abilities.
     

    Attached Files:

  4. hrochland

    hrochland Prince

    Joined:
    Apr 9, 2006
    Messages:
    2,142
    Location:
    Czech Kingdom
    Thanks :) I'm running home to try it :)
     
  5. platyping

    platyping Sleeping Dragon

    Joined:
    Oct 22, 2010
    Messages:
    4,626
    Location:
    Emerald Dreams
    Cut short some lines in CvGameUtils, no change in effects
    This mod component is also pretty much complete.
    5 each should be enough choices to choose from.
     
  6. hrochland

    hrochland Prince

    Joined:
    Apr 9, 2006
    Messages:
    2,142
    Location:
    Czech Kingdom
    Hi, Platy, I have tested your help. I have some problems with. I pasted all 3 into one picture

    1 / First city start with culture 1200
    2 / system write some tab
    3 / after save, restart game and load is game confused. was born prophet with general icon and unit is not possible use (I click on button and nothing) :(

    I almost forgot. G. General unit is not possible attach with unit and not give 20 exp
     
  7. platyping

    platyping Sleeping Dragon

    Joined:
    Oct 22, 2010
    Messages:
    4,626
    Location:
    Emerald Dreams
    As I recall, your mod has too many python codes so you may have problems merging in the modifications.

    The 2 files attached are meant to replace the old ones of the latest version.
    Since I am not sure what version you have I suggest you download the latest version, replace the 2 files and try it out as standalone before merging into your heavily modified mod.

    The leader promotion is there to distinguish whether that great person can perform the new abilities or not.
    In other words he belongs to the lucky 20%
     
  8. SeekTruthFromFacts

    SeekTruthFromFacts King

    Joined:
    Nov 2, 2009
    Messages:
    656
    This is an amazing modcomp - thank you for your hard work.

    Metropolis looks way too powerful though. It could change you from an also-ran into an unstoppable empire almost overnight!
     
  9. platyping

    platyping Sleeping Dragon

    Joined:
    Oct 22, 2010
    Messages:
    4,626
    Location:
    Emerald Dreams
    It only changes 1 small town to fully built city.
    How is that op considering you most likely have > 10 cities by the time it is useful? :D
     
  10. platyping

    platyping Sleeping Dragon

    Joined:
    Oct 22, 2010
    Messages:
    4,626
    Location:
    Emerald Dreams
    Updates

    Took out events files from modules.
    Those 2 files don't work well in modules.
     
  11. Bataknese

    Bataknese Horas Bah..

    Joined:
    Jun 3, 2009
    Messages:
    51
    Location:
    Indonesia
    I can't see the description text when i hover that button ingame..
    what i've been missed??
     
  12. platyping

    platyping Sleeping Dragon

    Joined:
    Oct 22, 2010
    Messages:
    4,626
    Location:
    Emerald Dreams
    If it happens in the downloaded mod then let me know.
    Else, if it happens only after you merge into your own mod, then chances are you did not merge one of the files...
    Most likely, it will be CvGameUtils which is screwed if you use BUG
     
  13. Bataknese

    Bataknese Horas Bah..

    Joined:
    Jun 3, 2009
    Messages:
    51
    Location:
    Indonesia
    not sure with these instructions:
    could you give me some clue? :D
    Code:
    ## Hover Help Text
    
    g_widgetHelp = {}
    
    def setWidgetHelpText(widget, text):
    	"""
    	Assigns the literal <text> to be used as the hover text for <widget>.
    	"""
    	_setWidgetHelp(widget, "Text", lambda *ignored: text)
    
    def setWidgetHelpXml(widget, key):
    	"""
    	Assigns the XML <key> to be used to lookup the translated hover text for <widget>.
    	"""
    	_setWidgetHelp(widget, "XML", lambda *ignored: BugUtil.getPlainText(key))
    
    def setWidgetHelpFunction(widget, func):
    	"""
    	Assigns the function <func> to be called to get the hover text for <widget>.
    	
    	The function will be called each time the hover text is needed with these parameters:
    	
    		eWidgetType         WidgetTypes constant
    		data1               int
    		data2               int
    		bOption             boolean
    	
    	The first three are the ones used when creating the UI widget.
    	I have no idea what <bOption> is or where it comes from as it's supplied by the EXE.
    	"""
    	_setWidgetHelp(widget, "Function", func)
    
    def _setWidgetHelp(widget, type, func):
    	"""
    	Registers the hover text <func> for <widget> if it hasn't been already.
    	
    	Do not call this function as it is used internally by the registration functions above.
    	"""
    	if widget in g_widgetHelp:
    		BugUtil.warn("WidgetTypes %d help already registered", widget)
    	else:
    		BugUtil.debug("WidgetUtil - registering %s hover help for WidgetTypes %d: %s", type, widget, func)
    		g_widgetHelp[widget] = func
    
    	
    def getWidgetHelp(argsList):
    	"""
    	Returns the hover help text for <eWidgetType> if registered, otherwise returns an empty string.
    	
    	This function is a BugGameUtils handler registered in init.xml.
    	"""
    	eWidgetType, iData1, iData2, bOption = argsList
    	func = g_widgetHelp.get(eWidgetType)
    	if func:
    		return func(eWidgetType, iData1, iData2, bOption)
    	return u""
    EDIT:
    after 2 days of tweaking, finally i can make the hover text works with BUG :crazyeye:
     
  14. Bataknese

    Bataknese Horas Bah..

    Joined:
    Jun 3, 2009
    Messages:
    51
    Location:
    Indonesia
    How if I want to make it requires 2 great engineer (consumed)?
     
  15. platyping

    platyping Sleeping Dragon

    Joined:
    Oct 22, 2010
    Messages:
    4,626
    Location:
    Emerald Dreams
    Just do it similar to Great WarPath of Great General
     
  16. Bataknese

    Bataknese Horas Bah..

    Joined:
    Jun 3, 2009
    Messages:
    51
    Location:
    Indonesia
    works like a charm... :D
    how if more than 2 GP consumed?

    Code:
    (loopUnit, iter) = pPlayer.firstUnit(False)
    			while(loopUnit):
    				if loopUnit.getUnitType() == gc.getInfoTypeForString("UNIT_ENGINEER"):
    					loopUnit.kill(False, -1)
    					break
    				(loopUnit, iter) = pPlayer.nextUnit(iter, False)
    			(loopCity, iter) = pPlayer.firstCity(False)
     
  17. platyping

    platyping Sleeping Dragon

    Joined:
    Oct 22, 2010
    Messages:
    4,626
    Location:
    Emerald Dreams
    Then use a counter and count how many have been killed.
    In general, when it requires more than 1 unit, a.I. will not use it, since they won't keep them.
     
  18. platyping

    platyping Sleeping Dragon

    Joined:
    Oct 22, 2010
    Messages:
    4,626
    Location:
    Emerald Dreams
    1) Changed all codes to check by Unit Class Type rather than Unit Type (For mods with UUs for GP)

    2) Shifted all codes out to the separate python file, except Widgets

    3) Missions no longer activated immediately if queued via "Shift"
     
  19. Sword_Of_Geddon

    Sword_Of_Geddon Mysterious Jungle Warrior

    Joined:
    Dec 21, 2003
    Messages:
    13,490
    Gender:
    Male
    Location:
    New England, USA
    Now this is a really great idea. I don't know about you but after building a shrine I always dreaded getting a Great Prophet. This takes care of that, and adds a whole new diamension of strategy to the Great People.

    Thanks aton Platy.
     
  20. RogerBacon

    RogerBacon King

    Joined:
    Nov 16, 2003
    Messages:
    649
    Hi PlatyPing,

    Great work on this mod. I installed it last night. One bug I noticed though. In PlatyEGP.py after line 288 you need to add:
    Code:
    iTeamX = pPlayerX.getTeam()
    
    You have it in the other code block right under it so I assume it was missed during a copy/paste.
     

Share This Page