So this code here in LogInterface.c...
This seems to be rather important. The bit I pointed out, should that be matching the companion limit? I changed this to 5 and the game didn’t care until I got a fifth companion... that’s when it crashed on launching to sea. Funnily enough, by changing that number and so long as it wasn’t crashing, this ceases to be a problem...
Whatever is going on here, it should also be considered in respect of the loot crash fix because I think that is what is causing those errors to show up anyway, not that they seem to be causing a problem but no errors is better. The crash I got when getting a fifth companion left no entry in the error log, so I’m guessing that it is directly related to why the loot crash happens.
It’s all about the icons when the battle or sea interface is loaded, it’s really finicky about it.
Code:
void BI_GetMsgIconRoot()
{
aref arTmp;
aref pARef[4]; // <---- specifically this
int i,idx,cn;
ref mchr = GetMainCharacter();
idx = 0;
// This was being triggered during boarding, clause added to fix it...
if(bSeaActive && !bAbordageStarted && !LAi_IsBoardingProcess())
{
for (i = 0; i < COMPANION_MAX; i++)
{
cn = GetCompanionIndex(mchr, i);
if(cn<0) {continue;}
Characters[cn].MessageIcons = true;
makearef(arTmp,Characters[cn].MessageIcons);
pARef[idx] = arTmp;
idx++;
}
SendMessage(&BattleInterface,"le", BI_MSG_SET_MSG_ICONS, &pARef);
}
else
{
for (i = 0; i < OFFICER_MAX; i++)
{
cn = GetOfficersIndex(mchr, i);
if(cn<0) {continue;}
Characters[cn].MessageIcons = true;
makearef(arTmp,Characters[cn].MessageIcons);
pARef[idx] = arTmp;
idx++;
}
SendMessage(&objLandInterface,"le", MSG_BATTLE_LAND_SET_MSGICONS, &pARef);
}
}
So the companion and officer icons are intrinsically linked, probably somewhere else as well other than the above code. I’m assuming that if there are more than 4 player icons to be shown then the battle interface needs to be able to do this correctly. In fact, it quite happily loads the icons and they can be appropriately interacted with, but that code above seems to have other ideas.Error.log is pretty much constantly throwing this up...
RUNTIME ERROR - file: battle_interface\loginterface.c; line: 533
invalid index 4 [size:4]
RUNTIME ERROR - file: battle_interface\loginterface.c; line: 533
process event stack error
Whatever is going on here, it should also be considered in respect of the loot crash fix because I think that is what is causing those errors to show up anyway, not that they seem to be causing a problem but no errors is better. The crash I got when getting a fifth companion left no entry in the error log, so I’m guessing that it is directly related to why the loot crash happens.
It’s all about the icons when the battle or sea interface is loaded, it’s really finicky about it.
Last edited: