Признаю, но в диалогс пи две части и вторая именно как в примере что ты привел... а первая... мда первая прописана кажется криво... и самое смешное, на первый взгляд там ничего что относилось бы к гнайму... только к повышению морали ящиком пива=)
упрощение при проверке на отношения... нда выглядит супер... и как вы это делаете=)
Извините если туплю.. за полные сутки устал как...
Извините засыпаю на ходу... спасибо за все утром буду думать и править да проверять....
то есть если reg 2, и reg (2) в чем тут разница? Не могу никак понять, то вылезает опять та же ошибка, то перестает... (устал бетатестить старт игры...=) переодически вместо наемников выползает иконка моего перса но без возможности нанять=)
выходит ошибка все же где-то в диалог пи... ищем дальше...
В общем основной ворос что в данном скрипте должно отвечать за ID parties или за Id troops?
In constants py
##########################################################
# Test : Tavern Recruitment Begin ########################
##########################################################
slot_town_mercs = 66
merc_parties_begin = "p_town_merc_1"
merc_parties_end = "p_castle_1"
#########################################################
# Test : Tavern Recruitment End #########################
#########################################################
In Dialogs py
(call_script, "script_end_quest", "qst_deliver_wine"),
]],
#######################################################################################
# Test : Tavern recruitment Begin ###################################################
#######################################################################################
[anyone|plyr,"tavernkeeper_talk", [], "I need to hire some soldiers. Can you help me?", "tavernkeeper_buy_peasants",[]],
[anyone,"tavernkeeper_buy_peasants",
[
(store_encountered_party,reg(3)),
(store_faction_of_party,reg(4),reg(3)),
(store_relation,reg(5),"fac_player_supporters_faction",reg(4)),
(lt, reg(5), -3),
], "I don't think anyone from this town will follow somebody like you. Try your luck elsewhere.", "tavernkeeper_buy_peasants_2",[]],
[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)]],
[anyone,"tavernkeeper_buy_peasants_2", [], "Anything else?", "tavernkeeper_talk",[]],
#######################################################################################
# Test : Tavern recruitment end #####################################################
#######################################################################################
# NOTE TO SELF:
# I altered line 8943. The original line looks like this :
# [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)]],
#
# I added the "(" to (slot_town_mercs). Otherwise it gives a syntax.
# I changed it to :
# [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)]],
###################################################################################
###################################################################################
## [anyone|plyr,"tavernkeeper_talk", []
in Dialogs py 2
(assign, "$buy_drinks_last_time", ":cur_hours"),
]],
#####################################################################################
# Test: Tavern recruitment and Ale Begin ############################################
#####################################################################################
[anyone|plyr,"tavernkeeper_talk", [
(store_current_hours,":cur_hours"),
(val_sub, ":cur_hours", 24),
(gt, ":cur_hours", "$buy_drinks_last_time"),
], "I'd like to buy me and my men a barrel of your best ale.", "tavernkeeper_buy_drinks_troops",[]],
[anyone,"tavernkeeper_buy_drinks_troops",
[
], "Of course, {my lord/my lady}. I reckon {reg5} denars should be enough for that. What should I tell the lads?", "tavernkeeper_buy_drinks_troops_2",[
(assign, "$temp", 20),
(store_party_size_wo_prisoners, reg5, "p_main_party"),
(store_mul, "$temp", "$temp", reg5),
(assign, reg5, "$temp"),
]],
[anyone|plyr,"tavernkeeper_buy_drinks_troops_2",
[
(store_troop_gold, ":gold", "trp_player"),
(ge, ":gold", "$temp"),
(str_store_party_name, s10, "$current_town"),
], "The price is fair enough, let my men have at it.", "tavernkeeper_buy_drinks_troops_end",[
]],
[anyone,"tavernkeeper_buy_drinks_troops_end",
[], "Don't worry {sir/madam}. Your men will enjoy their pints.", "tavernkeeper_pretalk",
[
(troop_remove_gold, "trp_player", "$temp"),
(call_script, "script_change_player_party_morale", 20),
(store_current_hours,":cur_hours"),
(assign, "$buy_drinks_last_time", ":cur_hours"),
(rest_for_hours, 2, 5, 0)
]],
[anyone|plyr,"tavernkeeper_buy_drinks_troops_2", [], "Actually, cancel that order.", "tavernkeeper_pretalk",[]],
#####################################################################################
# Test: Tavern recruitment and Ale End ##############################################
#####################################################################################
In Scripts py 1
# Towns (loop)
(try_for_range, ":town_no", towns_begin, towns_end),
(store_sub, ":offset", ":town_no", towns_begin),
(party_set_slot,":town_no", slot_party_type, spt_town),
# (store_add, ":cur_object_no", "trp_town_1_seneschal", ":offset"),
# (party_set_slot,":town_no", slot_town_seneschal, ":cur_object_no"),
#####################################################################
# Test : Tavern recruitment Begin #################################
#####################################################################
(store_add, ":cur_object_no", "p_town_merc_1", ":offset"),
(party_set_slot,":town_no", slot_town_mercs,":cur_object_no"),
#####################################################################
# Test : Tavern recruitment End ###################################
#####################################################################
Scrpits 2
(try_for_range, ":unused", 0, 8),
(call_script, "script_spawn_bandits"),
(try_end),
###################################################################################
# Test : Tavern Recruitment Begin ###############################################
###################################################################################
(call_script, "script_add_tavern_troops"),
###################################################################################
# Test : Tavern Recruitment End #################################################
###################################################################################
(set_spawn_radius, 50),
Scripts 3
##################################################
# Test: Tavern Recruitment Begin ###############
##################################################
#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),30), #never have many more than 30 troops in the tavern
(store_random,reg(7),8),
(party_add_members,reg(2),"trp_townsman",reg(7)),
(store_random,reg(8),5),
(party_add_members,reg(2),"trp_sea_raider",reg(8)),
(store_random,reg(9),5),
(party_add_members,reg(2),"trp_manhunter",reg(9)),
(try_end),
]),
##################################################
# Test: Tavern Recruitment Begin ###############
##################################################
Parties py
# ("village_reinforcements","village_reinforcements",pf_is_static|pf_disabled, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(1,1),[]),
#######################################################################################
# Test : Tavern recruitment Begin ###################################################
#######################################################################################
("town_merc_1","sargoth_mercs",pf_disabled, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(0,0),[]),
("town_merc_2","tihr_mercs",pf_disabled, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(0,0),[]),
("town_merc_3","veluca_mercs",pf_disabled, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(0,0),[]),
("town_merc_4","suno_mercs",pf_disabled, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(0,0),[]),
("town_merc_5","jelkala_mercs",pf_disabled, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(0,0),[]),
("town_merc_6","praven_mercs",pf_disabled, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(0,0),[]),
("town_merc_7","uxkhal_mercs",pf_disabled, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(0,0),[]),
("town_merc_8","reyvadin_mercs",pf_disabled, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(0,0),[]),
("town_merc_9","khudan_mercs",pf_disabled, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(0,0),[]),
("town_merc_10","tulga_mercs",pf_disabled, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(0,0),[]),
("town_merc_11","curaw_mercs",pf_disabled, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(0,0),[]),
("town_merc_12","wercheg_mercs",pf_disabled, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(0,0),[]),
("town_merc_13","rivacheg_mercs",pf_disabled, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(0,0),[]),
("town_merc_14","halmar_mercs",pf_disabled, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(0,0),[]),
("town_merc_15","yalen_mercs",pf_disabled, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(0,0),[]),
("town_merc_16","dhirim_mercs",pf_disabled, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(0,0),[]),
("town_merc_17","ichamur_mercs",pf_disabled, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(0,0),[]),
("town_merc_18","narra_mercs",pf_disabled, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(0,0),[]),
("town_merc_19","Shariz",pf_disabled, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(0,0),[]),
("town_merc_20","Durquba",pf_disabled, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(0,0),[]),
("town_merc_21","Ahmerrad",pf_disabled, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(0,0),[]),
("town_merc_22","Bariyye",pf_disabled, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(0,0),[]),
#######################################################################################
# Test : Tavern recruitment End ###################################################
####################################################################################### Добавил еще в 4 города в таверны эту возможность
("zendar","Zendar",pf_disabled|icon_town|pf_is_static|pf_always_visible|pf_hide_defenders, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(18,60),[]),
triggers py
#NPC system changes begin
#Move unemployed NPCs around taverns
(24 * 15, 0, 0,
[
(call_script, "script_update_companion_candidates_in_taverns"),
],
[]
),
#######################################################################################
# Test : Tavern recruitment Begin ###################################################
#######################################################################################
(24.0, 0, 0.0, [],
[
(call_script, "script_add_tavern_troops"),# 24 -это время для повторного вызова скрипта -обновляемость#
],
),
#######################################################################################
# Test : Tavern recruitment End #####################################################
#######################################################################################
#Process morale and determine personality clashes
(0, 0, 24,
[],
[