Resolved Npc lord prisoners donated by the player to an npc's fief are incorrectly transferred to the settlement and use the wrong escape chances

Users who are viewing this thread

Summary: When the player donates a prisoner to an allied npc's settlement the prisoner is actually given to the garrison party rather than the settlement. When a prisoner is contained in the dungeon of an npc's fief they should be using the base daily escape chance of 7.5%, but instead they use the chance associated with the garrison party, which is classified as a "mobile party." Since the chance of escaping from a mobile party is higher than from a settlement, the prisoners escape more rapidly than intended.

All other cases tested seem to be working properly, including putting a prisoner in a player owned dungeon and an npc putting a prisoner in an npc owned dungeon.

How to Reproduce: Start the game in debug mode. As a player, donate a prisoner to any npc owned settlement, either a castle or a town. Insert a breakpoint in the DailyHeroTick() function of the PrisonerEscapeCampaignBehavior class at the EndCaptivityAction.ApplyByEscape(hero, null) line. Wait until the specific prisoner escapes and examine the related variables and properties of the hero object. You will see that the escape chances saved in the "num" variable reflect that of a mobile party with a size matching that of the settlement's garrison. The PartyBelongedToAsPrisoner property of the hero object will also say "Garrison of X."

Media:
Donated-Prisoner-Bug-3.png


Donated-Prisoner-Bug-2.png


Donated-Prisoner-Bug.png


Garrison-of-Thorios-Castle.png


Notice that the value of "num" in the first screenshot is 0.22928768 and the equation from .IsMobile [0.075 x (6 - (75^0.25))] = 0.22928768 also.

Version: 1.4.2 Beta Branch
 
Thanks @Bannerman Man you are right. Great catch! I fixed. While fixing I did not changed adding prisoner to garrison but I added if prison is at mobile party and mobile party is in settlement use 7.5% default escape rate. This is safer fix rather than adding prisoner to settlement party, other way can break something.

o9n75.png
 
Last edited:
Thanks @Bannerman Man you are right. Great catch! I fixed. While fixing I did not changed adding prisoner to garrison but I added if prison is at mobile party and mobile party is in settlement use 7.5% default escape rate. This is safer fix rather than adding prisoner to settlement party, other way can break something.
Awesome! You're on a roll!
 
Back
Top Bottom