Promotion Prerequisites

Evalis

Prince
Joined
Mar 2, 2009
Messages
496
So I've run into a little issue attempting to change prerequisites. Whenever I attempt to alter the prereq, the old requirement stays. This happens regardless if I use bforceOverwrite. This issue is exclusive to loading the change via a module.

For reference I am attempting to change the guardsman promotion to combat2 instead of combat4. After loading the module however, it tells me that I now need both of those promotions.

Spoiler :
Code:
		<PromotionInfo>		<!-- Guardsman -->
			<bForceOverwrite>1</bForceOverwrite>
			<Type>PROMOTION_GUARDSMAN</Type>
			<Description>TXT_KEY_PROMOTION_GUARDSMAN</Description>
			<PrereqPromotionANDs>
				<PrereqPromotionAND>
					<PromotionType>PROMOTION_COMBAT2</PromotionType>
					<iPrereqApplications>1</iPrereqApplications>
				</PrereqPromotionAND>
			</PrereqPromotionANDs>
			<CityBonuses>
				<CityBonus>
					<bApplySelf>1</bApplySelf>
					<bApplyTeam>1</bApplyTeam>
					<fDefense>3</fDefense>
				</CityBonus>
			</CityBonuses>
			<UnitCombats>
				<UnitCombat>
					<UnitCombatType>UNITCOMBAT_MELEE</UnitCombatType>
					<iMaxApplications>0</iMaxApplications>
				</UnitCombat>
				<UnitCombat>
					<UnitCombatType>UNITCOMBAT_BEAST</UnitCombatType>
					<iMaxApplications>0</iMaxApplications>
				</UnitCombat>
			</UnitCombats>
			<Button>Art/Interface/Buttons/Promotions/Guardsman.dds</Button>
			<bTargetWeakestUnitCounter>1</bTargetWeakestUnitCounter>
		</PromotionInfo>
 
Known issue. I had similar problems when trying to fix the Giantkin Seasoned promotion by module, and ended up having to use a rather terrible workaround for it. To my knowledge 'force overwrite' doesn't work properly for promotions, and unfortunately I don't have a fix for it that doesn't involve editing the original files.
 
@derf
I would do it as following (but haven't tested it so I don't know if it'll work:
<promotionprerquist>NONE<promotionprerquist> (same label as the one linking "combat_4" in the original RifE xml.)
<promotionprerquistOr1>combat_2<promotionprerquistOr1>
the first NONE should overwrite the initial "combat_4" while the Or1 prerequist will allow a first choice for parent promotion, and if you don't fill in a second choice, it would be the only one.

(for <promotionprerquist> I'm not sure of the actual syntaxe in RifE... you'll have to check the one which is linked to combat_4 for the guardsman promotion)

(Edit : I suppose that would be <PrereqPromotionANDs>NONE<PrereqPromotionANDs> ???)

or can't you do :

<PrereqPromotionAND>
<PromotionType>PROMOTION_COMBAT4</PromotionType>
<iPrereqApplications>0</iPrereqApplications>
</PrereqPromotionAND>
 
I'm not entirely sure. In theory setting it to 2 (as it was for the Giantkin promotes pre-fix) will ensure it won't get picked up, as Combat 2/4 aren't stackables, so you can't acquire them more than once. This *should* be picked up by the game, and if it is you've effectively blocked access to the promotion.

What you can do then is create a replacement promotion that's identical to the original except for the change you want to make, and it should function.

This should work for what Evalis has in mind, providing nothing depends on the Guardsman Promotion. I don't think anything does, but then if it does it's a simple matter to add a PromotionPrereqOr line, so it'll work off the original, blocked one or the available replacement one.


On the use of that, if the And one set to NONE doesn't work (Which is what I suspect), you'll only end up adding the Or as an alternative requirement to the existing one - ie Combat 2 OR Combat 4 as a prereq. This isn't really what's desired.
 
Top Bottom