Player suporter/kingdom AI lords use incorrect reinforcement cost rent decision

Users who are viewing this thread

Tingyun

Knight at Arms
Player kingdom lords don't have their reinforcement costs changed by campaign difficulty, they are always set to moderate:

    (store_faction_of_party, ":party_faction", ":party_no"),
      (try_begin),
        (this_or_next|eq, ":party_faction", "fac_player_supporters_faction"),
        (eq, ":party_faction", "$players_kingdom"),
        (assign, ":reinforcement_cost", reinforcement_cost_moderate),
      (else_try),
        (options_get_campaign_ai, ":reduce_campaign_ai"), #moto chief
        (assign, ":reinforcement_cost", reinforcement_cost_moderate),
        (try_begin),
          (eq, ":reduce_campaign_ai", 0), #hard
          (assign, ":reinforcement_cost", reinforcement_cost_hard),
        (else_try),
          (eq, ":reduce_campaign_ai", 1), #moderate
          (assign, ":reinforcement_cost", reinforcement_cost_moderate),
        (else_try),
          (eq, ":reduce_campaign_ai", 2), #easy
          (assign, ":reinforcement_cost", reinforcement_cost_easy),
        (try_end),
      (try_end),

But the rent collection decision for them is made as if they do change with difficulty level:

    #MOTO chief collect rents only when it actually helps recruit
            # (assign, ":score_to_beat", 300), #at least 300 gold to pick up MOTO equals reinforcement_cost_hard
            (options_get_campaign_ai, ":reduce_campaign_ai"),
            (try_begin),
              (eq, ":reduce_campaign_ai", 0), #hard
              (assign, ":score_to_beat", reinforcement_cost_hard),
            (else_try),
              (eq, ":reduce_campaign_ai", 2), #easy
              (assign, ":score_to_beat", reinforcement_cost_easy),
            (else_try),
              (assign, ":score_to_beat", reinforcement_cost_moderate),
            (try_end),
            (val_mul, ":score_to_beat", 4),    # 4/3 "hiring budget" from script_hire_men_to_kingdom_hero_party
            (val_div, ":score_to_beat", 3),
            (val_div, ":score_to_beat", 2),    #parties that can't afford to recruit are willing to go get half of what they need
            #MOTO end collect rents only when it actually helps recruit
           

There are other similar instances of the same mistake, all easily found by searching module_scripts.py for ":reduce_campaign_ai"

They should be changed so that the player kingdom lords have their AI decision making matching the reinforcement cost actually applied to them.
 
Back
Top Bottom