need basic help with unit promotions

tesb

Emperor
Joined
Jan 16, 2010
Messages
1,593
Hi,

in the new version of the modmod Fall from Heaven II: Wildmana (http://forums.civfanatics.com/forumdisplay.php?f=366)
there are buyable unitpromotions added (gear/items =*) and i just wanted to add new ones.

the best way would be a link to or a little tutorial itself.
the hard way would be anwsering me many noob questions:

1) I tried the xml Editor but liked the standart windows Editor better (for adding stuff), is there a Problem with using the Editor in general?
2) If i just copy an Item* and rename it it does not show up
2a) how do i create an Item* which is linked to the civilpedia
2b) how do i add descriptions to it
3) Is there a List with the existing unit promotions/abilities i.e. flying equals what code?

if those basics are setteld there are many more questions to come i guess.

thanks in advance,
tesb.
 
1) I (and at least half the modders here) recommend notepad++, free, powerful, easy to use. Google it.

2) when you say "item" you mean a promotion right? Not sure on that one, there's probably all kinds of crazy stuff going on in FfH, let alone some modmod. You should be able to copy and paste a regular promotion and it will show up, so there must be something going on in the SDK or python.

2a) & b
Code:
<PromotionInfo>
			<Type>PROMOTION_OPERATIONS1</Type>
			<Description>[COLOR="Blue"]TXT_KEY_PROMOTION_OPERATIONS1[/COLOR]</Description>
			<Sound>AS2D_IF_LEVELUP</Sound>
			<LayerAnimationPath>NONE</LayerAnimationPath>
			<PromotionPrereq>PROMOTION_TACTICS2</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/>
			<TerrainDefenses/>
			<FeatureAttacks/>
			<FeatureDefenses/>
			<UnitCombatMods/>
			<DomainMods/>
			<TerrainDoubleMoves/>
			<FeatureDoubleMoves/>
			<UnitCombats>
				<UnitCombat>
					<UnitCombatType>UNITCOMBAT_COMMANDER</UnitCombatType>
					<bUnitCombat>1</bUnitCombat>
				</UnitCombat>
			</UnitCombats>
			<HotKey/>
			<bAltDown>0</bAltDown>
			<bShiftDown>0</bShiftDown>
			<bCtrlDown>0</bCtrlDown>
			<iHotKeyPriority>0</iHotKeyPriority>
			<Button>,dummy.dds,Art/Interface/Buttons/Commanders.dds,1,1</Button>
			<iCommandRange>1</iCommandRange>
			<iControlPoints>5</iControlPoints>
		</PromotionInfo>

don't know what your talking about, if you adding this exact promotion in your mod it would show up in the pedia only doing exactly that. Of course it won't work, but thats another story. 2b the description is the blue text. I could literally write "Operations I" in that area and it would look identical in the game, the only good reason the coders didn't do it like that is because the game is for multiple languages.

I don't even understand question 3.

you might get better support for these kind of Q's in the modmod's folder or the FfH folder.

Shiggs
 
1) notepad++ is really nice, but normal editor works also
2) to rename an item you need to modify the <type> entry. If you copy a promotion and change the type to PROMOTION_JUST_A_TEST it will show up
2a) linking in the pedia is done automatically as long as you use the <bgear> tag for a promotion it will show up in the gear list
2b) add a TXT_KEY_X to the Description line and add the same TXT_KEY to Assets\XML\Text\Civ4Equipment.xml
3) If you open EQUIPMENT_CIV4UnitSchema.xml and then search for "PromotionInfo" you will see a list of all possible data entries. bflying for example is one of them.
some of them are explained in the FFH2 modding guide http://forums.civfanatics.com/showthread.php?t=238077
 
edit: this post was created befor i read sephis reply

thanks for the answer i got it to work, but i have still some issues:
i post them in pictures they say it better :D
picture 1)
i wanted to include a byable flying carpet for adepts pic one is the code itself, i just copied the code from a similiar item (spellbook) and tweaked it (gold cost, requirements ect.)
the code that i have drawn with a red circle gave me troubles though
picture 2) and 3)
ingame, using the worldbulder to give me the appropriate techs and buildings and gold, i get problems with the description and the ability (no terrain cost, no defensive bonus, ignore terrain cost are not listed

how can i fix this?

to the my initial question 3: I just wanted to ask what the code for certain (all) promotions are for example:
if i want to give it an withdrawal chance i type ==>
<iWithdrawalChange>0</iWithdrawalChange>
(and the numder between is the actual bonus)
 
did you test if the archmage in the picture can walk over the ocean? THen you should know if the carpet works.
 
Ha it worked!

just one last question, were can i find the little pictures for the items and what it the best way to create new ones?

My very thanks to you guys :)
 
buttons use a 64x64 dds file.

search for tutorial to create new buttons, I guess you should find some on this forum.
 
Back
Top Bottom