MODIFIER_PLAYER_ADJUST_IMPROVED_ROUTE_LEVEL

It is a MODIFIER_PLAYER so it is trying to apply to a player. Attaching it to a Great Engineer should work fine I think. Can you post your code?
 
I've actually gotten it to work now. I actually ran into two problems
1) I was expecting the argument to refer to the new route level (Where ancient = 1, medieval = 2, renaissance = 3 and modern =4) or refer to the route name directly. It actually works by adding a value (for example +1) to the current level of road. If the value is too high it doesn't apply. It might be a boolean actually....
2) Initially it (kind of) applied to the unit. If I gave the Great Engineer 2 uses, activated it the first time then waited 5 turns and activated it a second time, the bonus would apply between turns 1 and 5 but not thereafter (Since the unit would die on the 2nd use). So the unit had to be "alive", if you like, for the bonus to work. The workaround is to use a linking modifier. So the Great Engineer modifier attaches a second modifier to a players cities that actually upgrades the roads (If that makes sense).

Code is below
Code:
<Types>
        <Row Type="GREAT_PERSON_INDIVIDUAL_MCADAM" Kind="KIND_GREAT_PERSON_INDIVIDUAL"/>
</Types>
    <GreatPersonIndividuals>
        <Row GreatPersonIndividualType="GREAT_PERSON_INDIVIDUAL_MCADAM" Name="LOC_GREAT_PERSON_INDIVIDUAL_MCADAM_NAME" GreatPersonClassType="GREAT_PERSON_CLASS_ENGINEER" EraType="ERA_INDUSTRIAL" Gender="M" ActionCharges="1" ActionRequiresOwnedTile="true" ActionEffectTextOverride="LOC_GREATPERSON_MCADAM_ACTIVE" ActionEffectTileHighlighting="false"/>
    </GreatPersonIndividuals>
<GreatPersonIndividualActionModifiers>
<Row GreatPersonIndividualType="GREAT_PERSON_INDIVIDUAL_MCADAM" ModifierId="GREATPERSON_MCADAM_ACTIVE" AttachmentTargetType="GREAT_PERSON_ACTION_ATTACHMENT_TARGET_UNIT_GREATPERSON"/>
</GreatPersonIndividualActionModifiers>
<Modifiers>
        <Row>
            <ModifierId>GREATPERSON_MCADAM_ACTIVE</ModifierId>
            <ModifierType>MODIFIER_PLAYER_CITIES_ATTACH_MODIFIER</ModifierType>
        </Row>
        <Row>
            <ModifierId>GREATPERSON_MCADAM_ACTIVE_ROADS</ModifierId>
            <ModifierType>MODIFIER_PLAYER_ADJUST_IMPROVED_ROUTE_LEVEL</ModifierType>
        </Row>
</Modifiers>
<ModifierArguments>
        <Row>
            <ModifierId>GREATPERSON_MCADAM_ACTIVE</ModifierId>
            <Name>ModifierId</Name>
            <Value>GREATPERSON_MCADAM_ACTIVE_ROADS</Value>
        </Row>
        <Row>
            <ModifierId>GREATPERSON_MCADAM_ACTIVE_ROADS</ModifierId>
            <Name>ImprovedRouteLevel</Name>
            <Value>1</Value>
        </Row>
</ModifierArguments>
 
I believe the argument is referring to the amount to improve by, but I'm not sure either. Your attaching it to the unit just means that when the unit is "activated" then it applies the modifier to the player because it is a MODIFIER_PLAYER, though only while the unit is alive (because the source is the unit). However, you could also have solved this by adding <Permanent>true</Permanent> and <RunOnce>true</RunOnce> to your modifier declaration, for future reference. This lets it last after your source is gone (and assures that it doesn't get screwed up somehow, though you shouldn't actually need the RunOnce in this case afaik)
 
Back
Top Bottom