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

TAM V.091 Testing

Discussion in 'Civ4 - The Ancient Mediterranean MOD' started by graywarden, Jul 3, 2010.

  1. graywarden

    graywarden King

    Joined:
    Dec 6, 2007
    Messages:
    819
    Ambrox,

    Looks like a graphical bug here. The Iberian slingers have a ghostly look about them.:eek:
     

    Attached Files:

  2. ono-neko

    ono-neko Prince

    Joined:
    Oct 4, 2005
    Messages:
    441
    Location:
    SEA, Earth (+7 GMT)
    Yay! Testing phase! and ghost units! :D Can I do a beta testing as well? :)
     
  3. graywarden

    graywarden King

    Joined:
    Dec 6, 2007
    Messages:
    819
    I anticipate version .091 to be released if not this week, next week. There are only a few minor bugs that need to be fixed that we know of now. Then everybody can test it.
    Ambrox had some computer problems last week and of course this is a Holiday weekend here, so hopefully he will be able to fix the known bugs and be able to release soon. I know this is his intention. ;)
     
  4. ambrox62

    ambrox62 Emperor

    Joined:
    Mar 24, 2005
    Messages:
    1,294
    Hi Gray,
    I'm back and fully operative now.
    Do you see ghostly slinger in civilopedia also?
     
  5. graywarden

    graywarden King

    Joined:
    Dec 6, 2007
    Messages:
    819
    Glad your back.... ;)

    No it is non-ghostly. I think it may have cleared out yesterday after I rebooted. It appears that may have been a false alarm.

    I have tweaked the Dense Forest a little. They were producing half the yield as a regular forest, and I also tweaked the yield when they are removed. They were a bit backwards to me. BTW. i will upload the affected files to the server later today.
     
  6. LeMAD

    LeMAD Chieftain

    Joined:
    Jun 17, 2006
    Messages:
    9
  7. LeMAD

    LeMAD Chieftain

    Joined:
    Jun 17, 2006
    Messages:
    9
    Couldn't load it, leaderheads don't work, and there seems to have other errors before it crashes.

    Bts 3.19 (french) with better AI mod.


    edit: ok nvm, better AI was the problem. Sadly it seems you can't load both at the same time. Which sucks because better AI is what civ4 should have been from the start. Any plans to merge the two together in the future?
     
  8. Dertuek

    Dertuek Chieftain

    Joined:
    Aug 5, 2008
    Messages:
    22
    Location:
    France
    Hello,
    First of all, thx for your mod, perhaps the first i played!

    I took a look at two minor but annoying problems

    1/ The message "You recieved 20 gold by plundering!" is displayed even when another civilization kills a merchant vessel

    in cvEventManager.py, at line 407, i replaced
    Code:
    CyInterface().addImmediateMessage("You recieved 20 gold by plundering!","")
    with
    Code:
    CyInterface().addMessage(pWinner.getOwner(),True,15,localText.getText("TXT_KEY_EVENT_PLUNDER_MERCHANT_VESSEL",()),'AS2D_BUILD_BANK',0,'',gc.getInfoTypeForString("COLOR_GREEN"),-1,-1,false,false)
    Notice I used a new tag instead of harcoded sentence to allow translation (I added it in TAM_GameText_Events_BTS.xml)

    2/ Promotions "xxx weapons"
    Each time a unit moves on a city, it gains the adequate weapon promotion even if it already has it and, more annoying, a unit can lose its promotion and gain a worse one instead (for example, a unit with iron weapons can lose it and gains bronze/copper/nothing weapons instead if you lose access to iron between the time you gain the iron promotion and the time you move again on a city)

    in cvEventManager.py again, at line 602, i replaced
    Code:
                    self.removeWeaponPromotions(objUnit)
                    # CyInterface().addMessage(pUnit.getOwner(),True,25,'An enemy Treant has appeared in the Ancient Forest.','AS2D_FEATUREGROWTH',1,'Art/Interface/Buttons/Units/Treant.dds',ColorTypes(8),newUnit.getX(),newUnit.getY(),True,True)
    
                    # If the city is connected to iron and coal then give the new unit the steel weapons promotion
                    if(objCity.hasBonus(gc.getInfoTypeForString("BONUS_IRON")) and objCity.hasBonus(gc.getInfoTypeForString("BONUS_TIMBER")) and team.isHasTech(gc.getInfoTypeForString("TECH_STEEL"))):
                            objUnit.setHasPromotion(gc.getInfoTypeForString("PROMOTION_STEEL_WEAPONS"), True)
                            ##CyInterface().addImmediateMessage("Your unit has been re-outfitted with Steel weapons!","")
                            CyInterface().addMessage(objUnit.getOwner(),True,25,'Your unit has been re-outfitted with Steel weapons!','AS2D_FEATUREGROWTH',1,'Art/Interface/Buttons/Promotions/weapons_steel.dds',ColorTypes(8),objUnit.getX(),objUnit.getY(),True,True)
                    # If the city is connected to iron then give the new unit the iron weapons promotion
                    elif(objCity.hasBonus(gc.getInfoTypeForString("BONUS_IRON"))):
                            objUnit.setHasPromotion(gc.getInfoTypeForString("PROMOTION_IRON_WEAPONS"), True)
                            CyInterface().addMessage(objUnit.getOwner(),True,25,'Your unit has been re-outfitted with Iron weapons!','AS2D_FEATUREGROWTH',1,'Art/Interface/Buttons/Promotions/weapons_iron.dds',ColorTypes(8),objUnit.getX(),objUnit.getY(),True,True)
                    # If the city is connected to copper and tin then give the new unit the bronze weapons promotion
                    elif(objCity.hasBonus(gc.getInfoTypeForString("BONUS_COPPER")) and objCity.hasBonus(gc.getInfoTypeForString("BONUS_TIN")) ):
                            objUnit.setHasPromotion(gc.getInfoTypeForString("PROMOTION_BRONZE_WEAPONS"), True)
                            CyInterface().addMessage(objUnit.getOwner(),True,25,'Your unit has been re-outfitted with Bronze weapons!','AS2D_FEATUREGROWTH',1,'Art/Interface/Buttons/Promotions/weapons_bronze.dds',ColorTypes(8),objUnit.getX(),objUnit.getY(),True,True)
                    # If the city is connected to copper then give the new unit the copper weapons promotion
                    elif(objCity.hasBonus(gc.getInfoTypeForString("BONUS_COPPER"))):
                            objUnit.setHasPromotion(gc.getInfoTypeForString("PROMOTION_COPPER_WEAPONS"), True)
                            CyInterface().addMessage(objUnit.getOwner(),True,25,'Your unit has been re-outfitted with Copper weapons!','AS2D_FEATUREGROWTH',1,'Art/Interface/Buttons/Promotions/weapons_copper.dds',ColorTypes(8),objUnit.getX(),objUnit.getY(),True,True)
    
    with
    Code:
    		if(objUnit.isHasPromotion(gc.getInfoTypeForString("PROMOTION_STEEL_WEAPONS"))):
    			iWeaponType = 4
    		elif(objUnit.isHasPromotion(gc.getInfoTypeForString("PROMOTION_IRON_WEAPONS"))):
    			iWeaponType = 3
    		elif(objUnit.isHasPromotion(gc.getInfoTypeForString("PROMOTION_BRONZE_WEAPONS"))):
    			iWeaponType = 2
    		elif(objUnit.isHasPromotion(gc.getInfoTypeForString("PROMOTION_COPPER_WEAPONS"))):
    			iWeaponType = 1
    		else:
    			iWeaponType = 0
    
    		# If the city is connected to iron and timber then give the new unit the steel weapons promotion
    		if(objCity.hasBonus(gc.getInfoTypeForString("BONUS_IRON")) and objCity.hasBonus(gc.getInfoTypeForString("BONUS_TIMBER")) and team.isHasTech(gc.getInfoTypeForString("TECH_STEEL"))):
    			if(iWeaponType < 4):
    				self.removeWeaponPromotions(objUnit)
    				objUnit.setHasPromotion(gc.getInfoTypeForString("PROMOTION_STEEL_WEAPONS"), True)
    				CyInterface().addMessage(objUnit.getOwner(),True,20,localText.getText("TXT_KEY_EVENT_PROMOTION_STEEL_WEAPONS", ()),'AS2D_BUILD_FORGE',1,'Art/Interface/Buttons/Promotions/weapons_steel.dds',gc.getInfoTypeForString("COLOR_LIGHT_GREY"),objUnit.getX(),objUnit.getY(),True,True)
    		# If the city is connected to iron then give the new unit the iron weapons promotion
    		elif(objCity.hasBonus(gc.getInfoTypeForString("BONUS_IRON"))):
    			if(iWeaponType < 3):
    				self.removeWeaponPromotions(objUnit)
    				objUnit.setHasPromotion(gc.getInfoTypeForString("PROMOTION_IRON_WEAPONS"), True)
    				CyInterface().addMessage(objUnit.getOwner(),True,20,localText.getText("TXT_KEY_EVENT_PROMOTION_IRON_WEAPONS", ()),'AS2D_BUILD_FORGE',1,'Art/Interface/Buttons/Promotions/weapons_iron.dds',gc.getInfoTypeForString("COLOR_LIGHT_GREY"),objUnit.getX(),objUnit.getY(),True,True)
    		# If the city is connected to copper and tin then give the new unit the bronze weapons promotion
    		elif(objCity.hasBonus(gc.getInfoTypeForString("BONUS_COPPER")) and objCity.hasBonus(gc.getInfoTypeForString("BONUS_TIN")) ):
    			if(iWeaponType < 2):
    				self.removeWeaponPromotions(objUnit)
    				objUnit.setHasPromotion(gc.getInfoTypeForString("PROMOTION_BRONZE_WEAPONS"), True)
    				CyInterface().addMessage(objUnit.getOwner(),True,20,localText.getText("TXT_KEY_EVENT_PROMOTION_BRONZE_WEAPONS", ()),'AS2D_BUILD_FORGE',1,'Art/Interface/Buttons/Promotions/weapons_bronze.dds',gc.getInfoTypeForString("COLOR_LIGHT_GREY"),objUnit.getX(),objUnit.getY(),True,True)
    		# If the city is connected to copper then give the new unit the copper weapons promotion
    		elif(objCity.hasBonus(gc.getInfoTypeForString("BONUS_COPPER"))):
    			if(iWeaponType < 1):
    				self.removeWeaponPromotions(objUnit)
    				objUnit.setHasPromotion(gc.getInfoTypeForString("PROMOTION_COPPER_WEAPONS"), True)
    				CyInterface().addMessage(objUnit.getOwner(),True,20,localText.getText("TXT_KEY_EVENT_PROMOTION_COPPER_WEAPONS", ()),'AS2D_BUILD_FORGE',1,'Art/Interface/Buttons/Promotions/weapons_copper.dds',gc.getInfoTypeForString("COLOR_LIGHT_GREY"),objUnit.getX(),objUnit.getY(),True,True)
    
    I used again new tags and I modified sound and color ... just beacause I prefer :o

    And last point, what about translation? I translated several text in french. I wonder if you can/want use it
     

    Attached Files:

  9. ambrox62

    ambrox62 Emperor

    Joined:
    Mar 24, 2005
    Messages:
    1,294
    Very good :goodjob:
    You solved two really annoying issues. :)
    I'm not a pythonist, I wasn't able to solve them myself. :(
    Thanx !!! ;)

    Your french translation is welcome !!!
    Contact me on PM in order to exchange email address, or attach it on a post :goodjob:
     
  10. Dertuek

    Dertuek Chieftain

    Joined:
    Aug 5, 2008
    Messages:
    22
    Location:
    France
    ok I'll send you a PM soon

    Anothers issues:

    1/ Weapon promotion again
    Units can gain these promotions in any cities even those which belong to another civilizations. Maybe this feature should be restricted to cities of the same team?

    2/ I see that players with seafaring trait gain a free building in all their cities even those which aren't connected to water. Is it normal? I wonder because I saw in python a condition "iscoastal" in comment

    3/ Sometimes, when I raze a city, I get a "can't find type enum for type tag EVENTTRIGGER_PARTISANS" error
    Two solutions:
    - remove code related to partisan in cvEventManager.py (onCityRazed)
    - add tags EVENT_PARTISANS_1 + EVENT_PARTISANS_2 in CIV4EventInfos.xml and EVENTTRIGGER_PARTISANS in CIV4EventTriggerInfos.xml (and modify the civic requirement in this last tag because CIVIC_EMANCIPATION doesn't exist in TAM)
     
  11. ambrox62

    ambrox62 Emperor

    Joined:
    Mar 24, 2005
    Messages:
    1,294
    1 -> yes
    2 -> no (I don't know why "iscoastal" is in comment - may be it doesn't work?)
    3 -> I prefer the quoted solution above

    Are you able to fix the python issues above?
     
  12. graywarden

    graywarden King

    Joined:
    Dec 6, 2007
    Messages:
    819
    Dertuek,

    thanks for the python help, and for your contributions already.
    continue to post issues you find for ambrox to review and comment on, and I would like to try and keep abreast.
    any XML items you come across, I would like to review and comment on with Ambrox if you dont mind.
    as Ambrox mentioned python is our weakest link right now, Ive tried to keep the xml files clean as I can, and Ambrox is our resident graphic god... :bowdown:
     
  13. ono-neko

    ono-neko Prince

    Joined:
    Oct 4, 2005
    Messages:
    441
    Location:
    SEA, Earth (+7 GMT)
    I just want to say that Dertuek's fix in post #8 seems to be working great. I just have to make sure I added the text in XML as instructed. I wish I could help, though I can read code, but I've never mod Civ before or know what to find to change things.
     
  14. Dertuek

    Dertuek Chieftain

    Joined:
    Aug 5, 2008
    Messages:
    22
    Location:
    France
    Actually I already did the modifications for my own use ;)

    1/ weapon promotion restricted to same team => ok
    2/ iscoastal works fine
    3/ I put in comment code related to partisans

    Edit: and an adjustment of the civics screen (it seemed to me complicated at the beginning but finally so easy ... just few variables to change)
     

    Attached Files:

  15. Dertuek

    Dertuek Chieftain

    Joined:
    Aug 5, 2008
    Messages:
    22
    Location:
    France
    Regarding the seafaring free building, what about captured cities? Maybe a coastal city captured by a player with seafaring trait could gain the seafaring building (and on the contrary, a city captured by a player without the seafaring trait could lose this free building)?

    And, for change, in the file TAM_GameText_Objects_BTS.xml:

    TXT_KEY_CIV_BABYLON_DESC, TXT_KEY_CIV_BABYLON_SHORT_DESC and TXT_KEY_CIV_BABYLON_ADJECTIVE tags already exist in Civ_Babylon.xml

    The following tags seem useless. I put the tag really used in brackets:
    TXT_KEY_UNIT_BABYLON_BOWMAN (TXT_KEY_UNIT_BABYLONIAN_ARCHER in TAM_Units_UnitCombats.xml)
    TXT_KEY_BUILDING_BABYLON_GARDEN (TXT_KEY_BUILDING_BABYLON_GARDEN_TAM in TAM_Buildings_Wonders_Projects.xml )
    TXT_KEY_LEADER_HAMMURABI (TXT_KEY_LEADER_BABYLON in Civ_Babylon.xml)
    TXT_KEY_LEADER_DARIUS (TXT_KEY_LEADER_PERSIA in Civ_Persia.xml)
    TXT_KEY_LEADER_BOUDICA (TXT_KEY_LEADER_BRITONS in Civ_Britons.xml)
    TXT_KEY_BUILDING_MAUSOLEUM_OF_MAUSSOLLOS (TXT_KEY_BUILDING_MAUSOLOS in TAM_Buildings_Wonders_Projects.xml)
    TXT_KEY_BUILDING_STATUE_OF_ZEUS (TXT_KEY_BUILDING_PARTHENON_ZEUS in TAM_Buildings_Wonders_Projects.xml)
     
  16. ono-neko

    ono-neko Prince

    Joined:
    Oct 4, 2005
    Messages:
    441
    Location:
    SEA, Earth (+7 GMT)
    I've been trying to merge Civ4lert into TAM, or do something similar using the code from other mod. However, for whatever reason, I cannot get it to display the alert that a city will grow in the next turn. It gives other alerts, such as will be unhappy or unhealty, as well as has grown, fine without problem.

    Another one I wish I could add is to add AI's attitude in the scoreboard. From what I can find, the gamefont_75.tga file needs to be updated, and other sort of things need to be added, which is beyond my current ability in modding.

    Since Dertuek has been so kind in fixing TAM's python, maybe you can do these things? :) I can always dream and hope someone could add these things, or even better, merge BUG into TAM :D
     
  17. graywarden

    graywarden King

    Joined:
    Dec 6, 2007
    Messages:
    819
    Dertuek,

    1) Seafaring (ideas) hold onto them (ideas). I am expecting some exciting developments in the coming week regarding the TAM development group. Laurino, an old original member who has been on sabbatical for some time is expected to rejoin. I have also submitted you to become a member as well to Ambrox and Thamis.
    What this means is the "ideas" and "improvements" we all want to see can be discussed and decided upon together as a team.
    A lot of what was "broken" in TAM is because we got away from a good team structure, and things got piece-mealed in, especially about the time it was converted to BTS.

    2) duplication of some files came about because of the afore mentioned processes and we are aware of them. if you dont mind keep your list on these until we can reform as a team, and set about refining the mod. a quick deletion of these xml tags seems easy enough, and im sure there are more, but i would like to wait on these since they are not "breaking" anything at the moment.

    looking forward to working with you SOON on the TAM DEV!
     
  18. Dertuek

    Dertuek Chieftain

    Joined:
    Aug 5, 2008
    Messages:
    22
    Location:
    France
    @ono-neko: I'd like too but I'm quite new to python & civ4 modding and BUG is too complicated for now. I spend some times in order to understand how it works but perhaps it will come to nothing :crazyeye:

    @graywarden: Why not but keep in mind my motivation can be very ... fluctuating. One week, I'd spend all my time on modding, the next one I wouldn't even start the computer
     
  19. ono-neko

    ono-neko Prince

    Joined:
    Oct 4, 2005
    Messages:
    441
    Location:
    SEA, Earth (+7 GMT)
    I am just glad to hear that TAM is reforming the team again. That's the best news I can ever hope for :) I wish I could help in anyway, but my knowledge includes only limited knowledge of XML tags, and reading codes only (I've never done any coding with python).
     
  20. ono-neko

    ono-neko Prince

    Joined:
    Oct 4, 2005
    Messages:
    441
    Location:
    SEA, Earth (+7 GMT)
    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.

    Edit again: Attachment is removed due to updated version of CvMainInterface.py has been given in post#30 of this thread.
     

Share This Page