Good afternoon, people. Need help with the next issue
based on scripts laid out for OSP Map Icons Pack I tried to add my icons to the developed mod
I inserted the script script_draw_icons at the end of module_scripts
icons of troops after ("bridge_snow_a", mcn_no_shadow, "map_river_bridge_snow_a", 1.27.0),
in module_simple_triggers - the end of the file.
It compiles without errors, but when the game starts, all the lords on the global map use only 1 icon - flagbearer_a.
What could be the problem?
based on scripts laid out for OSP Map Icons Pack I tried to add my icons to the developed mod
Code:
("draw_icons",
[
(try_for_parties, ":party"),
(party_slot_eq, ":party", slot_party_type, spt_kingdom_hero_party),
(party_is_active, ":party"),
(gt, ":party", 0),
(neg|party_is_in_any_town, ":party"),
(store_faction_of_party, ":fac", ":party"),
(store_party_size, ":num", ":party"),
(party_get_icon, ":icon", ":party"),
(party_get_slot, ":leader", ":party", slot_kingdom_party_leader),
(assign, ":is_king", 0),
(try_for_range, ":cur_fac", "fac_kingdom_1", "fac_kingdoms_end"),
(faction_slot_eq, ":cur_fac", slot_faction_leader, ":leader"),
(assign, ":is_king", 1),
(try_end),
(try_begin),
(eq, ":is_king", 0),
(try_begin),
(eq, ":fac", "fac_kingdom_3"),
(try_begin),
(ge, ":num", 160),
(assign, ":icon", "icon_ttr_army"),
(else_try),
(assign, ":icon", "icon_ttr_army"),
(try_end),
(else_try),
(eq, ":fac", "fac_kingdom_4"),
(try_begin),
(ge, ":num", 160),
(assign, ":icon", "icon_swed_army"),
(else_try),
(assign, ":icon", "icon_swed_army"),
(try_end),
(else_try),
(eq, ":fac", "fac_kingdom_5"),
(try_begin),
(ge, ":num", 160),
(assign, ":icon", "icon_hun_army"),
(else_try),
(assign, ":icon", "icon_hun_army"),
(try_end),
(else_try),
(eq, ":fac", "fac_kingdom_2"),
(try_begin),
(ge, ":num", 160),
(assign, ":icon", "icon_rus_army"),
(else_try),
(assign, ":icon", "icon_rus_army"),
(try_end),
(else_try),
(eq, ":fac", "fac_kingdom_6"),
(try_begin),
(ge, ":num", 160),
(assign, ":icon", "icon_turk_army"),
(else_try),
(assign, ":icon", "icon_turk_army"),
(try_end),
(else_try),
(eq, ":fac", "fac_kingdom_1"),
(try_begin),
(ge, ":num", 160),
(assign, ":icon", "icon_teu_army2"),
(else_try),
(assign, ":icon", "icon_teu_army"),
(try_end),
(else_try),
(eq, ":fac", "fac_kingdom_7"),
(try_begin),
(ge, ":num", 160),
(assign, ":icon", "icon_mold_army"),
(else_try),
(assign, ":icon", "icon_mold_army"),
(try_end),
(else_try),
(eq, ":fac", "fac_kingdom_8"),
(try_begin),
(ge, ":num", 160),
(assign, ":icon", "icon_lit_army"),
(else_try),
(assign, ":icon", "icon_lit_army"),
(try_end),
(else_try),
(eq, ":fac", "fac_kingdom_9"),
(try_begin),
(ge, ":num", 160),
(assign, ":icon", "icon_pol_army"),
(else_try),
(assign, ":icon", "icon_pol_army"),
(try_end),
(else_try),
(eq, ":fac", "fac_player_supporters_faction"),
(try_begin),
(ge, ":num", 160),
(assign, ":icon", "icon_rus_army"),
(else_try),
(assign, ":icon", "icon_rus_army"),
(try_end),
(else_try),
(try_begin),
(eq, ":fac", "fac_kingdom_3"),
(try_begin),
(ge, ":num", 160),
(assign, ":icon", "icon_ttr_army"),
(else_try),
(assign, ":icon", "icon_ttr_army"),
(try_end),
(else_try),
(eq, ":fac", "fac_kingdom_4"),
(try_begin),
(ge, ":num", 160),
(assign, ":icon", "icon_swed_army"),
(else_try),
(assign, ":icon", "icon_swed_army"),
(try_end),
(else_try),
(eq, ":fac", "fac_kingdom_5"),
(try_begin),
(ge, ":num", 160),
(assign, ":icon", "icon_hun_army"),
(else_try),
(assign, ":icon", "icon_hun_army"),
(try_end),
(else_try),
(eq, ":fac", "fac_kingdom_2"),
(try_begin),
(ge, ":num", 160),
(assign, ":icon", "icon_rus_army"),
(else_try),
(assign, ":icon", "icon_rus_army"),
(try_end),
(else_try),
(eq, ":fac", "fac_kingdom_6"),
(try_begin),
(ge, ":num", 160),
(assign, ":icon", "icon_turk_army"),
(else_try),
(assign, ":icon", "icon_turk_army"),
(try_end),
(else_try),
(eq, ":fac", "fac_kingdom_1"),
(try_begin),
(ge, ":num", 160),
(assign, ":icon", "icon_teu_army2"),
(else_try),
(assign, ":icon", "icon_teu_army"),
(try_end),
(else_try),
(eq, ":fac", "fac_kingdom_7"),
(try_begin),
(ge, ":num", 160),
(assign, ":icon", "icon_mold_army"),
(else_try),
(assign, ":icon", "icon_mold_army"),
(try_end),
(else_try),
(eq, ":fac", "fac_kingdom_8"),
(try_begin),
(ge, ":num", 160),
(assign, ":icon", "icon_lit_army"),
(else_try),
(assign, ":icon", "icon_lit_army"),
(try_end),
(else_try),
(eq, ":fac", "fac_kingdom_9"),
(try_begin),
(ge, ":num", 160),
(assign, ":icon", "icon_pol_army"),
(else_try),
(assign, ":icon", "icon_pol_army"),
(try_end),
(else_try),
(eq, ":fac", "fac_player_supporters_faction"),
(try_begin),
(ge, ":num", 160),
(assign, ":icon", "icon_rus_army"),
(else_try),
(assign, ":icon", "icon_rus_army"),
(try_end),
(try_end),
(try_end),
(party_set_icon, ":party", ":icon"),
(try_end),
]),
Code:
(0.01,
[
(call_script, "script_draw_icons"),
]),
Code:
( "teu_army", 0, "teu_map_icons_a", avatar_scale, snd_gallop, 0.15, 0.173, 0,),
( "teu_army2", 0, "teu_map_icons_b", avatar_scale, snd_gallop, 0.15, 0.173, 0,),
( "rus_army", 0, "rus_army_icon", avatar_scale, snd_gallop, 0.15, 0.173, 0,),
( "ttr_army", 0, "ttr_army_icon", avatar_scale, snd_gallop, 0.15, 0.173, 0,),
( "swed_army", 0, "euro_army_icon", avatar_scale, snd_gallop, 0.15, 0.173, 0,),
( "hun_army", 0, "hun_army_icon", avatar_scale, snd_gallop, 0.15, 0.173, 0,),
( "turk_army", 0, "turk_army_icon", avatar_scale, snd_gallop, 0.15, 0.173, 0,),
( "mold_army", 0, "mold_army_icon", avatar_scale, snd_gallop, 0.15, 0.173, 0,),
( "hun_army", 0, "hun_army_icon", avatar_scale, snd_gallop, 0.15, 0.173, 0,),
( "lit_army", 0, "lit_army_icon", avatar_scale, snd_gallop, 0.15, 0.173, 0,),
( "pol_army", 0, "euro_army_icon2", avatar_scale, snd_gallop, 0.15, 0.173, 0,),
I inserted the script script_draw_icons at the end of module_scripts
icons of troops after ("bridge_snow_a", mcn_no_shadow, "map_river_bridge_snow_a", 1.27.0),
in module_simple_triggers - the end of the file.
It compiles without errors, but when the game starts, all the lords on the global map use only 1 icon - flagbearer_a.
What could be the problem?