For reference, I had to modify the code a bit to make it work, so here is my working code:
## SEA BATTLES BEGIN
(0.1, 0, 0, [(party_get_current_terrain,":terrain","p_main_party"),(assign,reg1,":terrain")], # rt_steppe is an example for the name of your new water terrain
[(try_begin),
(troop_get_inventory_slot, ":cur_horse", "trp_player", 8), #horse slot
(assign, ":new_icon", -1),
(try_begin),
(eq,reg1,5),
(assign, ":new_icon", "icon_ship"),
#(display_message,"@water"),
(else_try),
(eq, "$g_player_icon_state", pis_normal),
(try_begin),
(ge, ":cur_horse", 0),
(assign, ":new_icon", "icon_player_horseman"),
#(display_message,"@no water, horse"),
(else_try),
(assign, ":new_icon", "icon_player"),
#(display_message,"@no water, no horse"),
(try_end),
(else_try),
(eq, "$g_player_icon_state", pis_camping), # All of this is thanks to Lumos bein' generous, and not being as much of a lazy arse as I am
(assign, ":new_icon", "icon_camp"),
(try_end),
(party_set_icon,"p_main_party", ":new_icon"),
]),
# (0.1, 0, 0, [(party_get_current_terrain,":terrain","p_main_party"),
# (neq,":terrain",5),], #Oh shi- ALL HAIL HYPNOTOAD
# [(party_set_icon,"p_main_party", "icon_player"),
# (display_message,"@Not water"),
# ]),
(0.1, 0, 0.0, [],
[(try_for_parties, ":cur_party"),
(party_get_current_terrain, ":terrain", ":cur_party"),
(eq, ":terrain", 5),
(party_get_template_id, ":cur_template", ":cur_party"),
(this_or_next|eq, ":cur_template", "pt_kingdom_hero_party"),
(this_or_next|eq, ":cur_template", "pt_kingdom_caravan_party"),
(this_or_next|eq, ":cur_template", "pt_manhunters"),
(this_or_next|eq, ":cur_template", "pt_village_farmers"),
(this_or_next|eq, ":cur_template", "pt_deserters"),
(this_or_next|eq, ":cur_template", "pt_looters"),
(this_or_next|eq, ":cur_template", "pt_forest_bandits"),
(this_or_next|eq, ":cur_template", "pt_steppe_bandits"),
(this_or_next|eq, ":cur_template", "pt_mountain_bandits"),
(eq, ":cur_template", "pt_sea_raiders"),
(party_set_icon, ":cur_party", "icon_ship"),
(else_try),
(neq,":terrain",5),
(party_get_template_id, ":cur_template", ":cur_party"),
(eq, ":cur_template", "pt_kingdom_hero_party"),
(party_set_icon,":cur_party","icon_flagbearer_a"),
(else_try),
(eq, ":cur_template", "pt_kingdom_caravan_party"),
(party_set_icon,":cur_party","icon_mule"),
(else_try),
(eq, ":cur_template", "pt_deserters"),
(party_set_icon,":cur_party","icon_vaegir_knight"),
(else_try),
(eq, ":cur_template", "pt_manhunters"),
(party_set_icon,":cur_party","icon_gray_knight"),
(else_try),
(eq, ":cur_template", "pt_village_farmers"),
(party_set_icon,":cur_party","icon_peasant"),
(else_try),
(this_or_next|eq, ":cur_template", "pt_looters"),
(this_or_next|eq, ":cur_template", "pt_forest_bandits"),
(this_or_next|eq, ":cur_template", "pt_steppe_bandits"),
(this_or_next|eq, ":cur_template", "pt_mountain_bandits"),
(eq, ":cur_template", "pt_sea_raiders"),
(party_set_icon,":cur_party","icon_axeman"),
(else_try),
(eq, ":cur_template", "pt_cattle_herd"),
(party_set_icon,":cur_party","icon_cattle"),
(try_end),]),
## SEA BATTLES END