Faction Patrols

Users who are viewing this thread

It should work normal, but I will look at my own this evening and then post if I have done something different than you.



EDIT: Ok, this is what I did to let my patrols work,

Uncomment this in module_constants;
Code:
##spt_patrol             = 7

Be sure that in module_party_templates, this party is out commented.
Code:
 ("patrol_party","Patrol",icon_gray_knight|carries_goods(2)|pf_show_faction,0,fac_commoners,soldier_personality,[]),

Uncomment this in module_scripts;
Code:
##    (eq, ":party_type", spt_patrol),
##      (assign, ":party_count_limit", 10),
##     (else_try),

Then, uncomment this in module_scripts, except for the third line as noted in the OP;
Code:
##      (eq, ":party_type", spt_patrol),
##     (assign, ":party_template", "pt_patrol_party"),
##        (assign, ":party_name_str", "str_s7_patrol"),
##     (else_try),

In module_scripts be sure to have it corresponding as this;

Code:
       (eq, ":party_type", spt_patrol),
#	   (party_add_template, ":result", ":reinforcements_a"),
       (party_add_template, ":result", ":reinforcements_b"),
       (else_try),

Then uncomment this in module_triggers;

Code:
##   (try_begin),
##       (store_random_in_range, ":random_no", 0, 100),
##       (lt, ":random_no", 10),
##       (call_script, "script_create_kingdom_party_if_below_limit", ":cur_kingdom", spt_patrol),
##     (try_end),



I am afraid I cannot explain it more clearer than that. The patrols will appear after several days from castles and towns and will patrol the surrounding area. Do you have any errors when you compile or start up the game?
 
#        (assign, ":party_name_str", "str_s7_patrol"),

you can safely uncomment the line above if you define the string at module_strings.py:
("s7_patrol","{s7} Patrol"),
 
ah now i have find it you don't must outcommend :

# (Party_add_template ": Ergebnis", ": reinforcements_a"),


because looked that:

in module scripts:

#      (faction_get_slot, ":reinforcements_a", ":faction_no", slot_faction_reinforcements_a),
      (faction_get_slot, ":reinforcements_b", ":faction_no", slot_faction_reinforcements_b),
#      (faction_get_slot, ":reinforcements_c", ":faction_no", slot_faction_reinforcements_c),
 

do taht to this:

      (faction_get_slot, ":reinforcements_a", ":faction_no", slot_faction_reinforcements_a),
      (faction_get_slot, ":reinforcements_b", ":faction_no", slot_faction_reinforcements_b),
      (faction_get_slot, ":reinforcements_c", ":faction_no", slot_faction_reinforcements_c),
 






and now do it realy good:
 
Utrehd said:
yes but i have see only one patrol i don't know why ^^

This is why,

then go to module_scripts.py and uncomment this:

##        (eq, ":party_type", spt_patrol),
##        (assign, ":party_count_limit", 1), <-- party says 1 must be higher.
##      (else_try),


if you leave party count to 1 all faction will only have 1 patrol available. change that number to 20 and 20 will be available.
 
Looked that


this is now my script.


# script_create_kingdom_party_if_below_limit
  # Input: arg1 = faction_no, arg2 = party_type (variables beginning with spt_)
  # Output: reg0 = party_no
  ("create_kingdom_party_if_below_limit",
    [
      (store_script_param_1, ":faction_no"),
      (store_script_param_2, ":party_type"),
     
      (call_script, "script_count_parties_of_faction_and_party_type", ":faction_no", ":party_type"),
      (assign, ":party_count", reg0),
     
      (assign, ":party_count_limit", 100),
      (try_begin),
        (eq, ":party_type", spt_forager),
        (assign, ":party_count_limit", 30),
      (else_try),
        (eq, ":party_type", spt_scout),
        (assign, ":party_count_limit", 24),
      (else_try),
        (eq, ":party_type", spt_patrol),
        (assign, ":party_count_limit", 4:cool:,
      (else_try),
        (eq, ":party_type", spt_messenger),
        (assign, ":party_count_limit", 12),
      (else_try),
        (eq, ":party_type", spt_kingdom_caravan),
        (assign, ":party_count_limit", 4:cool:,
      (else_try),
        (eq, ":party_type", spt_prisoner_train),
        (assign, ":party_count_limit", 15),
      (else_try),
        (eq, ":party_type", spt_raider),
        (assign, ":party_count_limit", 15),
      (try_end),
     
      (assign, reg0, -1),
      (try_begin),
        (lt, ":party_count", ":party_count_limit"),
        (call_script,"script_cf_create_kingdom_party", ":faction_no", ":party_type"),
      (try_end),
  ]),


but i don't see any Patrol etc. 
waht going on with this thing mean.


Or must i wait a long time?
 
just a wild guess but have you tried new game ?? not all changes are save game compatible. So if you change something and it is not showing always try new game first.
 
are you sure ?? i do remember when edited the part when changing the number how many spawned it forced  me to start over to see any effect. Or else he should wait a while and see if any spawns. usually it takes 72 hours depends how high he set the spawning range.
 
Putting some display_message at the code, and see if it will be displayed correctly when we play the game.

Example, at the "cf_create_kingdom_party" script :
Code:
  
        (try_begin),
##          (eq, ":party_type", spt_forager),
##          (party_add_template, ":result", ":reinforcements_a"),
##        (else_try),
##          (eq, ":party_type", spt_scout),
##          (party_add_template, ":result", ":reinforcements_c"),
        (else_try),
             (eq, ":party_type", spt_patrol),
             (display_message, "@Patrol created for {s7}"
),
##          (party_add_template, ":result", ":reinforcements_a"),
              (party_add_template, ":result", ":reinforcements_b"),
        (else_try),
          (eq, ":party_type", spt_kingdom_caravan),
          (party_add_template, ":result", ":reinforcements_b"),
          (party_add_template, ":result", ":reinforcements_b"),
          (party_set_ai_behavior,":result",ai_bhvr_travel_to_party),
          (party_set_ai_object,":result",":spawn_center"),
          (party_set_flags, ":result", pf_default_behavior, 1),
          (store_sub, ":item_to_price_slot", slot_town_trade_good_prices_begin, trade_goods_begin),
          (try_for_range, ":cur_goods", trade_goods_begin, trade_goods_end),
            (store_add, ":cur_goods_price_slot", ":cur_goods", ":item_to_price_slot"),
            (party_set_slot, ":result", ":cur_goods_price_slot", average_price_factor),
          (try_end),
##        (else_try),
##          (eq, ":party_type", spt_messenger),
##          (faction_get_slot, ":messenger_troop", ":faction_no", slot_faction_messenger_troop),
##          (party_add_leader, ":result", ":messenger_troop"),
##          (party_set_ai_behavior,":result",ai_bhvr_travel_to_party),
##          (party_set_ai_object,":result",":spawn_center"),
##          (party_set_flags, ":result", pf_default_behavior, 0),
##        (else_try),
##          (eq, ":party_type", spt_raider),
##          (party_add_template, ":result", ":reinforcements_c"),
##          (party_add_template, ":result", ":reinforcements_b"),
##          (party_add_template, ":result", "pt_raider_captives"),
##        (else_try),
##          (eq, ":party_type", spt_prisoner_train),
##          (party_add_template, ":result", ":reinforcements_b"),
##          (party_add_template, ":result", ":reinforcements_a"),
##          (try_begin),
##            (call_script,"script_cf_faction_get_random_enemy_faction",":faction_no"),
##            (store_random_in_range,":r",0,3),
##            (try_begin),
##              (lt, ":r", 1),
##              (faction_get_slot, ":captive_reinforcements", reg0, slot_faction_reinforcements_b),
##            (else_try),
##              (faction_get_slot, ":captive_reinforcements", reg0, slot_faction_reinforcements_a),
##            (try_end),
##            (party_add_template, ":result", ":captive_reinforcements",1),
##          (else_try),
##            (party_add_template, ":result", "pt_default_prisoners"),
##          (try_end),
        (try_end),
      (try_end),
      (ge, ":result", 0),
      (assign, reg0, ":result"),
  ]),

Put similar things at the script, and trace down if the message displayed.
 
ni have play a long time and any krawan or partol coming in the game waht can i do
 
Back
Top Bottom