@Levis Here is the bugtracker you requested regarding captain generation and surrender
Enemy Captains can, at least most of the time, not be captured any more after they surrender.
At first we thought it might be from the cabinfight dialog file changes, but testing proved this was not the source of the problem.
Perhaps bAllowCapture seems to somehow not be set to true, Pieter quotes the relevant code here: Points, Perks and Leveling UP | Page 2 | PiratesAhoy!
It seems something is going wrong in captain generation, perhaps:
Lack of twin generated for captain
And Pieter suggests a possibilty: "I imagine it might be OK at game start but then as the game has to start cycling through the same Captain IDs, it could start going wrong depending on what happened to the previous Captain with the same ID."
Here is the relevant code from cabinfight that is getting set to false by something happening elsewhere:
bool bAllowCapture = HasSubStr(NPChar.id,"Enc_CabinCaptain") || strcut(NPChar.id,0,1) == "Cr"; // PB: Allow Coast Raiders also
if(!bAllowCapture)
{
bAllowCapture = HasSubStr(NPChar.id,"fantom")&&FindFreeCabinCaptain()!=-1;
}
if(CheckAttribute(NPChar,"cabinfight") && NPChar.cabinfight==true) { bAllowCapture = FindFreeCabinCaptain()!=-1; } /* fantoms allow anything */ //MAXIMUS 10.10.2007
if(CheckAttribute(boarding_enemy,"location.norebirth") && boarding_enemy.location.norebirth==1) { bAllowHireJoin = true; bAllowRelease = false; bAllowCapture = true; } /* special captains must die */
if(CheckAttribute(boarding_enemy,"questchar") && boarding_enemy.questchar==true) { bAllowHireJoin = false; bAllowRelease = false; bAllowCapture = true; }
Possiblly related bugs:
Other Bug 1) Dialog errors that sometimes happen when talking with surrendered captain:
RUNTIME ERROR - file: dialog.c; line: 414
incorrect argument index
COMPILE ERROR - file: dialog.c; line: 414
file not found: dialogs\English\-1.038827h
COMPILE ERROR - file: dialog.c; line: 414
file not found: dialogs\-1.0388279
Other Bug 2) a surrendered captain if hired is regenerated as a new officer with different level
Enemy Captains can, at least most of the time, not be captured any more after they surrender.
At first we thought it might be from the cabinfight dialog file changes, but testing proved this was not the source of the problem.
Perhaps bAllowCapture seems to somehow not be set to true, Pieter quotes the relevant code here: Points, Perks and Leveling UP | Page 2 | PiratesAhoy!
It seems something is going wrong in captain generation, perhaps:
Lack of twin generated for captain
And Pieter suggests a possibilty: "I imagine it might be OK at game start but then as the game has to start cycling through the same Captain IDs, it could start going wrong depending on what happened to the previous Captain with the same ID."
Here is the relevant code from cabinfight that is getting set to false by something happening elsewhere:
bool bAllowCapture = HasSubStr(NPChar.id,"Enc_CabinCaptain") || strcut(NPChar.id,0,1) == "Cr"; // PB: Allow Coast Raiders also
if(!bAllowCapture)
{
bAllowCapture = HasSubStr(NPChar.id,"fantom")&&FindFreeCabinCaptain()!=-1;
}
if(CheckAttribute(NPChar,"cabinfight") && NPChar.cabinfight==true) { bAllowCapture = FindFreeCabinCaptain()!=-1; } /* fantoms allow anything */ //MAXIMUS 10.10.2007
if(CheckAttribute(boarding_enemy,"location.norebirth") && boarding_enemy.location.norebirth==1) { bAllowHireJoin = true; bAllowRelease = false; bAllowCapture = true; } /* special captains must die */
if(CheckAttribute(boarding_enemy,"questchar") && boarding_enemy.questchar==true) { bAllowHireJoin = false; bAllowRelease = false; bAllowCapture = true; }
Possiblly related bugs:
Other Bug 1) Dialog errors that sometimes happen when talking with surrendered captain:
RUNTIME ERROR - file: dialog.c; line: 414
incorrect argument index
COMPILE ERROR - file: dialog.c; line: 414
file not found: dialogs\English\-1.038827h
COMPILE ERROR - file: dialog.c; line: 414
file not found: dialogs\-1.0388279
Other Bug 2) a surrendered captain if hired is regenerated as a new officer with different level
Last edited: