Samdomanld
Baron
Oh, so good job. Thx.
[quote]from Janycz:
("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",[b] slot_kingdom_party_leader[/b]),
(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),
[/quote]
Meneldur said:[what is it with that slot? slot_kingdom_party_leader i can define it at module _constans but what belongs into it?Code:[quote]from Janycz: ("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",[b] slot_kingdom_party_leader[/b]), (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), [/quote]
As for me all lords use kings icon with that script so (eq, ":is_king", 0), is never executed
(party_set_slot, "$pout_party", slot_kingdom_party_leader, ":troop_no"),
("create_kingdom_hero_party",
[
(store_script_param, ":troop_no", 1),
(store_script_param, ":center_no", 2),
(store_troop_faction, ":troop_faction_no", ":troop_no"),
(assign, "$pout_party", -1),
(try_begin),
(eq, "$g_there_is_no_avaliable_centers", 0),
(set_spawn_radius, 0),
(else_try),
(set_spawn_radius, 15),
(try_end),
(spawn_around_party, ":center_no", "pt_kingdom_hero_party"),
(assign, "$pout_party", reg0),
(party_set_faction, "$pout_party", ":troop_faction_no"),
(party_set_slot, "$pout_party", slot_party_type, spt_kingdom_hero_party),
(call_script, "script_party_set_ai_state", "$pout_party", spai_undefined, -1),
(troop_set_slot, ":troop_no", slot_troop_leaded_party, "$pout_party"),
(party_add_leader, "$pout_party", ":troop_no"),
(str_store_troop_name, s5, ":troop_no"),
(party_set_name, "$pout_party", "str_s5_s_party"),
(party_set_slot, "$pout_party", slot_party_commander_party, -1), #we need this because 0 is player's party!
#Setting the flag icon
#normal_banner_begin
(troop_get_slot, ":cur_banner", ":troop_no", slot_troop_banner_scene_prop),
(try_begin),
(gt, ":cur_banner", 0),
(val_sub, ":cur_banner", banner_scene_props_begin),
(val_add, ":cur_banner", banner_map_icons_begin),
(party_set_banner_icon, "$pout_party", ":cur_banner"),
#custom_banner_begin
#(troop_get_slot, ":flag_icon", ":troop_no", slot_troop_custom_banner_map_flag_type),
#(try_begin),
# (ge, ":flag_icon", 0),
# (val_add, ":flag_icon", custom_banner_map_icons_begin),
# (party_set_banner_icon, "$pout_party", ":flag_icon"),
(try_end),
(try_begin),
#because of below two lines, lords can only hire more than one party_template(stack) at game start once a time during all game.
(troop_slot_eq, ":troop_no", slot_troop_spawned_before, 0),
(troop_set_slot, ":troop_no", slot_troop_spawned_before, 1),
(assign, ":num_tries", 20),
(try_begin),
(store_troop_faction, ":troop_kingdom", ":troop_no"),
(faction_slot_eq, ":troop_kingdom", slot_faction_leader, ":troop_no"),
(assign, ":num_tries", 50),
(try_end),
#(str_store_troop_name, s0, ":troop_no"),
#(display_message, "{!}str_debug__hiring_men_to_party_for_s0"),
(try_for_range, ":unused", 0, ":num_tries"),
(call_script, "script_hire_men_to_kingdom_hero_party", ":troop_no"),
(try_end),
(assign, ":xp_rounds", 0),
(game_get_reduce_campaign_ai, ":reduce_campaign_ai"),
(try_begin),
(this_or_next|eq, ":troop_faction_no", "$players_kingdom"),
(eq, ":troop_faction_no", "fac_player_supporters_faction"),
(assign, ":xp_rounds", 0),
(else_try),
(eq, ":reduce_campaign_ai", 0), #hard
(assign, ":xp_rounds", 2),
(else_try),
(eq, ":reduce_campaign_ai", 1), #moderate
(assign, ":xp_rounds", 1),
(else_try),
(eq, ":reduce_campaign_ai", 2), #easy
(assign, ":xp_rounds", 0),
(try_end),
(troop_get_slot, ":renown", ":troop_no", slot_troop_renown),
(store_div, ":renown_xp_rounds", ":renown", 100),
(val_add, ":xp_rounds", ":renown_xp_rounds"),
(try_for_range, ":unused", 0, ":xp_rounds"),
(call_script, "script_upgrade_hero_party", "$pout_party", 4000),
(try_end),
(try_end),
#icons begin
(party_set_slot, "$pout_party", slot_kingdom_party_leader, ":troop_no"),
#icons end
]),
("dedal_battlefield_a",mcn_no_shadow,"dedal_battlefield_a", 0.15, 0),
("dedal_battlefield_b",mcn_no_shadow,"dedal_battlefield_b", 0.15, 0),
("dedal_battlefield_c",mcn_no_shadow,"dedal_battlefield_c", 0.15, 0),
("dedal_battlefield_d",mcn_no_shadow,"dedal_battlefield_d", 0.15, 0),
(1,
[
(try_for_parties, ":party"),
(party_slot_eq, ":party", slot_party_type, spt_battlefield_icon_on_map),
(party_get_slot, ":hours", ":party", slot_num_hours_battle_icon_on_map),
(val_add, ":hours", 1),
(try_begin),
(ge, ":hours", 24), #24 - how many hours will be visible icon
(party_clear, ":party"),
(remove_party, ":party"),
(else_try),
(party_set_slot, ":party", slot_num_hours_battle_icon_on_map, ":hours"),
(try_end),
(try_end),
]),
("draw_battle_icon",
[
(store_script_param, ":party_no", 1),
(set_spawn_radius, 0),
(spawn_around_party, ":party_no", "pt_battlefield"),
(assign, ":battlefield", reg0),
(assign, ":icon", "icon_dedal_battlefield_a"),
(store_random_in_range, ":rand", 0, 3),
(try_begin),
# (eq, ":rand", 0),
# (assign, ":icon", "icon_dedal_battlefield_a"),
# (else_try),
(eq, ":rand", 1),
(assign, ":icon", "icon_dedal_battlefield_b"),
(else_try),
(eq, ":rand", 2),
(assign, ":icon", "icon_dedal_battlefield_c"),
(else_try),
(eq, ":rand", 3),
(assign, ":icon", "icon_dedal_battlefield_d"),
(try_end),
(party_set_icon, ":battlefield", ":icon"),
(party_set_slot, ":battlefield", slot_num_hours_battle_icon_on_map, 0),
(party_set_slot, ":battlefield", slot_party_type, spt_battlefield_icon_on_map),
(party_set_flags, ":battlefield", pf_is_static|pf_always_visible|pf_no_label, 1),
]),
(store_script_param_1, ":root_defender_party"),
(store_script_param_2, ":root_attacker_party"),
(call_script, "script_draw_battle_icon", ":root_attacker_party"),
("game_event_battle_end",
[
(store_script_param_1, ":root_defender_party"),
(store_script_param_2, ":root_attacker_party"),
(call_script, "script_draw_battle_icon", ":root_attacker_party"),
#other operations ...
...
]),
DerGreif said:Brytenwalda has already more than 256 map icons, which is the hardcoded maximum amount of possible map icons.
No. As I said, there is a hardcoded maximum amount of possible different map icons, for whatever reason. You can use the FISH&CHIPS OSP from Lav to reduce the amount of used map icons drastically by removing the flag icons from the list (except for three). That frees in native around 130 map icons, because in native each flag is its own map icon.PoisonCourtesan said:DerGreif said:Brytenwalda has already more than 256 map icons, which is the hardcoded maximum amount of possible map icons.
Wait there's a map icon limit?
You can bypass it right?