Issue with Freelancer after being defeated while enlisted

Users who are viewing this thread

John25-

Sergeant at Arms
Hi, I have been facing this issue after I integrated Freelancer to my mod. If my party gets defeated while I am enlisted, I will always have the "Your enemies take you prisoner" menu displayed, and will be held captive for a few hours. But in addition to this, the message "{player} has been defeated in battle but managed to escaped" or "{player} has been taken prisoner" will be displayed as if I were AI.
If I 'manage to escape' then it's fine, but when I 'have been taken prisoner' my name is displayed among the prisoners of the party that captured me, and later in their town/castle's prison.. e.g. ('should not appear' being me :cool:):
QrjQc5d.png


Following the first part of my message, I 'escape from my captors' within a few hours, but because of the second part I am shown as 'help captive' on the map and in character notes - even though I have escaped from them..
I would like to know how to prevent this from happening, and therefore how to not be considered as AI if the party in which I enlisted gets captured
 
Solution
Thanks, so I have found these lines in module_scripts.py:
Code:
                (party_add_prisoners, ":nonempty_winner_party", ":cur_troop_id", 1),
                (gt, reg0, 0),
                #(troop_set_slot, ":cur_troop_id", slot_troop_is_prisoner, 1),
                (troop_set_slot, ":cur_troop_id", slot_troop_prisoner_of_party, ":nonempty_winner_party"),
                (display_log_message, "str_hero_taken_prisoner"),

I then replaced the first one with this:
Code:
(try_begin),
      (eq, "$freelancer_state", 0),
      (party_add_prisoners, ":nonempty_winner_party", ":cur_troop_id", 1),
(else_try),
      (eq, "$freelancer_state", 1),
      (party_add_prisoners, ":nonempty_winner_party", ":cur_troop_id", 0),
(try_end),
...
Sounds for me like a script is somehow assigning the party ID of the player to be captive without reason. Check the script files which handle the captive status post battle and compare them with the Native and the Freelancer once. Might be that you made a misstake by accident here.
 
Upvote 0
Thanks, so I have found these lines in module_scripts.py:
Code:
                (party_add_prisoners, ":nonempty_winner_party", ":cur_troop_id", 1),
                (gt, reg0, 0),
                #(troop_set_slot, ":cur_troop_id", slot_troop_is_prisoner, 1),
                (troop_set_slot, ":cur_troop_id", slot_troop_prisoner_of_party, ":nonempty_winner_party"),
                (display_log_message, "str_hero_taken_prisoner"),

I then replaced the first one with this:
Code:
(try_begin),
      (eq, "$freelancer_state", 0),
      (party_add_prisoners, ":nonempty_winner_party", ":cur_troop_id", 1),
(else_try),
      (eq, "$freelancer_state", 1),
      (party_add_prisoners, ":nonempty_winner_party", ":cur_troop_id", 0),
(try_end),

And it seems to work
 
Upvote 0
Solution
It is assigned as soon as the player enlists in a lord's army, and is unassigned when they retire from service or have been captured by an enemy war party.
The message "has been taken prisoner" is being displayed for the AI lord only and not the player anymore, but no-one appears as a prisoner in the captor's party. The player still goes through the usual "Your enemies take you prisoner" process and escapes from captivity a few hours later.
So based on what I was trying to do, this solution works fine. The fact that whether the AI lord actually gets captured or not doesn't make a big difference in my case
 
Upvote 0
Back
Top Bottom