• New Horizons on Maelstrom
    Maelstrom New Horizons


    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!

Cannot Confirm [4.1] Officers don't use antidote

Levis

Find(Rum) = false;
Staff member
Administrator
Creative Support
Programmer
Storm Modder
It seems officers dont use anitode altough they have this in place (removed some commented code):
Code:
if(CheckAttribute(chr, "chr_ai.poison"))
    {
        if(LAi_GetCharacterRelHP(chr) < 0.8)
        {

            //Levis:
            btl = FindAntidoteForCharacter(chr);
            DoCharacterUsedItem(&Characters[sti(chr.index)], btl);
        }
    }

and this function should find the right antidote:

Code:
string FindAntidoteForCharacter(ref chref)
{
    string sret = "";
    aref chritems; makearef(chritems, chref.items);
    int n;
    for(int i = 0; i < GetAttributesNum(chritems); i++)
    {
        if(sti(GetAttributeValue(GetAttributeN(chritems, i))) > 0)
        {
            n = GetItemIndex(GetAttributeName(GetAttributeN(chritems, i)));
            if(CheckAttribute(&Items[n],"potion"))
            {
                if(CheckAttribute(&Items[n],"potion.antidote"))
                {
                    //TODO: Make it check which antidote is best etc but let's start with this.
                    sret = Items[n].id;
                }
            }
        }
    }
    return sret;
}

So either the function doesn't provide the antidote or something else is going wrong.
 
@Grey Roger confirmed it. But I will do another test tonight. It's not that hard to test. just give an antidote to an officer and make him poisoned. could be done with two console commands.
 
Kicking this up. If someone can confirm it that would be nice. Else I will try to confirm it.
 
It does take them a very long time to get over being poisoned. It seems that they try every other item first before using the antidote.
 
Confirmed - officers don't use Antidote. They might use Mixture if they have it as it cures the HP which they lost from being poisoned (as well as curing the poison), though I've never handed that out so I don't know for sure. They certainly use Bandages and Cauterising Kits.
 
Uhm.....I'm trying to replicate this now but my officers are using antidotes.
Their HP first has to drop under 80% but if they do they will use an item which cures them of poisoning.
So if this doesn't happen for someone please describe how or when.
I've added this to the officer dialog for testing:
Code:
        case "hired":

[.....]

            Link.l9 = "get poisioned";
            Link.l9.go = "exit_poison";

        break;    // original line
       
        case "exit_poison":
            NPChar.chr_ai.poison = 10;
            DialogExit();
        break;

This will make them poisonned when using this dialog option. But when they have an item to cure themself they do for me.
 
Back
Top