Change unit types spawned for Bandits at Night encounter

Users who are viewing this thread

blacklimo

Sergeant at Arms
Does anyone know how to do this?  I have some custom units I would like to spawn instead of the normal bandits (4 different types)

I think this is the right encounter.... the random one that pops up at night when you try to enter a town and get ambushed?

Thanks
 
Thanks for the reply...


unfortunately I can't seem to brain today.... I must have the dumb.....

does it have something to do with this bit?

      (party_get_slot, ":bandit_troop", "$current_town", slot_center_has_bandits),

I can't seem to locate where the troop number/type is set for bandit_troop except in the script_update_villages_infested_by_bandits section here (parts in bold):

  #script_update_villages_infested_by_bandits
  # INPUT: none
  # OUTPUT: none
  ("update_villages_infested_by_bandits",
    [(try_for_range, ":village_no", villages_begin, villages_end),
      (try_begin),
        (check_quest_active, "qst_eliminate_bandits_infesting_village"),
        (quest_slot_eq, "qst_eliminate_bandits_infesting_village", slot_quest_target_center, ":village_no"),
        (quest_get_slot, ":cur_state", "qst_eliminate_bandits_infesting_village", slot_quest_current_state),
        (val_add, ":cur_state", 1),
        (try_begin),
          (lt, ":cur_state", 3),
          (quest_set_slot, "qst_eliminate_bandits_infesting_village", slot_quest_current_state, ":cur_state"),
        (else_try),
          (party_set_slot, ":village_no", slot_village_infested_by_bandits, 0),
          (call_script, "script_abort_quest", "qst_eliminate_bandits_infesting_village", 2),
        (try_end),
      (else_try),
        (check_quest_active, "qst_deal_with_bandits_at_lords_village"),
        (quest_slot_eq, "qst_deal_with_bandits_at_lords_village", slot_quest_target_center, ":village_no"),
        (quest_get_slot, ":cur_state", "qst_deal_with_bandits_at_lords_village", slot_quest_current_state),
        (val_add, ":cur_state", 1),
        (try_begin),
          (lt, ":cur_state", 3),
          (quest_set_slot, "qst_deal_with_bandits_at_lords_village", slot_quest_current_state, ":cur_state"),
        (else_try),
          (party_set_slot, ":village_no", slot_village_infested_by_bandits, 0),
          (call_script, "script_abort_quest", "qst_deal_with_bandits_at_lords_village", 2),
        (try_end),
      (else_try),
        (party_set_slot, ":village_no", slot_village_infested_by_bandits, 0),
        (store_random_in_range, ":random_no", 0, 100),
        (lt, ":random_no", 3),
        (store_random_in_range, ":random_no", 0, 3),
        (try_begin),
          (eq, ":random_no", 0),
          (assign, ":bandit_troop", "trp_bandit"),
        (else_try),
          (eq, ":random_no", 1),
          (assign, ":bandit_troop", "trp_mountain_bandit"),
        (else_try),
          (assign, ":bandit_troop", "trp_forest_bandit"),
        (try_end),
        (party_set_slot, ":village_no", slot_village_infested_by_bandits, ":bandit_troop"),
        #Reduce prosperity of the village by 3
        (call_script, "script_change_center_prosperity", ":village_no", -3),
        (try_begin),
          (eq, "$cheat_mode", 1),
          (str_store_party_name, s1, ":village_no"),
          (display_message, "@{s1} is infested by bandits."),
        (try_end),
      (try_end),
    (try_end),
    ]),

do you think this would assign the bandit types for the script_cf_enter_center_location_bandit_check section as well?

sry for being a pain... I'm a coding n00b...

edit:

I am only looking to change the troop types for the ambush, not the village raids.
 
Back
Top Bottom