Search results for query: *

  1. Malik Faris

    SP Native Malik Faris's Companions and Native Enhancement [1.166]

    Kinoheld said:
    Cool. I can do that, but the sole thought of doing that again and again gives me a nervous breakdown... :wink:

    So as I did not find a tool for that kind of work I am thinking of programming one. Should not be too hard to create a little tool that will at least add enough empty lines to the dialog file. (like 'I want at least 30 NPCs' and it starts looking how many are there and adds just empty lines if there are not enough) If i find an IDE that suits me I might create an even more elaborate tool. (For myself I usually only do a little website tinkering. notepad++ and a Server environment is enough for that. But if i code desktop programs i lose my interest quite fast if work's not going smooth enough.)

    I too once looked for a "better way" but really, I just wasted time that I could have spent just finishing copying and pasting.

    I also didn't start out with 80 new companions, started just 1, then 6 more, than 7 more, than another 10-12, repeat that a few times, and i ended up with 78. I wanted a rounded number so I added 2 more.
  2. Malik Faris

    SP Native Malik Faris's Companions and Native Enhancement [1.166]

    yes, I did it all by hand.

    But I use Notepad++ it helps alot to keep things lined up and readable.
    I also have good repetive motion skills, and it's easy enough to get into the mindset of "do x, than x, repeat"
  3. Malik Faris

    SP Tutorial Module System Make your own Companions

    You mean a mod you downloaded that already works? no.
  4. Malik Faris

    SP Native Malik Faris's Companions and Native Enhancement [1.166]

    The guild masters are actually pretty easy to find once you know how towns are laid out.
  5. Malik Faris

    SP Tutorial Module System Make your own Companions

    In module_scripts.py, search for "trp_npc1"
    It's at the bottom of his section.

            (troop_set_slot, "trp_npc1", slot_troop_morality_type, tmt_egalitarian),  #borcha
            (troop_set_slot, "trp_npc1", slot_troop_morality_value, 4),  #borcha
            (troop_set_slot, "trp_npc1", slot_troop_2ary_morality_type, tmt_aristocratic),  #borcha
            (troop_set_slot, "trp_npc1", slot_troop_2ary_morality_value, -1),
            (troop_set_slot, "trp_npc1", slot_troop_personalityclash_object, "trp_npc7"),  #borcha - deshavi
            (troop_set_slot, "trp_npc1", slot_troop_personalityclash2_object, "trp_npc16"),  #borcha - klethi
            (troop_set_slot, "trp_npc1", slot_troop_personalitymatch_object, "trp_npc2"),  #borcha - marnid
            (troop_set_slot, "trp_npc1", slot_troop_home, "p_village_25"), #Dashbiga
            (troop_set_slot, "trp_npc1", slot_troop_payment_request, 300),
    (troop_set_slot, "trp_npc1", slot_troop_kingsupport_argument, argument_ruler),
    (troop_set_slot, "trp_npc1", slot_troop_kingsupport_opponent, "trp_npc14"), #lezalit
    (troop_set_slot, "trp_npc1", slot_troop_town_with_contacts, "p_town_17"), #ichamur
    (troop_set_slot, "trp_npc1", slot_troop_original_faction, 0), #ichamur
    (troop_set_slot, "trp_npc1", slot_lord_reputation_type, lrep_roguish), #
  6. Malik Faris

    SP Tutorial Module System Make your own Companions

    Caba`drin said:
    manekemaan said:
    My question now is, how can I set companions to be not noble and or to be noble (in this order because malik already told me that companions are considered noble unless said otherwise) I can't seem to find where I can adjust this.
    SPD_Phoenix said:
    Module_scripts, script "initialize_npcs". Every companion has a line:
    (troop_set_slot, "trp_npc1", slot_lord_reputation_type, lrep_roguish),
    The complete list of personality is in module_constants. From "lrep_martial" to "lrep_upstanding" are noble. From "lrep_roguish" to "lrep_custodian" are non-noble.

    #"Martial" will be twice as common as the other types
    lrep_none          = 0
    lrep_martial        = 1 #chivalrous but not terribly empathetic or introspective, - eg Richard Lionheart, your average 14th century French baron
    lrep_quarrelsome    = 2 #spiteful, cynical, a bit paranoid, possibly hotheaded - eg Robert Graves' Tiberius, some of Charles VI's uncles
    lrep_selfrighteous  = 3 #coldblooded, moralizing, often cruel - eg William the Conqueror, Timur, Octavian, Aurangzeb (although he is arguably upstanding instead, particularly after his accession)
    lrep_cunning        = 4 #coldblooded, pragmatic, amoral - eg Louis XI, Guiscard, Akbar Khan, Abd al-Aziz Ibn Saud
    lrep_debauched      = 5 #spiteful, amoral, sadistic - eg Caligula, Tuchman's Charles of Navarre
    lrep_goodnatured    = 6 #chivalrous, benevolent, perhaps a little too decent to be a good warlord - eg Hussein ibn Ali. Few well-known historical examples maybe. because many lack the drive to rise to faction leadership. Ranjit Singh has aspects
    lrep_upstanding    = 7 #moralizing, benevolent, pragmatic, - eg Bernard Cornwell's Alfred, Charlemagne, Salah al-Din, Sher Shah Suri

    lrep_roguish        = 8 #used for commons, specifically ex-companions. Tries to live life as a lord to the full
    lrep_benefactor    = 9 #used for commons, specifically ex-companions. Tries to improve lot of folks on land
    lrep_custodian      = 10 #used for commons, specifically ex-companions. Tries to maximize fief's earning potential
  7. Malik Faris

    About recruiting troops from the Tavernkeeper

    Ghost of Razgriz said:
    :shock:

    Wow, thank you!  I know I didn't ask for it since I didn't want to pester people about it (let alone I basically gave up), but thank you anyways!  :grin:

    By the way.......it's not simple_triggers.....it's actually dialogs that it's supposed to be put in (no idea how I figured that one out without having to go through each file one by one....).

    Other than having to manipulate a few troops so that they'd appear since Kidnapped Girl and anything beyond doesn't appear, it's working.  Now let's see if it stays that way.  :grin:

    And if I feel like it, I might toy with the code a bit so that I can clean up some of those troops so that they don't appear such as "mercenaries end" since it's not really a troop, but just a placeholder (this may require messy coding of a lot of "if/then" [or equivalent....] statements and make it look ugly, but oh well.  I'd rather not pester people if I can help it).

    Again, thank you for the help, Malik Faris.

    P.S.  BTW, thanks for the companion tutorial.  It's what got me started on all of this mess (and the tutorial was great).  Going to be making a few more companions because I can (and hopefully not overload myself with them where they're literally all I need).

    Derp my bad, I actually did pull it from Dialog, but I wrote where I THOUGHT it was first and didn't correct it.
    Yeah, and the tavern keeper recruit code could use a bit of cleaning, I've just been lazy and haven't gotten to it, it shouldn't be that difficult, you just have to add more "this_or_next|is_between" arguments at the top of it to just have extremely specific places it looks. Like say you ONLY wanted recruits, just tell it to look at the recruits of each faction.
  8. Malik Faris

    SP Native Malik Faris's Companions and Native Enhancement [1.166]

    Hurray, updated the first post with the new characters, and now everyone has their pictures!
    Check it out: http://forums.taleworlds.com/index.php?topic=129012.msg3109408#msg3109408
  9. Malik Faris

    SP Native Malik Faris's Companions and Native Enhancement [1.166]

    Dude, no. Just no.
    You're welcome to go do your own thing. Or a find a mod with "magic" in it.
  10. Malik Faris

    About recruiting troops from the Tavernkeeper

    If you want to recruit from tavern keepers, just paste this at the end of module_dialogs

    After:
    Code:
      (str_store_party_name, s4, ":wealthiest_center"),
      
      ], "In terms of attacks on travellers, the town of {s4} is believed to be the most dangerous. Here in {s5}, we are less afflicted by bandits and raiders than {reg4} towns, and more afflicted than {reg5}. ", "mayor_pretalk",[
      ]],

    Code:
    #Malik Troop Recruit From Taverns
    #giz me troobz   
     [anyone|plyr,"tavernkeeper_talk",
       [   
          (party_get_free_companions_capacity,":room","p_main_party"),
            (ge,":room",1),
            (store_troop_gold,":gold","trp_player"),       
            (ge,":gold",200),
       ], "I need to recruit some troops.", "ramun_buy",[]],
     
     [anyone,"ramun_buy", [], "Of course. What kind would you like?", "ramun_faction",[]],
    
     [anyone|repeat_for_factions|plyr,"ramun_faction",
       [  (store_repeat_object, ":faction_no"),
          (this_or_next|is_between, ":faction_no", kingdoms_begin, kingdoms_end),
          (this_or_next|is_between, ":faction_no", "fac_commoners", "fac_neutral"),
          (is_between, ":faction_no", "fac_manhunters", "fac_mountain_bandits"),
          #(assign, reg1, ":faction_no"),
          (try_begin),
             (is_between, ":faction_no", npc_kingdoms_begin, kingdoms_end),
             (faction_get_slot, ":str", ":faction_no", slot_faction_adjective),
             (str_store_string, s2, ":str"),
          (else_try),
             (str_store_faction_name, s2, ":faction_no"),
          (try_end),
       ], "Some {s2} please.", "ramun_select",
       [(store_repeat_object, reg2),(str_store_faction_name, s2, reg2),]
       ],
    
      [anyone|plyr,"ramun_faction",[], "Nevermind.", "tavernkeeper_pretalk", []],
     
      [anyone,"ramun_select", [], "So you want some troops from the {s2}?", "ramun_troops",[]],
     
      [anyone|repeat_for_troops|plyr,"ramun_troops",
       [
          (store_repeat_object, ":troop"),
          (is_between, ":troop", regular_troops_begin, "trp_kidnapped_girl"),#eliminates a load
          (store_faction_of_troop, ":faction", ":troop"),#eliminates the rest
          (eq, ":faction", reg2),#by faction obviously
          (neg|troop_is_hero, ":troop"),#patrol leaders
          (str_store_troop_name, s3, ":troop"),
          (assign,"$stroop",0),      
       ],
       "{s3}", "ramun_count", [(store_repeat_object,reg3),(str_store_faction_name, s3, reg2),(str_store_troop_name_plural,s4,reg3),(assign,"$stroop",reg3),]],
     
      [anyone|plyr,"ramun_troops",[],"No, none of these.  Let me see that faction list again.","ramun_buy",[]],   
       
       [anyone,"ramun_count",[],"How many {s4}?","ramun_crespond",[]],
       
       [anyone|plyr,"ramun_crespond",[],"I shall return when I'm better prepared.","tavernkeeper_pretalk",[]],
        [anyone|plyr,"ramun_crespond",
          [
             (party_get_free_companions_capacity,":room","p_main_party"),
             (ge,":room",1),
             (store_troop_gold,":gold","trp_player"),
             (call_script,"script_game_get_join_cost",reg3),
             (store_mul,":cost",reg0,1),
             (ge,":gold",":cost"),         
          ],"I'd like one.","ramun_buy_some",[(assign, "$tcost", 1),]],
        [anyone|plyr,"ramun_crespond",
          [
             (party_get_free_companions_capacity,":room","p_main_party"),
             (ge,":room",5),
             (store_troop_gold,":gold","trp_player"),
             (call_script,"script_game_get_join_cost",reg3),
             (store_mul,":cost",reg0,5),
             (ge,":gold",":cost"),         
          ],"I'd like five.","ramun_buy_some",[(assign, "$tcost", 5),]],
    
        [anyone|plyr,"ramun_crespond",
          [
             (party_get_free_companions_capacity,":room","p_main_party"),
             (ge,":room",10),
             (store_troop_gold,":gold","trp_player"),
             (call_script,"script_game_get_join_cost",reg3),
             (store_mul,":cost",reg0,10),
             (ge,":gold",":cost"),         
          ],"I'd like ten.","ramun_buy_some",[(assign, "$tcost", 10),]],
        [anyone|plyr,"ramun_crespond",
          [
             (party_get_free_companions_capacity,":room","p_main_party"),
             (ge,":room",20),
             (store_troop_gold,":gold","trp_player"),
             (call_script,"script_game_get_join_cost",reg3),
             (store_mul,":cost",reg0,20),
             (ge,":gold",":cost"),         
          ],"I'd like twenty.","ramun_buy_some",[(assign, "$tcost", 20),]],
       
        [anyone|plyr,"ramun_crespond",
          [
             (party_get_free_companions_capacity,":room","p_main_party"),
             (ge,":room",50),
             (store_troop_gold,":gold","trp_player"),
             (call_script,"script_game_get_join_cost",reg3),
             (store_mul,":cost",reg0,50),       
             (ge,":gold",":cost"),         
          ],"I'd like fifty.","ramun_buy_some",[(assign, "$tcost", 50),]],
    
       
        [anyone|plyr,"ramun_crespond",
          [
             (party_get_free_companions_capacity,":room","p_main_party"),
             (ge,":room",100),
             (store_troop_gold,":gold","trp_player"),
             (call_script,"script_game_get_join_cost",reg3),
             (store_mul,":cost",reg0,100),         
             (ge,":gold",":cost"),         
          ],"I'd like one hundred.","ramun_buy_some",[(assign, "$tcost", 100),]],
    
        [anyone|plyr,"ramun_crespond",
          [
             (party_get_free_companions_capacity,":room","p_main_party"),
             (ge,":room",300),
             (store_troop_gold,":gold","trp_player"),
             (call_script,"script_game_get_join_cost",reg3),
             (store_mul,":cost",reg0,300),         
             (ge,":gold",":cost"),         
          ],"I have no time for this tomfoolery! I need an army! I'll take three hundred!","ramun_buy_300",[(assign, "$tcost", 300),]],
    
        [anyone,"ramun_buy_some",[], "Certainly.", "ramun_anythingelse",
         [
          (party_add_members, "p_main_party","$stroop","$tcost"),
            (call_script,"script_game_get_join_cost",reg3),
            (val_mul, "$tcost", reg0),
            (troop_remove_gold, "trp_player", "$tcost"),
            (assign, "$tcost", 0),
         ]
        ],   
             
       [anyone,"ramun_buy_300",[], "What a greedy {fulcher/queine} ye be!  I do this only for thee.", "ramun_anythingelse",
         [
          (party_add_members, "p_main_party","$stroop","$tcost"),
            (call_script,"script_game_get_join_cost",reg3),
            (val_mul, "$tcost",reg0),
            (troop_remove_gold, "trp_player", "$tcost"),
            (assign, "$tcost", 0),         
         ]
       ],   
       
       [anyone,"ramun_anythingelse",[],"What else?","ramun_demands",[]],
       
       [anyone|plyr,"ramun_demands",[],"No, I'm done as thou hadst served well","tavernkeeper_pretalk",[]],
       [anyone|plyr,"ramun_demands",[],"Yes, more of the same.","ramun_count",[]],
       [anyone|plyr,"ramun_demands",[],"I would have another look at the list anew.","ramun_buy",[]],
    
    #   [anyone|plyr,"ramun_troops",[], "Let's try some other kind of grunts.", "ramun_buy", []],
    #giz me troobz end
    #Malik Troop Recruit From Taverns End 
  11. Malik Faris

    SP Native Malik Faris's Companions and Native Enhancement [1.166]

    If you really want to get into modding go here: http://forums.taleworlds.com/index.php/board,64.0.html
    There are lots of tutorials to show you how things are done, and to save you the work most of the time with code ready to go.

    It's easier than you think.
  12. Malik Faris

    SP Native Malik Faris's Companions and Native Enhancement [1.166]

    Tasunke said:
    Ok, I looked in, and heroes + Player have a 2x experience modifier, although .... REGULARS have a 3x experience modifier? What am I missing here? :razz:
    That's the way it always was, you'd have to ask Taleworlds for the exact specifics. The reason "regulars" i.e. troops have 3x the exp is because their EXP is earned for the whole stack of units of the same type, i.e. all 20 swadian recruits. So they need more exp to level up.
    Tasunke said:
    Hmm .... why is the max level 62!??!??!????

    One might think the theoretical level maximum would be between 80 - 100 in order to max all stats at 30 (not that you *have* to max them at 30 mind you)

    How did you test (or how do you know) the level maximum? (and, if it is, then why??)


    --> Awesome mod btw :smile:

    (I would advise for future versions, to have the Max-10 Trader/ Doctor/ etc to not enter the game until the MC reaches say, level 10 or so, at least) --> A slow progression of, say, better and better companions slowly over time, would be interesting, to tie to spawns at Character level, the way that some of the game mechanics work

    Again only taleworlds knows why 62 is the max level, probably something to do with math/hexadecimal/blahblahblah. You can use the cheat Ctrl + L on the character stats screen to gain levels very fast. The game kinda ****s its pants when you go beyond 62. Bandit parties get in the size of multiple, 1000s and all kinds of other ****.

    If you want to have max stats, just go to the character screen, click the statistics button in the bottom left, choose export character, alt tab, go to your "(my) Documents\Mount&Blade Warband\Characters" and there will be a text file with your character's name there, open it with notepad and you'll see all these easy to edit stats. Save your changes, go back ingame, and click the import button and you've got your max stat character with 4 million denars, or whatever.

    Since I have to test all the changes i make to the game I need cheats to get the results faster, i've got a "Test" character with max stats and tons of money, but only at level 1 because the game scales with your level.
  13. Malik Faris

    Problem with excessive indictments & renunciations OSP Special Merchant

    Yeah, somewhere in here might be some clues:

    Code:
      # script_refresh_center_inventories
      ("refresh_center_inventories",
      [   	
        (set_merchandise_modifier_quality,150),
        (reset_item_probabilities,100),	    
    
        # Add trade goods to merchant inventories
        (try_for_range,":cur_center",towns_begin, towns_end),
          (party_get_slot,":cur_merchant",":cur_center",slot_town_merchant),
          (reset_item_probabilities,100),
          (assign, ":total_production", 0),
          (try_for_range, ":cur_goods", trade_goods_begin, trade_goods_end),
            (call_script, "script_center_get_production", ":cur_center", ":cur_goods"),
    		(assign, ":cur_production", reg0),
    
            (try_for_range, ":cur_village", villages_begin, villages_end),
    		  (party_slot_eq, ":cur_village", slot_village_bound_center, ":cur_center"),
              (call_script, "script_center_get_production", ":cur_village", ":cur_goods"),
    		  (val_div, reg0, 3),
    		  (val_add, ":cur_production", reg0),
    		(try_end),		
    
    		(val_max, ":cur_production", 1),
    		(val_mul, ":cur_production", 4),
    
    		(val_add, ":total_production", ":cur_production"),
          (try_end),
    
    	  (party_get_slot, ":town_prosperity", ":cur_center", slot_town_prosperity),
    	  (assign, ":number_of_items_in_town", 25),
    
    	  (try_begin), #1.0x - 2.0x (50 - 100 prosperity)
    	    (ge, ":town_prosperity", 50),
    		(store_sub, ":ratio", ":town_prosperity", 50),
    		(val_mul, ":ratio", 2),
    		(val_add, ":ratio", 100),
    		(val_mul, ":number_of_items_in_town", ":ratio"),
    		(val_div, ":number_of_items_in_town", 100),
    	  (else_try), #0.5x - 1.0x (0 - 50 prosperity)
    		(store_sub, ":ratio", ":town_prosperity", 50),
    		(val_add, ":ratio", 100),
    		(val_mul, ":number_of_items_in_town", ":ratio"),
    		(val_div, ":number_of_items_in_town", 100),
    	  (try_end),
    
    	  (val_clamp, ":number_of_items_in_town", 10, 40),	
    
    	  (try_begin),
    	    (is_between, ":cur_center", castles_begin, castles_end),
    	    (val_div, ":number_of_items_in_town", 2),
          (try_end),
    
          (try_for_range, ":cur_goods", trade_goods_begin, trade_goods_end),
            (call_script, "script_center_get_production", ":cur_center", ":cur_goods"),
    		(assign, ":cur_production", reg0),
    
            (try_for_range, ":cur_village", villages_begin, villages_end),
    		  (party_slot_eq, ":cur_village", slot_village_bound_center, ":cur_center"),
              (call_script, "script_center_get_production", ":cur_village", ":cur_goods"),
    		  (val_div, reg0, 3),
    		  (val_add, ":cur_production", reg0),
    		(try_end),		
    
    		(val_max, ":cur_production", 1),
    		(val_mul, ":cur_production", 4),
    
            (val_mul, ":cur_production", ":number_of_items_in_town"),
    		(val_mul, ":cur_production", 100),
    		(val_div, ":cur_production", ":total_production"),
            (set_item_probability_in_merchandise, ":cur_goods", ":cur_production"),						  
          (try_end),
    
    	  (troop_clear_inventory, ":cur_merchant"),
          (troop_add_merchandise, ":cur_merchant", itp_type_goods, ":number_of_items_in_town"),
    
          (troop_ensure_inventory_space, ":cur_merchant", 20),
          (troop_sort_inventory, ":cur_merchant"),
          (store_troop_gold, ":cur_gold",":cur_merchant"),
          (lt,":cur_gold",1500),
          (store_random_in_range,":new_gold",500,1000),
          (call_script, "script_troop_add_gold", ":cur_merchant", ":new_gold"),
        (try_end), 	
      ]), 
    
      # script_refresh_center_armories
      ("refresh_center_armories",
      [
        (reset_item_probabilities, 100),
    	(set_merchandise_modifier_quality, 150),    
    	(try_for_range, ":cur_merchant", armor_merchants_begin, armor_merchants_end),    
    	  (store_sub, ":cur_town", ":cur_merchant", armor_merchants_begin),
    	  (val_add, ":cur_town", towns_begin),
    	  (troop_clear_inventory, ":cur_merchant"),
    	  (party_get_slot, ":cur_faction", ":cur_town", slot_center_original_faction),    
    	  (troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_body_armor, 16),
    	  (troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_head_armor, 16),
    	  (troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_foot_armor, 8),
    	  (troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_hand_armor, 4),
    	  (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"),
        (end_try),
      ]),
    
      # script_refresh_center_weaponsmiths
      ("refresh_center_weaponsmiths",
      [
        (reset_item_probabilities, 100),
        (set_merchandise_modifier_quality, 150),
        (try_for_range, ":cur_merchant", weapon_merchants_begin, weapon_merchants_end),
    	  (store_sub, ":cur_town", ":cur_merchant", weapon_merchants_begin),
          (val_add, ":cur_town", towns_begin), 
    	  (troop_clear_inventory, ":cur_merchant"),
          (party_get_slot, ":cur_faction", ":cur_town", slot_center_original_faction),
          (troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_one_handed_wpn, 5),
          (troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_two_handed_wpn, 5),
          (troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_polearm, 5),
          (troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_shield, 6),
          (troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_bow, 4),
          (troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_crossbow, 3),
          (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_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),
          (val_add, ":cur_town", towns_begin),
          (party_get_slot, ":cur_faction", ":cur_town", slot_center_original_faction),
          (troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_horse, 5),
          (troop_ensure_inventory_space, ":cur_merchant", 65),
          (troop_sort_inventory, ":cur_merchant"),
          (store_troop_gold, ":cur_gold", ":cur_merchant"),
          (lt, ":cur_gold", 600),
          (store_random_in_range, ":new_gold", 250, 500),
          (call_script, "script_troop_add_gold", ":cur_merchant", ":new_gold"),
        (try_end),
      ]),
  14. Malik Faris

    troops dont appear when talking to them via party window

    Do you have Edit Mode turned on? it will enable debug messages that will help find out the cause.
    You can also try turning on CheatMenu as well and talk to a companion than go check Recent Messages and see if there's any errors there.
    Is your compiler giving any errors?
  15. Malik Faris

    Problem with excessive indictments & renunciations OSP Special Merchant

    Couldn't you just kinda clone the way book merchants work in WB?

    Code:
    # Tavern traveler.
      ["tavern_bookseller_1","Book_Merchant","Book_Merchant",tf_hero|tf_is_merchant|tf_randomize_face, 0, reserved, fac_commoners,[itm_fur_coat,itm_hide_boots,
                   itm_book_tactics, itm_book_persuasion, itm_book_wound_treatment_reference, itm_book_leadership, 
                   itm_book_intelligence, itm_book_training_reference, itm_book_surgery_reference],def_attrib|level(5),wp(20),knows_common,merchant_face_1,merchant_face_2],
      ["tavern_bookseller_2","Book_Merchant","Book_Merchant",tf_hero|tf_is_merchant|tf_randomize_face, 0, reserved, fac_commoners,[itm_fur_coat,itm_hide_boots,
                   itm_book_wound_treatment_reference, itm_book_leadership, itm_book_intelligence, itm_book_trade, 
                   itm_book_engineering, itm_book_weapon_mastery],def_attrib|level(5),wp(20),knows_common,merchant_face_1, merchant_face_2],

    Code:
      #script_update_booksellers
      # INPUT: none
      # OUTPUT: none
      ("update_booksellers",
        [(try_for_range, ":town_no", towns_begin, towns_end),
           (party_set_slot, ":town_no", slot_center_tavern_bookseller, 0),
         (try_end),
         
         (try_for_range, ":troop_no", tavern_booksellers_begin, tavern_booksellers_end),
           (store_random_in_range, ":town_no", towns_begin, towns_end),
           (party_set_slot, ":town_no", slot_center_tavern_bookseller, ":troop_no"),
         (try_end),
    	 
    
    	 
         ]),

    Dunno if this is all of it, but their the example "unique merchants" that you're looking for I think.
  16. Malik Faris

    SP Native Malik Faris's Companions and Native Enhancement [1.166]

    xaliber said:
    Malik, do you happen to have uploaded the latest source of the Steam Workshop version?

    Mmm, like the source files that I use to mod the game? no.
    The Steam version is the more up to date one, by a long shot.
    http://steamcommunity.com/sharedfiles/filedetails/?id=463348138

    I'm in the middle of getting the next version ready, which will have updates for the actual companion dialog, as well as a few other significant updates. I can't put the version that's on steam on the nexus right now because my files are currently more advanced because they have the new changes.
  17. Malik Faris

    SP Native Malik Faris's Companions and Native Enhancement [1.166]

    Yeah, that ones fairly out of date, the latest version is on the Steam Workshop.
  18. Malik Faris

    How to add a unique troop to a specific castle?

    This is somewhat easy and also fairly complicated, it will require a lot of work on your end, unless you've seen it done in another mod already than you could ask to borrow their code.
    You have to find the scripts/strings/dialogs/constants/ect for recruiting from castles and custom faction recruits and make scripts so instead of a range of villages like it is normally, only that specific location will have the troop available.

    Getting NPCs to recruit the troop will be dificult because NPCs don't actually recruit troops, they just get gifted units by the system depending on how their faction is setup.

    Like this is a script for recruiting custom troops from villages the player's faction owns: http://forums.taleworlds.com/index.php/topic,111689.0.html

    Basically, you have to learn how troops are recruited currently, copy those scripts, make adjustments to the values to instead of looking at a range of items like castles/villages/towns and which specific faction to offer troops from, to a specific location, and a specific troop.

    And then find a script that makes it so only the owner can recruit them.
  19. Malik Faris

    delete me

    nvm
  20. Malik Faris

    OSP Code SP Custom Banner Module System and Resources

    It'd be nice if someone could make this actually usable to add to an existing mod.
    Having to search for code that isn't clearly commented makes this kind of unusable.
    And no implementation guide either.
    I want this but both this guide and Falx's are really not helpful at all.
Back
Top Bottom