adding troop

正在查看此主题的用户

robinnbastar

Recruit
i have read a few tutorial and now trying to make a new troop and now there are 2 problem.
1./for face of my troop i use pirate_face1,pirate_face2 but it give me an error report.but if i use the code i see in the module_troop there is not a problem why?

2./i put my new troop the zendar but could find them and here my code  ("zendar_mercs","zendar_mercs",pf_disabled, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(0,0),[(trp_pirate_crew,15,0)]),

place help  :cry:and thanks :wink:
 
The zendar mercs thing is oooold, and no longer in use.

What you want to do is mke them hireable in Zendar?

Assuming you're using 0.903 module system...

Part 1. Can you post the whole troop entry from module_troops.py?

Part 2. The easiest thing to do will be to give a dialog to the tavernkeeper, replace his old dialog with this new one;

2. You'll need a new dialogue.... sections in red need changing.
    [trp_zendar_tavernkeeper|plyr,"start", [], "I need some men for my army. Can you help me?", "zendar_buy_peasants",[]],
  [anyone,"zendar_buy_pirates", [], "I know a few fellows who would follow you if you paid for their equipment.", "zendar_buy_pirates_b",[]],
  [anyone,"zendar_buy_pirates_in", [], "Any more?", "zendar_buy_pirates_b",[]],
  [anyone|plyr,"zendar_buy_pirates_b", [], "Actually, I don't have the money to hire any more men.", "close_window",[]],
  [anyone|plyr,"zendar_buy_pirates_b", [(store_troop_gold,":gold","trp_player"),(ge,":gold",50)], "Ok then, let's see who you've got.", "zendar_buy_begin",[]],
  [anyone,"zendar_buy_begin", [], "Alright then", "zendar_buy",[]],
  [anyone|plyr,"zendar_buy", [], "I want to hire 1 pirate crewman", "zendar_sell_b",[]],
  [anyone|plyr,"zendar_buy", [], "I don't want to hire any more troops.", "zendar_buy_pirates_stop",[]],
  [anyone,"zendar_sell_b", [], "OK", "conir_buy_peasants_in",[(troop_remove_gold, "trp_player",24),(call_script, "script_recruit_troop_as_companion", "trp_pirate_crew")]],
  [anyone,"zendar_sell_b", [(party_get_free_companions_capacity, ":free_capacity", "p_main_party"),(eq, ":free_capacity", 0)], "You don't have space in your party.", "zendar_buy_pirates_in",[]],
  [anyone,"zendar_buy_pirates_stop", [], "Anything else?", "zendar_close",[]],
  [anyone|plyr,"zendar_close", [], "No thank you.", "close_window",[]],

That should work.
 
you will need to edit triggers to get them to respawn after a while otherwise you'll run out of pirates. (I mean once you hire the first load you wont be able to hire anymore)
 
thanks for your reply
to jubal:
i cant post the whole module troop it was just too big.and about the dialog you mean u want me to use your code in the module_dialog.py right??
another thing is the problem with hero i have create and i can find him but couldnt hire him why. and here the code
["robin","Robin","Robin", tf_hero, scn_the_happy_boar|entry(6),reserved, fac_commoners,[itm_linen_tunic,itm_hide_boots,itm_club],def_attrib|level(6),wp(60),knows_trade_3|knows_inventory_management_2|knows_riding_2,0x00000000000c600301c2510211a5b292],
 
To jubal:
your solution doesnt work at all. i try to place it in the module_dialogs.py under the Tavernkeepers but when i build it there an error report.
 
The reason you can't hire your hero is because he's in the wrong place. In module_troops, find where the heroes (marnid, brocha, and so on) are, and put Robin in between them.

For the dialog, I made a mistake or two when editing it. the end of the first line should read pirates, not peasants, and the line ending with conire_buy peasants_in should end zendar_buy_pirates_in.

Fix that and see if it works.

Good Luck,

Jubal
 
thanks for your reply judal :mrgreen:
oh man after try out you salution it going nowhere but error.anyway can you tell me the tutorial to edit dialogue.
 
Can you post the entire section of your dialogs file to do with Tavernkeeprs, and tell me exactly what the error message says?
 
Hey jubal here the error i get:

Traceback (most recent call last):
  File "process_global_variables.py", line6, in <module>
        from module_dialogs import*
  File "c:\documents and settings\vtc\my document\system madule\modulesystem\ module_dialogs.py", line 5441.

:?: :neutral: :?:
 
后退
顶部 底部