OSP Kit SP Mercenary Camps (of Calradia)

Users who are viewing this thread

Just check if in every entry you made, everything you copied out of this thread, that everywhere where you need it to say horde it actually says horde. My guess is, that somewhere in the code for the horde you wrote geroian.

Example:
game menu said:
    ("enter_horde_camp",[(eq, "$g_encountered_party", "p_merc_camp_horde"),],"Enter  the Black Khergit Camp.",[
    (modify_visitors_at_site,"scn_horde_camp"),
    (reset_visitors), 
    (assign, "$g_mt_mode", tcm_default),   
    (set_jump_entry, 1),
    (set_visitor, 2, "trp_ahmad"),
    (set_visitor, 5, "trp_black_khergit_guard"),
    (set_visitor, 6, "trp_black_khergit_horseman"),
    (set_visitor, 7, "trp_black_khergit_horseman"),
    (set_visitor, 8, "trp_black_khergit_guard"),
    (set_visitor, 9, "trp_black_khergit_horseman"),
    (set_jump_mission,"mt_visit_town_castle"),
    (jump_to_scene,"scn_horde_camp"),
    (change_screen_mission),
 
好的,这是我添加的一些代码来增加更多的趣味性,代码会让一些人出现在地图上,靠近他们各自的阵营,它还会孕育出一家大公司,一开始他们对玩家是中立的,但你可以攻击他们。

..........
It's interesting :grin:。I join the military encounter dialogue
Dialogs.py

behind this :

[party_tpl|pt_manhunters,"manhunter_talk_b2", [], "Bah. They're holed up in this country like rats, but we'll smoke them out yet. Sooner or later.", "close_window",[(assign, "$g_leave_encounter",1)]],

[party_tpl | pt_manhunters | plyr, "manhunter_talk_b", [], "Yes, Right in front of you, can't you see them yet?","manhunter_talk_b3", []],
[party_tpl | pt_manhunters, "manhunter_talk_b3", [],"Excuse me, what you said? How dare you! Don't crack joke {mate/girlie}!", "lord_ultimatum_surrender",[]],
[party_tpl | pt_manhunters | plyr, "manhunter_talk_b", [], "I wish to recruit you, may I ?","manhunter_talk_b4", []],
[party_tpl| pt_manhunters , "manhunter_talk_b4", [], "You have to ask our Head directly about this.", "close_window", [(assign, "$g_leave_encounter",1)]],

## CCCC
[party_tpl|pt_order,"start", [(eq,"$talk_context",tc_party_encounter)], "Discipline & Obey !", "order_talk_b",[(play_sound,"snd_encounter_vaegirs_neutral")]],
[party_tpl|pt_order|plyr,"order_talk_b", [], "What does the Knights order do?", "order_talk_b1",[]],
[party_tpl|pt_order,"order_talk_b1", [], "Our sword just defend our faith, however, Defending faith interest usually also accord with our King against foreign enemies.", "order_talk_b",[]],
[party_tpl|pt_order|plyr,"order_talk_b", [], "I heard about Friar Knights can't get married?", "order_talk_b2",[]],
[party_tpl|pt_order,"order_talk_b2", [], "Yes, celibacy, dedication, loyalty.(No Legitimate wife doesn't mean no illegitimate children).", "order_talk_b",[]],
[party_tpl|pt_order|plyr,"order_talk_b", [], "I hear you're good at fighting, Do you mind if we try today,haa?","order_talk_b3", []],
[party_tpl|pt_order, "order_talk_b3", [],"{mate/girlie}, How dares you to despise steel-bucket knight of God ?", "lord_ultimatum_surrender", []],
[party_tpl|pt_order|plyr,"order_talk_b", [], "I need powerful mercenaries, may I recruit you?", "order_talk_b4",[]],
[party_tpl|pt_order, "order_talk_b4", [], "You have to ask our Commander directly about this.","order_talk_b", []],
[party_tpl|pt_order|plyr, "order_talk_b", [], "God bless you.", "close_window", [(assign, "$g_leave_encounter", 1)]],

## CCCC
[party_tpl|pt_companions,"start", [(eq,"$talk_context",tc_party_encounter)], "I will drink from your skull !", "companion_talk_b",[(play_sound,"snd_encounter_sea_raiders")]],
[party_tpl|pt_companions|plyr,"companion_talk_b", [], "Are you pirates? Murder, Robbery, Rape and Arson, Eaven little girls?", "companion_talk_b1",[]],
[party_tpl|pt_companions,"companion_talk_b1", [], "That history is looong time ago, We also be trade and art very well. Unless I'm not happy today.", "companion_talk_b",[]],
[party_tpl|pt_companions|plyr,"companion_talk_b", [], "Do you fight for Nord's king?", "companion_talk_b2",[]],
[party_tpl|pt_companions,"companion_talk_b2", [], "Not necessarily. We usually be employed with private combat affairs.", "companion_talk_b",[]],
[party_tpl|pt_companions|plyr,"companion_talk_b", [], "Simple minded and well-developed's fool, also stinks to make me vomit!","companion_talk_b3", []],
[party_tpl|pt_companions, "companion_talk_b3", [],"How lucky you to make me feel so good today! {mate/girlie}!", "lord_ultimatum_surrender", []],
[party_tpl|pt_companions| plyr, "companion_talk_b", [], "I need strong warrior, Can I hire you?", "companion_talk_b4", []],
[party_tpl|pt_companions, "companion_talk_b4", [], "You have to ask our leader directly about this.","companion_talk_b", []],
[party_tpl|pt_companions| plyr,"companion_talk_b", [], "Let me go.", "close_window",[(assign, "$g_leave_encounter", 1)]],

## CCCC
[party_tpl|pt_brotherhood,"start", [(eq,"$talk_context",tc_party_encounter)], "Good hunting and fight well !", "brotherhood_talk_b",[snd_encounter_vaegirs_ally]],
[party_tpl|pt_brotherhood|plyr,"brotherhood_talk_b", [], "Good for hunting, brother.", "brotherhood_talk_b1",[]],
[party_tpl|pt_brotherhood,"brotherhood_talk_b1", [], "It should be so.", "brotherhood_talk_b",[]],
[party_tpl|pt_brotherhood|plyr,"brotherhood_talk_b", [], "I wish you every shoot in a deer's eye, brother.", "brotherhood_talk_b2",[]],
[party_tpl|pt_brotherhood,"brotherhood_talk_b2", [], "The same to you {mate/girlie}.", "brotherhood_talk_b",[]],
[party_tpl|pt_brotherhood|plyr,"brotherhood_talk_b", [], "Since ice hasn't broken off your little brother, Why didn't try to use my sword?","brotherhood_talk_b3", []],
[party_tpl|pt_brotherhood, "brotherhood_talk_b3", [],"How could I meet such a mean person! Don't crack joke {mate/girlie}!", "lord_ultimatum_surrender", []],
[party_tpl|pt_brotherhood| plyr, "brotherhood_talk_b", [], "I need good hunters, Can you join us?", "brotherhood_talk_b4", []],
[party_tpl|pt_brotherhood, "brotherhood_talk_b4", [], "You have to ask our Master directly about this.","brotherhood_talk_b", []],
[party_tpl|pt_brotherhood| plyr, "brotherhood_talk_b", [], "Good day, hunters.", "close_window", [(assign, "$g_leave_encounter", 1)]],

## CCCC
[party_tpl|pt_ranger,"start", [(eq,"$talk_context",tc_party_encounter)], "My eyes on you {mate/girlie}, Put your hands where I can see. ^My dearest brother?", "ranger_talk_b",[]],
[party_tpl|pt_ranger|plyr,"ranger_talk_b", [], "Take easy brother, Are you forest bandits?", "ranger_talk_b1",[]],
[party_tpl|pt_ranger,"ranger_talk_b1", [], "No? No! no no no NOOO! They also kill civilians for money, But We clean bandits all of them. That's misunderstanding.", "ranger_talk_b",[]],
[party_tpl|pt_ranger|plyr,"ranger_talk_b", [], "Are you the ones who fight to outlaws? brother?", "ranger_talk_b2",[]],
[party_tpl|pt_ranger,"ranger_talk_b2", [], "Unhumm, and also fight for freedom and protection commoners. Whether the enemy is the Lord or any king.", "ranger_talk_b",[]],
[party_tpl|pt_ranger|plyr,"ranger_talk_b", [], "Sound you likes a very honest's good man, How about lending us some Dinar?","ranger_talk_b3", []],
[party_tpl|pt_ranger, "ranger_talk_b3", []," Are you going to rob us in the wilderness? Don't crack joke {mate/girlie}!", "lord_ultimatum_surrender", []],
[party_tpl|pt_ranger| plyr, "ranger_talk_b", [], "I need good Riding Archer, mabe you can join us?","ranger_talk_b4", []],
[party_tpl|pt_ranger, "ranger_talk_b4", [], "(Silence ...... ).","ranger_talk_b", []],
[party_tpl|pt_ranger| plyr, "ranger_talk_b", [], "We just passing by.", "close_window",[(assign, "$g_leave_encounter", 1)]],

## CCCC
[party_tpl|pt_ashashin,"start", [(eq,"$talk_context",tc_party_encounter)], "Do you have any business with us?", "ashashin_talk_b", []],
[party_tpl|pt_ashashin|plyr,"ashashin_talk_b", [], "I heard you killed and robbed??", "ashashin_talk_b1",[]],
[party_tpl|pt_ashashin,"ashashin_talk_b1", [],"If so, what can you do for us? It's none of your business.","ashashin_talk_b", []],
[party_tpl|pt_ashashin|plyr, "ashashin_talk_b", [], "My men need to practice a bit, to arms!", "ashashin_talk_b3",[]],
[party_tpl|pt_ashashin, "ashashin_talk_b3", [],"No one dares to talk to us like this.", "close_window", [(call_script, "script_change_player_relation_with_faction", "$g_encountered_party_faction",-3),(encounter_attack),]],
[party_tpl|pt_ashashin| plyr, "ashashin_talk_b", [], "I need good assassin, May I recruit you?","ashashin_talk_b4", []],
[party_tpl|pt_ashashin, "ashashin_talk_b4", [], "You have to ask our Chief preacher directly about this.","ashashin_talk_b", []],
[party_tpl|pt_ashashin| plyr, "ashashin_talk_b", [], "Leave me alone, I have no business with you.", "close_window",[(assign, "$g_leave_encounter", 1)]],






[anyone | plyr, "mercenary_recruit", [
(lt, "$g_talk_troop_faction_relation", 0),
(store_relation, ":players_kingdom_relation", "$g_talk_troop_faction", "$players_kingdom"),
(this_or_next | ge, ":players_kingdom_relation", 0),
(this_or_next | eq, "$players_kingdom", 0),
(eq, "$players_kingdom", "fac_player_supporters_faction"),
(neq, "$players_oath_renounced_against_kingdom", "$g_talk_troop_faction"),

(is_between, "$g_talk_troop_faction", org_fac_begin, org_fac_end), #
(str_store_faction_name, s4, "$g_talk_troop_faction"), ],
"I wish to make peace with the {s4}.", "tuanzhang_ask_pardon", []],


[anyone, "tuanzhang_ask_pardon",
[
(store_sub, ":hostility", 3, "$g_talk_troop_faction_relation"),
(val_mul, ":hostility", ":hostility"), # square it
(store_mul, reg16, ":hostility", 3),

(str_store_faction_name, s4, "$g_talk_troop_faction"),
],
"I have bigger worries than you. However, you have wronged my brothers, and wrongs demand compensation. For the sume of {reg16} denars, I suppose that I could agree to grant you a pardon. What do you say?",
"lord_ask_pardon_2", []],
 
Last edited:
It's interesting :grin:。I join the military encounter dialogue
Dialogs.py

behind this :

[party_tpl|pt_manhunters,"manhunter_talk_b2", [], "Bah. They're holed up in this country like rats, but we'll smoke them out yet. Sooner or later.", "close_window",[(assign, "$g_leave_encounter",1)]],
No offense, but I failed to understand what this is about. Do these dialogues play out if you encounter the new mercenary patrols?
 
When i compile it it gives me this:
failed to compile simple trigger #3
command [1, 2, 'script_refresh_mercenary_camp_troops', ':camp_no'] compilation fails in simple_trigger(#3).repeat_trigger(72.0) on line 2
failed to parse operand 'script_refresh_mercenary_camp_troops' for operation call_script in simple_trigger(#3).repeat_trigger(72.0) on line 2
illegal reference `script.refresh_mercenary_camp_troops`
 
Hi, been trying to implement this but was getting Aggregator errors so I tried to compile along the way, always meeting an error reffering another module component which I, of course, implemented right after. however, now that all the code is injected... I get this, despite balion_camp clearly being in the module_scenes.

Here is the error message when I compile
Code:
Traceback (most recent call last):
  File "compile.py", line 129, in <module>
    from module_troops import *
  File "C:\Users\Calbanar\Desktop\Warb.Modding\Source Files\Diplomacy\module_troops.py", line 2658, in <module>
    ["konrad","Konrad","Konrad", tf_hero,scn_balion_camp|entry(2), reserved,fac_commoners,
NameError: name 'scn_balion_camp' is not defined
 
Last edited:
Are you sure that you added the scene scn_balion_camp correctly to module_scenes.py?
I think so, at first I put it at the end of the page, then I tried putting it in the SP Castles section, hoping the error been the game saying "hey, no balion_camp in single player!" but no luck.

Code:
  ("castle_48_exterior",sf_generate,"none", "none", (0,0),(100,100),-100,"0x0000000056c3da200003a0e6000002a900002d7a0000409e",
    [],[],"outer_terrain_desert"),
  ("castle_48_interior",sf_indoors, "arabian_interior_keep_b", "bo_arabian_interior_keep_b", (-100,-100),(100,100),-100,"0",
    ["exit"],["castle_48_seneschal"]),
  ("castle_48_prison",sf_indoors,"interior_prison_o", "bo_interior_prison_o", (-100,-100),(100,100),-100,"0",
    [],[]),
# Merc Camp Begin 
  ("geroian_camp",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000003000050000064592000063c100001bee00006f14",
    [],[],"outer_terrain_plain"), 
  ("balion_camp",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000003000050000064592000063c100001bee00006f14",
    [],[],"outer_terrain_beach"),     
  ("jumne_camp",sf_generate,"none", "none", (0,0),(100,100),-100,"0x00000000b00562e200040900000063f40000679f00006cda",
    [],[],"sea_outer_terrain_1"), 
  ("zendar_camp",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000003000050000064592000063c100001bee00006f14",
    [],[],"outer_terrain_snow"),     
# Merc Camp End
  
#!!Villages !!#
 
Comment out the scene entry and the troops which are referencing it. Look if you still get the same or a similar error, compile twice.
It seems the same problem applies to the Geroian camp now... I suspect repeating the process will only result errors with the two remaining camps.

Any idea what's going on?
 
Last edited:
Welp, I just started over again and it worked...must have corrected a mistake I guess.

Thanks for the help!
 
Welp, I just started over again and it worked...must have corrected a mistake I guess.

Thanks for the help!
Also, as a general advice, Python files are compiled in an order coded in one of a compiler's files. Therefore, a mod will not correctly compile if there is a reference to something newly-added in a file compiled later in the order. This is why there may be a 'wrong' reference even though everything is done properly in a tuple of code.
 
Also, as a general advice, Python files are compiled in an order coded in one of a compiler's files. Therefore, a mod will not correctly compile if there is a reference to something newly-added in a file compiled later in the order. This is why there may be a 'wrong' reference even though everything is done properly in a tuple of code.
That's a good tip, I'm keeping it under my blanket.
 
For some reason I'm getting this error:

Code:
*** Warband Refined & Enhanced Compiler Kit (W.R.E.C.K.) version 1.0.4 ***
Please report errors, problems and suggestions at
https://forums.taleworlds.com/index.php?threads/325102/

Loading module... DONE.
Loading plugins... DONE.
Checking module syntax... DONE.
Allocating identifiers... DONE.
Compiling module... FAILED.
MODULE scripts AGGREGATOR ERROR:
failed to compile script game_event_party_encounter (#9)
  command [2060, 1, 'mnu_mercenary_camp'] compilation fails in script.game_event_party_encounter on line 73
    failed to parse operand 'mnu_mercenary_camp' for operation jump_to_menu in script.game_event_party_encounter on line 73
      illegal reference `mnu.mercenary_camp`


COMPILATION FAILED.

Why is that happening?
 
For some reason I'm getting this error:

Code:
*** Warband Refined & Enhanced Compiler Kit (W.R.E.C.K.) version 1.0.4 ***
Please report errors, problems and suggestions at
https://forums.taleworlds.com/index.php?threads/325102/

Loading module... DONE.
Loading plugins... DONE.
Checking module syntax... DONE.
Allocating identifiers... DONE.
Compiling module... FAILED.
MODULE scripts AGGREGATOR ERROR:
failed to compile script game_event_party_encounter (#9)
  command [2060, 1, 'mnu_mercenary_camp'] compilation fails in script.game_event_party_encounter on line 73
    failed to parse operand 'mnu_mercenary_camp' for operation jump_to_menu in script.game_event_party_encounter on line 73
      illegal reference `mnu.mercenary_camp`


COMPILATION FAILED.

Why is that happening?
This is just a guess, but I think it can't find the appropriate reference. This happens when you don't copy the code in the right order. Try copy-pasting the code in reverse to how it's listed here.
 
Back
Top Bottom