Any way to access your vassal's garrisons?

正在查看此主题的用户

DJK83

Sergeant
It's kind of annoying that sometimes you'll award a fief to one of your vassals, and they'll barely add anyone to the garrison for quite a while. So lately I've been holding off on awarding any castles or towns to anyone until I can fill them up myself. But the problem is that I usually can't do it before I have to pay a week or two worth of wages, without collecting rents or tariffs to offset the cost.

It would be fantastic if there were some way to add the ability to access your vassal's garrisons. Now, perhaps it could be so that you couldn't take troops -- just like it is when you give them troops in the field. Any ideas as to how this could be done? I've actually gone so far as to exit the game, remove the relation penalty for awarding fiefs, take them myself, collect the rents and/or tariffs to pay for the wages while I'm adding troops to the garrison, and then award them to a vassal. It's a pain in the ass...
 
Diplomacy includes the ability to send troops reinforce any garrison within your kingdom. Other mods include various ways of giving troops to vassals, patrols, etc, as well.

In any case, it would be quite easy to add an option to the town menu that utilizes the following command:
(change_screen_give_members, [party_id]), #if party id is not given, current party will be used

EDIT
For instance, the following menu option could be added to the "town" menu, immediately following "castle_store_troops"
插入代码块:
      ("castle_reinforce_garrison",
      [	  
		(party_get_slot, ":town_lord", "$current_town", slot_town_lord),
		  
	    (assign, ":player_can_draw_from_garrison", 0), 
		(try_begin), #option 1 - player is town lord
		  (eq, ":town_lord", "trp_player"),
		  (assign, ":player_can_draw_from_garrison", 1),
		(else_try), #option 2 - town is unassigned and part of the player faction
		  (store_faction_of_party, ":faction", "$g_encountered_party"),
		  (eq, ":faction", "fac_player_supporters_faction"),			
		  (neg|party_slot_ge, "$g_encountered_party", slot_town_lord, active_npcs_begin), #ie, zero or -1

		  (assign, ":player_can_draw_from_garrison", 1),
		(else_try), #option 3 - town was captured by player
		  (lt, ":town_lord", 0), #ie, unassigned
		  (store_faction_of_party, ":castle_faction", "$g_encountered_party"),
		  (eq, "$players_kingdom", ":castle_faction"),
		  
		  (eq, "$g_encountered_party", "$g_castle_requested_by_player"),

		  (assign, ":player_can_draw_from_garrison", 1),
		(else_try),
		  (lt, ":town_lord", 0), #ie, unassigned
		  (store_faction_of_party, ":castle_faction", "$g_encountered_party"),
		  (eq, "$players_kingdom", ":castle_faction"),
		  
		  (store_party_size_wo_prisoners, ":party_size", "$g_encountered_party"),
		  (eq, ":party_size", 0),
		  
		  (assign, ":player_can_draw_from_garrison", 1),
		(else_try),
		  (party_slot_ge, "$g_encountered_party", slot_town_lord, active_npcs_begin),
		  (store_faction_of_party, ":castle_faction", "$g_encountered_party"),
		  (eq, "$players_kingdom", ":castle_faction"),
		  
		  (troop_slot_eq, "trp_player", slot_troop_spouse, ":town_lord"),		    

		  (assign, ":player_can_draw_from_garrison", 1),
		(try_end),

                (neq, ":player_can_draw_from_garrison", 1),
		
                (store_faction_of_party, ":castle_faction", "$g_encountered_party"),
                (this_or_next|eq, "$players_kingdom", ":castle_faction"),
                (eq, ":castle_faction", "fac_player_supporters_faction"),		
      ],
      "Reinforce this garrison.",
      [
        (change_screen_give_members),
      ]),
It is mutually exclusive with the standard "Manage the garrison." option, and will only appear if the player is of the same faction as the town or castle.

One could simply edit the existing town option, too, passing a register from the conditions to the consequences to determine what consequence to execute and changing the text to a string register, of course.
 
You can modify the condition in the town/castle garrison menu (module_game_menus) to allow you to take/give troops.
 
Thank you, Caba`drin! That's exactly what I was looking for. Here's another question, since you seem to be the one to ask: Is it possible to add the 'talk privately' options when having a conversation with prisoners in your dungeons? It's always bothered me that you can't even attempt to recruit a lord you've captured, considering the fact that circumstances which might influence their decision may have changed. Plus, there are instances in which you join a battle to help an ally, and never even get the chance to talk with a lord before fighting them. Releasing and/or ransoming them and hoping to run into them again is a crap shoot, so It'd be nice if I could talk to them after their capture.

Not to mention the fact that, in my dungeons, I've got numerous lords from factions that have been eliminated, and some of them have positive relationship with me. But there's no way to release them, or attempt to recruit them at this point, so they're just left there to rot, when they just might join me if I had the opportunity to ask them. So, is it possible to add this feature?
 
Simplest way, in module_dialogs, find this part:
插入代码块:
  [anyone|plyr,"lord_talk",[#(troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 0),
                            (neg|troop_slot_ge, "$g_talk_troop", slot_troop_prisoner_of_party, 0),
                            (neg|encountered_party_is_attacker),
                            (neg|is_between, "$g_talk_troop", pretenders_begin, pretenders_end),
                            (neg|faction_slot_eq, "$g_talk_troop_faction", slot_faction_leader, "$g_talk_troop"),
                            (neg|troop_slot_eq, "trp_player", slot_troop_spouse, "$g_talk_troop"),
                            (neq, "$g_talk_troop_faction", "fac_player_supporters_faction"),
                            #other requirements                            
                            ],
   "There is something which I would like to discuss with to you in private.", "lord_recruit_1_relation",
   []],
Simply add a # to comment out (neg|troop_slot_ge, "$g_talk_troop", slot_troop_prisoner_of_party, 0),

Then the same option becomes available while in prison as it is when not in prison.
 
Well, it seems I have a new problem now, lol. I get the option to ask them to speak in private, but they say I'll have to do it some other time. How do I disable that?
 
Right. Bit of an oversight.

Also in module_dialogs, find, and add the indicated try block
插入代码块:
   #lord proximity
  [anyone,"lord_recruit_1_relation", [ #can't use the nearby scripts, because it would include the player party
    (assign, ":continue", 1),
    (try_begin),
      (call_script, "script_cf_troop_can_intrigue", "$g_talk_troop", 1),
      (assign, ":continue", 0),
    (try_end),       
    (try_begin), ## ADD THIS - Begin
      (eq, ":continue", 1),
      (troop_slot_ge, "$g_talk_troop", slot_troop_prisoner_of_party, 0),
      (assign, ":continue", 0),
    (try_end), ## ADD THIS - End

    (eq, ":continue", 1),
 
Okay, first of all, that does let me talk to them, but I have yet another problem: Even once someone has joined me, they're still in prison! I assumed they'd automatically be released, like prisoners are when there's a peace treaty, but nope... I waited a few days in-game to see if they'd eventually disappear from there, but they don't. So now what do I do? It seems this creates a unique situation that the game is unprepared for. :mrgreen:
 
DJK83 说:
Okay, first of all, that does let me talk to them, but I have yet another problem: Even once someone has joined me, they're still in prison! I assumed they'd automatically be released, like prisoners are when there's a peace treaty, but nope... I waited a few days in-game to see if they'd eventually disappear from there, but they don't. So now what do I do? It seems this creates a unique situation that the game is unprepared for. :mrgreen:

Did you bust them out? Nothing in the code demands that they be released...that would take further addenda.
 
DJK83 说:
I don't have the option to bust them out, as they're in my prison.
Ha! Right. Will look into that addendum then.

EDIT:
Alright...give this a shot. In module_dialogs, find the following and add all of the code in the previously closed brackets []

插入代码块:
    [anyone,"lord_recruit_pledge_conclude",  [
	],
    "Now... It is a momentous step I have taken. I will take my leave, as I may need some time prepare myself for what comes next.", "close_window",
	[
        (try_begin),
            (troop_slot_ge, "$g_talk_troop", slot_troop_prisoner_of_party, 0),
            (store_faction_of_party, ":castle_faction", "$g_encountered_party"),
            (this_or_next|eq, "$players_kingdom", ":castle_faction"),  #This will allow you to release a prisoner in any ally lords dungeon....not sure if that's how you wanted it...
            (eq, ":castle_faction", "fac_player_supporters_faction"),
            (party_remove_prisoners, "$g_encountered_party", "$g_talk_troop", 1),          
            (troop_set_slot, "$g_talk_troop", slot_troop_prisoner_of_party, -1),
        (try_end),
      ]],
	#lord recruitment changes end
 
That worked! Thanks for all your help! :smile: One more question, though. This is actually in regard to the Floris mod, which I plan on using once I finish my current game. Now, I did post this in the bug reports, but everybody seems to have missed it, as I brought up the camera issues that occur during a tournament in the very same post.

Anyway, I have a strange problem with the sound, where things like horse galloping, arrows being fired, enemies getting slashed, etc., will just randomly cut in and out. The game is perfectly stable and the performance is fine, but some of the sounds just... don't play at times. I'll ride a horse and every few seconds, it goes silent. Or, I hit an enemy and I don't hear the slashing sound -- only the 'death grunt'. Do you have any idea what could be causing this? I have an X-FI Titanium Fatal1ty Pro, so I can't imagine what could be wrong.
 
Caba`drin 说:
Diplomacy includes the ability to send troops reinforce any garrison within your kingdom. Other mods include various ways of giving troops to vassals, patrols, etc, as well.

In any case, it would be quite easy to add an option to the town menu that utilizes the following command:
(change_screen_give_members, [party_id]), #if party id is not given, current party will be used

EDIT
For instance, the following menu option could be added to the "town" menu, immediately following "castle_store_troops"
插入代码块:
      ("castle_reinforce_garrison",
      [	  
		(party_get_slot, ":town_lord", "$current_town", slot_town_lord),
		  
	    (assign, ":player_can_draw_from_garrison", 0), 
		(try_begin), #option 1 - player is town lord
		  (eq, ":town_lord", "trp_player"),
		  (assign, ":player_can_draw_from_garrison", 1),
		(else_try), #option 2 - town is unassigned and part of the player faction
		  (store_faction_of_party, ":faction", "$g_encountered_party"),
		  (eq, ":faction", "fac_player_supporters_faction"),			
		  (neg|party_slot_ge, "$g_encountered_party", slot_town_lord, active_npcs_begin), #ie, zero or -1

		  (assign, ":player_can_draw_from_garrison", 1),
		(else_try), #option 3 - town was captured by player
		  (lt, ":town_lord", 0), #ie, unassigned
		  (store_faction_of_party, ":castle_faction", "$g_encountered_party"),
		  (eq, "$players_kingdom", ":castle_faction"),
		  
		  (eq, "$g_encountered_party", "$g_castle_requested_by_player"),

		  (assign, ":player_can_draw_from_garrison", 1),
		(else_try),
		  (lt, ":town_lord", 0), #ie, unassigned
		  (store_faction_of_party, ":castle_faction", "$g_encountered_party"),
		  (eq, "$players_kingdom", ":castle_faction"),
		  
		  (store_party_size_wo_prisoners, ":party_size", "$g_encountered_party"),
		  (eq, ":party_size", 0),
		  
		  (assign, ":player_can_draw_from_garrison", 1),
		(else_try),
		  (party_slot_ge, "$g_encountered_party", slot_town_lord, active_npcs_begin),
		  (store_faction_of_party, ":castle_faction", "$g_encountered_party"),
		  (eq, "$players_kingdom", ":castle_faction"),
		  
		  (troop_slot_eq, "trp_player", slot_troop_spouse, ":town_lord"),		    

		  (assign, ":player_can_draw_from_garrison", 1),
		(try_end),

                (neq, ":player_can_draw_from_garrison", 1),
		
                (store_faction_of_party, ":castle_faction", "$g_encountered_party"),
                (this_or_next|eq, "$players_kingdom", ":castle_faction"),
                (eq, ":castle_faction", "fac_player_supporters_faction"),		
      ],
      "Reinforce this garrison.",
      [
        (change_screen_give_members),
      ]),
It is mutually exclusive with the standard "Manage the garrison." option, and will only appear if the player is of the same faction as the town or castle.

One could simply edit the existing town option, too, passing a register from the conditions to the consequences to determine what consequence to execute and changing the text to a string register, of course.

How to use this in a mod.
 
后退
顶部 底部