Recruit troops from Tavern keepers?

Users who are viewing this thread

Llew2

Cheap ass bum
Count
What the title says. Anyone know how to re enable recruitment of troops from Tavern keepers? There is a section in Module_dialogs commented out, but uncommenting it doesn't make it show up, so I'm guessing it must be referenced in other module files, but I can't find which ones. 

And by the way, don't tell me to add them to the list of regular mercs.
 
I added the tavern recruitment feature that is mentioned here, it works quite well

http://forums.taleworlds.com/index.php/topic,8652.msg1334281.html#msg1334281
 
HokieBT said:
I added the tavern recruitment feature that is mentioned here, it works quite well

http://forums.taleworlds.com/index.php/topic,8652.msg1334281.html#msg1334281
Woah, nice, hadn't seen that.

I just put it in, but I'm getting an Invalid Syntax Error on this line:
[anyone,"tavernkeeper_buy_peasants", [], "I know a few fellows who would follow you if you paid for their equipment.", "tavernkeeper_buy_peasants_2",[(store_encountered_party,reg(2)),(party_get_slot,"$tavernkeeper_party",reg(2)),slot_town_mercs),(set_mercenary_source_party,"$tavernkeeper_party"),(change_screen_buy_mercenaries)]],
Can some one spot it?

And also an error in Module_scripts saying "name 'slot_town_mercs' is not defined."

EDIT: Could the syntax error be that a parenthesis is missing from ,slot_town_mercs) above? I tried adding it, but I'm still getting the "name 'slot_town_mercs' is not defined." in Module_scripts.
 
hmm, my code looks different then yours actually....  I got mine from the source code of SoD, who said it was by Geoffrey Ashe so that is why I linked you to his post.  But you may want to download the source at this link below and review it, search for "#Tavern recruitment"

http://forums.taleworlds.com/index.php/topic,53660.0.html
 
Gah!

Alright, I copied the code directly from SoD, without changing ANYTHING, but when I go to the tavern keeps ingame, a clone of my character is the only thing that is on the other side of the troop transfer screen. This sucks alot.  :sad:
 
Did you modify "add_tavern_troops" in module_scripts to include the troops you want to appear in the list?  The script also only runs every 24 hours, so maybe after you start a new game you should wait a day or so....  Here's my code that adds the troops...

Code:
#Tavern recruitment and ale START 3/3
#no input/output
#could need a faction check
#that's from the 808 module system

   ("add_tavern_troops",
      [
         (try_for_range,reg(2),merc_parties_begin,merc_parties_end),
              (store_party_size,reg(6),reg(2)),
            (lt,reg(6),40), #never have many more than 40 troops in the tavern
            (store_random,reg(7),5),
            (party_add_members,reg(2),"trp_wookiee",(7)),
            (store_random,reg(8),5),
            (party_add_members,reg(2),"trp_mandalorian",reg(8)),
            (store_random,reg(9),5),
            (party_add_members,reg(2),"trp_gamorrean",reg(9)),
            (store_random,reg(10),5),
            (party_add_members,reg(2),"trp_twilek_female1",reg(10)),			
            (store_random,reg(11),5),
            (party_add_members,reg(2),"trp_twilek",reg(11)),
            (store_random,reg(12),5),
            (party_add_members,reg(2),"trp_rodian",reg(12)),
            (store_random,reg(13),5),
            (party_add_members,reg(2),"trp_moncal_1",reg(13)),
            (store_random,reg(14),5),
            (party_add_members,reg(2),"trp_bothan",reg(14)),
            (store_random,reg(15),5),
            (party_add_members,reg(2),"trp_hired_guard",reg(15)),
            (store_random,reg(16),5),
            (party_add_members,reg(2),"trp_trandoshan",reg(16)),
            (store_random,reg(17),5),
            (party_add_members,reg(2),"trp_chiss_1",reg(17)),
            (store_random,reg(18),5),
            (party_add_members,reg(2),"trp_geonosian_1",reg(18)),
            (store_random,reg(19),5),
            (party_add_members,reg(2),"trp_sullustan_1",reg(19)),
			(store_random,reg(20),5),
            (party_add_members,reg(2),"trp_ig88",reg(20)),
			(store_random,reg(21),5),
            (party_add_members,reg(2),"trp_defiler",reg(21)),
         (try_end),
                
      ]),
#Tavern recruitment and ale END 3/3

and then I see something like this....

mb54.jpg
 
May be it should be like this:
(party_get_slot,"$tavernkeeper_party",reg(2),slot_town_mercs)

one extra ) after reg(2) in your code.
 
Aha!

Add: slot_town_mercs = 66 to module_constants.py!

Insert this into the end of module_constants.py:
slot_town_mercs = 66
merc_parties_begin = "p_town_merc_1"
merc_parties_end = "p_castle_1"

:cool:
 
FYI - we tried to integrate it in this other thread, and there was a syntax error which we had to fix.  see this post for more info:

http://forums.taleworlds.com/index.php/topic,70749.msg1841064.html#msg1841064
 
Back
Top Bottom