Another suggested update in PROGRAM\Loc_ai\LAi_events.c:
Code:
if( CheckAttribute(weapon, "poison" ) ) // if weapon poisonous
{
if(GetAttribute(findCh, "id") == "Blackbeard") LAi_SetImmortal(findCh, false); // PB: Blackbeard can be killed also by a stinkpot or ether bottle
findCh.chr_ai.poison = 300 ; // poisons EVERY near character
And:
Code:
if( CheckAttribute(weapon, "poison" ) ) // if weapon poisonous
{
if(GetAttribute(enemy, "id") == "Blackbeard") LAi_SetImmortal(enemy, false); // PB: Blackbeard can be killed also by a poisoned throwing knife
I think that should work to allow other poisoned weapons to also affect Blackbeard.
Don't know why I didn't do that in the first place...
That version of "eng_officiant_dialog.c" includes some "Preprocessor_Add" statements in case "Blaze_must_escape_2" which won't do much unless you also have a new version of "eng_officiant_dialog.h".
Actually, no; the preprocessors are not in the DLG_TEXT, but in the 'ShipLocationName' that gets merged in-between.
I copied those lines from the earlier case for dying in a friendly town above:
Code:
case "survival3":
// KK -->//changed by MAXIMUS string GetCharacterShipLocation(ref rChar) declared in locations.c
ShipLocationName = TranslateString("", GetCharacterShipLocationName(PChar));
Preprocessor_Add("island_name", XI_ConvertString(GetIslandNameByLocationID(PChar.location)));
if (CheckAttribute(&Locations[FindLoadedLocation()], "townsack")) Preprocessor_Add("town_name", FindTownName(GetCurrentTownID()));
ShipLocationName = PreprocessText(ShipLocationName);
Preprocessor_Remove("island_name");
Preprocessor_Remove("town_name");
if (HasSubStr(ShipLocationName, "port"))
dialog.text = DLG_TEXT[27] + ShipLocationName + DLG_TEXT[29];
else
dialog.text = DLG_TEXT[27] + DLG_TEXT[28] + ShipLocationName + DLG_TEXT[29];
link.l1 = DLG_TEXT[30] + DLG_TEXT[31];
link.l1.go = "survival4";
// <-- KK
break;
I can assure you, they
are needed.
Originally tested it without and the location name didn't display correctly.
With these added, it does work right.
I'm also not sure what the revised code does or what is wrong with the original, apart from the "dialog.text +=".
That's the point.
The "dialog.text +=" simply doesn't work, so none of that second sentence ever displayed.
It was a very invisible sort of bug, but a bug nonetheless.
I caught this when my ship got moved to another location upon my death, but I didn't realize that happened.
The dialog was always meant to tell me about that, but it didn't because of this error.
One change is significant though, so it's going into my new version - replacing one 'DLG_TEXT[42]' with 'DLG_TEXT[28]' makes the sentence much more sensible!
Well, without the other changes, there's no point.
It won't display.
So that line seems to work properly.
Guess it's fine then.
I got a bit alarmed with mixing && and || in the same statement.
Especially without brackets or anything.
I just never feel comfortable doing that, because I'm not sure how the game interprets that.