-- Official Unofficial 'Ask Questions About Warband Singleplayer Here' Thread --

Users who are viewing this thread

Hello.  Unfortunately, even if I speak to the lords/ladies, they do not cycle out of the castle hall.  I have included the sections of code that I have placed into the Module_Scripts file along with some of the surrounding text to show where I have placed the code.  Could it be a problem with where the code is being placed?  Alternatively, does the code possibly depend on having other files modified?

Note, I have put in a suggestion for this feature to simply be included in native.  However, with the game having been out for so long, I do not expect that Mount and Blade Warband is being actively updated

      (troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_thrown, 5),
      (troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_arrows, 2),
      (troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_bolts, 2),
      (troop_ensure_inventory_space, ":cur_merchant", merchant_inventory_space),
      (troop_sort_inventory, ":cur_merchant"),
      (store_troop_gold, reg6, ":cur_merchant"),
      (lt, reg6, 1000),
      (store_random_in_range, ":new_gold", 250, 500),
      (call_script, "script_troop_add_gold", ":cur_merchant", ":new_gold"),
    (try_end),
  ]),

                        # script_dplmc_time_sorted_heroes_for_center_aux
                    # For internal use only
                    # param 1: center no
                    # param 2: party_no_to_collect_heroes
                    # param 3: minimum time since last met (inclusive), or negative for no restriction
                    # param 4: maximum time since last met (exclusive), or negative for no restriction
                    ("dplmc_time_sorted_heroes_for_center_aux",
                    [
                      (store_script_param_1, ":center_no"),
                      (store_script_param_2, ":party_no_to_collect_heroes"),
                      (store_script_param, ":min_time", 3),
                      (store_script_param, ":max_time", 4),

                      (store_current_hours, ":current_hours"),
                     
                      (party_get_num_companion_stacks, ":num_stacks",":center_no"),
                      (try_for_range, ":i_stack", 0, ":num_stacks"),
                        (party_stack_get_troop_id, ":stack_troop",":center_no",":i_stack"),
                        (troop_is_hero, ":stack_troop"),
                        #get time since last talk
                        (troop_get_slot, ":troop_last_talk_time", ":stack_troop", slot_troop_last_talk_time),
                        (store_sub, ":time_since_last_talk", ":current_hours", ":troop_last_talk_time"),
                        #add if time meets constraints
                        (this_or_next|ge, ":time_since_last_talk", ":min_time"),
                          (lt, ":min_time", 0),
                        (this_or_next|lt, ":time_since_last_talk", ":max_time"),
                          (lt, ":max_time", 0),
                        (party_add_members, ":party_no_to_collect_heroes", ":stack_troop", 1),
                      (try_end),
                      (party_get_num_attached_parties, ":num_attached_parties", ":center_no"),
                      (try_for_range, ":attached_party_rank", 0, ":num_attached_parties"),
                        (party_get_attached_party_with_rank, ":attached_party", ":center_no", ":attached_party_rank"),
                        (gt, ":attached_party", 0), #Floris - bugfix
                        (call_script, "script_dplmc_time_sorted_heroes_for_center_aux", ":attached_party", ":party_no_to_collect_heroes",":min_time",":max_time"),
                      (try_end),
                    ]),

                    # script_dplmc_time_sorted_heroes_for_center
                    # Input: arg1 = center_no, arg2 = party_no_to_collect_heroes
                    # Output: none, adds heroes to the party_no_to_collect_heroes party
                    # The catch is that it returns heroes who haven't been met in a day
                    # or more before others, for greater use in feasts.
                    ("dplmc_time_sorted_heroes_for_center",
                    [
                      (store_script_param_1, ":center_no"),
                      (store_script_param_2, ":party_no_to_collect_heroes"),
                      (party_clear, ":party_no_to_collect_heroes"),

                      #Heroes you haven't spoken to in 24+ hours
                      (call_script, "script_dplmc_time_sorted_heroes_for_center_aux",
                        ":center_no", ":party_no_to_collect_heroes", 24, -1),

                      #Heroes you haven't spoken to in 12 to 24 hours
                      (call_script, "script_dplmc_time_sorted_heroes_for_center_aux",
                        ":center_no", ":party_no_to_collect_heroes", 12, 24),

                      #Everyone else
                      (call_script, "script_dplmc_time_sorted_heroes_for_center_aux",
                        ":center_no", ":party_no_to_collect_heroes", -1, 12),

                      #Non-attached pretenders
                      (try_for_range, ":pretender", pretenders_begin, pretenders_end),
                        (neq, ":pretender", "$supported_pretender"),
                        (troop_slot_eq, ":pretender", slot_troop_cur_center, ":center_no"),
                        (party_add_members, ":party_no_to_collect_heroes", ":pretender", 1),
                      (try_end),
                    ]),
 
  # script_refresh_center_stables
  ("refresh_center_stables",
  [
    (reset_item_probabilities, 100),
    (set_merchandise_modifier_quality, 150),
    (try_for_range, ":cur_merchant", horse_merchants_begin, horse_merchants_end),
  (troop_clear_inventory, ":cur_merchant"),
      (store_sub, ":cur_town", ":cur_merchant", horse_merchants_begin),

**********************************************************

      (troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_thrown, 5),
      (troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_arrows, 2),
      (troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_bolts, 2),
      (troop_ensure_inventory_space, ":cur_merchant", merchant_inventory_space),
      (troop_sort_inventory, ":cur_merchant"),
      (store_troop_gold, reg6, ":cur_merchant"),
      (lt, reg6, 1000),
      (store_random_in_range, ":new_gold", 250, 500),
      (call_script, "script_troop_add_gold", ":cur_merchant", ":new_gold"),
    (try_end),
  ]),

                        # script_dplmc_time_sorted_heroes_for_center_aux
                    # For internal use only
                    # param 1: center no
                    # param 2: party_no_to_collect_heroes
                    # param 3: minimum time since last met (inclusive), or negative for no restriction
                    # param 4: maximum time since last met (exclusive), or negative for no restriction
                    ("dplmc_time_sorted_heroes_for_center_aux",
                    [
                      (store_script_param_1, ":center_no"),
                      (store_script_param_2, ":party_no_to_collect_heroes"),
                      (store_script_param, ":min_time", 3),
                      (store_script_param, ":max_time", 4),

                      (store_current_hours, ":current_hours"),
                     
                      (party_get_num_companion_stacks, ":num_stacks",":center_no"),
                      (try_for_range, ":i_stack", 0, ":num_stacks"),
                        (party_stack_get_troop_id, ":stack_troop",":center_no",":i_stack"),
                        (troop_is_hero, ":stack_troop"),
                        #get time since last talk
                        (troop_get_slot, ":troop_last_talk_time", ":stack_troop", slot_troop_last_talk_time),
                        (store_sub, ":time_since_last_talk", ":current_hours", ":troop_last_talk_time"),
                        #add if time meets constraints
                        (this_or_next|ge, ":time_since_last_talk", ":min_time"),
                          (lt, ":min_time", 0),
                        (this_or_next|lt, ":time_since_last_talk", ":max_time"),
                          (lt, ":max_time", 0),
                        (party_add_members, ":party_no_to_collect_heroes", ":stack_troop", 1),
                      (try_end),
                      (party_get_num_attached_parties, ":num_attached_parties", ":center_no"),
                      (try_for_range, ":attached_party_rank", 0, ":num_attached_parties"),
                        (party_get_attached_party_with_rank, ":attached_party", ":center_no", ":attached_party_rank"),
                        (gt, ":attached_party", 0), #Floris - bugfix
                        (call_script, "script_dplmc_time_sorted_heroes_for_center_aux", ":attached_party", ":party_no_to_collect_heroes",":min_time",":max_time"),
                      (try_end),
                    ]),

                    # script_dplmc_time_sorted_heroes_for_center
                    # Input: arg1 = center_no, arg2 = party_no_to_collect_heroes
                    # Output: none, adds heroes to the party_no_to_collect_heroes party
                    # The catch is that it returns heroes who haven't been met in a day
                    # or more before others, for greater use in feasts.
                    ("dplmc_time_sorted_heroes_for_center",
                    [
                      (store_script_param_1, ":center_no"),
                      (store_script_param_2, ":party_no_to_collect_heroes"),
                      (party_clear, ":party_no_to_collect_heroes"),

                      #Heroes you haven't spoken to in 24+ hours
                      (call_script, "script_dplmc_time_sorted_heroes_for_center_aux",
                        ":center_no", ":party_no_to_collect_heroes", 24, -1),

                      #Heroes you haven't spoken to in 12 to 24 hours
                      (call_script, "script_dplmc_time_sorted_heroes_for_center_aux",
                        ":center_no", ":party_no_to_collect_heroes", 12, 24),

                      #Everyone else
                      (call_script, "script_dplmc_time_sorted_heroes_for_center_aux",
                        ":center_no", ":party_no_to_collect_heroes", -1, 12),

                      #Non-attached pretenders
                      (try_for_range, ":pretender", pretenders_begin, pretenders_end),
                        (neq, ":pretender", "$supported_pretender"),
                        (troop_slot_eq, ":pretender", slot_troop_cur_center, ":center_no"),
                        (party_add_members, ":party_no_to_collect_heroes", ":pretender", 1),
                      (try_end),
                    ]),
 
  # script_refresh_center_stables
  ("refresh_center_stables",
  [
    (reset_item_probabilities, 100),
    (set_merchandise_modifier_quality, 150),
    (try_for_range, ":cur_merchant", horse_merchants_begin, horse_merchants_end),
  (troop_clear_inventory, ":cur_merchant"),
      (store_sub, ":cur_town", ":cur_merchant", horse_merchants_begin),
 
Rabbit86 said:
Hello.  Unfortunately, even if I speak to the lords/ladies, they do not cycle out of the castle hall.  I have included the sections of code that I have placed into the Module_Scripts file along with some of the surrounding text to show where I have placed the code.  Could it be a problem with where the code is being placed?  Alternatively, does the code possibly depend on having other files modified?


Well, I will show you where I put it in the copy of Warband I checked it in. It is basically Native version 1.160.

First, the first piece of code must be inserted in the larger tulip (piece of code) called enter_court. This should only occur twice if you search, once to label the section and the section which starts right under.

Under find this piece of code, you are going to replace it:

      (call_script, "script_get_heroes_attached_to_center", ":center_no", "p_temp_party"),
      (party_get_num_companion_stacks, ":num_stacks","p_temp_party"),
      (try_for_range, ":i_stack", 0, ":num_stacks"),
        (party_stack_get_troop_id, ":stack_troop","p_temp_party",":i_stack"),
        (lt, ":cur_pos", 32), # spawn up to entry point 32 - is it possible to add another 10 spots?

I put mine here, remember replacing the above:

  #Lords wishing to pledge allegiance - inactive, but part of player faction
  (try_begin),
(eq, "$g_player_court", ":center_no"),
    (faction_slot_eq, ":center_faction", slot_faction_leader, "trp_player"),
    (try_for_range, ":active_npc", active_npcs_begin, active_npcs_end),
      (store_faction_of_troop, ":active_npc_faction", ":active_npc"),
      (eq, ":active_npc_faction", "fac_player_supporters_faction"),
      (troop_slot_eq, ":active_npc", slot_troop_occupation, slto_inactive),
      (neg|troop_slot_ge, ":active_npc", slot_troop_prisoner_of_party, 0), #if he/she is not prisoner in any center.
      (neq, ":active_npc", "$g_player_minister"),
      (set_visitor, ":cur_pos", ":active_npc"),      
      (val_add,":cur_pos", 1),
(try_end),
  (try_end),  
 
                    #### xxxx Start Suffle Lords - replace this:      (call_script, "script_get_heroes_attached_to_center", ":center_no", "p_temp_party"), WITH
  ##diplomacy start+
  #Show heroes you haven't seen recently first, to deal with crowded feast halls
  #(call_script, "script_get_heroes_attached_to_center", ":center_no", "p_temp_party"),
  (call_script, "script_dplmc_time_sorted_heroes_for_center", ":center_no", "p_temp_party"),
  #Reserve a certain number of feast positions for ladies, both for practical
  #reasons of courtship and for visual variety.
  (try_begin),
#If the player is unmarried, reserve zero to 8 slots for women
(lt, ":player_spouse", 1),
(store_random_in_range, ":reserved", 0, 9),
  (else_try),
#If the player is married, reserve zero to four slots for women
(store_random_in_range, ":reserved", 0, 5),
  (try_end),
  (store_sub, ":non_lady_max", 32, ":reserved"),
  #diplomacy end+
  (party_get_num_companion_stacks, ":num_stacks","p_temp_party"),
  (try_for_range, ":i_stack", 0, ":num_stacks"),
(party_stack_get_troop_id, ":stack_troop","p_temp_party",":i_stack"),
##diplomacy start+
#(lt, ":cur_pos", 32), # spawn up to entry point 32 - is it possible to add another 10 spots?
(lt, ":cur_pos", ":non_lady_max"),#Leave some room for ladies in huge feasts
##diplomacy end+
                    #### xxxx End Suffle Lords


(set_visitor, ":cur_pos", ":stack_troop"),
        (val_add,":cur_pos", 1),
      (try_end),
      (try_for_range, ":cur_troop", kingdom_ladies_begin, kingdom_ladies_end),
    (neq, ":cur_troop", "trp_knight_1_1_wife"), #The one who should not appear in game
        #(troop_slot_eq, ":cur_troop", slot_troop_occupation, slto_kingdom_lady),
        (troop_slot_eq, ":cur_troop", slot_troop_cur_center, ":center_no"),

(assign, ":lady_meets_visitors", 0),
(try_begin),
(this_or_next|troop_slot_eq, "trp_player", slot_troop_spouse, ":cur_troop"), #player spouse goes in position of honor
(this_or_next|troop_slot_eq, "trp_player", slot_troop_betrothed, ":cur_troop"), #player spouse goes in position of honor
(this_or_next|troop_slot_eq, ":cur_troop", slot_troop_spouse, "trp_player"), #player spouse goes in position of honor
(troop_slot_eq, ":cur_troop", slot_troop_betrothed, "trp_player"),

(assign, ":lady_meets_visitors", 0), #She is already in the place of honor

(try_begin),
(eq, "$cheat_mode", 1),
(str_store_troop_name, s4, ":cur_troop"),
(display_message, "str_s4_is_present_at_the_center_and_in_place_of_honor"),
(try_end),


The second and third piece of code need to be placed further down in module_scripts. It is new code and does not replace anything. I placed them here:

    (try_begin),
  (this_or_next|eq, ":entry_type", logent_lord_defeated_by_player),
      (this_or_next|eq, ":entry_type", logent_player_participated_in_major_battle),
(eq, ":entry_type", logent_player_participated_in_siege),

      (try_begin),
        (eq, "$cheat_mode", 1),
        (display_message, "@{!}Ally party is present"),
      (try_end),
      (try_for_range, ":hero", active_npcs_begin, active_npcs_end),
        (party_count_companions_of_type, ":hero_present", "p_collective_friends", ":hero"),
        (gt, ":hero_present", 0),
        (troop_set_slot, ":hero", slot_troop_present_at_event, "$num_log_entries"),
#        (store_sub, ":skip_up_to_here", "$num_log_entries", 1),
#        (troop_set_slot, ":hero", slot_troop_last_comment_slot, ":skip_up_to_here"),
        (try_begin),
          (eq, "$cheat_mode", 1),
          (str_store_troop_name, s4, ":hero"),
          (display_message, "@{!}{s4} is present at event"),
        (try_end),
      (try_end),
    (try_end),
    ]),


                          #### xxxx Start sort NPCs Place at end of module_scripts
  # script_dplmc_time_sorted_heroes_for_center_aux
  # For internal use only
  # param 1: center no
  # param 2: party_no_to_collect_heroes
  # param 3: minimum time since last met (inclusive), or negative for no restriction
  # param 4: maximum time since last met (exclusive), or negative for no restriction
  ("dplmc_time_sorted_heroes_for_center_aux",
[
  (store_script_param_1, ":center_no"),
  (store_script_param_2, ":party_no_to_collect_heroes"),
  (store_script_param, ":min_time", 3),
  (store_script_param, ":max_time", 4),

  (store_current_hours, ":current_hours"),
 
  (party_get_num_companion_stacks, ":num_stacks",":center_no"),
  (try_for_range, ":i_stack", 0, ":num_stacks"),
(party_stack_get_troop_id, ":stack_troop",":center_no",":i_stack"),
(troop_is_hero, ":stack_troop"),
#get time since last talk
(troop_get_slot, ":troop_last_talk_time", ":stack_troop", slot_troop_last_talk_time),
(store_sub, ":time_since_last_talk", ":current_hours", ":troop_last_talk_time"),
#add if time meets constraints
(this_or_next|ge, ":time_since_last_talk", ":min_time"),
  (lt, ":min_time", 0),
(this_or_next|lt, ":time_since_last_talk", ":max_time"),
  (lt, ":max_time", 0),
(party_add_members, ":party_no_to_collect_heroes", ":stack_troop", 1),
  (try_end),
  (party_get_num_attached_parties, ":num_attached_parties", ":center_no"),
  (try_for_range, ":attached_party_rank", 0, ":num_attached_parties"),
(party_get_attached_party_with_rank, ":attached_party", ":center_no", ":attached_party_rank"),
(gt, ":attached_party", 0), #Floris - bugfix
(call_script, "script_dplmc_time_sorted_heroes_for_center_aux", ":attached_party", ":party_no_to_collect_heroes",":min_time",":max_time"),
  (try_end),
  ]),

  # script_dplmc_time_sorted_heroes_for_center
  # Input: arg1 = center_no, arg2 = party_no_to_collect_heroes
  # Output: none, adds heroes to the party_no_to_collect_heroes party
  # The catch is that it returns heroes who haven't been met in a day
  # or more before others, for greater use in feasts.
  ("dplmc_time_sorted_heroes_for_center",
[
  (store_script_param_1, ":center_no"),
  (store_script_param_2, ":party_no_to_collect_heroes"),
  (party_clear, ":party_no_to_collect_heroes"),

#Heroes you haven't spoken to in 24+ hours
(call_script, "script_dplmc_time_sorted_heroes_for_center_aux",
":center_no", ":party_no_to_collect_heroes", 24, -1),

#Heroes you haven't spoken to in 12 to 24 hours
(call_script, "script_dplmc_time_sorted_heroes_for_center_aux",
":center_no", ":party_no_to_collect_heroes", 12, 24),

#Everyone else
(call_script, "script_dplmc_time_sorted_heroes_for_center_aux",
":center_no", ":party_no_to_collect_heroes", -1, 12),

#Non-attached pretenders
(try_for_range, ":pretender", pretenders_begin, pretenders_end),
(neq, ":pretender", "$supported_pretender"),
(troop_slot_eq, ":pretender", slot_troop_cur_center, ":center_no"),
(party_add_members, ":party_no_to_collect_heroes", ":pretender", 1),
(try_end),
  ]),
                          #### xxxx End sort NPCs

 
  # script_get_relevant_comment_for_log_entry
  # Input: arg1 = log_entry_no,
  # Output: reg0 = comment_id; reg1 = relevance
  # Notes: 50 is the default relevance.
  # A comment with relevance less than 30 will always be skipped.
  # A comment with relevance 75 or more will never be skipped.
  # A comment with relevance 50 has about 50% chance to be skipped.
  # If there is more than one comment that is not skipped, the system will randomize their relevance values, and then choose the highest one.
  # Also note that the relevance of events decreases as time passes. After three months, relevance reduces to 50%, after 6 months, 25%, etc...
  ("get_relevant_comment_for_log_entry",
    [(store_script_param, ":log_entry_no", 1),
 
When I lose a battle, and someone takes my items, can I get them back? I know that you can release captives that were in your army and in some instances can get the items that you lost back. But, is there a point at which it will disappear forever? I lost a book, I'm wondering if it has disappeared.
 
bulletbill22 said:
When I lose a battle, and someone takes my items, can I get them back? I know that you can release captives that were in your army and in some instances can get the items that you lost back. But, is there a point at which it will disappear forever? I lost a book, I'm wondering if it has disappeared.

I do not think NPCs work on the same system. So, it is likely the item is gone forever. I know I have attacked a group of bandits game hours after my escape (I escaped right next to my castle). They had nowhere near the money I lost when I was captured, and nothing else I lost was in the loot.

Oh, how did it happen, soloing can be a b'tch if you take the stray jarid to the head.
 
A question here...

Background: I am playing Warband with no mods. Steam version, 1.161 or something I think.

Short version: How to get multiple nobles to attack a town?

I've done it with one noble before: tell him a town can be taken, he lays siege, I wait for the 8 hours to pass, then tell him to attack, then join him.

But this time, I want to take Suno, which has 400-500 guys in it, from Swadia. I'm a Rhodok vassal. I grabbed a couple fellow nobles and told them to lay siege, then left to find more help. Near Veluca I found 3 more countrymen and got them to follow me. I was getting pumped at this point, because I hadn't done anything of this scale in the game yet (day 800). I was just scared that peace might be declared. (Peace WAS declared against another faction, and another war was declared, but we were fortunately still at war with the Swadians.) Several game days later I arrived back at Suno, and wanted the guys following me to  join the siege. But Suno was no longer even in the list of towns to attack. The first noble was still laying siege, but for the others the closest thing I could say was "ride towards Suno", but that just caused them to bugger off chasing caravans because they were close enough to Suno already. The noble laying siege had 50 men, so I told him to follow me in order to cancel his previous orders, figuring maybe the game only allows you one ally at a time, so I might as well take King What's his nuts with 350 men. But the town is still not in the list.

I know if I lay siege myself, they won't join. So it seems that all my plans were for nothing. That's where my save game is though, so maybe someone can help me out here...

Ivan Khan said:
bulletbill22 said:
When I lose a battle, and someone takes my items, can I get them back? I know that you can release captives that were in your army and in some instances can get the items that you lost back. But, is there a point at which it will disappear forever? I lost a book, I'm wondering if it has disappeared.

I do not think NPCs work on the same system. So, it is likely the item is gone forever. I know I have attacked a group of bandits game hours after my escape (I escaped right next to my castle). They had nowhere near the money I lost when I was captured, and nothing else I lost was in the loot.

In the version I'm playing (see above), the items can be recovered, along with your old comrades as prisoners. I have specifically recovered books that were taken when I was defeated.
 
yes said:
A question here...


You need to tell your friends to siege the place before it is besieged by anyone of them. You can try asking them to follow you, and once you have gotten enough of them tell them one after the other to siege the town/castle.
 
Ivan Khan said:
yes said:
A question here...


You need to tell your friends to siege the place before it is besieged by anyone of them. You can try asking them to follow you, and once you have gotten enough of them tell them one after the other to siege the town/castle.

You're right. I had to run around in circles for a while and wait for the "Under Siege" state to clear before I tried again.
 
Although I've been playing M&B:W for some time now, I'm relatively new to the whole mod-experience. I recently downloaded the A Clash Of Kings 1.5 mod -being a huge fan- and it looks amazing, but the loading times are definitely longer than on the original. There's also every few seconds some lag on the world map, what makes it hard to fast travel safely. Does anybody know how these small problems can be fixed?
 
They're design problems with the mod. The textures and particles are all massive (the latter really hurts fps), and cozur isn't too aware of unoptimised materials as he doesn't make the models. You'd have to go through deleting unused textures and resizing used ones, something cozur said he's doing for the new version. I'd advise against doing it because there are thousands of textures.
The campaign map lag is harder to change. It's a pain to explain but basically map lag increases exponentially with number of factions. For that you've just got to rely on cozur doing it himself.
 
Hey guys,
I kind of got bored with the original game seeing as the only goal is to create goals for myself and there isn't much story past the beginning scene. I was hoping you guys could recommend me some Mods that have some sort of story through to the end game and improved dialogue. Any help would be greatly appreciated.
 
finegold14 said:
Hey guys,
I kind of got bored with the original game seeing as the only goal is to create goals for myself and there isn't much story past the beginning scene. I was hoping you guys could recommend me some Mods that have some sort of story through to the end game and improved dialogue. Any help would be greatly appreciated.

Hmm, I have been playing Brytenwalda lately, and it is better in that respect. Has some neat characters, and unique quests.
 
Does having a shield on our back protects our back from arrows and bolts? I've just tried it and still got hit from behind (not from the sides), which I found odd. An I never actually saw arrows and bolts stuck on back shield, only in the front one. Thanks.
 
Back
Top Bottom