Custom Chaplain Promotion bugs

mikeejimbo

Chieftain
Joined
Jan 16, 2010
Messages
65
All right, so I'm trying to make a Chaplain promotion similar to the Apostle's, which gives it the Medic's ability. So since I figured it's basically a copy/paste of either of two existing abilities, it should be simple enough. However, even though I'm able to grant a military unit the promotion, it doesn't seem to actually do anything.

Code:
<?xml version="1.0" encoding="utf-8"?>
<GameInfo>
  <Types>
    <Row Type="PROMOTION_CLASS_SPECIAL" Kind="KIND_PROMOTION_CLASS"/>
    <Row Type="PROMOTION_CHAP" Kind="KIND_PROMOTION"/>   
  </Types>
 
  <UnitPromotions>
    <Row UnitPromotionType="PROMOTION_CHAP" Name="Holy Chaplain" Description="This unit heals your units around it." Level="1" Specialization="" Column="1" PromotionClass="PROMOTION_CLASS_SPECIAL"/>
    </UnitPromotions>
 
  <UnitPromotionClasses>
        <Row PromotionClassType="PROMOTION_CLASS_SPECIAL" Name="LOC_PROMOTION_CLASS_SPECIAL_NAME"/>
    </UnitPromotionClasses>
 
  <UnitPromotionModifiers>
    <Row>
        <UnitPromotionType>PROMOTION_CHAP</UnitPromotionType>
        <ModifierId>HOLY_CHAPLAIN</ModifierId>
    </Row>
  </UnitPromotionModifiers>
 
  <Modifiers>
        <Row>   
      <ModifierId>HOLY_CHAPLAIN</ModifierId>
            <ModifierType>MODIFIER_PLAYER_UNITS_ADJUST_HEAL_PER_TURN</ModifierType>
            <SubjectRequirementSetId>MEDIC_HEALING_REQUIREMENTS</SubjectRequirementSetId>
        </Row>
  </Modifiers>
 
  <ModifierArguments>
        <Row>
            <ModifierId>HOLY_CHAPLAIN</ModifierId>
            <Name>Amount</Name>
            <Value>5</Value>
        </Row>
        <Row>
            <ModifierId>HOLY_CHAPLAIN</ModifierId>
            <Name>Type</Name>
            <Value>ALL</Value>
        </Row>
  </ModifierArguments>
 
  <ModifierStrings>
    <Row ModifierId="HOLY_CHAPLAIN" Context="Summary" Text="LOC_ABILITY_MEDIC_HEAL_DESCRIPTION"/>
        <Row ModifierId="HOLY_CHAPLAIN" Context="Preview" Text="LOC_ABILITY_MEDIC_HEAL_MODIFIER_DESCRIPTION"/>
    </ModifierStrings>
 
</GameInfo>

That is literally the entire code of the only XML I have in the mod. I have a SQL file that changes the Warrior to PROMOTION_CLASS_SPECIAL, which I have been successfully using for a few other promotions. But I'm scratching my head at this one, since it seems like it should be simple.

I'm probably overlooking something easy - any thoughts?
 
Yeah, interestingly when I had the Permanent element in there, the promotion wasn't even available for selection. I'm not completely sure, but I think it might only be valid on Apostles.

No errors in my Database.log either.
 
Huh, that might have done it... at least when I had two damaged level 1 units, one next to a Chaplain and one not, the one next to my guy was healing 15 and the other 10. I couldn't find a good description of how healing is supposed to scale though, so in retrospect maybe that would be good to know before undertaking this.
 
Here's from GameEvents.log. No errors here, either.

Interestingly I have seen errors here when there aren't any database errors, so this is definitely a good thing to look at.

Code:
[1887371.295] [Turn: 3] Attaching Modifier <474:HOLY_CHAPLAIN> to <Unit: 131073, Owner: 3, Type: 19 Position: 30x28>.
[1887371.295] [Turn: 3] Arguments:
[1887371.295] [Turn: 3] Amount: 5
[1887371.295] [Turn: 3] Type: ALL
[1887371.295] [Turn: 3] Created Requirement <14222:ADJACENT_UNIT_REQUIREMENT> with Owner <Unit: 131073, Owner: 3, Type: 19 Position: 30x28> and Subject <Unit: 131073, Owner: 3, Type: 19 Position: 30x28>.
[1887371.295] [Turn: 3] Created Requirement Set <14223:MEDIC_HEALING_REQUIREMENTS> with Owner <Unit: 131073, Owner: 3, Type: 19 Position: 30x28> and Subject <Unit: 131073, Owner: 3, Type: 19 Position: 30x28>.
[1887371.295] [Turn: 3] Modifier <474:HOLY_CHAPLAIN> Collection Count (met/total): 1/1.
[1887371.295] [Turn: 3] Applying effect from <474:HOLY_CHAPLAIN> to <Unit: 131073, Owner: 3, Type: 19 Position: 30x28>.
 
Back
Top Bottom