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

Spoiler Simple change to dev console cargo cheat...

Jonesie85

Boarding Master
Storm Modder
Hello all, my name is Chris Jones.I am posting this on the forum so that if anybody else needs this info it is easy to find.

I use the dev console quite alot. I typically use a standard code that changes the current ammount of 'BOMBS' to a specified number. If you have 200 already and the cheat is set to give you 150 you will not have 350 you will have 150.

This is rather annoying to me so i figured out a very simple change that seems to work. I realy should have figured it out straight away rather than spending 30 minutes sifting through the Program/Quests/reaction_functions.c file for a quest peramiter that adds goods to your ship.

my first attempt was to simply place a '+' before the good quantity, It did not work. However, it did change the quantity to 1000 even if i had 3333:-

Code:
SetCharacterGoods(mc,GOOD_POWDER,+ 1000);

I then found the following line of code in the Program/Quests/reaction_functions.c file. I changed the good type to 'BOMBS'. This did not work.

Code:
AddCharacterGoods(sld, GOOD_BOMBS, 5000);

I then changed the 'sld' in the above code to 'mc'. The code then did what i wanted it to do. It shouldalso be noted that the 'add' will not increase over your max cargo space:-

Code:
AddCharacterGoods(mc,GOOD_BOMBS, 2500);
<---- This one works.

The cheat in my Debuger.c file looks like this:-

Code:
string descF27 = "Jonesies' Boarding Masters Cheat";
void CalculateInfoDataF27()
{
    totalInfo = descF27;
    ref mc = getmaincharacter();
    // --> Code written specifically to my preferences.
    SetCrewQuantityFull(mc);
    mc.ship.Crew.Morale = 100;
    ChangeCrewExp(mc, "Sailors", 100);
    ChangeCrewExp(mc, "Cannoners", 100);
    ChangeCrewExp(mc, "Soldiers", 100);
    AddCharacterGoods(mc,GOOD_BOMBS, 1000);
    // SetCharacterGoods(mc,GOOD_BOMBS, 1000); <--- Original
    AddCharacterGoods(mc,GOOD_POWDER, 1000);
    AddCharacterGoods(mc,GOOD_KNIPPELS, 250)
    AddCharacterGoods(mc,GOOD_FOOD, 250);
    AddCharacterGoods(mc,GOOD_RUM, 250);
    AddCharacterGoods(mc,GOOD_WEAPON, 250);
    AddCharacterGoods(mc,GOOD_MEDICAMENT, 250);
    // <--
    totalInfo = totalInfo + NewStr() + NewStr() +
    "Crew compliment, morale & Experience set to maximum. Powder and Bombs increased by 1000. Knipples, food, rum, weapons & medicines increased by 250.";
    SetFormatedText("INFO_TEXT",totalInfo);
}

SOOOooooooo, to recap.... All i did was change 'Set' to 'Add'. Simple. :beer:
 
For GOF 2, this was changed in one of the patches so you would start with more ammo, powder food and rum which wasn't included etc. It didn't take long to figure out. What took the time was making sure that the starting amounts wasn't over the top, but wasn't to little either. The only things that wasn't changed was the starting crew amount and the crews experience.

If you want i could alway's upload the file so you could see and make changes to suit your needs?
 
For GOF 2, this was changed in one of the patches so you would start with more ammo, powder food and rum which wasn't included etc. It didn't take long to figure out. What took the time was making sure that the starting amounts wasn't over the top, but wasn't to little either. The only things that wasn't changed was the starting crew amount and the crews experience.

If you want i could alway's upload the file so you could see and make changes to suit your needs?

yes please, it would be nice to see how other people did it.
 
Back
Top