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

Need Help Enemy ships have the same level as me

Lonious

Master Mariner
Just a brief question, in my Internal Settings the "#define START_DIFF_SHIPCAP" is set to 0, so as I understand it, the enemy crew's level does not depend on mine.

However, when I level myself up through cheats to 300+, the enemy's level also scales up to mine. I find this out when I board their ships because their soldiers have the same HP as mine. How do I disable this?
 
Have a look at "PROGRAM\Loc_ai\LAi_boarding.c". In function 'LAi_StartBoarding' you'll find this:
Code:
    boarding_erank = sti(echr.rank);    // used to calculate enemy HP
    if (GetDifficulty() < 4 && boarding_erank > 2*sti(mchr.rank))    // LDH 06Sep06 put a limit on this thing to prevent insanely high enemy ranks
    {
        int new_boarding_erank = sti(mchr.rank) * 2;
        SDLogIt("boarding_erank changed from " + boarding_erank + " to " + new_boarding_erank);
        boarding_erank = new_boarding_erank;
    }
Enemy crew level is set by default to be the same as the enemy captain. Then, if you're not playing "Iron Man" difficulty, and if the enemy level is more than double yours, it's scaled back to double your rank. That way you should at least have some chance if you're in a much smaller ship than the enemy.

But further down:
Code:
    // LDH - change from averaging boarding_erank with mchr only if echr was higher to always
    // was makeint(sti(mchr.rank)+(boarding_erank-sti(mchr.rank))/2))
    // Make the enemy rank closer to the player so enemy boarder HP won't be too different.  Used only for enemy boarder HP
    int old_boarding_erank = boarding_erank;
    boarding_erank = makeint((2.0*sti(mchr.rank) + boarding_erank)/3.0+0.5);
    SDLogIt("boarding_erank changed from " + old_boarding_erank + " to " + boarding_erank + ", player rank = " + mchr.rank);
... the enemy crew level is averaged with yours regardless of difficulty and levels. Delete or comment out this section (put "//" in front of every line to turn it into a comment).
 
Back
Top