OSP Kit Campaign New kingdom management(Module system download post #3)

Users who are viewing this thread

Nevermind the problem I posted up there. I fixed it  :lol:

I was using the Python version above 2.6 and that caused the syntax errors.
So I deleted the Pythone and reinstalled 2.6, and boom it works well  :grin:

Thank you for the nice work!!!
 
I just played m&b with new kingdom implemented and strange thing just happened. I gave city to companion and few seconds later that player declared his own faction - rebel faction and declared war against me. What was that?
 
Yeah I did, that was no problem, the problem is that means that I can not hire companions as lords because they will act like that, and besides this is first time something like this happens.

EDIT:
I think I found problem, maybe faction restoration by rubik does that, I mean, companions are fac_commoners are they?  So now I need trigger that turns companions to players faction when they are chosen to be lords so they dont declare indepenence.
 
I looked into the troop file and noticed there are troops starting with id "trp_rebel_xxxx".
Does that mean it is only the player, and he/she can recruit them when the new kingdom is established?

I was also wondering if it is possible to implement the RESERVED LORDS from the "Lords and Realms" mode.
Basically, it allows you to recruit new set of lords as the you gain another land after establishing your kingdom.
 
Well the idea with this kingdom management is that there is no magical pool of landless lords.  That doesn't really make sense.  In this you either have to promote a companion or conquer a kingdom and have one of the defeated lords join you.  You might want to create more companions for this to give you as many lords as you want.

And yes the trp_rebels are the player kingdom troops.  A very large troop tree as well with some of the fighting capabilities of all factions.
 
Thank you for the fast reply  :grin:
I just have few more questions  :oops:

1) What are the features? Is this similar to the NE mode?
2) How many factions do you have in your mode?
    I'm also trying to add more factions and lords. Does that mean I have to edit some codes?
 
Shame, and I was preparing some diplomacy dudes for this,not much but litle things that would make more options, which will allow that option besides other options.I will finish it tomorow so dont know what to do now.Should I post that here or should I pm you Berserker so you decide?
 
This is mostly a template for kingdom management added onto native.  My actual mod Revenge of the Berserk is more in depth.
If I am honest this ended up being similar to NE.  Except that mod lets you bribe a lord with a castle to make him switch sides.  Note I had no access to NE's source so it mostly ended up similar because we have similar ideas of what kingdom management should look like.  If you want to edit factions and lords you will definitely need to edit some codes.  You will also need the module system.  Unless you really only want to change troop names and abilities and then you can get by with the troop editor.
iggorbb said:
Shame, and I was preparing some diplomacy dudes for this,not much but litle things that would make more options, which will allow that option besides other options.I will finish it tomorow so dont know what to do now.Should I post that here or should I pm you Berserker so you decide?
Diplomacy dudes?  Feel free to post it here. 
 
Yes. Idea was originaly mine, and I created dialogs and add extra npc... and than I saw SOD source that was better working so I combined with it. So script is not 100% mine but allows some stuff like recruit militia/elite units, change color/banner of faction, declare wars make peace... and recruit lords. I an using it because few posts above I posted what happened to me with one of companions, he declared indepenence in commoners fac. name, so... is it ok to post that?

EDIT: ah yes, that trps appear at lords hall(set_visitors) after you capture city.
 
This is mostly a template for kingdom management added onto native.  My actual mod Revenge of the Berserk is more in depth.
If I am honest this ended up being similar to NE.  Except that mod lets you bribe a lord with a castle to make him switch sides.  Note I had no access to NE's source so it mostly ended up similar because we have similar ideas of what kingdom management should look like.  If you want to edit factions and lords you will definitely need to edit some codes.  You will also need the module system.  Unless you really only want to change troop names and abilities and then you can get by with the troop editor.

Can you briefly tell me which source files need to be edited, and any key words I should use to find them? (e.g. faction/culture etc)
 
I taught the other day and had idea about diplomacy. I created something, implemented it into my mod and it worked, not perfect but worked. And than I founded sod source wich had that I had but in much, much better version, so I combined my stuff and source I found. So if you going to use this, give 99% credits to sod creator and 1% to me for retyping and some minor addons, so here it goes:

module.troops.py: (between merchant and seneschals)
##  ["merchant_20","merchant_20_F","merchant_20_F",tf_hero|tf_female, 0,0, fac_merchants,[itm_courser,            itm_arming_sword,      itm_padded_leather,        itm_leather_boots,                          ],              def_attrib|level(15),wp(100),knows_inventory_management_10, 0x000000000010500401f6837d27688212],
#test court
  ["imperial_chancellor", "Diplomacy Advisor", "Diplomacy Advisor", tf_hero|tf_is_merchant, 0,reserved,  fac_neutral,[ itm_courtly_outfit,      itm_blue_hose],    def_attrib|level(2),wp(20),knows_common, 0x0000000e810011125c1b6db71b89b72000000000001e38d50000000000000000],
  ["imperial_marshal", "Military Advisor", "Military Advisor", tf_hero|tf_is_merchant, 0,reserved,  fac_neutral,[itm_plate_armor,      itm_iron_greaves],    def_attrib|level(20),wp(600),knows_common, 0x0000000fbd003044121b6c47db05b6eb00000000001db4e00000000000000000],
  ["imperial_keeper", "Imperial Armory Keeper", "Imperial Armory Keeper", tf_hero|tf_is_merchant, 0,reserved,  fac_neutral,[ itm_courtly_outfit,      itm_blue_hose],    def_attrib|level(2),wp(20),knows_common, 0x000000083f003094471b6db6db89b73500000000001e353b0000000000000000],
#test court


#Seneschals

module_scripts.py: 
find this:
  # script_enter_court
and scroll down a bit and make it look like this:

      #Adding guards
      (store_faction_of_party, ":center_faction", ":center_no"),
      (faction_get_slot, ":guard_troop", ":center_faction", slot_faction_guard_troop),
      (try_begin),
        (le, ":guard_troop", 0),
        (assign, ":guard_troop", "trp_swadian_sergeant"),
      (try_end),
      (set_visitor, 6, ":guard_troop"),
      (set_visitor, 7, ":guard_troop"),
        #TEST COURT BEGIN
      (try_begin),
        (this_or_next|eq, ":center_faction", "fac_player_faction"),
        (eq, ":center_faction", "fac_player_supporters_faction"),
        (set_visitor, 17, "trp_imperial_chancellor"),
        (set_visitor, 18, "trp_imperial_marshal"),
        (set_visitor, 20, "trp_imperial_keeper"),
        (troop_set_slot, "trp_imperial_chancellor", slot_troop_imperial_court, ":center_no"),
(troop_set_slot, "trp_imperial_marshal", slot_troop_imperial_court, ":center_no"),
        (troop_set_slot, "trp_imperial_keeper", slot_troop_imperial_court, ":center_no"),
(try_end),
      #TEST COURT END   
      (assign, ":cur_pos", 16),
      (call_script, "script_get_heroes_attached_to_center", ":center_no", "p_temp_party"),
      (party_get_num_companion_stacks, ":num_stacks","p_temp_party"),
      (try_for_range, ":i_stack", 0, ":num_stacks"),

module_dialogs.py:
dialogs = [

########################################diplomacy dudes########################################
##############################################################
  [trp_imperial_marshal, "start", [
  (troop_slot_eq, "$g_talk_troop", slot_troop_met_previously, 0),
  ], "Greetings My King. Thank You for giving me chance to serve you as the Marshall. I will serve you as with utter diligence and care. Whenever You want to discuss military matters such  preparing military campaigns just talk to me.", "marshal_talk",[
  (troop_set_slot, "$g_talk_troop", slot_troop_met_previously, 1),
  ]],
##############################################################
    [trp_imperial_marshal,"start", [], "My king?", "marshal_talk",[]],

##############################################################
    [trp_imperial_marshal,"marshal_else", [], "Anything else my Lord?", "marshal_talk",[]],
##############################################################
    [trp_imperial_marshal|plyr,"marshal_talk",
[],"I want to discuss about our military actions.","marshal_army",[]],
##############################################################
    [trp_imperial_marshal|plyr,"marshal_talk",
[],"I want to recruit some imperial troops.","marshal_troops",[]],
##############################################################
[trp_imperial_marshal|plyr, "marshal_talk", [], "Never mind.", "close_window",[]],
##############################################################
##############################################################
[trp_imperial_marshal,"marshal_army", [],
  "What would you like my King?", "marshal_army1",[]],
##############################################################
[trp_imperial_marshal|plyr,"marshal_army1",
  [
    ],
  "I want to start a new campaign. Let us assemble the army here.", "marshal_campaign",
  []],
##############################################################
    [trp_imperial_marshal|plyr, "marshal_army1", [], "I want to know location of one of my wassals.", "marshal_location",[

    ]],
##############################################################
[trp_imperial_marshal|plyr, "marshal_army1", [], "Never mind.", "marshal_else",[]],
##############################################################
##############################################################
[trp_imperial_marshal,"marshal_troops", [],
  "What kind of troops would you like to take my King?", "marshal_troops1",[]],
##############################################################
[trp_imperial_marshal|plyr,"marshal_troops1",
  [
    ],
  "I want to recruit some town militia, my towns are weekly defended.", "marshal_militia",
  []],

##############################################################
[trp_imperial_marshal|plyr,"marshal_troops1",
  [
    ],
  "I want to recruit some elite infantry.", "marshal_infantry",
  []],
##############################################################
  [trp_imperial_marshal|plyr,"marshal_troops1",
  [
    ],
  "I want to recruit some elite cavalry.", "marshal_cavalry",
  []],
##############################################################
##############################################################
[trp_imperial_marshal|plyr, "marshal_troops1", [], "Never mind.", "marshal_else",[]],
##############################################################
[trp_imperial_marshal,"marshal_campaign", [],
  "You wish to summon all lords for a new campaign?", "marshal_campaign1",[]],
##############################################################
  [trp_imperial_marshal|plyr,"marshal_campaign1", [], "Yes. We must gather all our forces before we march on the enemy.", "marshal_campaign2",[]],
##############################################################
  [trp_imperial_marshal|plyr,"marshal_campaign1", [], "On second thought, it won't be necessary to summon everyone.", "marshal_else",[]],
##############################################################
  [trp_imperial_marshal,"marshal_campaign2",
  [],
  "All right then. I will send messengers and tell everyone to come here.", "marshal_talk",
  [
    (faction_set_slot, "$players_kingdom", slot_faction_ai_state, sfai_gathering_army),
    (assign, "$g_recalculate_ais", 1),
    ]],

##############################################################
[trp_imperial_marshal,"marshal_location", [],
  "Very well, I shall tell you what I know. About whom do you wish to hear?", "marshal_location2",[]],
##############################################################
  [trp_imperial_marshal|plyr|repeat_for_troops,"marshal_location2", [(store_repeat_object, ":troop_no"),
                                                              (neq, "$g_talk_troop", ":troop_no"),
                                                              (is_between, ":troop_no", heroes_begin, heroes_end),
                                                              (this_or_next|troop_slot_eq, ":troop_no", slot_troop_occupation, slto_kingdom_hero),
  (store_troop_faction, ":faction_no", ":troop_no"),
                                                              (eq, "fac_player_supporters_faction", ":faction_no"),
                                                              (str_store_troop_name, s1, ":troop_no")],
  "{s1}", "marshal_location3",[(store_repeat_object, "$hero_requested_to_learn_location")]],
##############################################################
[trp_imperial_marshal|plyr, "marshal_location2", [], "I have a different question.", "marshal_else",[]],
##############################################################
  [trp_imperial_marshal,"marshal_location3",
  [
    (call_script, "script_update_troop_location_notes", "$hero_requested_to_learn_location", 1),
    (call_script, "script_get_information_about_troops_position", "$hero_requested_to_learn_location", 0),
    ],
  "{s1}", "marshal_talk",[]],
 
##############################################################
  [trp_imperial_marshal,"marshal_militia", [],
  "Yes my lord, they are ready to serve you.", "marshal_militia1",[]],

##############################################################
  [trp_imperial_marshal|plyr, "marshal_militia1", [], "Good, thank you.", "marshal_militia2",[]],
 
##############################################################
  [trp_imperial_marshal,"marshal_militia2", [
          (party_add_members, "p_main_party", "trp_imperial_militia", 5)], "Glad to be of service to your highness, anything else?", "marshal_else",[]],
##############################################################
  [trp_imperial_marshal,"marshal_infantry", [],
  "Yes my lord, they are finest infantry you can find in Calardia.", "marshal_infantry1",[]],

##############################################################
  [trp_imperial_marshal|plyr, "marshal_infantry1", [], "Fine, thank you.", "marshal_infantry2",[]],
 
##############################################################
  [trp_imperial_marshal,"marshal_infantry2", [
          (party_add_members, "p_main_party", "trp_imperial_guard", 5)], "Glad to be of service to your highness, anything else?", "marshal_else",[]], 
##############################################################
  [trp_imperial_marshal,"marshal_cavalry", [],
  "Yes my lord, they are finest cavalry anybody saw.", "marshal_cavalry1",[]],

##############################################################
  [trp_imperial_marshal|plyr, "marshal_cavalry1", [], "I shall test them on field, thank you.", "marshal_cavalry2",[]],
 
##############################################################
  [trp_imperial_marshal,"marshal_cavalry2", [
          (party_add_members, "p_main_party", "trp_imperial_cataphract", 5)], "Glad to be of service to your highness, anything else?", "marshal_else",[]], 
############################################################## 
##############################################################
##############################################################
##############################################################
##############################################################


############################################################## 
##############################################################
##############################################################
# CHANCELLOR
##############################################################
##############################################################
##############################################################
[trp_imperial_chancellor, "start", [
  (troop_slot_eq, "$g_talk_troop", slot_troop_met_previously, 0),
  ], "Greetings Your Highness. Thank You for appointing me for as your Chancellor. I will serve and be available for you whenever needed. Whenever You want to discuss matters such as managing Your fiefs, recruiting Lords, declaring war or other kingdom management matters just call me.", "chancellor_talk",[
  (troop_set_slot, "$g_talk_troop", slot_troop_met_previously, 1),
  ]],
##############################################################
    [trp_imperial_chancellor,"start", [], "Yes my King?", "chancellor_talk",[]],
##############################################################
    [trp_imperial_chancellor,"chancellor_else", [], "Anything else my King?", "chancellor_talk",[]],
##############################################################
    [trp_imperial_chancellor|plyr, "chancellor_talk", [], "I would like to discuss about our kingdom.", "chancellor_our_kingdom",[
    ]],
##############################################################
    [trp_imperial_chancellor|plyr, "chancellor_talk", [], "I would like to discuss about our politics with other kingdoms.", "chancellor_foreighn_politics",[
    ]],
##############################################################
[trp_imperial_chancellor|plyr, "chancellor_talk", [], "Never mind.", "close_window",[]],
##############################################################
    [trp_imperial_chancellor,"chancellor_our_kingdom", [], "Yes my King?", "chancellor_our_kingdom1",[]],
##############################################################
    [trp_imperial_chancellor|plyr, "chancellor_our_kingdom1", [], "I want to manage my fiefs.", "chancellor_fiefs1",[
    ]],
##############################################################
    [trp_imperial_chancellor|plyr, "chancellor_our_kingdom1", [], "I want to change our kingdom color.", "chancellor_color",[
    ]],
##############################################################
    [trp_imperial_chancellor|plyr, "chancellor_our_kingdom1", [], "Never mind.", "chancellor_else",[
    ]],
##############################################################
    [trp_imperial_chancellor,"chancellor_foreighn_politics", [], "Yes my King?", "chancellor_foreighn_politics1",[]],
##############################################################
    [trp_imperial_chancellor|plyr, "chancellor_foreighn_politics1", [], "I want to declare war on one of the factions.", "chancellor_war",[
    ]],
##############################################################
    [trp_imperial_chancellor|plyr, "chancellor_foreighn_politics1", [], "Never mind.", "chancellor_else",[]],

##############################################################
[trp_imperial_chancellor, "chancellor_fiefs1", [
], "Which topic is of interest to you, my Liege?", "chancellor_fiefs2",[

]],
##############################################################
[trp_imperial_chancellor|plyr|repeat_for_parties, "chancellor_fiefs2", [
(store_repeat_object, ":fief"),
(is_between, ":fief", "p_town_1", "p_salt_mine"),
(store_faction_of_party, ":center_faction", ":fief"),
    (eq, ":center_faction", "fac_player_supporters_faction"),
(str_store_party_name, s1, ":fief"),
(party_get_slot, ":lord", ":fief", slot_town_lord),
      (str_store_troop_name,s2,":lord"),
], "{s1} belonging to {s2}", "chancellor_fiefs3",[
(store_repeat_object, "$temp_fief"),
]],
##############################################################
[trp_imperial_chancellor|plyr, "chancellor_fiefs2", [
], "Let's look at other topics to make decisions about.", "chancellor_else",[

]],
##############################################################
[trp_imperial_chancellor, "chancellor_fiefs3", [
  (party_get_slot, ":lord", "$temp_fief", slot_town_lord),
      (str_store_party_name,s2,"$temp_fief"),
      (str_store_troop_name,s3,":lord"),
], "{s2} belongs to {s3}. Who shall be your vassal to manage these lands?", "chancellor_fiefs3",[

]],
##############################################################
[trp_imperial_chancellor|plyr, "chancellor_fiefs3", [
], "I want it for Myself.", "chancellor_else",[
(call_script, "script_give_center_to_lord", "$temp_fief",  "trp_player", 0),
]],
##############################################################
[trp_imperial_chancellor|plyr|repeat_for_troops, "chancellor_fiefs3", [
(store_repeat_object, ":lord"),
(is_between, ":lord", "trp_reserved_knight_1", "trp_kingdom_1_pretender"),
(troop_slot_eq, ":lord", slot_troop_occupation, slto_kingdom_hero),
(str_store_party_name, s1, "$temp_fief"),
(str_store_troop_name,s2,":lord"),
], "Assign {s1} to {s2}.", "chancellor_else",[
(store_repeat_object, "$temp_lord"),
(call_script, "script_give_center_to_lord", "$temp_fief",  "$temp_lord", 0),
]],
##############################################################

[trp_imperial_chancellor|plyr, "chancellor_fiefs3", [
], "Let's look at other topics to make decisions about.", "chancellor_else",[

]],
##############################################################
[trp_imperial_chancellor, "chancellor_color", [
], "Which color would suit our kingdom most, Your Highness?", "chancellor_color",[

]],
##############################################################
[trp_imperial_chancellor|plyr, "chancellor_color", [
], "Black.", "chancellor_else",[
(faction_set_color, "fac_player_supporters_faction", 0x000000),
]],
##############################################################
[trp_imperial_chancellor|plyr, "chancellor_color", [
], "White.", "chancellor_else",[
(faction_set_color, "fac_player_supporters_faction", 0xFFFFFF),
]],
##############################################################
[trp_imperial_chancellor|plyr, "chancellor_color", [
], "Blue.", "chancellor_else",[
(faction_set_color, "fac_player_supporters_faction", 0x4876FF),
]],
##############################################################
[trp_imperial_chancellor|plyr, "chancellor_color", [
], "Wheat.", "chancellor_else",[
(faction_set_color, "fac_player_supporters_faction", 0xCDBA96),
]],
##############################################################
[trp_imperial_chancellor|plyr, "chancellor_color", [
], "Red.", "chancellor_else",[
(faction_set_color, "fac_player_supporters_faction", 0xFF4500),
]],
##############################################################
[trp_imperial_chancellor|plyr, "chancellor_color", [
], "Green.", "chancellor_else",[
(faction_set_color, "fac_player_supporters_faction", 0x32CD32),
]],
##############################################################
[trp_imperial_chancellor|plyr, "chancellor_color", [
], "Purple.", "chancellor_else",[
(faction_set_color, "fac_player_supporters_faction", 0x9400D3),
]],
##############################################################
[trp_imperial_chancellor|plyr, "chancellor_color", [
], "Gold.", "chancellor_else",[
(faction_set_color, "fac_player_supporters_faction", 0xFFB90F),
]],
##############################################################
[trp_imperial_chancellor|plyr, "chancellor_color", [
], "Dark Cherry Red.", "chancellor_else",[
(faction_set_color, "fac_player_supporters_faction", 0xFF330000),
]],
##############################################################
[trp_imperial_chancellor|plyr, "chancellor_color", [
], "Ultra marine blue.", "chancellor_else",[
(faction_set_color, "fac_player_supporters_faction", 0xFF120A8F),
]],
##############################################################
[trp_imperial_chancellor|plyr, "chancellor_color", [
], "Celtics green.", "chancellor_else",[
(faction_set_color, "fac_player_supporters_faction", 0xFF00611C),
]],
##############################################################
[trp_imperial_chancellor|plyr, "chancellor_color", [
], "Indigo purple.", "chancellor_else",[
(faction_set_color, "fac_player_supporters_faction", 0xFF4B0082),
]],
##############################################################
[trp_imperial_chancellor|plyr, "chancellor_color", [
], "Crimson red.", "chancellor_else",[
(faction_set_color, "fac_player_supporters_faction", 0xFFDC143C),
]],
##############################################################
[trp_imperial_chancellor|plyr, "chancellor_color", [
], "Dark olive green.", "chancellor_else",[
(faction_set_color, "fac_player_supporters_faction", 0xFFCAFF70),
]],
##############################################################
[trp_imperial_chancellor|plyr, "chancellor_color", [
], "Salmon.", "chancellor_else",[
(faction_set_color, "fac_player_supporters_faction", 0xFFFA8072),
]],
##############################################################
[trp_imperial_chancellor|plyr, "chancellor_color", [
], "I do not have time for this right now.", "chancellor_else",[

]],
##############################################################
[trp_imperial_chancellor, "chancellor_war", [
], "This is a very difficult decision, my Liege. Where should I send the envoy to declare war?", "chancellor_war1",[

]],
##############################################################
[trp_imperial_chancellor|plyr, "chancellor_war1", [
], "To the Kingdom of Swadia.", "chancellor_else",[
(call_script, "script_make_kingdom_hostile_to_player", "fac_kingdom_1", -90),
]],
##############################################################
[trp_imperial_chancellor|plyr, "chancellor_war1", [
], "To the Kingdom of Vaegirs.", "chancellor_else",[
(call_script, "script_make_kingdom_hostile_to_player", "fac_kingdom_2", -90),
]],
##############################################################
[trp_imperial_chancellor|plyr, "chancellor_war1", [
], "To the Khergit Khanate.", "chancellor_else",[
(call_script, "script_make_kingdom_hostile_to_player", "fac_kingdom_3", -90),
]],
##############################################################
[trp_imperial_chancellor|plyr, "chancellor_war1", [
], "To the Kingdom of Nords.", "chancellor_else",[
(call_script, "script_make_kingdom_hostile_to_player", "fac_kingdom_4", -90),
]],
##############################################################
[trp_imperial_chancellor|plyr, "chancellor_war1", [
], "To the Kingdom of Rhodoks.", "chancellor_else",[
(call_script, "script_make_kingdom_hostile_to_player", "fac_kingdom_5", -90),
]],

##############################################################
[trp_imperial_chancellor|plyr, "chancellor_war1", [
], "Let's look at other topics to make decisions about.", "chancellor_else",[

]],
##############################################################
##############################################################
##############################################################


##############################################################
##############################################################
##############################################################
### ARMORY KEEPER
##############################################################
##############################################################
##############################################################
  [trp_imperial_keeper, "start", [
  (troop_slot_eq, "$g_talk_troop", slot_troop_met_previously, 0),
  ], "Greetings My King. Thank You for put me in place of trust.", "keeper_talk",[
  (troop_set_slot, "$g_talk_troop", slot_troop_met_previously, 1),
  ]],
##############################################################
    [trp_imperial_keeper,"start", [], "My king?", "keeper_talk",[]],

##############################################################
[trp_imperial_keeper,"keeper_else", [], "Anything else my Lord?", "keeper_talk",[]],

#############################################################
[trp_imperial_keeper|plyr,"keeper_talk",
  [
    ],
  "I have a need for some armour.", "keeper_armor",
  []],
##############################################################
[trp_imperial_keeper|plyr,"keeper_talk",
  [
    ],
  "I have a need for some weapons.", "keeper_sword",
  []],
##############################################################
[trp_imperial_keeper|plyr, "keeper_talk", [], "Never mind.", "close_window",[]],
##############################################################
  [trp_imperial_keeper,"keeper_armor", [],
  "For whom do you need armour my King?", "keeper_armor1",[]],
##############################################################

[trp_imperial_keeper|plyr,"keeper_armor1",[],
  "I need some armour for me.", "keeper_armor_me",
  []],
 
##############################################################
[trp_imperial_keeper|plyr,"keeper_armor1",[],
  "I need some armour for one of my vassals.", "keeper_armor_vassal",
  []],
##############################################################
[trp_imperial_keeper|plyr, "keeper_armor1", [], "Never mind.", "keeper_else",[]], 
##############################################################
  [trp_imperial_keeper,"keeper_sword", [],
  "For whom do you need weapons my King?", "keeper_sword1",[]],
##############################################################
[trp_imperial_keeper|plyr,"keeper_sword1",[],
  "I have a need for some weapons for me.", "keeper_king_weapon",
  []],
##############################################################
[trp_imperial_keeper|plyr,"keeper_sword1",[],
  "I have a need some weapons for one of my vassal.", "keeper_weapon_vassal",
  []],

##############################################################
[trp_imperial_keeper|plyr, "keeper_sword1", [], "Never mind.", "keeper_else",[]],
 
# ############################################################
  [trp_imperial_keeper,"keeper_armor_me", [],
  "Yes my lord, my best armoureer just brought this to me.", "keeper_armor_me1",[]],
 
# ############################################################
[trp_imperial_keeper|plyr,"keeper_armor_me1",
  [
    ],
  "Good I shall take it, thank you.", "keeper_armor_me2",
  []],

# ############################################################
  [trp_imperial_keeper,"keeper_armor_me2", [
          (troop_add_item,"trp_player","itm_guardian_head",imod_plain),
          (troop_add_item,"trp_player","itm_guardian_body",imod_plain),
          (troop_add_item,"trp_player","itm_guardian_leg",imod_plain),
          (troop_add_item,"trp_player","itm_guardian_hand",imod_plain),
          (troop_add_item,"trp_player","itm_scalekataphract",imod_spirited)], "I hope that this armour will serve you well my Lord, anything else?", "keeper_else",[]], 

# ############################################################
  [trp_imperial_keeper,"keeper_armor_vassal", [],
  "Yes my lord, my best armoureer just brought one you need.", "keeper_armor_vassal1",[]],
 
# ############################################################
[trp_imperial_keeper|plyr,"keeper_armor_vassal1",
  [
    ],
  "Good I shall take it for them, thank you.", "keeper_armor_vassal2",
  []],

# ############################################################
  [trp_imperial_keeper,"keeper_armor_vassal2", [
          (troop_add_item,"trp_player","itm_lords_helmet",imod_plain),
          (troop_add_item,"trp_player","itm_lords_mail",imod_plain),
          (troop_add_item,"trp_player","itm_lords_greaves",imod_plain),
          (troop_add_item,"trp_player","itm_lords_gauntlets",imod_plain),
          (troop_add_item,"trp_player","itm_warhorse_scale_rtw1",imod_spirited)], "I hope that this armour will serve you well my Lord, anything else?", "keeper_else",[]], 
# ############################################################
  [trp_imperial_keeper,"keeper_king_weapon", [],
  "Yes my lord, my best smith brought this morning this arms.", "keeper_king_weapon1",[]],
 
# ############################################################
[trp_imperial_keeper|plyr,"keeper_king_weapon1",[],
  "Exelent, thank you.", "keeper_king_weapon2",
  []],

# ############################################################
  [trp_imperial_keeper,"keeper_king_weapon2", [
          (troop_add_item,"trp_player","itm_kings_sword",imod_plain),
          (troop_add_item,"trp_player","itm_kings_sword_diamond",imod_plain),
          (troop_add_item,"trp_player","itm_flintlock_pistol",imod_plain),
          (troop_add_item,"trp_player","itm_cartridges",imod_plain),  
          (troop_add_item,"trp_player","itm_tab_shield_round_e",imod_reinforced)], "I hope that you will find this arms worty of your Highness, anything else?", "keeper_else",[]], 

##############################################################
  [trp_imperial_keeper,"keeper_weapon_vassal", [],
  "Yes my lord, my smith brought me this, I hope it will do.", "keeper_weapon_vassal1",[]],
 
# ############################################################
[trp_imperial_keeper|plyr,"keeper_weapon_vassal1",[],
  "Nice balanced, thank you.", "keeper_weapon_vassal2",
  []],

# ############################################################
  [trp_imperial_keeper,"keeper_weapon_vassal2", [
          (troop_add_item,"trp_player","itm_lords_sword_b",imod_plain),
          (troop_add_item,"trp_player","itm_flintlock_pistol",imod_plain),
          (troop_add_item,"trp_player","itm_cartridges",imod_plain),    
          (troop_add_item,"trp_player","itm_tab_shield_round_e",imod_reinforced)], "I hope this sword will serve you well in hands of your vassals, anything else my King?", "keeper_else",[]], 
 
# ############################################################  
as it is obvious I created new troop tree for my self(earlier) and implemented it, so put in your own or put original troops created for this okm.
and in module_constants.py:
slot_troop_imperial_court = 210

mine is on the bottom, but you can place yours where you want.

Adding your own troops as guards in lords hall:
In module scripts find this:
    (le, ":guard_troop", 0),
    (assign, ":guard_troop", "trp_swadian_sergeant"),
    (try_end),

and make it look like this:
        (le, ":guard_troop", 0),
        (assign, ":guard_troop", "trp_imperial_guard"),
      (try_end),

Adding your own guards in town:
In module_game_menus find this:
            (else_try),
              (assign,reg(0),"trp_vaegir_infantry"),
              (assign,reg(1),"trp_vaegir_infantry"),
              (assign,reg(2),"trp_vaegir_archer"),
              (assign,reg(3),"trp_vaegir_footman"),
            (try_end),
and make it look like this:
            (else_try),
              (assign,reg(0),"trp_imperial_footman"),
              (assign,reg(1),"trp_imperial_swordsman"),
              (assign,reg(2),"trp_imperial_light_infantry"),
              (assign,reg(3),"trp_imperial_infantry"),
            (try_end),
For adding guards in lords hall and in courtyard I used my troops as example, so whereever you see imperial something you should put your own troop.


Updated.
Imperial Marshall:
Preparing campaighn
Recruit militia/elite troops
Imperial Chancellor:
Managing fiefs
War declaration
Change kingdom color
Imperial armory keeper:
Gives armour/weapon sets to player for himself and for vassals
 
iggorbb said:
I taught the other day and had idea about diplomacy. I created something, implemented it into my mod and it worked, not perfect but worked. And than I founded sod source wich had that I had but in much, much better version, so I combined my stuff and source I found. So if you going to use this, give 99% credits to sod creator and 1% to me for retyping and some minor addons, so here it goes:

module.troops.py: (between merchant and seneschals)

##  ["merchant_20","merchant_20_F","merchant_20_F",tf_hero|tf_female, 0,0, fac_merchants,[itm_courser,            itm_arming_sword,      itm_padded_leather,        itm_leather_boots,                          ],              def_attrib|level(15),wp(100),knows_inventory_management_10, 0x000000000010500401f6837d27688212],
#test court
  ["imperial_chancellor", "Diplomacy Advisor", "Diplomacy Advisor", tf_hero|tf_is_merchant, 0,reserved,  fac_neutral,[ itm_courtly_outfit,      itm_blue_hose],    def_attrib|level(2),wp(20),knows_common, 0x0000000e810011125c1b6db71b89b72000000000001e38d50000000000000000],
  ["imperial_marshal", "Military Advisor", "Military Advisor", tf_hero|tf_is_merchant, 0,reserved,  fac_neutral,[itm_plate_armor,      itm_iron_greaves],    def_attrib|level(20),wp(600),knows_common, 0x0000000fbd003044121b6c47db05b6eb00000000001db4e00000000000000000],
  ["imperial_keeper", "Imperial Armory Keeper", "Imperial Armory Keeper", tf_hero|tf_is_merchant, 0,reserved,  fac_neutral,[ itm_courtly_outfit,      itm_blue_hose],    def_attrib|level(2),wp(20),knows_common, 0x000000083f003094471b6db6db89b73500000000001e353b0000000000000000],
#test court


#Seneschals

module_scripts.py: 
find this:
  # script_enter_court
and scroll down a bit and make it look like this:

      #Adding guards
      (store_faction_of_party, ":center_faction", ":center_no"),
      (faction_get_slot, ":guard_troop", ":center_faction", slot_faction_guard_troop),
      (try_begin),
        (le, ":guard_troop", 0),
        (assign, ":guard_troop", "trp_swadian_sergeant"),
      (try_end),
      (set_visitor, 6, ":guard_troop"),
      (set_visitor, 7, ":guard_troop"),
        #TEST COURT BEGIN
      (try_begin),
        (this_or_next|eq, ":center_faction", "fac_player_faction"),
        (eq, ":center_faction", "fac_player_supporters_faction"),
        (set_visitor, 17, "trp_imperial_chancellor"),
        (set_visitor, 18, "trp_imperial_marshal"),
        (set_visitor, 20, "trp_imperial_keeper"),
        (troop_set_slot, "trp_imperial_chancellor", slot_troop_imperial_court, ":center_no"),
(troop_set_slot, "trp_imperial_marshal", slot_troop_imperial_court, ":center_no"),
        (troop_set_slot, "trp_imperial_keeper", slot_troop_imperial_court, ":center_no"),
(try_end),
      #TEST COURT END   
      (assign, ":cur_pos", 16),
      (call_script, "script_get_heroes_attached_to_center", ":center_no", "p_temp_party"),
      (party_get_num_companion_stacks, ":num_stacks","p_temp_party"),
      (try_for_range, ":i_stack", 0, ":num_stacks"),

module_dialogs.py:

dialogs = [

#test ########################### OWN KINGDOM MANAGEMENT BEGIN ###########################
# ########################################################################################
# ############################################################
  [trp_imperial_marshal, "start", [
  (troop_slot_eq, "$g_talk_troop", slot_troop_met_previously, 0),
  ], "Greetings My King. Thank You for giving me chance to serve you as the Marshall. I will serve you as with utter diligence and care. Whenever You want to discuss military matters such  preparing military campaigns, reinforce city troops  just talk to me.", "marshal_talk",[
  (troop_set_slot, "$g_talk_troop", slot_troop_met_previously, 1),
  ]],
# ############################################################
    [trp_imperial_marshal,"start", [], "My king?", "marshal_talk",[]],

# ############################################################
[trp_imperial_marshal,"marshal_else", [], "Anything else my Lord?", "marshal_talk",[]],

# ############################################################
[trp_imperial_marshal|plyr,"marshal_talk",
  [
    ],
  "I want to start a new campaign. Let us assemble the army here.", "marshal_campaign",
  []],
# ############################################################
    [trp_imperial_marshal|plyr, "marshal_talk", [], "I want to know location of one of my wassals.", "marshal_location",[

    ]],

# ############################################################
[trp_imperial_marshal|plyr,"marshal_talk",
  [
    ],
  "I want to recruit some town militia, my towns are weekly defended.", "marshal_militia",
  []],

# ############################################################
[trp_imperial_marshal|plyr,"marshal_talk",
  [
    ],
  "I want to recruit some elite infantry.", "marshal_infantry",
  []],
# ############################################################
  [trp_imperial_marshal|plyr,"marshal_talk",
  [
    ],
  "I want to recruit some elite cavalry.", "marshal_cavalry",
  []],

# ############################################################
[trp_imperial_marshal|plyr, "marshal_talk", [], "Never mind.", "close_window",[]],

# ############################################################
[trp_imperial_marshal,"marshal_campaign", [],
  "You wish to summon all lords for a new campaign?", "marshal_campaign1",[]],
# ############################################################
  [trp_imperial_marshal|plyr,"marshal_campaign1", [], "Yes. We must gather all our forces before we march on the enemy.", "marshal_campaign2",[]],
# ############################################################
  [trp_imperial_marshal|plyr,"marshal_campaign1", [], "On second thought, it won't be necessary to summon everyone.", "marshal_else",[]],
# ############################################################
  [trp_imperial_marshal,"marshal_campaign2",
  [],
  "All right then. I will send messengers and tell everyone to come here.", "marshal_talk",
  [
    (faction_set_slot, "$players_kingdom", slot_faction_ai_state, sfai_gathering_army),
    (assign, "$g_recalculate_ais", 1),
    ]],

# ############################################################
[trp_imperial_marshal,"marshal_location", [],
  "Very well, I shall tell you what I know. About whom do you wish to hear?", "marshal_location2",[]],
# ############################################################
  [trp_imperial_marshal|plyr|repeat_for_troops,"marshal_location2", [(store_repeat_object, ":troop_no"),
                                                              (neq, "$g_talk_troop", ":troop_no"),
                                                              (is_between, ":troop_no", heroes_begin, heroes_end),
                                                              (this_or_next|troop_slot_eq, ":troop_no", slot_troop_occupation, slto_kingdom_hero),
  (store_troop_faction, ":faction_no", ":troop_no"),
                                                              (eq, "fac_player_supporters_faction", ":faction_no"),
                                                              (str_store_troop_name, s1, ":troop_no")],
  "{s1}", "marshal_location3",[(store_repeat_object, "$hero_requested_to_learn_location")]],
# ############################################################
[trp_imperial_marshal|plyr, "marshal_location2", [], "I have a different question.", "marshal_else",[]],
# ############################################################
  [trp_imperial_marshal,"marshal_location3",
  [
    (call_script, "script_update_troop_location_notes", "$hero_requested_to_learn_location", 1),
    (call_script, "script_get_information_about_troops_position", "$hero_requested_to_learn_location", 0),
    ],
  "{s1}", "marshal_talk",[]],
 
# ############################################################
  [trp_imperial_marshal,"marshal_militia", [],
  "Yes my lord, they are ready to serve you.", "marshal_militia1",[]],

# ############################################################
  [trp_imperial_marshal|plyr, "marshal_militia1", [], "Good, thank you.", "marshal_militia2",[]],
 
# ############################################################
  [trp_imperial_marshal,"marshal_militia2", [
          (party_add_members, "p_main_party", "trp_imperial_militia", 5)], "Glad to be of service to your highness, anything else?", "marshal_else",[]],
# ############################################################
  [trp_imperial_marshal,"marshal_infantry", [],
  "Yes my lord, they are finest infantry you can find in Calardia.", "marshal_infantry1",[]],

# ############################################################
  [trp_imperial_marshal|plyr, "marshal_infantry1", [], "Fine, thank you.", "marshal_infantry2",[]],
 
# ############################################################
  [trp_imperial_marshal,"marshal_infantry2", [
          (party_add_members, "p_main_party", "trp_imperial_guard", 5)], "Glad to be of service to your highness, anything else?", "marshal_else",[]], 
# ############################################################
  [trp_imperial_marshal,"marshal_cavalry", [],
  "Yes my lord, they are finest cavalry anybody saw.", "marshal_cavalry1",[]],

# ############################################################
  [trp_imperial_marshal|plyr, "marshal_cavalry1", [], "I shall test them on field, thank you.", "marshal_cavalry2",[]],
 
# ############################################################
  [trp_imperial_marshal,"marshal_cavalry2", [
          (party_add_members, "p_main_party", "trp_imperial_cataphract", 5)], "Glad to be of service to your highness, anything else?", "marshal_else",[]], 
# ############################################################ 

# ############################################################
# CHANCELLOR
# ############################################################

[trp_imperial_chancellor, "start", [
  (troop_slot_eq, "$g_talk_troop", slot_troop_met_previously, 0),
  ], "Greetings Your Highness. Thank You for appointing me for as your Chancellor. I will serve and be available for you whenever needed. Whenever You want to discuss matters such as managing Your fiefs, recruiting Lords, declaring war or other kingdom management matters just call me.", "chancellor_talk",[
  (troop_set_slot, "$g_talk_troop", slot_troop_met_previously, 1),
  ]],

  # ############################################################
    [trp_imperial_chancellor,"start", [], "Yes my King?", "chancellor_talk",[]],

# ############################################################
[trp_imperial_chancellor,"chancellor_else", [], "Anything else my King?", "chancellor_talk",[]],

# ############################################################
    [trp_imperial_chancellor|plyr, "chancellor_talk", [], "I want to recruit new Lord", "chancellor_lord1",[

    ]],
# ############################################################
    [trp_imperial_chancellor|plyr, "chancellor_talk", [], "I want to manage my fiefs.", "chancellor_fiefs1",[
    ]],
# ############################################################
    [trp_imperial_chancellor|plyr, "chancellor_talk", [], "I want to declare war on one of the factions.", "chancellor_war",[
    ]],
# ############################################################
    [trp_imperial_chancellor|plyr, "chancellor_talk", [], "I want to change our kingdom color.", "chancellor_color",[
    ]],
# ############################################################
[trp_imperial_chancellor|plyr, "chancellor_talk", [], "Never mind.", "close_window",[]],
# ############################################################
    [trp_imperial_chancellor, "chancellor_lord1", [
(assign,":num_lords",0),
      (try_for_range,":lord","trp_reserved_knight_1","trp_kingdom_1_pretender"),
        (troop_slot_eq, ":lord", slot_troop_occupation, slto_kingdom_hero),
        (val_add,":num_lords",1),
      (try_end),
  (assign,":num_centers",0),
      (try_for_range, ":center_no", walled_centers_begin, walled_centers_end),
        (store_faction_of_party, ":center_faction", ":center_no"),
        (eq, ":center_faction", "fac_player_supporters_faction"),
        (val_add,":num_centers",1),
      (try_end),
      (try_begin),
(lt,":num_lords",":num_centers"),
(str_store_string, s1, "@Do you wish to recruit more Lords?"),
(assign, "$territory", 1),
  (else_try),
(le,":num_centers",":num_lords"),
(str_store_string, s1, "@We need more territory to recruit additional Lords."),
  (assign, "$territory", 0),
  (try_end),
], "{s1}", "chancellor_lord1",[
]],
# ############################################################
[trp_imperial_chancellor|plyr, "chancellor_lord1", [
(eq, "$territory", 1),
], "Recruit new lord.", "chancellor_else",[
(assign, ":stop", 0),
      (try_for_range, ":lord", "trp_reserved_knight_1", "trp_kingdom_1_pretender"),
(neq, ":stop", 1),
(neg|troop_slot_eq, ":lord", slot_troop_occupation, slto_kingdom_hero),
(assign, ":cur_lord", ":lord"),
(assign, ":stop", 1),
      (try_end),
      (neq, ":stop", 0),
      (troop_set_slot, ":cur_lord", slot_troop_change_to_faction, "fac_player_supporters_faction"),
      (troop_set_slot, ":cur_lord", slot_troop_occupation, slto_kingdom_hero),
      (troop_set_slot, ":cur_lord", slot_troop_wealth, 6000),
  (troop_get_slot, ":selected_banner_spr", "trp_player", slot_troop_banner_scene_prop),
  (troop_set_slot, ":cur_lord", slot_troop_banner_scene_prop, ":selected_banner_spr"),
      (troop_set_slot, ":cur_lord", slot_troop_original_faction, "fac_player_supporters_faction"),
]],
# ############################################################
[trp_imperial_chancellor|plyr, "chancellor_lord1", [
], "Let's look at other topics to make decisions about.", "chancellor_else",[

]],
# ############################################################
[trp_imperial_chancellor, "chancellor_fiefs1", [
], "Which topic is of interest to you, my Liege?", "chancellor_fiefs2",[

]],
# ############################################################
[trp_imperial_chancellor|plyr|repeat_for_parties, "chancellor_fiefs2", [
(store_repeat_object, ":fief"),
(is_between, ":fief", "p_town_1", "p_salt_mine"),
(store_faction_of_party, ":center_faction", ":fief"),
    (eq, ":center_faction", "fac_player_supporters_faction"),
(str_store_party_name, s1, ":fief"),
(party_get_slot, ":lord", ":fief", slot_town_lord),
      (str_store_troop_name,s2,":lord"),
], "{s1} belonging to {s2}", "chancellor_fiefs3",[
(store_repeat_object, "$temp_fief"),
]],
# ############################################################
[trp_imperial_chancellor|plyr, "chancellor_fiefs2", [
], "Let's look at other topics to make decisions about.", "chancellor_else",[

]],
# ############################################################
[trp_imperial_chancellor, "chancellor_fiefs3", [
  (party_get_slot, ":lord", "$temp_fief", slot_town_lord),
      (str_store_party_name,s2,"$temp_fief"),
      (str_store_troop_name,s3,":lord"),
], "{s2} belongs to {s3}. Who shall be your vassal to manage these lands?", "chancellor_fiefs3",[

]],
# ############################################################
[trp_imperial_chancellor|plyr, "chancellor_fiefs3", [
], "I want it for Myself.", "chancellor_else",[
(call_script, "script_give_center_to_lord", "$temp_fief",  "trp_player", 0),
]],
# ############################################################
[trp_imperial_chancellor|plyr|repeat_for_troops, "chancellor_fiefs3", [
(store_repeat_object, ":lord"),
(is_between, ":lord", "trp_reserved_knight_1", "trp_kingdom_1_pretender"),
(troop_slot_eq, ":lord", slot_troop_occupation, slto_kingdom_hero),
(str_store_party_name, s1, "$temp_fief"),
(str_store_troop_name,s2,":lord"),
], "Assign {s1} to {s2}.", "chancellor_else",[
(store_repeat_object, "$temp_lord"),
(call_script, "script_give_center_to_lord", "$temp_fief",  "$temp_lord", 0),
]],
# ############################################################

[trp_imperial_chancellor|plyr, "chancellor_fiefs3", [
], "Let's look at other topics to make decisions about.", "chancellor_else",[

]],
# ############################################################
[trp_imperial_chancellor, "chancellor_war", [
], "This is a very difficult decision, my Liege. Where should I send the envoy to declare war?", "chancellor_war",[

]],
# ############################################################
[trp_imperial_chancellor|plyr, "chancellor_war", [
], "To the Kingdom of Swadia.", "chancellor_else",[
(call_script, "script_make_kingdom_hostile_to_player", "fac_kingdom_1", -3),
]],
# ############################################################
[trp_imperial_chancellor|plyr, "chancellor_war", [
], "To the Kingdom of Vaegirs.", "chancellor_else",[
(call_script, "script_make_kingdom_hostile_to_player", "fac_kingdom_2", -3),
]],
# ############################################################
[trp_imperial_chancellor|plyr, "chancellor_war", [
], "To the Khergit Khanate.", "chancellor_else",[
(call_script, "script_make_kingdom_hostile_to_player", "fac_kingdom_3", -3),
]],
# ############################################################
[trp_imperial_chancellor|plyr, "chancellor_war", [
], "To the Kingdom of Nords.", "chancellor_else",[
(call_script, "script_make_kingdom_hostile_to_player", "fac_kingdom_4", -3),
]],
# ############################################################
[trp_imperial_chancellor|plyr, "chancellor_war", [
], "To the Kingdom of Rhodoks.", "chancellor_else",[
(call_script, "script_make_kingdom_hostile_to_player", "fac_kingdom_5", -3),
]],
# ############################################################
[trp_imperial_chancellor|plyr, "chancellor_war", [
], "To the Imperial Expeditionary Forces.", "chancellor_else",[
(call_script, "script_make_kingdom_hostile_to_player", "fac_kingdom_6", -3),
]],
# ############################################################
[trp_imperial_chancellor|plyr, "chancellor_war", [
], "Let's look at other topics to make decisions about.", "chancellor_else",[

]],
# ############################################################
[trp_imperial_chancellor, "chancellor_color", [
], "Which color would suit our kingdom most, Your Highness?", "chancellor_color",[

]],
# ############################################################
[trp_imperial_chancellor|plyr, "chancellor_color", [
], "Black.", "chancellor_else",[
(faction_set_color, "fac_player_supporters_faction", 0x000000),
]],
# ############################################################
[trp_imperial_chancellor|plyr, "chancellor_color", [
], "White.", "chancellor_else",[
(faction_set_color, "fac_player_supporters_faction", 0xFFFFFF),
]],
# ############################################################
[trp_imperial_chancellor|plyr, "chancellor_color", [
], "Blue.", "chancellor_else",[
(faction_set_color, "fac_player_supporters_faction", 0x4876FF),
]],
# ############################################################
[trp_imperial_chancellor|plyr, "chancellor_color", [
], "Wheat.", "chancellor_else",[
(faction_set_color, "fac_player_supporters_faction", 0xCDBA96),
]],
# ############################################################
[trp_imperial_chancellor|plyr, "chancellor_color", [
], "Red.", "chancellor_else",[
(faction_set_color, "fac_player_supporters_faction", 0xFF4500),
]],
# ############################################################
[trp_imperial_chancellor|plyr, "chancellor_color", [
], "Green.", "chancellor_else",[
(faction_set_color, "fac_player_supporters_faction", 0x32CD32),
]],
# ############################################################
[trp_imperial_chancellor|plyr, "chancellor_color", [
], "Purple.", "chancellor_else",[
(faction_set_color, "fac_player_supporters_faction", 0x9400D3),
]],
# ############################################################
[trp_imperial_chancellor|plyr, "chancellor_color", [
], "Gold.", "chancellor_else",[
(faction_set_color, "fac_player_supporters_faction", 0xFFB90F),
]],
# ############################################################
[trp_imperial_chancellor|plyr, "chancellor_color", [
], "Let's look at other topics to make decisions about.", "chancellor_else",[

]],
# ############################################################
# ############################################################

##############################################################
# ############################################################

##############################################################
### ARMORY KEEPER
##############################################################
# ############################################################
  [trp_imperial_keeper, "start", [
  (troop_slot_eq, "$g_talk_troop", slot_troop_met_previously, 0),
  ], "Greetings My King. Thank You for put me in place of trust.", "keeper_talk",[
  (troop_set_slot, "$g_talk_troop", slot_troop_met_previously, 1),
  ]],
# ############################################################
    [trp_imperial_keeper,"start", [], "My king?", "keeper_talk",[]],

# ############################################################
[trp_imperial_keeper,"keeper_else", [], "Anything else my Lord?", "keeper_talk",[]],

# ############################################################
[trp_imperial_keeper|plyr,"keeper_talk",
  [
    ],
  "I have a need for some armour.", "keeper_armor",
  []],
# ############################################################
[trp_imperial_keeper|plyr,"keeper_talk",
  [
    ],
  "I need some armour for one of my vassals.", "keeper_vassal",
  []],
 
# ############################################################
[trp_imperial_keeper|plyr,"keeper_talk",
  [
    ],
  "I have a need for some weapons.", "keeper_sword",
  []],

  # ############################################################
[trp_imperial_keeper|plyr,"keeper_talk",
  [
    ],
  "I have a need for some weapons for one of my vassal.", "keeper_weapon",
  []],

# ############################################################
[trp_imperial_keeper|plyr, "keeper_talk", [], "Never mind.", "close_window",[]],
 
# ############################################################
  [trp_imperial_keeper,"keeper_armor", [],
  "Yes my lord, my best armoureer just brought this to me.", "keeper_armor1",[]],
 
# ############################################################
[trp_imperial_keeper|plyr,"keeper_armor1",
  [
    ],
  "Good I shall take it, thank you.", "keeper_armor2",
  []],

# ############################################################
  [trp_imperial_keeper,"keeper_armor2", [
          (troop_add_item,"trp_player","itm_winged_great_helmet",imod_lordly),
          (troop_add_item,"trp_player","itm_plate_armor",imod_lordly),
          (troop_add_item,"trp_player","itm_iron_greaves",imod_lordly),
          (troop_add_item,"trp_player","itm_gauntlets",imod_lordly)], "I hope that this armour will serve you well my Lord, anything else?", "keeper_else",[]], 

# ############################################################
  [trp_imperial_keeper,"keeper_vassal", [],
  "Yes my lord, my best armoureer just brought one you need.", "keeper_vassal1",[]],
 
# ############################################################
[trp_imperial_keeper|plyr,"keeper_vassal1",
  [
    ],
  "Good I shall take it for them, thank you.", "keeper_vassal2",
  []],

# ############################################################
  [trp_imperial_keeper,"keeper_vassal2", [
          (troop_add_item,"trp_player","itm_great_helmet",imod_lordly),
          (troop_add_item,"trp_player","itm_coat_of_plates",imod_lordly),
          (troop_add_item,"trp_player","itm_mail_boots",imod_lordly),
          (troop_add_item,"trp_player","itm_mail_mittens",imod_lordly)], "I hope that this armour will serve you well my Lord, anything else?", "keeper_else",[]], 
# ############################################################
  [trp_imperial_keeper,"keeper_sword", [],
  "Yes my lord, my best smith brought this morning this arms.", "keeper_sword1",[]],
 
# ############################################################
[trp_imperial_keeper|plyr,"keeper_sword1",
  [
    ],
  "Exelent, thank you.", "keeper_sword2",
  []],

# ############################################################
  [trp_imperial_keeper,"keeper_sword2", [
          (troop_add_item,"trp_player","itm_bastard_sword_b",imod_masterwork),
          (troop_add_item,"trp_player","itm_tab_shield_round_e",imod_reinforced)], "I hope that you will find this arms worty of your Highness, anything else?", "keeper_else",[]], 
  # ############################################################
  [trp_imperial_keeper,"keeper_weapon", [],
  "Yes my lord, my smith brought me this, I hope it will do.", "keeper_weapon1",[]],
 
# ############################################################
[trp_imperial_keeper|plyr,"keeper_weapon1",
  [
    ],
  "Nice balanced, thank you.", "keeper_weapon2",
  []],

# ############################################################
  [trp_imperial_keeper,"keeper_weapon2", [
          (troop_add_item,"trp_player","itm_bastard_sword_a",imod_masterwork),
          (troop_add_item,"trp_player","itm_tab_shield_round_e",imod_reinforced)], "I hope this sword will serve you well in hands of your vassals, anything else my King?", "keeper_else",[]], 
 
# ############################################################
as it is obvious I created new troop tree for my self(earlier) and implemented it, so put in your own or put original troops created for this okm.
and in module_constants.py:

slot_troop_imperial_court = 210

mine is on the bottom, but you can place yours where you want.


Thats it for now. I will probably update it when I find more time to work on it, and untill that time comes you can try to modify it yourself. The things I couldnt do because of my low scripting experience is:
I got this piece of game_menu code:
      ("action_modify_banner",[],"Choose new heraldry.",
      [
          (start_presentation, "prsnt_banner_selection"),
          #(start_presentation, "prsnt_custom_banner"),
        ]
      ),
so if anybody knows how to do it, it would be nice.
Known problems:
I tested it and it worked good, but one thing was going on my nervs and I couldnt fix it. I placed trp_militia to stand in town as guards, and trp_militia_sergeant to be prison/castle guard, and when i implemented this town guards are Vaeghir lower troops and castle/prison guards doesnt exist at all. So I need help about that.

So, does that mean Berserker's Kingdom Management doesn't have the above features?
 
Please don't post a big quote like that use spoilers instead. and the answer is no you have to implement it in the kingdom management yourself.
 
Done, thanks for help. And something else was bothering me, if you have time to help me. As I posted up there I have problem with something, now I know it is related to visitor entry number, correct me if Im wrong, but what I dont know is how to fix it. Can you help me about that?

EDIT: Nobody?
 
Berserker Pride said:
It is native.  Just with kingdom management and the rebel faction to serve as your troops when you start a kingdom.

BP,

I just noticed that compiled version still has kingdom heroes including player begins in the game. 

Just an FYI, I know there is a fix. I am just checking some things to make sure they work in that version because I ran into a problem in a modified version of your mod.  Every lord had zero troops at the start and no one would get reinforcements so I am going back to the beginning and checking after each change to see if I can figure out where things went wrong.

Just to be clear, your version works fine as far as starting troop levels, and I assume reinforcements it just still has KHIPB in the game.  The reinforcement thing was in a altered version I was working on.
 
Back
Top Bottom