Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!
Quick links for Beyond New Horizons
- Download latest version
- Wiki
- FAQ
- Report bugs here
- Bug Tracker on Github
Quick links for Maelstrom
- Download the latest version of Maelstrom
- Download the latest version of ERAS II
- Download the latest version of New Horizons on Maelstrom
Quick links for PotC: New Horizons
- Download latest version
- Wiki
- FAQ
- Report bugs here
Thanks to YOUR votes, GOG.com now sells:
- Sea Dogs
- Sea Dogs: Caribbean Tales
- Sea Dogs: City of Abandoned Ships
Vote now to add Pirates of the Caribbean to the list!
Quick links for AoP2: Gentlemen of Fortune 2
- Downloads and info
- ModDB Profile
- Forums Archive
A Pirate Podcast with Interviews
Music, Comedy and all things Pirate!
- Episode Guide - About - Subscribe -
- Twitter - Facebook - iTunes - Android -
- Youtube - Fill the Coffers -
In that case, please make a save prior to talking to these random officers. If you get one that crashes, reload your save and see if it crashes again.Sometimes, so far 1-4, when you encounter a random officer and ask how good he is you get the CTD.
Any log files then at least?I did reload a save prior to the encounter and of course since the encounter is random I did not see the officers. To be clear they are not tavern officers. The are walking around outside
Any log files then at least?
That is a VERY strange error.log file.
RUNTIME ERROR - file: Loc_ai\LAi_events.c; line: 3376
invalid index -1 [size:1000]
RUNTIME ERROR - file: Loc_ai\LAi_events.c; line: 3376
process event stack error
RUNTIME ERROR - file: battle_interface\BattleInterface.c; line: 720
process event stack error
RUNTIME ERROR - file: battle_interface\BattleInterface.c; line: 720
function 'Event' stack error
Not in the version of "LAi_events.c" which I can find in the 24th January zip update. Line 3376 is this:That is a VERY strange error.log file.
This points to a COMMENT line:
Code:RUNTIME ERROR - file: Loc_ai\LAi_events.c; line: 3376 invalid index -1 [size:1000] RUNTIME ERROR - file: Loc_ai\LAi_events.c; line: 3376 process event stack error
corpse = CharacterFromId(chr.id);
LAi_group_MoveCharacter(corpse, LAI_GROUP_CORPSES);
//MAXIMUS: makes box from corpse with hand-icon in the top-left corner -->
locNum = 1;
corpseLoc = &Locations[FindLocation(corpse.location)]; <-- This is line 3376
Line 720 in the 24th January version is a '}' which marks the end of the definition of 'void RefreshBattleInterface(bool CheckRelations)'.And that falls outside the actual file:
Happens sometimes though when there is a clear code error.Code:RUNTIME ERROR - file: battle_interface\BattleInterface.c; line: 720 process event stack error RUNTIME ERROR - file: battle_interface\BattleInterface.c; line: 720 function 'Event' stack error
Thanks for the confirmation. It was indeed reported before, but I thought it was already fixed again.It's a real bug, alright. Just go into "Enc_Walkers.c", find the line 'switch(chance)', and right above it add 'chance = 10';. For good measure, down at case 10, replace 'if (11 < Rand(19))' with 'if (-1 < Rand(19))'. Then every walker you meet will want to become an officer, which should see you bitten by the bug pretty soon.
Thanks for the confirmation. It was indeed reported before, but I thought it was already fixed again.It's a real bug, alright. Just go into "Enc_Walkers.c", find the line 'switch(chance)', and right above it add 'chance = 10';. For good measure, down at case 10, replace 'if (11 < Rand(19))' with 'if (-1 < Rand(19))'. Then every walker you meet will want to become an officer, which should see you bitten by the bug pretty soon.
Assuming that everything works as intended, EVERY single character in the game does get an officer type assigned.No they can't, as both the options to assign them a type are commented out. There does seem to be some default behaviour because sometimes it doesn't crash and then you get a "Fighter" type.
Very true.I don't much care either way, but what is important is to have a system which works. The system to give odd officer types didn't.
Out of curiosity, did you try uncommenting this line already?Or you use this version of "Enc_Walker.c", which has the original system uncommented, in which case you can hire non-fighter officers. And then put it in "Build Testing List", not "Bug Tracker".
NPChar.quest.officertype = GetRandomOfficerType();
Just trying to get the most information I can. Hopefully I can actually look at this over the weekend.The easy way to check, as I suggested earlier, is to nobble "Enc_Walker.c" so that all walkers are officers, then see whether the recruits crash the game, are silly officer types (e.g. all fighters), or are a reasonable spread of types. You can find a suitably nobbled version up here, though you'll need to do a bit of WinMerging to get the guaranteed officer code merged with any more recent fixes such as uncommenting one or other of the officer type selection codes, plus my changes to reputation gains from walkers.
string FindRandomModelOfficerType(string model)
{
string type = OFFIC_TYPE_CIVILIAN; // Define default NPC type
int num = 0;
string validTypes = "";
string curType = "";
string nexType = FindModelTypeFromModel(model, num);
while (num == 0 || curType != nexType)
{
if(UsableOfficerType(nexType, false)) validTypes = StoreString(validTypes, nexType);
num++;
curType = nexType;
nexType = FindModelTypeFromModel(model, num);
}
if (validTypes != "") {
type = GetRandSubString(validTypes);
}
return type;
}
So even with your quick-fixes, the game still crashes sometimes?Whereas, by editing "Enc_Walker.c" to always have them want to be officers, I had the game crash approximately 1 in 3 times.
string FindModelTypeFromModel(string model, int num)
{
if(GetModelindex(model) == -1) return ""; // PB: In case this gets called for a model that isn't defined
ref mdl; makeref(mdl, Models[GetModelindex(model)]);
if(!CheckAttribute(mdl, "types")) return "";
aref mdltypes; makearef(mdltypes, mdl.types);
int numa = GetAttributesNum(mdltypes);
if(num >= numa) num = numa-1;
return GetAttributeName(GetAttributeN(mdltypes, num));
}