• 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 a question about one of Skodaraps COAS Cheats.

Jonesie85

Boarding Master
Storm Modder
hello all i found this cheat on skodaraps website. It is intended to repair all ships in your squadron. Remove damage effects and if you make a transition from one area to another your masts will repair. It is meant to be activated through a interface prompt/enter code system. I am using the ye old debuger.c... F11 options. Obviously it would not work as it is so i edited it.

Code:
if(GameInterface.edit_box.str == "RepairAll")
{
    int cn;
    ref chr;
    for (int i = 0; i<COMPANION_MAX; i++)
    {
        cn = GetCompanionIndex(pchar, i);
        if(cn != -1)
        {
            chr = &characters[cn];,
            ProcessHullRepair(chr, 100.0); // REPAIR HULL
            ProcessSailRepair(chr, 100.0); // REPAIR SAIL
            DeleteAttribute(chr, "ship.blots"); // MAYBE THE CANNON BALL MARKS LEFT AFTER BATTLE
            DeleteAttribute(chr, "ship.sails"); // SAIL HOLES
            DeleteAttribute(chr, "ship.masts"); // MISSING MASTS
        }
    }
    isCheatCode = true;
}

The edited version (including other options).

Code:
    int cn;
    ref chr;
    for (int i = 0; i<COMPANION_MAX; i++)
    {
        cn = GetCompanionIndex(pchar, i);
        if(cn != -1)
        {
            chr = &characters[cn];
            ProcessHullRepair(chr, 100.0);
            ProcessSailRepair(chr, 100.0);
            DeleteAttribute(chr, "ship.blots");
            DeleteAttribute(chr, "ship.sails");
            DeleteAttribute(chr, "ship.masts");
        }
    }

The problem i am having is that only the Hull repair works, i am still unsure if my companions hull is repaired with this cheat. Sails do not repair. does anybody know what i have to change to make sails repair and what i have to change to the 'DeleteAttribute.... lines to make them work.

Im sorry fro sounding like a winging child.
 
I'm no coder, but you might be missing a comma.

The one you pasted says chr = &characters[cn]; ,
While yours says the same thing, minus the comma at the end.
 
I'm no coder, but you might be missing a comma.

The one you pasted says chr = &characters[cn]; ,
While yours says the same thing, minus the comma at the end.
i dont know where that comma come from but its not in my altered code and not in the original from skodaraps site either. It must be another sighting of the phantom comma! :8q.

Thank you for your reply though :onya.
 
I should also say that my edited version seems to partially work. the hull does heal to full but the sail damage does not, not even slightly.
 
I tried using the full skodaraps version using the rename ship method. only the hull heals. This leads me to think that it either never worked properly or mods and updates have changed the way the game handles how it deals with sail damage and visual damage markers.
 
Back
Top