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

Users who are viewing this thread

I think I've managed to fix problems with the script with this clumsy Simple Trigger that I wrote.

Simple_triggers.py
Code:
#UPDATE PATHING WATER TRAVEL
(1,
  [
(try_for_parties, ":party_no"),
 (party_is_active, ":party_no"),
 (this_or_next|party_slot_eq, ":party_no", slot_party_type, spt_kingdom_hero_party),
 (this_or_next|party_slot_eq, ":party_no", slot_party_type, spt_kingdom_caravan),
 (party_slot_eq, ":party_no", slot_party_type, spt_village_farmer),
 (store_faction_of_party, ":party_faction", ":party_no"),
  (try_begin),
            (party_get_slot, ":target_center", ":party_no", slot_party_ai_object),
            (ge, ":target_center", 0),
 (party_is_active, ":target_center"),
   (party_slot_eq, ":party_no", slot_party_type, spt_kingdom_hero_party),
   (party_slot_eq, ":party_no", slot_party_ai_state, spai_accompanying_army),
   (neg|party_slot_eq, ":target_center", slot_party_type, spt_kingdom_hero_party),
    (try_begin),
     (faction_get_slot, ":faction_marshal", ":party_faction", slot_faction_marshall),
            (ge, ":faction_marshal", 0),
     (party_is_active, ":faction_marshal"),
     (assign, ":target_center", ":faction_marshal"),
     (assign, "$g_party_no", ":party_no"),
        (assign, "$g_target_center", ":target_center"),
     (call_script, "script_calculate_distances"),
    (else_try),
     (faction_get_slot, ":faction_leader", ":party_faction", slot_faction_leader),
     (party_is_active, ":faction_leader"),
     (assign, ":target_center", ":faction_leader"),
     (assign, "$g_party_no", ":party_no"),
        (assign, "$g_target_center", ":target_center"),
     (call_script, "script_calculate_distances"),
    (else_try),
          (call_script, "script_party_set_ai_state", ":party_no", spai_undefined, -1),
          (assign, "$g_recalculate_ais", 1),
    (try_end),
(else_try),
(party_get_current_terrain, ":terrain", ":party_no"),
(this_or_next|eq, ":terrain", 0),
(eq, ":terrain", 8),

(party_get_slot, ":target_center", ":party_no", slot_party_destination),
            (ge, ":target_center", 0),
 (party_is_active, ":target_center"),
     (assign, "$g_party_no", ":party_no"),
        (assign, "$g_target_center", ":target_center"),
     (call_script, "script_calculate_distances"),
    (else_try),
            (party_get_slot, ":target_center", ":party_no", slot_party_ai_object),
            (ge, ":target_center", 0),
 (party_is_active, ":target_center"),
     (assign, "$g_party_no", ":party_no"),
        (assign, "$g_target_center", ":target_center"),
     (call_script, "script_calculate_distances"),
(else_try),
(party_slot_eq, ":party_no", slot_party_type, spt_kingdom_hero_party),
          (call_script, "script_party_set_ai_state", ":party_no", spai_undefined, -1),
          (assign, "$g_recalculate_ais", 1),
  (try_end),
(try_end),
  ]),
 
Is this a fix for the lords getting stuck on coasts?

No, when I worked with this thing, I wasn't as good at Warband scripting as I am now. My best advice for you as a fairly experienced modder now is that if you want sea travel and naval battles, you use Viking Conquest as your base instead of native Warband.
 
Yes, I was actually wondering what the "best" sailing system was atm. TBH I don't really like the actual ship combat in VC though, it's cool at first but as soon as you have ships of different sizes the ai gets stuck and it becomes an awful mess (at least in AWOIAF), Is it fairly easy to replace the combat mission for VC with static ship scenes? I'm assuming it would just be a case of using the appropriate module_menu section from this script in place of the VC script but idk how much goes on with VC (and obviously having the scene files).
 
Back
Top Bottom