и заменить им старый. Не забудьте переименовать файл в troops.txt.
- когда игрок вступает в фракцию, т.е. присягает то получает скидку 20% на фракционные войска.
- от -30% до 30% скидки игрок получает в зависимости от отношений с фракциями. Если отношения отрицательные, то это штраф. bonus=0,3*relation. К этому бонусу относятся Рыцарские Ордены. Когда игрок сам основывает Королевство, то этот бонус равен 30%.
99 21 1 1224979098644774912 22 1 1224979098644774913 500 3 360287970189640762 407 1224979098644774913 1 2 936748722493063921 1224979098644774912 500 3 360287970189640762 405 1224979098644774912 2133 2 1224979098644774914 0 4 0 1073741855 2 1224979098644774912 360287970189639680 1073741855 2 1224979098644774912 360287970189640053 31 2 1224979098644774912 360287970189640052 5 0 33 3 1224979098644774912 360287970189640310 360287970189640315 5 0 2171 2 1224979098644774915 1224979098644774912 2133 2 1224979098644774914 1224979098644774915 2105 2 1224979098644774914 3 2107 2 1224979098644774914 1224979098644774914 2108 2 1224979098644774914 25 3 0 4 0 32 2 1224979098644774914 40 2147483681 3 1224979098644774912 360287970189640185 360287970189640205 520 3 1224979098644774916 1224979098644774912 172 31 2 1224979098644774916 2 2107 2 1224979098644774914 4 2108 2 1224979098644774914 3 3 0 4 0 32 2 1224979098644774914 40 2147483681 3 1224979098644774912 360287970189640185 360287970189640205 520 3 1224979098644774916 1224979098644774912 172 31 2 1224979098644774916 3 2107 2 1224979098644774914 6 2108 2 1224979098644774914 5 3 0 4 0 152 1 1224979098644774912 2107 2 1224979098644774914 5 2108 2 1224979098644774914 3 3 0 4 0 33 3 1224979098644774912 360287970189639737 360287970189639764 2107 2 1224979098644774914 2 3 0 4 0 33 3 1224979098644774912 360287970189640185 360287970189640205 2107 2 1224979098644774914 3 3 0 2170 3 1224979098644774917 1 360287970189639680 2122 3 1224979098644774918 5 1224979098644774917 2121 3 1224979098644774919 100 1224979098644774918 2107 2 1224979098644774914 1224979098644774919 2108 2 1224979098644774914 100 2133 2 1224979098644774920 0 2133 2 1224979098644774921 100 4 0 1073741855 2 144115188075856008 1 31 2 144115188075856294 432345564227567630 2173 2 1224979098644774922 1224979098644774912 522 3 1224979098644774923 144115188075856294 10 4 0 31 2 1224979098644774923 1224979098644774922 2106 2 1224979098644774921
3 0 4 0 4 0 33 3 1224979098644774922 432345564227567623 432345564227567628 2105 2 1224979098644774922 8 522 3 1224979098644774924 1224979098644774922 21 522 3 1224979098644774925 1224979098644774922 10 4 0 31 2 144115188075856294 432345564227567630 31 2 1224979098644774925 1224979098644774923 2133 2 1224979098644774926 100 5 0 31 2 1224979098644774924 1 2133 2 1224979098644774926 0 5 0 2190 3 1224979098644774926 432345564227567630 1224979098644774922 3 0 5 0 2190 3 1224979098644774926 432345564227567630 1224979098644774922 3 0 2107 2 1224979098644774926
2108 2 1224979098644774926 100 2106 2 1224979098644774921 1224979098644774926 2107 2 1224979098644774914 1224979098644774921 2108 2 1224979098644774914 100 3 0 3 0 4 0 2147483679 2 1224979098644774912 360287970189639680 2147483679 2 1224979098644774912 360287970189640052 2147483679 2 1224979098644774912 360287970189640053 2147483681 3 1224979098644774912 360287970189640310 360287970189640315 2111 2 1224979098644774914 1 3 0 2133 2 72057594037927936 1224979098644774914 2075 1 72057594037927936
# script_game_get_troop_wage
# This script is called from the game engine for calculating troop wages.
# Input:
# param1: troop_id, param2: party-id
# Output: reg0: weekly wage
("game_get_troop_wage",
[
(store_script_param_1, ":troop_id"),
(store_script_param_2, ":unused"),
(troop_set_slot, "trp_quick_battle_6_player", 407, ":unused"),
(call_script, "script_initialize_exchange_screen_extensions", ":troop_id"), # for quick party managment keys
(troop_set_slot, "trp_quick_battle_6_player", 405, ":troop_id"),
(assign, ":wage", 0),
(try_begin),
(this_or_next|eq, ":troop_id", "trp_player"), # wage = 1
(this_or_next|eq, ":troop_id", "trp_kidnapped_daughter"),
(eq, ":troop_id", "trp_kidnapped_girl"),
(else_try),
(is_between, ":troop_id", "trp_kingdom_1_pretender", "trp_knight_1_1_wife"), # wage = 1
(else_try),
(store_character_level, ":troop_level", ":troop_id"), # wage=(lvl+3)*(lvl+3)/25
(assign, ":wage", ":troop_level"),
(val_add, ":wage", 3),
(val_mul, ":wage", ":wage"),
(val_div, ":wage", 25),
(end_try),
(try_begin),
(gt, ":wage", 40),
(neg|is_between, ":troop_id", "trp_npc_adonja", "trp_kingdom_1_lord"), # not companions
(troop_get_slot, ":troop_type", ":troop_id", 172),
(eq, ":troop_type", 2), # archers 33% more than the normal cost
(val_mul, ":wage", 4),
(val_div, ":wage", 3),
(end_try),
(try_begin),
(gt, ":wage", 40),
(neg|is_between, ":troop_id", "trp_npc_adonja", "trp_kingdom_1_lord"),
(troop_get_slot, ":troop_type", ":troop_id", 172),
(eq, ":troop_type", 3), # mounted archer 20% more than normal cost ( total_cost = 1,2*1,66 = 2 or 200%)
(val_mul, ":wage", 6),
(val_div, ":wage", 5),
(end_try),
(try_begin), #mounted troops cost 66% more than the normal cost
(troop_is_mounted, ":troop_id"),
(val_mul, ":wage", 5),
(val_div, ":wage", 3),
(end_try),
(try_begin), #mercenaries cost %100 more than the normal cost
(is_between, ":troop_id", "trp_watchman", "trp_mercenaries_end"),
(val_mul, ":wage", 2),
(end_try),
(try_begin), #companions cost %200 more than the normal cost
(is_between, ":troop_id", "trp_npc_adonja", "trp_kingdom_1_lord"),
(val_mul, ":wage", 3),
(end_try),
(store_skill_level, ":leadership_level", skl_leadership, "trp_player"),
(store_mul, ":leadership_bonus", 5, ":leadership_level"),
(store_sub, ":leadership_factor", 100, ":leadership_bonus"),
(val_mul, ":wage", ":leadership_factor"), #wage = wage * (100 - 5*leadership)/100
(val_div, ":wage", 100),
# new code to make discounts based on relations
(assign, ":continue", 0),
(assign, ":bonus", 100),
(try_begin),
(this_or_next|eq, "$player_has_homage", 1), # player is a vassal
(eq, "$players_kingdom", "fac_player_supporters_faction"), # player has rebelled or fights for claymant
(store_troop_faction, ":troop_faction", ":troop_id"),
(faction_get_slot, ":player_culture", "$players_kingdom", slot_faction_culture),
(try_begin),
(eq, ":player_culture", ":troop_faction"),
(val_sub, ":bonus", 20), # 20% discount
(try_end),
(try_begin),
(try_begin),
(is_between, ":troop_faction", "fac_culture_1", "fac_culture_6"),
(val_add, ":troop_faction", 8),
(faction_get_slot, ":state", ":troop_faction", slot_faction_state),
(faction_get_slot, ":culture", ":troop_faction", slot_faction_culture),
(try_begin),
(eq, "$players_kingdom", "fac_player_supporters_faction"), # player has rebelled
(eq, ":culture", ":player_culture"),
(assign, ":relation", 100),
(else_try),
(eq, ":state", sfs_defeated), # faction was defeated
(assign, ":relation", 0),
(else_try),
(store_relation, ":relation", "fac_player_supporters_faction", ":troop_faction"),
(try_end),
(else_try),
(store_relation, ":relation", "fac_player_supporters_faction", ":troop_faction"),
(try_end),
(val_mul, ":relation", 30),
(val_div, ":relation", 100),
(val_sub, ":bonus", ":relation"),
(val_mul, ":wage", ":bonus"),
(val_div, ":wage", 100),
(try_end),
(try_end),
(try_begin),
(neq, ":troop_id", "trp_player"),
(neq, ":troop_id", "trp_kidnapped_girl"),
(neq, ":troop_id", "trp_kidnapped_daughter"),
(neg|is_between, ":troop_id", "trp_kingdom_1_pretender", "trp_knight_1_1_wife"),
(val_max, ":wage", 1),
(end_try),
(assign, reg0, ":wage"),
(set_trigger_result, reg0),
]),