I think it should only get canceled if the relationship points change decrease it below the relationship range.
e.g. in this example, i had a mission to get the ceremonyfriend licence. and it was canceled when my relationship points increased en route to the faction rep:
a cue listener in a mod reported that my relationship points changed from 0.0209435 to 0.0221435, a change of 0.0012.
the PlayerReputation cue reported as shown below. i.e. "was friendly and is now friendly delta=0.0012"
Code: Select all
[Scripts] 20694.11 *** Context:md.PlayerReputation.Base<inst:294c493>: Player's relationship with Godrealm of the Paranid was friendly and is now friendly delta=0.0012
[Scripts] 20694.11 *** Context:md.PlayerReputation.Base<inst:294c493>: Player's relationship with Godrealm of the Paranid remains as-is.
[Scripts] 20694.11 *** Context:md.PlayerReputation.ReputationChanged<inst:29382e2>: Removing promotion mission for Godrealm of the Paranid from 4 to 4
but that doesn't happen because CalculateFactionRelation will report no change in the relationship range.
in my example above, CalculateFactionRelation set $RelationNew to 4 and $RelationOld to 4.
and this test in PlayerReputation.Base prevents a new promotion mission from getting issued.
Code: Select all
<do_if value="$RelationNew != $RelationOld">
the comments, which are egosoft's, show that this was intentional.
Code: Select all
<cue name="ReputationChanged" instantiate="true">
<conditions>
<event_player_relation_changed />
<check_value value="event.param == $Faction"/>
</conditions>
<actions>
<set_value name="$NewValue" exact="event.param2.{1}" />
<set_value name="$OldValue" exact="event.param2.{2}" />
<include_actions ref="CalculateFactionRelation" comment="Calculate faction-relation index from faction-relation value, returns $RelationNew and $RelationOld"/>
<!-- If the new reputation goes down to or below $RelationOldParam (reputation we had when we started the mission) then cancel the mission (no need for promotion) -->
<do_if value="$RelationNew le $RelationOldParam">
<debug_text text="'Removing promotion mission for ' + $Faction + ' from ' + $RelationNewParam + ' to ' + $RelationNew" chance="$DebugChance"/>
<set_value name="md.$FactionData.{$Faction}.$PromotionActive" exact="false" comment="this removed the rank-dialog option at the faction-representative"/>
<remove_mission cue="PromotionMission" type="aborted" />
<cancel_cue cue="PromotionMission"/>
</do_if>
<!-- If the current reputation is different to what we are promoted to when we started the mission, we need to update briefing-texts (and remember the new value) -->
<do_if value="$RelationNew != $RelationNewParam">
<debug_text text="'Updating RelationNewParam' + $Faction + ' from ' + $RelationNewParam + ' to ' + $RelationNew" chance="$DebugChance"/>
<set_value name="$RelationNewParam" exact="$RelationNew" />
</do_if>
</actions>
</cue>
Code: Select all
<do_if value="$RelationNew le $RelationOldParam">
Code: Select all
<do_if value="$RelationNew lt $RelationOldParam">