Page 1 of 1

Prisoner Exchange

Posted: Thu Jun 23, 2016 2:08 am
by Jerzul
Except for the obvious (both sides get conscript companies back), why does it cost NM? You'd think a prisoner exchange should increase morale and happiness among the population.

Also, when I look at my decision it says that my "Conscript pool increases by 10 thousand" and then stops. It can't possibly mean 10 thousand conscript companies...so what does it mean?

Posted: Thu Jun 23, 2016 4:18 am
by DrPostman
I never use it. By that time the war is almost over so I don't see the need.

Posted: Thu Jun 23, 2016 5:07 am
by grimjaw
Here's the text for one of the events, and I think at least one of the events is bugged. Instead of giving (in game terms) 10 conscripts to both factions, it gives 10 to the US twice.

Code: Select all

SelectFaction = USA
StartEvent = evt_nam_USA_ExchangePrisonners_Execute|999|0|NULL|NULL|NULL|NULL

Conditions
  CheckOption = $gmaOptionMil;USA_ExchangePrisonners;=;1

SelectFaction = CSA
  EvalPrisoners = USA;>=;12

SelectFaction = USA
  EvalPrisoners = CSA;>=;12
  MinDate = 1861/07/01

Actions
  ChgPrisoners = USA;-12
  ChgPrisoners = USA;-12

SelectFaction = CMN
  GenTextMsg  = opt_notify_CMN_ExchangePrisonnersUSA;1;NULL;NULL;NULL

SelectFaction = USA
  ChangeConscriptPool = 10
  ChangeConscriptPool = 10
  ChangeActorPool = $gmaOptionMil;MaxUse;0;ResetFreq;0;SubType;USA_ExchangePrisonners;SParam1;USA

EndEvent


Here's another example of that script in a different event file.

Code: Select all

SelectFaction = CSA
StartEvent = evt_nam_CSA_ExchangePrisonners_Execute|999|0|NULL|NULL|NULL|NULL

Conditions
  CheckOption = $gmaOptionMil;CSA_ExchangePrisonners;=;1
  EvalPrisoners = USA;>=;12

SelectFaction = USA
  EvalPrisoners = CSA;>=;12
  MinDate = 1861/07/01

Actions

SelectFaction = CSA
  ChgPrisoners = USA;-12
  ChgPrisoners = CSA;-12

SelectFaction = CMN
  GenTextMsg  = opt_notify_CMN_ExchangePrisonnersCSA;1;NULL;NULL;NULL

SelectFaction = CSA
  ChangeConscriptPool = 10

SelectFaction = USA
  ChangeConscriptPool = 10

SelectFaction = CSA
  ChangeActorPool = $gmaOptionMil;MaxUse;0;ResetFreq;0;SubType;CSA_ExchangePrisonners;SParam1;CSA

EndEvent

Posted: Thu Jun 23, 2016 9:17 am
by Captain_Orso
Jerzul wrote:Except for the obvious (both sides get conscript companies back), why does it cost NM? You'd think a prisoner exchange should increase morale and happiness among the population.

Also, when I look at my decision it says that my "Conscript pool increases by 10 thousand" and then stops. It can't possibly mean 10 thousand conscript companies...so what does it mean?


From the scripts which grimjaw posted, each side gets 10 CC's in their respective CC pools and 12 CC's are removed from the POW count. I guess the extra 2 CC are lost due to POW's being unfit for a return to service and/or subsequent desertion.

What is odd to me--or maybe it is WAD--is that if I recall correctly on how prisoner exchange works, both sides must select it in their options, for it to work, and once selected by one side it remains selected for a number of turns. During that time, the other side gets a message, so that side knows that the other side wants to exchange prisoners.

The odd part is, that once both sides have decided to exchange prisoners, both of those scripts will be executed, because both sides have selected the option, and that means there might actually be 2 exchanges if there are enough prisoners to exchange, being that each exchange removes 12 CC from the prisoners pools. So if there are >=12 CC, but <24 CC, in each pool only one of those scripts will fire successfully. If there are =>24 CC in each of the 2 pools, both scripts will successfully fire, so both sides will get 20 CC's in their CC pools.

EDIT: Wait WHAT?!? I'm just reading through the scripts again more carefully, and the evt_nam_USA_ExchangePrisonners_Execute script is wrong/broken completely. In the 'Conditions' section, it looks at how many prisoners each side has correctly, but in the 'Actions' section, it does not select a faction again, so the last selected faction is in use (SelectFaction = USA) and the ChgPrisoners commands will do nothing, becasue the USA has no USA POW's :wacko: , but then the USA faction is selected explicitly and the ChangeConscriptPool statement is run twice, giving the USA 20 CC's :blink:

Posted: Thu Jun 23, 2016 1:21 pm
by Jerzul
Captain_Orso wrote:From the scripts which grimjaw posted, each side gets 10 CC's in their respective CC pools and 12 CC's are removed from the POW count. I guess the extra 2 CC are lost due to POW's being unfit for a return to service and/or subsequent desertion.

What is odd to me--or maybe it is WAD--is that if I recall correctly on how prisoner exchange works, both sides must select it in their options, for it to work, and once selected by one side it remains selected for a number of turns. During that time, the other side gets a message, so that side knows that the other side wants to exchange prisoners.

The odd part is, that once both sides have decided to exchange prisoners, both of those scripts will be executed, because both sides have selected the option, and that means there might actually be 2 exchanges if there are enough prisoners to exchange, being that each exchange removes 12 CC from the prisoners pools. So if there are >=12 CC, but <24 CC, in each pool only one of those scripts will fire successfully. If there are =>24 CC in each of the 2 pools, both scripts will successfully fire, so both sides will get 20 CC's in their CC pools.

EDIT: Wait WHAT?!? I'm just reading through the scripts again more carefully, and the evt_nam_USA_ExchangePrisonners_Execute script is wrong/broken completely. In the 'Conditions' section, it looks at how many prisoners each side has correctly, but in the 'Actions' section, it does not select a faction again, so the last selected faction is in use (SelectFaction = USA) and the ChgPrisoners commands will do nothing, becasue the USA has no USA POW's :wacko: , but then the USA faction is selected explicitly and the ChangeConscriptPool statement is run twice, giving the USA 20 CC's :blink:


It does appear that the script is broken.

I think it is high time for a user patch that fixes these obvious mistakes. After the patch is beta'd we can present to Pocus et al for official implementation. Prisoner exchanges were very common in the first half of the war. In fact, for the first half of the war, prisoner exchanges should be automatic because most prisoners were paroled.

Perhaps there should be an event that runs automatically when both sides have 12 CC's worth of prisoners that provides for the paroled soldiers. Then later there is a decision to stop the paroling. At that point, the current system of each side agreeing to the exchange for it to happen can start. (Just my 2ยข)

Posted: Thu Jun 23, 2016 4:20 pm
by tripax
Jerzul wrote:I think it is high time for a user patch that fixes these obvious mistakes. After the patch is beta'd we can present to Pocus et al for official implementation. Prisoner exchanges were very common in the first half of the war. In fact, for the first half of the war, prisoner exchanges should be automatic because most prisoners were paroled.


I'm not a software developer and my circumstances have changed (for the better) since I was modding here so I am not really able to put much time into this, but I'd love to see this done right. Is there a modders version of github that exists that can be used for this? Can github be used this way? Is github good for this? Something with version control and transparency would be great, and just having a public google drive or dropbox folder might not quite meet our needs. I know a number of people have private mods that fix a number of errors, it would be great if there were a public, transparent place that we could put the DB files, talk about and agree to changes, and implement. My feeling would be that there would be one version that is a conservative mod (no mods to unit strength or abilities for instances, just cosmetic fixes, minor map fixes, add images, bug fixes, etc) and then any number of more extensive mods.

As a disclaimer, if someone knows how to make this work, we should probably contact the AGEOD people about it if we put it on the public github (private github-like services that I don't really know about could be fine, I suppose).

Posted: Fri Jun 24, 2016 2:17 am
by Teatime
If it is just events that are modded then it should not be a major issue to get a user patch out there, there would need to be agreement on what should be changed though with perhaps a group of the more knowledgeable people with the decision making on what should be in or out and what should change. We should also get AGEOD's input on what future plans are regards patches if any.

To add to the issue with prisoner exchange I think there are also issues with the Kentucky events
- I had one case where the CSA intervened and Kentucky went USA on the same turn and had double units spawn and double forcepools generate.
- I also believe there are issues with the Kentucky forcepools that are allocated on succession or intervention but have not made an effort to get to the bottom of that