OSP Code Campaign [WIP] Way of the Sea - water travel -

Users who are viewing this thread

Alright, I've managed to fix the problems I mentioned earlier. However, there's still the problem is lords getting stuck at a port when the are following the marshal.

Is there a fix or a away to stop the marshal from using ports?

Would this work to stop Marshals from using Ports and make them use the old pathfinding instead?

Python:
(eq, ":new_ai_state", spai_visiting_village),
         (try_for_range, ":troop_no", active_npcs_begin, kingdom_ladies_end),
         (faction_slot_eq,  ":faction_no", slot_faction_marshall, ":troop_no"),
                (party_get_position, pos1, ":new_ai_object"),
                (map_get_random_position_around_position, pos2, pos1, 2),
                (party_set_ai_behavior, ":party_no", ai_bhvr_travel_to_point),
                (party_set_ai_target_position, ":party_no", pos2),
                (party_set_ai_object, ":party_no", ":new_ai_object"),
            (party_set_flags, ":party_no", pf_default_behavior, 0),
            (party_set_slot, ":party_no", slot_party_ai_substate, 0),
        (else_try),
            (party_set_flags, ":party_no", pf_default_behavior, 0),
            (party_set_slot, ":party_no", slot_party_ai_substate, 0),
                (assign, "$g_party_no", ":party_no"),
                (assign, "$g_target_center", ":new_ai_object"),
                (call_script, "script_calculate_distances"),        #F&B injected
    (try_end),
            (try_begin),
              (gt, ":party_is_in_town", 0),
              (neq, ":party_is_in_town", ":new_ai_object"),
              (party_detach, ":party_no"),
            (try_end),

edit: This code doesn't give me errors and I haven't seen a marshal go into water. But I don't know for sure if it works. :ohdear:
 
Last edited:
After testing the navigation code (which worked perfectly) in a copy of native, I reviewed module by module the differences it might have, of which I found several but not so relevant, I tried again in my mod, but it still did not solve the problem, until I discovered that there was a code that I had added a while ago and it was about custom icons for lords ... I removed it to try again and there it worked well .... but how can I do now to have those custom icons without me affect the navigation code?
Well, in my module_iconos I have described each of the icons (do not delete it, because it did not affect anything),
in module_simple_triggers, this (deleted)
Code:
# iconos mauro #############
##mauro (0.01,
## [
##    (call_script, "script_draw_icons"),
##mauro  ]),
  # fin
and this in module_script this (deleted)
Code:
# map icon mauro inicio ################################################################################################
("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", 200),
    (assign, ":icon", "icon_dedal_map_khergit_lord_a"),
  (else_try),
    (ge, ":num", 100),
    (assign, ":icon", "icon_dedal_map_khergit_lord_b"),
  (else_try),
    (assign, ":icon", "icon_dedal_map_khergit_lord_c"),
  (try_end),
(else_try),
  (eq, ":fac", "fac_kingdom_4"),
  (try_begin),
    (ge, ":num", 200),
    (assign, ":icon", "icon_dedal_map_nordic_lord_a"),
  (else_try),
    (ge, ":num", 100),
    (assign, ":icon", "icon_dedal_map_nordic_lord_b"),
  (else_try),
    (assign, ":icon", "icon_dedal_map_nordic_lord_c"),
  (try_end),
(else_try),
  (eq, ":fac", "fac_kingdom_5"),
  (try_begin),
    (ge, ":num", 200),
    (assign, ":icon", "icon_dedal_map_rhodok_lord_a"),
  (else_try),
    (ge, ":num", 100),
    (assign, ":icon", "icon_dedal_map_rhodok_lord_b"),
  (else_try),
    (assign, ":icon", "icon_dedal_map_rhodok_lord_c"),
  (try_end),
(else_try),
  (eq, ":fac", "fac_kingdom_2"),
  (try_begin),
    (ge, ":num", 200),
    (assign, ":icon", "icon_dedal_map_vaegir_lord_a"),
  (else_try),
    (ge, ":num", 100),
    (assign, ":icon", "icon_dedal_map_vaegir_lord_b"),
  (else_try),
    (assign, ":icon", "icon_dedal_map_vaegir_lord_c"),
  (try_end),
(else_try),
  (eq, ":fac", "fac_kingdom_6"),
  (try_begin),
    (ge, ":num", 200),
    (assign, ":icon", "icon_dedal_map_sar_lord_a"),
  (else_try),
    (ge, ":num", 100),
    (assign, ":icon", "icon_dedal_map_sar_lord_b"),
  (else_try),
    (assign, ":icon", "icon_dedal_map_sar_lord_c"),
  (try_end),
(else_try),
  (eq, ":fac", "fac_kingdom_7"),
  (try_begin),
    (ge, ":num", 200),
    (assign, ":icon", "icon_dedal_map_lfed_lord_a"),
  (else_try),
    (ge, ":num", 100),
    (assign, ":icon", "icon_dedal_map_lfed_lord_b"),
  (else_try),
    (assign, ":icon", "icon_dedal_map_lfed_lord_c"),
  (try_end),
(else_try),
  (eq, ":fac", "fac_kingdom_1"),
  (try_begin),
    (ge, ":num", 200),
    (assign, ":icon", "icon_dedal_map_swadia_lord_a"),
  (else_try),
    (ge, ":num", 100),
    (assign, ":icon", "icon_dedal_map_swadia_lord_b"),
  (else_try),
    (assign, ":icon", "icon_dedal_map_swadia_lord_c"),
  (try_end),
(try_end),

(else_try),

(try_begin),
  (eq, ":fac", "fac_kingdom_3"),
  (try_begin),
    (ge, ":num", 200),
    (assign, ":icon", "icon_dedal_map_khergit_king_a"),
  (else_try),
    (ge, ":num", 100),
    (assign, ":icon", "icon_dedal_map_khergit_king_b"),
  (else_try),
    (assign, ":icon", "icon_dedal_map_khergit_king_c"),
  (try_end),
(else_try),
  (eq, ":fac", "fac_kingdom_4"),
  (try_begin),
    (ge, ":num", 200),
    (assign, ":icon", "icon_dedal_map_nordic_king_a"),
  (else_try),
    (ge, ":num", 100),
    (assign, ":icon", "icon_dedal_map_nordic_king_b"),
  (else_try),
    (assign, ":icon", "icon_dedal_map_nordic_king_c"),
  (try_end),
(else_try),
  (eq, ":fac", "fac_kingdom_5"),
  (try_begin),
    (ge, ":num", 200),
    (assign, ":icon", "icon_dedal_map_rhodok_king_a"),
  (else_try),
    (ge, ":num", 100),
    (assign, ":icon", "icon_dedal_map_rhodok_king_b"),
  (else_try),
    (assign, ":icon", "icon_dedal_map_rhodok_king_c"),
  (try_end),
(else_try),
  (eq, ":fac", "fac_kingdom_2"),
  (try_begin),
    (ge, ":num", 200),
    (assign, ":icon", "icon_dedal_map_vaegir_king_a"),
  (else_try),
    (ge, ":num", 100),
    (assign, ":icon", "icon_dedal_map_vaegir_king_b"),
  (else_try),
    (assign, ":icon", "icon_dedal_map_vaegir_king_c"),
  (try_end),
(else_try),
  (eq, ":fac", "fac_kingdom_6"),
  (try_begin),
    (ge, ":num", 200),
    (assign, ":icon", "icon_dedal_map_sar_king_a"),
  (else_try),
    (ge, ":num", 100),
    (assign, ":icon", "icon_dedal_map_sar_king_b"),
  (else_try),
    (assign, ":icon", "icon_dedal_map_sar_king_c"),
  (try_end),
(else_try),
  (eq, ":fac", "fac_kingdom_7"),
  (try_begin),
    (ge, ":num", 200),
    (assign, ":icon", "icon_dedal_map_lfed_king_a"),
  (else_try),
    (ge, ":num", 100),
    (assign, ":icon", "icon_dedal_map_lfed_king_b"),
  (else_try),
    (assign, ":icon", "icon_dedal_map_lfed_king_c"),
  (try_end),

(else_try),
  (eq, ":fac", "fac_kingdom_1"),
  (try_begin),
    (ge, ":num", 200),
    (assign, ":icon", "icon_dedal_map_swadia_king_a"),
  (else_try),
    (ge, ":num", 100),
    (assign, ":icon", "icon_dedal_map_swadia_king_b"),
  (else_try),
    (assign, ":icon", "icon_dedal_map_swadia_king_c"),
  (try_end),
(try_end),

(try_end),

(party_set_icon, ":party", ":icon"),

(try_end),
]),
# map icon mauro fin
 
You need to code this but it's not to difficult

With the script from the module_script you need to make it a trigger

Add Check for terrain
If terrain 0 = assign ship icon
If terrain not 0 = assign icon like in your script

Edit: I have taken a look in your script it's not that easy

You could make a trigger that check if party is on sea and assign ship but you must save your previous icon to assign them later again if party is not on sea. I have seen something similar with a script all party's resting in the night and assign a tent icon in nighttime
 
Last edited by a moderator:
("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_current_terrain, ":terrain", ":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", 200),
(neq, ":terrain", 0),
(assign, ":icon", "icon_dedal_map_khergit_lord_a"),
(else_try),
(ge, ":num", 100),
(neq, ":terrain", 0), #and so on.. I'm on phone sorry but above every assign icon
(assign, ":icon", "icon_dedal_map_khergit_lord_b"),
(else_try),
#next here......

You need also to uncomment your trigger that he is activ
 
("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_current_terrain, ":terrain", ":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", 200),
(neq, ":terrain", 0),
(assign, ":icon", "icon_dedal_map_khergit_lord_a"),
(else_try),
(ge, ":num", 100),
(neq, ":terrain", 0), #and so on.. I'm on phone sorry but above every assign icon
(assign, ":icon", "icon_dedal_map_khergit_lord_b"),
(else_try),
#next here......

You need also to uncomment your trigger that he is activ
Excellent friend, thank you very much, you are great :smile:
I already tried it and it works perfect

Edit 1
I do not want to be insistent, but will it be possible to modify the ship that they use according to the type of troop?, that is to say ... if it is a lord, use one type of ship and if it is a caravan another type of ship, the same for Farmers....
: P
 
Last edited:
plazzard, does a version of this naval AI exist that doesn't get stuck in the ocean?
The truth of the matter is that it works well for me, not perfect but well, sometimes they get stuck on the shore and other times they appear riding on horseback and not by boat (only sometimes) ... maybe that could be corrected, but I don't know, sometimes I think the map can also be the cause of why they get stuck
 
Excellent friend, thank you very much, you are great :smile:
I already tried it and it works perfect

Edit 1
I do not want to be insistent, but will it be possible to modify the ship that they use according to the type of troop?, that is to say ... if it is a lord, use one type of ship and if it is a caravan another type of ship, the same for Farmers....
: P
Yes all what you need is in your draw icon script you only need to expand it.

You should add the following to your script to improve it.

(assign, ":icon", "icon_dedal_map_swadia_king_c"),
(try_end),
(else_try),
(eq, ":terrain", 0),
(assign, ":icon", "icon_ship"),

(try_end),

(try_end),

(party_set_icon, ":party", ":icon"),

(try_end),
]),
# map icon mauro fin
 
Last edited by a moderator:
At the end my icon code according to your advice, it was like this: (I put it in simple_triggers)
Code:
# map icon inicio ################################################################################################
(2,
[
(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"),
############# plazzard ####
(party_get_current_terrain, ":terrain", ":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),
############################################# Generales ###########################
(try_begin),
  (eq, ":fac", "fac_kingdom_3"),
  (try_begin),
    (ge, ":num", 200),
############ plazzard 
(neq, ":terrain", 0), #water
(neq, ":terrain", 7), #bridges
(neq, ":terrain", 8), #rivers!
###########
    (assign, ":icon", "icon_dedal_map_khergit_lord_a"),
########### plazzard asigna otro icono de barco a los lores ########
(else_try),
(this_or_next|eq, ":terrain", 0),
(eq, ":terrain", 8),
(assign, ":icon", "icon_ship2"),
###########################
  (else_try),
    (ge, ":num", 100),
############
(neq, ":terrain", 0), #water
(neq, ":terrain", 7), #bridges 
(neq, ":terrain", 8), #rivers!
############
    (assign, ":icon", "icon_dedal_map_khergit_lord_b"),
###############################
(else_try),
(this_or_next|eq, ":terrain", 0),
(eq, ":terrain", 8),
(assign, ":icon", "icon_ship2"),
##############################
  (else_try),
############
(neq, ":terrain", 0), #water
(neq, ":terrain", 7), #bridges 
(neq, ":terrain", 8), #rivers!
############
    (assign, ":icon", "icon_dedal_map_khergit_lord_c"),
######################################
(else_try),
(this_or_next|eq, ":terrain", 0),
(eq, ":terrain", 8),
(assign, ":icon", "icon_ship2"),
#######################################
  (try_end),

(else_try),
  (eq, ":fac", "fac_kingdom_4"),
  (try_begin),
    (ge, ":num", 200),
############
(neq, ":terrain", 0), #water
(neq, ":terrain", 7), #bridges 
(neq, ":terrain", 8), #rivers!
############
    (assign, ":icon", "icon_dedal_map_nordic_lord_a"),
######################################
(else_try),
(this_or_next|eq, ":terrain", 0),
(eq, ":terrain", 8),
(assign, ":icon", "icon_ship2"),
######################################
  (else_try),
    (ge, ":num", 100),
############
(neq, ":terrain", 0), #water
(neq, ":terrain", 7), #bridges 
(neq, ":terrain", 8), #rivers!
############
    (assign, ":icon", "icon_dedal_map_nordic_lord_b"),
######################################
(else_try),
(this_or_next|eq, ":terrain", 0),
(eq, ":terrain", 8),
(assign, ":icon", "icon_ship2"),
######################################
  (else_try),
############
(neq, ":terrain", 0), #water
(neq, ":terrain", 7), #bridges
(neq, ":terrain", 8), #rivers!
############
    (assign, ":icon", "icon_dedal_map_nordic_lord_c"),
######################################
(else_try),
(this_or_next|eq, ":terrain", 0),
(eq, ":terrain", 8),
(assign, ":icon", "icon_ship2"),
######################################
  (try_end),

(else_try),
  (eq, ":fac", "fac_kingdom_5"),
  (try_begin),
    (ge, ":num", 200),
############
(neq, ":terrain", 0), #water
(neq, ":terrain", 7), #bridges 
(neq, ":terrain", 8), #rivers!
############
    (assign, ":icon", "icon_dedal_map_rhodok_lord_a"),
######################################
(else_try),
(this_or_next|eq, ":terrain", 0),
(eq, ":terrain", 8),
(assign, ":icon", "icon_ship2"),
######################################
  (else_try),
    (ge, ":num", 100),
############
(neq, ":terrain", 0), #water
(neq, ":terrain", 7), #bridges 
(neq, ":terrain", 8), #rivers!
############
    (assign, ":icon", "icon_dedal_map_rhodok_lord_b"),
######################################
(else_try),
(this_or_next|eq, ":terrain", 0),
(eq, ":terrain", 8),
(assign, ":icon", "icon_ship2"),
######################################
  (else_try),
############
(neq, ":terrain", 0), #water
(neq, ":terrain", 7), #bridges 
(neq, ":terrain", 8), #rivers!
############
    (assign, ":icon", "icon_dedal_map_rhodok_lord_c"),
######################################
(else_try),
(this_or_next|eq, ":terrain", 0),
(eq, ":terrain", 8),
(assign, ":icon", "icon_ship2"),
######################################
  (try_end),

(else_try),
  (eq, ":fac", "fac_kingdom_2"),
  (try_begin),
    (ge, ":num", 200),
############
(neq, ":terrain", 0), #water
(neq, ":terrain", 7), #bridges 
(neq, ":terrain", 8), #rivers!
############
    (assign, ":icon", "icon_dedal_map_vaegir_lord_a"),
######################################
(else_try),
(this_or_next|eq, ":terrain", 0),
(eq, ":terrain", 8),
(assign, ":icon", "icon_ship2"),
#######################################
  (else_try),
    (ge, ":num", 100),
############
(neq, ":terrain", 0), #water
(neq, ":terrain", 7), #bridges 
(neq, ":terrain", 8), #rivers!
############
    (assign, ":icon", "icon_dedal_map_vaegir_lord_b"),
######################################
(else_try),
(this_or_next|eq, ":terrain", 0),
(eq, ":terrain", 8),
(assign, ":icon", "icon_ship2"),
######################################
  (else_try),
############
(neq, ":terrain", 0), #water
(neq, ":terrain", 7), #bridges 
(neq, ":terrain", 8), #rivers!
############
    (assign, ":icon", "icon_dedal_map_vaegir_lord_c"),
######################################
(else_try),
(this_or_next|eq, ":terrain", 0),
(eq, ":terrain", 8),
(assign, ":icon", "icon_ship2"),
######################################
  (try_end),

(else_try),
  (eq, ":fac", "fac_kingdom_6"),
  (try_begin),
    (ge, ":num", 200),
############
(neq, ":terrain", 0), #water
(neq, ":terrain", 7), #bridges 
(neq, ":terrain", 8), #rivers!
############
    (assign, ":icon", "icon_dedal_map_sar_lord_a"),
######################################
(else_try),
(this_or_next|eq, ":terrain", 0),
(eq, ":terrain", 8),
(assign, ":icon", "icon_ship2"),
######################################
  (else_try),
    (ge, ":num", 100),
############
(neq, ":terrain", 0), #water
(neq, ":terrain", 7), #bridges 
(neq, ":terrain", 8), #rivers!
############
    (assign, ":icon", "icon_dedal_map_sar_lord_b"),
######################################
(else_try),
(this_or_next|eq, ":terrain", 0),
(eq, ":terrain", 8),
(assign, ":icon", "icon_ship2"),
######################################
  (else_try),
############
(neq, ":terrain", 0), #water
(neq, ":terrain", 7), #bridges 
(neq, ":terrain", 8), #rivers!
############
    (assign, ":icon", "icon_dedal_map_sar_lord_c"),
######################################
(else_try),
(this_or_next|eq, ":terrain", 0),
(eq, ":terrain", 8),
(assign, ":icon", "icon_ship2"),
######################################
  (try_end),

(else_try),
  (eq, ":fac", "fac_kingdom_7"),
  (try_begin),
    (ge, ":num", 200),
############
(neq, ":terrain", 0), #water
(neq, ":terrain", 7), #bridges 
(neq, ":terrain", 8), #rivers!
############
    (assign, ":icon", "icon_dedal_map_lfed_lord_a"),
######################################
(else_try),
(this_or_next|eq, ":terrain", 0),
(eq, ":terrain", 8),
(assign, ":icon", "icon_ship2"),
######################################
  (else_try),
    (ge, ":num", 100),
############
(neq, ":terrain", 0), #water
(neq, ":terrain", 7), #bridges
(neq, ":terrain", 8), #rivers!
############
    (assign, ":icon", "icon_dedal_map_lfed_lord_b"),
######################################
(else_try),
(this_or_next|eq, ":terrain", 0),
(eq, ":terrain", 8),
(assign, ":icon", "icon_ship2"),
######################################
  (else_try),
############
(neq, ":terrain", 0), #water
(neq, ":terrain", 7), #bridges 
(neq, ":terrain", 8), #rivers!
############
    (assign, ":icon", "icon_dedal_map_lfed_lord_c"),
#####################################
(else_try),
(this_or_next|eq, ":terrain", 0),
(eq, ":terrain", 8),
(assign, ":icon", "icon_ship2"),
#####################################
  (try_end),

(else_try),
  (eq, ":fac", "fac_kingdom_1"),
  (try_begin),
    (ge, ":num", 200),
############
(neq, ":terrain", 0), #water
(neq, ":terrain", 7), #bridges 
(neq, ":terrain", 8), #rivers!
############
    (assign, ":icon", "icon_dedal_map_swadia_lord_a"),
######################################
(else_try),
(this_or_next|eq, ":terrain", 0),
(eq, ":terrain", 8),
(assign, ":icon", "icon_ship2"),
######################################
  (else_try),
    (ge, ":num", 100),
############
(neq, ":terrain", 0), #water
(neq, ":terrain", 7), #bridges
(neq, ":terrain", 8), #rivers!
############
    (assign, ":icon", "icon_dedal_map_swadia_lord_b"),
######################################
(else_try),
(this_or_next|eq, ":terrain", 0),
(eq, ":terrain", 8),
(assign, ":icon", "icon_ship2"),
######################################
  (else_try),
############
(neq, ":terrain", 0), #water
(neq, ":terrain", 7), #bridges 
(neq, ":terrain", 8), #rivers!
############
    (assign, ":icon", "icon_dedal_map_swadia_lord_c"),
######################################
(else_try),
(this_or_next|eq, ":terrain", 0),
(eq, ":terrain", 8),
(assign, ":icon", "icon_ship2"),
######################################
  (try_end),
(try_end),

###################################### comandantes ####################
(else_try),
(try_begin),
  (eq, ":fac", "fac_kingdom_3"),
  (try_begin),
    (ge, ":num", 200),
############
(neq, ":terrain", 0), #water
(neq, ":terrain", 7), #bridges
(neq, ":terrain", 8), #rivers!
############
    (assign, ":icon", "icon_dedal_map_khergit_king_a"),
#####################################
(else_try),
(this_or_next|eq, ":terrain", 0),
(eq, ":terrain", 8),
(assign, ":icon", "icon_ship2"),
#####################################
  (else_try),
    (ge, ":num", 100),
############
(neq, ":terrain", 0), #water
(neq, ":terrain", 7), #bridges
(neq, ":terrain", 8), #rivers!
############
    (assign, ":icon", "icon_dedal_map_khergit_king_b"),
######################################
(else_try),
(this_or_next|eq, ":terrain", 0),
(eq, ":terrain", 8),
(assign, ":icon", "icon_ship2"),
######################################
  (else_try),
############
(neq, ":terrain", 0), #water
(neq, ":terrain", 7), #bridges 
(neq, ":terrain", 8), #rivers!
############
    (assign, ":icon", "icon_dedal_map_khergit_king_c"),
######################################
(else_try),
(this_or_next|eq, ":terrain", 0),
(eq, ":terrain", 8),
(assign, ":icon", "icon_ship2"),
######################################
  (try_end),

(else_try),
  (eq, ":fac", "fac_kingdom_4"),
  (try_begin),
    (ge, ":num", 200),
############
(neq, ":terrain", 0), #water
(neq, ":terrain", 7), #bridges 
(neq, ":terrain", 8), #rivers!
############
    (assign, ":icon", "icon_dedal_map_nordic_king_a"),
######################################
(else_try),
(this_or_next|eq, ":terrain", 0),
(eq, ":terrain", 8),
(assign, ":icon", "icon_ship2"),
######################################
  (else_try),
    (ge, ":num", 100),
############
(neq, ":terrain", 0), #water
(neq, ":terrain", 7), #bridges 
(neq, ":terrain", 8), #rivers!
############
    (assign, ":icon", "icon_dedal_map_nordic_king_b"),
######################################
(else_try),
(this_or_next|eq, ":terrain", 0),
(eq, ":terrain", 8),
(assign, ":icon", "icon_ship2"),
######################################
  (else_try),
############
(neq, ":terrain", 0), #water
(neq, ":terrain", 7), #bridges 
(neq, ":terrain", 8), #rivers!
############
    (assign, ":icon", "icon_dedal_map_nordic_king_c"),
######################################
(else_try),
(this_or_next|eq, ":terrain", 0),
(eq, ":terrain", 8),
(assign, ":icon", "icon_ship2"),
######################################
  (try_end),

(else_try),
  (eq, ":fac", "fac_kingdom_5"),
  (try_begin),
    (ge, ":num", 200),
############
(neq, ":terrain", 0), #water
(neq, ":terrain", 7), #bridges
(neq, ":terrain", 8), #rivers!
############
    (assign, ":icon", "icon_dedal_map_rhodok_king_a"),
######################################
(else_try),
(this_or_next|eq, ":terrain", 0),
(eq, ":terrain", 8),
(assign, ":icon", "icon_ship2"),
######################################
  (else_try),
    (ge, ":num", 100),
############
(neq, ":terrain", 0), #water
(neq, ":terrain", 7), #bridges 
(neq, ":terrain", 8), #rivers!
############
    (assign, ":icon", "icon_dedal_map_rhodok_king_b"),
######################################
(else_try),
(this_or_next|eq, ":terrain", 0),
(eq, ":terrain", 8),
(assign, ":icon", "icon_ship2"),
######################################
  (else_try),
############
(neq, ":terrain", 0), #water
(neq, ":terrain", 7), #bridges
(neq, ":terrain", 8), #rivers!
############
    (assign, ":icon", "icon_dedal_map_rhodok_king_c"),
######################################
(else_try),
(this_or_next|eq, ":terrain", 0),
(eq, ":terrain", 8),
(assign, ":icon", "icon_ship2"),
######################################
  (try_end),

(else_try),
  (eq, ":fac", "fac_kingdom_2"),
  (try_begin),
    (ge, ":num", 200),
############
(neq, ":terrain", 0), #water
(neq, ":terrain", 7), #bridges 
(neq, ":terrain", 8), #rivers!
############
    (assign, ":icon", "icon_dedal_map_vaegir_king_a"),
######################################
(else_try),
(this_or_next|eq, ":terrain", 0),
(eq, ":terrain", 8),
(assign, ":icon", "icon_ship2"),
######################################
  (else_try),
    (ge, ":num", 100),
############
(neq, ":terrain", 0), #water
(neq, ":terrain", 7), #bridges 
(neq, ":terrain", 8), #rivers!
############
    (assign, ":icon", "icon_dedal_map_vaegir_king_b"),
######################################
(else_try),
(this_or_next|eq, ":terrain", 0),
(eq, ":terrain", 8),
(assign, ":icon", "icon_ship2"),
######################################
  (else_try),
############
(neq, ":terrain", 0), #water
(neq, ":terrain", 7), #bridges
(neq, ":terrain", 8), #rivers!
############
    (assign, ":icon", "icon_dedal_map_vaegir_king_c"),
######################################
(else_try),
(this_or_next|eq, ":terrain", 0),
(eq, ":terrain", 8),
(assign, ":icon", "icon_ship2"),
######################################
  (try_end),

(else_try),
  (eq, ":fac", "fac_kingdom_6"),
  (try_begin),
    (ge, ":num", 200),
############
(neq, ":terrain", 0), #water
(neq, ":terrain", 7), #bridges
(neq, ":terrain", 8), #rivers!
############
    (assign, ":icon", "icon_dedal_map_sar_king_a"),
######################################
(else_try),
(this_or_next|eq, ":terrain", 0),
(eq, ":terrain", 8),
(assign, ":icon", "icon_ship2"),
######################################
  (else_try),
    (ge, ":num", 100),
############
(neq, ":terrain", 0), #water
(neq, ":terrain", 7), #bridges
(neq, ":terrain", 8), #rivers!
############
    (assign, ":icon", "icon_dedal_map_sar_king_b"),
######################################
(else_try),
(this_or_next|eq, ":terrain", 0),
(eq, ":terrain", 8),
(assign, ":icon", "icon_ship2"),
######################################
  (else_try),
############
(neq, ":terrain", 0), #water
(neq, ":terrain", 7), #bridges
(neq, ":terrain", 8), #rivers!
############
    (assign, ":icon", "icon_dedal_map_sar_king_c"),
######################################
(else_try),
(this_or_next|eq, ":terrain", 0),
(eq, ":terrain", 8),
(assign, ":icon", "icon_ship2"),
######################################
  (try_end),

(else_try),
  (eq, ":fac", "fac_kingdom_7"),
  (try_begin),
    (ge, ":num", 200),
############
(neq, ":terrain", 0), #water
(neq, ":terrain", 7), #bridges
(neq, ":terrain", 8), #rivers!
############
    (assign, ":icon", "icon_dedal_map_lfed_king_a"),
######################################
(else_try),
(this_or_next|eq, ":terrain", 0),
(eq, ":terrain", 8),
(assign, ":icon", "icon_ship2"),
######################################
  (else_try),
    (ge, ":num", 100),
############
(neq, ":terrain", 0), #water
(neq, ":terrain", 7), #bridges
(neq, ":terrain", 8), #rivers!
############
    (assign, ":icon", "icon_dedal_map_lfed_king_b"),
#####################################
(else_try),
(this_or_next|eq, ":terrain", 0),
(eq, ":terrain", 8),
(assign, ":icon", "icon_ship2"),
####################################
  (else_try),
############
(neq, ":terrain", 0), #water
(neq, ":terrain", 7), #bridges 
(neq, ":terrain", 8), #rivers!
############
    (assign, ":icon", "icon_dedal_map_lfed_king_c"),
#####################################
(else_try),
(this_or_next|eq, ":terrain", 0),
(eq, ":terrain", 8),
(assign, ":icon", "icon_ship2"),
#####################################
  (try_end),

(else_try),
  (eq, ":fac", "fac_kingdom_1"),
  (try_begin),
    (ge, ":num", 200),
############
(neq, ":terrain", 0), #water
(neq, ":terrain", 7), #bridges 
(neq, ":terrain", 8), #rivers!
############
    (assign, ":icon", "icon_dedal_map_swadia_king_a"),
######################################
(else_try),
(this_or_next|eq, ":terrain", 0),
(eq, ":terrain", 8),
(assign, ":icon", "icon_ship2"),
######################################
  (else_try),
    (ge, ":num", 100),
############
(neq, ":terrain", 0), #water
(neq, ":terrain", 7), #bridges
(neq, ":terrain", 8), #rivers!
############
    (assign, ":icon", "icon_dedal_map_swadia_king_b"),
######################################
(else_try),
(this_or_next|eq, ":terrain", 0),
(eq, ":terrain", 8),
(assign, ":icon", "icon_ship2"),
######################################
  (else_try),
############
(neq, ":terrain", 0), #water
(neq, ":terrain", 7), #bridges 
(neq, ":terrain", 8), #rivers!
############
(assign, ":icon", "icon_dedal_map_swadia_king_c"),
######################################
(else_try),
(this_or_next|eq, ":terrain", 0),
(eq, ":terrain", 8),
(assign, ":icon", "icon_ship2"),
#######################################
(try_end),
(try_end),
(try_end),
(party_set_icon, ":party", ":icon"),
(try_end),
]),
# map icon mauro fin
 
You should provide a link to the icons thread that would be useful if someone wants the same in his ms.
Sure friend :xf-cool: This is the link to the Slawomir of Aaarrghh thread for an icon pack, but at the bottom of the page, Janycz provides the code to add them.
https://forums.taleworlds.com/index.php?threads/map-icons-pack.303947/
this other link is to the NPC99 tutorial to create your own animated icons
https://forums.taleworlds.com/index.php?threads/how-to-make-animated-map-icons-in-openbrf.376980/
 
Back
Top Bottom