I'm working on a mod that adds a second 'race'. I have the walkers changing over, but now I'm working on getting the Guild Master, Armorer, Weaponsmith, etc. changing races too. Unfortunately, it's not working.
Here's the current script:
Can anyone see what's going wrong? I have it all set up by trigger just like the walkers, so I know it's firing (plus a good bit of lag when it DOES fire), but they're remaining human when they should be changing to the new race.
Here's the current script:
Code:
("change_town_staff_race",
[
(store_script_param, ":center_no", 1),
(store_faction_of_party, ":center_faction", ":center_no"),
(party_get_slot, ":town_mayor", ":center_no", slot_town_elder),
(party_get_slot, ":town_tavernkeeper", ":center_no", slot_town_tavernkeeper),
(party_get_slot, ":town_weaponsmith", ":center_no", slot_town_weaponsmith),
(party_get_slot, ":town_merchant", ":center_no", slot_town_merchant),
(party_get_slot, ":town_armorer", ":center_no", slot_town_armorer),
(party_get_slot, ":town_horse_merchant", ":center_no", slot_town_horse_merchant),
(troop_get_type, ":mayor_race", ":town_mayor"),
(troop_get_type, ":tavernkeeper_race", ":town_tavernkeeper"),
(troop_get_type, ":weaponsmith_race", ":town_weaponsmith"),
(troop_get_type, ":merchant_race", ":town_merchant"),
(troop_get_type, ":armorer_race", ":town_armorer"),
(troop_get_type, ":horse_merchant_race", ":town_horse_merchant"),
(try_begin),
(this_or_next|eq, ":center_faction", fac_culture_7),
(eq, ":center_faction", fac_culture_tamek),
(eq, ":mayor_race", 0),
(troop_set_type, ":town_mayor", 2),
(else_try),
(this_or_next|eq, ":center_faction", fac_culture_7),
(eq, ":center_faction", fac_culture_tamek),
(eq, ":mayor_race", 1),
(troop_set_type, ":town_mayor", 3),
(else_try),
(neq, ":center_faction", fac_culture_7),
(neq, ":center_faction", fac_culture_tamek),
(eq, ":mayor_race", 2),
(troop_set_type, ":town_mayor", 0),
(else_try),
(neq, ":center_faction", fac_culture_7),
(neq, ":center_faction", fac_culture_tamek),
(eq, ":mayor_race", 3),
(troop_set_type, ":town_mayor", 1),
(try_end),
(try_begin),
(this_or_next|eq, ":center_faction", fac_culture_7),
(eq, ":center_faction", fac_culture_tamek),
(eq, ":tavernkeeper_race", 0),
(troop_set_type, ":town_tavernkeeper", 2),
(else_try),
(this_or_next|eq, ":center_faction", fac_culture_7),
(eq, ":center_faction", fac_culture_tamek),
(eq, ":tavernkeeper_race", 1),
(troop_set_type, ":town_tavernkeeper", 3),
(else_try),
(neq, ":center_faction", fac_culture_7),
(neq, ":center_faction", fac_culture_tamek),
(eq, ":tavernkeeper_race", 2),
(troop_set_type, ":town_tavernkeeper", 0),
(else_try),
(neq, ":center_faction", fac_culture_7),
(neq, ":center_faction", fac_culture_tamek),
(eq, ":tavernkeeper_race", 3),
(troop_set_type, ":town_tavernkeeper", 1),
(try_end),
(try_begin),
(this_or_next|eq, ":center_faction", fac_culture_7),
(eq, ":center_faction", fac_culture_tamek),
(eq, ":weaponsmith_race", 0),
(troop_set_type, ":town_weaponsmith", 2),
(else_try),
(this_or_next|eq, ":center_faction", fac_culture_7),
(eq, ":center_faction", fac_culture_tamek),
(eq, ":weaponsmith_race", 1),
(troop_set_type, ":town_weaponsmith", 3),
(else_try),
(neq, ":center_faction", fac_culture_7),
(neq, ":center_faction", fac_culture_tamek),
(eq, ":weaponsmith_race", 2),
(troop_set_type, ":town_weaponsmith", 0),
(else_try),
(neq, ":center_faction", fac_culture_7),
(neq, ":center_faction", fac_culture_tamek),
(eq, ":weaponsmith_race", 3),
(troop_set_type, ":town_weaponsmith", 1),
(try_end),
(try_begin),
(this_or_next|eq, ":center_faction", fac_culture_7),
(eq, ":center_faction", fac_culture_tamek),
(eq, ":merchant_race", 0),
(troop_set_type, ":town_merchant", 2),
(else_try),
(this_or_next|eq, ":center_faction", fac_culture_7),
(eq, ":center_faction", fac_culture_tamek),
(eq, ":merchant_race", 1),
(troop_set_type, ":town_merchant", 3),
(else_try),
(neq, ":center_faction", fac_culture_7),
(neq, ":center_faction", fac_culture_tamek),
(eq, ":merchant_race", 2),
(troop_set_type, ":town_merchant", 0),
(else_try),
(neq, ":center_faction", fac_culture_7),
(neq, ":center_faction", fac_culture_tamek),
(eq, ":merchant_race", 3),
(troop_set_type, ":town_merchant", 1),
(try_end),
(try_begin),
(this_or_next|eq, ":center_faction", fac_culture_7),
(eq, ":center_faction", fac_culture_tamek),
(eq, ":armorer_race", 0),
(troop_set_type, ":town_armorer", 2),
(else_try),
(this_or_next|eq, ":center_faction", fac_culture_7),
(eq, ":center_faction", fac_culture_tamek),
(eq, ":armorer_race", 1),
(troop_set_type, ":town_armorer", 3),
(else_try),
(neq, ":center_faction", fac_culture_7),
(neq, ":center_faction", fac_culture_tamek),
(eq, ":armorer_race", 2),
(troop_set_type, ":town_armorer", 0),
(else_try),
(neq, ":center_faction", fac_culture_7),
(neq, ":center_faction", fac_culture_tamek),
(eq, ":armorer_race", 3),
(troop_set_type, ":town_armorer", 1),
(try_end),
(try_begin),
(this_or_next|eq, ":center_faction", fac_culture_7),
(eq, ":center_faction", fac_culture_tamek),
(eq, ":horse_merchant_race", 0),
(troop_set_type, ":town_horse_merchant", 2),
(else_try),
(this_or_next|eq, ":center_faction", fac_culture_7),
(eq, ":center_faction", fac_culture_tamek),
(eq, ":horse_merchant_race", 1),
(troop_set_type, ":town_horse_merchant", 3),
(else_try),
(neq, ":center_faction", fac_culture_7),
(neq, ":center_faction", fac_culture_tamek),
(eq, ":horse_merchant_race", 2),
(troop_set_type, ":town_horse_merchant", 0),
(else_try),
(neq, ":center_faction", fac_culture_7),
(neq, ":center_faction", fac_culture_tamek),
(eq, ":horse_merchant_race", 3),
(troop_set_type, ":town_horse_merchant", 1),
(try_end),
]),
Can anyone see what's going wrong? I have it all set up by trigger just like the walkers, so I know it's firing (plus a good bit of lag when it DOES fire), but they're remaining human when they should be changing to the new race.