• 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!

Fixed Missing chr_ai

A.H

Privateer
Usually says the same thing always.. but it keeps repeating.
Maybe it has something to do with the shiplog because it keeps ringing a lot..
but with regards to that i will try exploring more on the shiplog issue then see if it's worth making a thread about.


And is it me or does everyone also get in fights with soldiers everytime they enter a tavern?
for me i have LOM with spain, i have a high rank with them too and good repuation.. and everytime i enter a tavern we are at a fight with the spanish soldiers inside.. and i mean EVERYTIME ... maybe they are racist against frenchies? :rofl

by fight, i mean once we enter tavern my comrades and i have red flashing on our logos upon entering the building.. and not by talking in conversation then getting in fight
 

Attachments

  • error.log
    241.4 KB · Views: 100
for the guard problem look here:
Needs Testing - Friendly guards attacking you | Page 2 | PiratesAhoy!

Hmmm there indeed seems to be a logic fail here.
Code:
bool bDead = false;
    if (CheckAttribute(chr, "chr_ai.hp") == false) bDead = true;
    if (stf(chr.chr_ai.hp) < 1.0) bDead = true;
    //JRH -->
    if (bDead && !IsMainCharacter(chr))
    {
        if(CheckCharacterItem(chr, "blademketK"))
        {
            TakeItemFromCharacter(chr, "blademketK");
            GiveItem2Character(chr, "blade_mKnife");
            GiveItem2Character(chr, "pistolmket");
        }

        if(CheckCharacterItem(chr, "blademketB"))
        {
            TakeItemFromCharacter(chr, "blademketB");
            GiveItem2Character(chr, "pistolmketB");
        }
    }
    //<-- JRH
    return bDead;
I sugest to put the second if in an else clause

Put attached file in PROGRAM\Loc_ai
 

Attachments

  • LAi_character.c
    33 KB · Views: 110
But Pieter I think you need some of my original code though, at least the part with the fist equip.
A gun item won't equip without an equipped blade item (first).

if(CheckCharacterItem(chr, "blademketK"))
{
RemoveCharacterEquip(chr, GUN_ITEM_TYPE);
RemoveCharacterEquip(chr, BLADE_ITEM_TYPE);
TakeItemFromCharacter(chr, "blademketK");
GiveItem2Character(chr, "blade_mKnife");
GiveItem2Character(chr, "pistolmket");
EquipCharacterByItem(chr, "blade_mKnife");
EquipCharacterByItem(chr, "pistolmket");
}
else
{
if(CheckCharacterItem(chr, "blademketB"))
{
RemoveCharacterEquip(chr, GUN_ITEM_TYPE);
RemoveCharacterEquip(chr, BLADE_ITEM_TYPE);
TakeItemFromCharacter(chr, "blademketB");
GiveItem2Character(chr, "pistolmketB");
if(!CheckCharacterItem(chr, "bladeX4")) GiveItem2Character(chr, "bladeX4");
EquipCharacterByItem(chr, "bladeX4");
EquipCharacterByItem(chr, "pistolmketB");
}
}

If you think so too the file is here. If not never mind.
 

Attachments

  • LAi_character.c
    33.6 KB · Views: 75
But equipping doesn't matter on a dead character, does it?
And by the time you loot, it isn't even actually a character anymore at all.
 
Only way to know for sure is from testing.
And I'm not doing that now. :shrug
 
Back
Top