Advertisement
Civilization Fanatics' Center  

Welcome to Civilization Fanatics' Center.

You are currently viewing our site as a guest which gives you limited access to our site features. By joining our free community, you will be able to participate in the discussions, search the forum, send private messages, vote in polls, upload your own screenshots to the gallery, and access many other special features. Registration is fast, simple and absolutely free, so sign up today! If you have any problems with the registration process or your account login, please contact support.

Go Back   Civilization Fanatics' Forums > CIVILIZATION IV > Civ4 - Creation & Customization

Notices

Reply
 
Thread Tools
Old Feb 02, 2008, 12:06 PM   #1
macantas
Chieftain
 
Join Date: Mar 2007
Posts: 15
Help! My promotions aren't promoting!

I've been racking my brain, trying to figure out why this isn't working, so I thought I'd open it up to the minds out there.

I'm using the editor that Kael made to create FFH, but for a mod that is more closely similar to the Charlemagne scenario from BtS. Actually, I've stripped the Charlemagne scenario of all its Python scripts, so I'm using the base XML that came with it, but have completely rewritten the Civilizations, Leaders, added a new Academy building, and new promotions.

Everything is working fine, except the promotions I've entered. My idea was to have unique promotions available to the 10 different civilizations I've made. Each civ can build a special academy building unique to its own civ, which will give all new units a free starting promotion. These promotions can only be achieved through this method.

I followed the Doctrine Only method I'd noticed in Total Realism. Basically, there is a promotion called DOCTRINE_ONLY which is available to NO UnitCombats so that no unit can ever achieve it. The construction of the academy will give a unit (let's say a Pyrean Warrior) a free Pyrean I promotion, whose prereq promo is Doctrine_Only. This means that Pyrean I cannot be achieved except through the presence of a Pyrean Academy. This part works fine (after some debugging).

The problem is, when this Pyrean Warrior gets enough experience, it should be able to upgrade to the Pyrean II promotion (which is dependent only on having Pyrean I already). But instead, the unit only has access to the other promotions it would normally have (ie. combat1, shock1, etc).

Is there something I have forgotten to do or overlooked? Or is this example so convoluted in itself that only through looking through the code will the answer become evident? I've looked through several times, and am pretty confident Kael's Editor I'm using isn't making any mistakes (I did go through several of the VisualBasic code for the Editor, to ensure that there's no FFH factors playing into my non-FFH mod).

Any ideas/comments?
macantas is offline   Reply With Quote
Old Feb 02, 2008, 02:50 PM   #2
ddrekins
Event Master
 
ddrekins's Avatar
 
Join Date: Aug 2007
Location: 2 food, 2 commerce plot in Utah
Posts: 89
Have you been using the PreReq or the PreReqOr tag in the XML? Have you tried using both? (probably not at the same time)

I'm not too familiar with the Promotions dealie yet, I'm going to probably start making some headway in creating a new XML editor on Monday when I get some information regarding nested XML elements. Darn you Excel!! (*Shakes fist*)

I may be able to help with most XML problems within a couple of weeks but you probably won't have to wait that long because someone else will probably come up with the answer soon.
ddrekins is offline   Reply With Quote
Old Feb 02, 2008, 03:48 PM   #3
macantas
Chieftain
 
Join Date: Mar 2007
Posts: 15
Hmmm. I tried your suggestion, but alas nothing changed. Is there any Python set up required for new promotions beyond what goes in the XML files?

Thanks for the idea though.
macantas is offline   Reply With Quote
Old Feb 02, 2008, 04:01 PM   #4
Deon
Lt. of Mordor
 
Deon's Avatar
 
Join Date: Jan 2008
Location: St.Petersburg, Russian Federation
Posts: 2,814
Can you post the code in the {spoiler} ? It will help to help you =). Not all the code needed, just the promotions part .
__________________
My Buildings For Civilization

"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." - Lao Tzu
Deon is offline   Reply With Quote
Old Feb 02, 2008, 04:06 PM   #5
ddrekins
Event Master
 
ddrekins's Avatar
 
Join Date: Aug 2007
Location: 2 food, 2 commerce plot in Utah
Posts: 89
I don't see anything in the Python that deals with this. It is possible that I missed it though.
ddrekins is offline   Reply With Quote
Old Feb 02, 2008, 04:16 PM   #6
macantas
Chieftain
 
Join Date: Mar 2007
Posts: 15
Here's the 3 promotions for Doctrine, Pyrean1 and Pyrean2. The problem is getting Pyrean2 to be available to a melee (or any) unit once they have Pyrean1.

Sorry the formatting doesn't work on the Spoiler. Is there a way to keep the indentations?

Spoiler:
<PromotionInfo>
<Type>PROMOTION_DOCTRINE</Type>
<Description>TXT_KEY_PROMOTION_DOCTRINE</Description>
<Sound>AS2D_IF_LEVELUP</Sound>
<LayerAnimationPath>NONE</LayerAnimationPath>
<PromotionPrereq>NONE</PromotionPrereq>
<PromotionPrereqOr1>NONE</PromotionPrereqOr1>
<PromotionPrereqOr2>NONE</PromotionPrereqOr2>
<TechPrereq>NONE</TechPrereq>
<StateReligionPrereq>NONE</StateReligionPrereq>
<bLeader>0</bLeader>
<bBlitz>0</bBlitz>
<bAmphib>0</bAmphib>
<bRiver>0</bRiver>
<bEnemyRoute>0</bEnemyRoute>
<bAlwaysHeal>0</bAlwaysHeal>
<bHillsDoubleMove>0</bHillsDoubleMove>
<bImmuneToFirstStrikes>0</bImmuneToFirstStrikes>
<iVisibilityChange>0</iVisibilityChange>
<iMovesChange>0</iMovesChange>
<iMoveDiscountChange>0</iMoveDiscountChange>
<iAirRangeChange>0</iAirRangeChange>
<iInterceptChange>0</iInterceptChange>
<iEvasionChange>0</iEvasionChange>
<iWithdrawalChange>0</iWithdrawalChange>
<iCargoChange>0</iCargoChange>
<iCollateralDamageChange>0</iCollateralDamageChange>
<iBombardRateChange>0</iBombardRateChange>
<iFirstStrikesChange>0</iFirstStrikesChange>
<iChanceFirstStrikesChange>0</iChanceFirstStrikesChange>
<iEnemyHealChange>0</iEnemyHealChange>
<iNeutralHealChange>0</iNeutralHealChange>
<iFriendlyHealChange>0</iFriendlyHealChange>
<iSameTileHealChange>0</iSameTileHealChange>
<iAdjacentTileHealChange>0</iAdjacentTileHealChange>
<iCombatPercent>0</iCombatPercent>
<iCityAttack>0</iCityAttack>
<iCityDefense>0</iCityDefense>
<iHillsAttack>0</iHillsAttack>
<iHillsDefense>0</iHillsDefense>
<iKamikazePercent>0</iKamikazePercent>
<iRevoltProtection>0</iRevoltProtection>
<iCollateralDamageProtection>0</iCollateralDamageProtection>
<iPillageChange>0</iPillageChange>
<iUpgradeDiscount>0</iUpgradeDiscount>
<iExperiencePercent>0</iExperiencePercent>
<TerrainAttacks>
</TerrainAttacks>
<TerrainDefenses>
</TerrainDefenses>
<FeatureAttacks>
</FeatureAttacks>
<FeatureDefenses>
</FeatureDefenses>
<UnitCombatMods>
</UnitCombatMods>
<DomainMods>
</DomainMods>
<TerrainDoubleMoves>
</TerrainDoubleMoves>
<FeatureDoubleMoves>
</FeatureDoubleMoves>
<UnitCombats>
</UnitCombats>
<HotKey></HotKey>
<bAltDown>0</bAltDown>
<bShiftDown>0</bShiftDown>
<bCtrlDown>0</bCtrlDown>
<iHotKeyPriority>0</iHotKeyPriority>
<Button>,Art/Interface/Buttons/Promotions/Combat1.dds,Art/Interface/Buttons/Promotions_Atlas.dds,8,2</Button>
</PromotionInfo>

<PromotionInfo>
<Type>PROMOTION_PYREA1</Type>
<Description>TXT_KEY_PROMOTION_PYREA1</Description>
<Sound>AS2D_IF_LEVELUP</Sound>
<LayerAnimationPath>NONE</LayerAnimationPath>
<PromotionPrereq>NONE</PromotionPrereq>
<PromotionPrereqOr1>PROMOTION_DOCTRINE</PromotionPrereqOr1>
<PromotionPrereqOr2>NONE</PromotionPrereqOr2>
<TechPrereq>NONE</TechPrereq>
<StateReligionPrereq>NONE</StateReligionPrereq>
<bLeader>0</bLeader>
<bBlitz>0</bBlitz>
<bAmphib>0</bAmphib>
<bRiver>0</bRiver>
<bEnemyRoute>0</bEnemyRoute>
<bAlwaysHeal>0</bAlwaysHeal>
<bHillsDoubleMove>0</bHillsDoubleMove>
<bImmuneToFirstStrikes>0</bImmuneToFirstStrikes>
<iVisibilityChange>0</iVisibilityChange>
<iMovesChange>0</iMovesChange>
<iMoveDiscountChange>0</iMoveDiscountChange>
<iAirRangeChange>0</iAirRangeChange>
<iInterceptChange>0</iInterceptChange>
<iEvasionChange>0</iEvasionChange>
<iWithdrawalChange>0</iWithdrawalChange>
<iCargoChange>0</iCargoChange>
<iCollateralDamageChange>0</iCollateralDamageChange>
<iBombardRateChange>0</iBombardRateChange>
<iFirstStrikesChange>0</iFirstStrikesChange>
<iChanceFirstStrikesChange>0</iChanceFirstStrikesChange>
<iEnemyHealChange>0</iEnemyHealChange>
<iNeutralHealChange>0</iNeutralHealChange>
<iFriendlyHealChange>0</iFriendlyHealChange>
<iSameTileHealChange>0</iSameTileHealChange>
<iAdjacentTileHealChange>0</iAdjacentTileHealChange>
<iCombatPercent>10</iCombatPercent>
<iCityAttack>0</iCityAttack>
<iCityDefense>0</iCityDefense>
<iHillsAttack>0</iHillsAttack>
<iHillsDefense>0</iHillsDefense>
<iKamikazePercent>0</iKamikazePercent>
<iRevoltProtection>0</iRevoltProtection>
<iCollateralDamageProtection>0</iCollateralDamageProtection>
<iPillageChange>0</iPillageChange>
<iUpgradeDiscount>0</iUpgradeDiscount>
<iExperiencePercent>0</iExperiencePercent>
<TerrainAttacks>
</TerrainAttacks>
<TerrainDefenses>
</TerrainDefenses>
<FeatureAttacks>
</FeatureAttacks>
<FeatureDefenses>
</FeatureDefenses>
<UnitCombatMods>
<UnitCombatMod>
<UnitCombatType>UNITCOMBAT_MOUNTED</UnitCombatType>
<iUnitCombatMod>10</iUnitCombatMod>
</UnitCombatMod>
</UnitCombatMods>
<DomainMods>
</DomainMods>
<TerrainDoubleMoves>
</TerrainDoubleMoves>
<FeatureDoubleMoves>
</FeatureDoubleMoves>
<UnitCombats>
<UnitCombat>
<UnitCombatType>UNITCOMBAT_ARCHER</UnitCombatType>
<bUnitCombat>1</bUnitCombat>
</UnitCombat>
<UnitCombat>
<UnitCombatType>UNITCOMBAT_MELEE</UnitCombatType>
<bUnitCombat>1</bUnitCombat>
</UnitCombat>
<UnitCombat>
<UnitCombatType>UNITCOMBAT_MOUNTED</UnitCombatType>
<bUnitCombat>1</bUnitCombat>
</UnitCombat>
<UnitCombat>
<UnitCombatType>UNITCOMBAT_NAVAL</UnitCombatType>
<bUnitCombat>1</bUnitCombat>
</UnitCombat>
<UnitCombat>
<UnitCombatType>UNITCOMBAT_RECON</UnitCombatType>
<bUnitCombat>1</bUnitCombat>
</UnitCombat>
<UnitCombat>
<UnitCombatType>UNITCOMBAT_SIEGE</UnitCombatType>
<bUnitCombat>1</bUnitCombat>
</UnitCombat>
</UnitCombats>
<HotKey></HotKey>
<bAltDown>0</bAltDown>
<bShiftDown>0</bShiftDown>
<bCtrlDown>0</bCtrlDown>
<iHotKeyPriority>0</iHotKeyPriority>
<Button>,Art/Interface/Buttons/Civilizations/Russia.dds,Art/Interface/Buttons/Beyond_the_Sword_Atlas.dds,4,4</Button>
</PromotionInfo>

<PromotionInfo>
<Type>PROMOTION_PYREA2</Type>
<Description>TXT_KEY_PROMOTION_PYREA2</Description>
<Sound>AS2D_IF_LEVELUP</Sound>
<LayerAnimationPath>NONE</LayerAnimationPath>
<PromotionPrereq>NONE</PromotionPrereq>
<PromotionPrereqOr1>PROMOTION_PYREA1</PromotionPrereqOr1>
<PromotionPrereqOr2>NONE</PromotionPrereqOr2>
<TechPrereq>NONE</TechPrereq>
<StateReligionPrereq>NONE</StateReligionPrereq>
<bLeader>0</bLeader>
<bBlitz>0</bBlitz>
<bAmphib>0</bAmphib>
<bRiver>0</bRiver>
<bEnemyRoute>0</bEnemyRoute>
<bAlwaysHeal>0</bAlwaysHeal>
<bHillsDoubleMove>0</bHillsDoubleMove>
<bImmuneToFirstStrikes>0</bImmuneToFirstStrikes>
<iVisibilityChange>0</iVisibilityChange>
<iMovesChange>0</iMovesChange>
<iMoveDiscountChange>0</iMoveDiscountChange>
<iAirRangeChange>0</iAirRangeChange>
<iInterceptChange>0</iInterceptChange>
<iEvasionChange>0</iEvasionChange>
<iWithdrawalChange>0</iWithdrawalChange>
<iCargoChange>0</iCargoChange>
<iCollateralDamageChange>0</iCollateralDamageChange>
<iBombardRateChange>0</iBombardRateChange>
<iFirstStrikesChange>0</iFirstStrikesChange>
<iChanceFirstStrikesChange>0</iChanceFirstStrikesChange>
<iEnemyHealChange>0</iEnemyHealChange>
<iNeutralHealChange>0</iNeutralHealChange>
<iFriendlyHealChange>0</iFriendlyHealChange>
<iSameTileHealChange>0</iSameTileHealChange>
<iAdjacentTileHealChange>0</iAdjacentTileHealChange>
<iCombatPercent>15</iCombatPercent>
<iCityAttack>0</iCityAttack>
<iCityDefense>0</iCityDefense>
<iHillsAttack>0</iHillsAttack>
<iHillsDefense>0</iHillsDefense>
<iKamikazePercent>0</iKamikazePercent>
<iRevoltProtection>0</iRevoltProtection>
<iCollateralDamageProtection>0</iCollateralDamageProtection>
<iPillageChange>0</iPillageChange>
<iUpgradeDiscount>0</iUpgradeDiscount>
<iExperiencePercent>0</iExperiencePercent>
<TerrainAttacks>
</TerrainAttacks>
<TerrainDefenses>
</TerrainDefenses>
<FeatureAttacks>
</FeatureAttacks>
<FeatureDefenses>
</FeatureDefenses>
<UnitCombatMods>
<UnitCombatMod>
<UnitCombatType>UNITCOMBAT_MOUNTED</UnitCombatType>
<iUnitCombatMod>15</iUnitCombatMod>
</UnitCombatMod>
</UnitCombatMods>
<DomainMods>
</DomainMods>
<TerrainDoubleMoves>
</TerrainDoubleMoves>
<FeatureDoubleMoves>
</FeatureDoubleMoves>
<UnitCombats>
<UnitCombat>
<UnitCombatType>UNITCOMBAT_ARCHER</UnitCombatType>
<bUnitCombat>1</bUnitCombat>
</UnitCombat>
<UnitCombat>
<UnitCombatType>UNITCOMBAT_MELEE</UnitCombatType>
<bUnitCombat>1</bUnitCombat>
</UnitCombat>
<UnitCombat>
<UnitCombatType>UNITCOMBAT_MOUNTED</UnitCombatType>
<bUnitCombat>1</bUnitCombat>
</UnitCombat>
<UnitCombat>
<UnitCombatType>UNITCOMBAT_NAVAL</UnitCombatType>
<bUnitCombat>1</bUnitCombat>
</UnitCombat>
<UnitCombat>
<UnitCombatType>UNITCOMBAT_RECON</UnitCombatType>
<bUnitCombat>1</bUnitCombat>
</UnitCombat>
<UnitCombat>
<UnitCombatType>UNITCOMBAT_SIEGE</UnitCombatType>
<bUnitCombat>1</bUnitCombat>
</UnitCombat>
</UnitCombats>
<HotKey></HotKey>
<bAltDown>0</bAltDown>
<bShiftDown>0</bShiftDown>
<bCtrlDown>0</bCtrlDown>
<iHotKeyPriority>0</iHotKeyPriority>
<Button>,Art/Interface/Buttons/Civilizations/Russia.dds,Art/Interface/Buttons/Beyond_the_Sword_Atlas.dds,4,4</Button>
</PromotionInfo>
macantas is offline   Reply With Quote
Old Feb 05, 2008, 03:14 PM   #7
macantas
Chieftain
 
Join Date: Mar 2007
Posts: 15
Okay, so in an effort to help fix this problem, I converted my entire mod to Modular programming (and for the sake of up-coming more complicated expansions). I hoped this would fix the promotions problem; it did, but created an even bigger problem.

Now, for some reason, the hierarchy of promotions are all out of wack. Initial units have free range to upgrade to every single promotion I've added (completely ignoring prerequisites), but basic Civ promotions like Shock and Cover suddenly need to have my added promotions as prereqs, even when I double check the XML to make sure everything looks the way it should.

Any ideas what could be causing this problem? Have I discovered some promotions bug, cause everything else about the mod works fine.
macantas is offline   Reply With Quote
Old Feb 05, 2008, 08:21 PM   #8
Yakk
Cheftan
 
Join Date: Mar 2006
Posts: 1,288
Code:
code tags will help spacing  Use [ code ] and [ /code ]
(without the white space around the word code, naturally)
The first thing you should do is make sure that your promotion will work without tricks. Remove the dependency on Docterine. Now can every unit get the promotion? Get the upgrade to the promotion?

I'm guessing that will work, but if it doesn't, that tells you something...

The next step I'd follow is I'd start to look at the python/SDK code that determines which promotions can be gotten.

I don't know how to fix your modular loading problems.
Yakk is offline   Reply With Quote
Old Feb 06, 2008, 10:00 AM   #9
macantas
Chieftain
 
Join Date: Mar 2007
Posts: 15
Here's the entire MOD as it is so far. Hopefully someone else out there will be able to see something I can't.

http://forums.civfanatics.com/upload...Novelworld.zip
macantas is offline   Reply With Quote
Old Feb 06, 2008, 11:27 AM   #10
Kael
Deity
 
Kael's Avatar
 
Join Date: May 2002
Location: Ohio
Posts: 17,392
This looks to be a modular loading problem. When I copy all your promotion information directly into the main promotion file it works correctly.

Specifically I suspect thast its a self-referencing issue (promotions cant refer to promotions because that promotion may not be loaded yet). The Civ4 wngine jumps through some hoops to do this, specifically it saves off the pointer until later and then comes back and builds the association. I think it is saving the pointer, then loading the modular promotion file and the pointer is now pointing to the wrong promotion (so you have weird things like a promotion that requires the 3rd promotion in the normal file now requires the 3rd promotion in the modular file).

I would recommend not using modular loading for promotions.
Kael is offline   Reply With Quote
Old Feb 06, 2008, 11:57 AM   #11
macantas
Chieftain
 
Join Date: Mar 2007
Posts: 15
I switched it back to non-modular loading for promotions, and it works ... better. At least the promotions appear to be pointing in the right direction. But that returns me to my original problem before I incorporated modular programming:

When loading the mod and viewing the Civilopedia, all appears to work as normal. But when I run it to test it, something isn't quite connecting. I build the Pyrean Academy and all future units built in that city get the free Pyrean I promotion. But when they get more experience, they are only able to add the normal promo upgrades (like Drill I, Combat I, etc) and cannot progress to Pyrean II, even though the only requirement for Pyrean II is to have Pyrean I. Any idea why that would be?
macantas is offline   Reply With Quote
Old Feb 06, 2008, 12:32 PM   #12
Kael
Deity
 
Kael's Avatar
 
Join Date: May 2002
Location: Ohio
Posts: 17,392
Works fine for me. Make sure to delete the units file from your modular directory. Any promotion file in there is going to mess up your results.

Incidently there are a few UnitAI types missing from from your BasicInfos/CIV4UnitAIInfos.xml file. Thats causing RTTI errors whenever you try to modify a unit with the worldbuilder. You should probably just delete that file from your mod, I cant think of any reason to remove entries from that file.
Kael is offline   Reply With Quote
Reply

Bookmarks

Go Back Civilization Fanatics' Forums > CIVILIZATION IV > Civ4 - Creation & Customization > Help! My promotions aren't promoting!

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Strategic Manipulation of Promotions, UUs Promotions and Permanent Alliances WilliamOfOrange Civ4 - Strategy & Tips 10 Jun 07, 2009 06:03 PM
Promoting Raw materials SerriaFox Civ4Col - Creation & Customization 0 Nov 05, 2008 07:09 PM
Promoting Units Kid_icoris Civ4 - General Discussions 7 Nov 25, 2005 09:07 AM
New Nike campaign in the US promoting Footie Marla_Singer Sports Talk 32 Oct 20, 2005 11:46 PM
Promoting later end Napo981 Civ - Ideas & Suggestions 5 Jun 17, 2005 10:28 AM


Advertisement

All times are GMT -6. The time now is 07:22 AM.


Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
This site is copyright © Civilization Fanatics' Center.
Support CFC: Amazon.com | Amazon UK | Amazon DE | Amazon CA | Amazon FR