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

No more Rats!

kevinwastaken

Landlubber
Storm Modder
I've made a simple modification which grants the starting player the Rat God artifact, thereby ensuring you never have to deal with rats on your ship again! No cheats, trainers, or debuggers necessary, just a simple mod.


Edit the file <i>RPGUtilite.c</i> which is found in <b>C:\Program Files\Playlogic\Age of Pirates 2\Program\characters</b>

search for <b>void initMainCharacterItem()</b> within the open file.

add the line <b>GiveItem2Character(Pchar,"indian11");</b> under each class.

The completed modification should appear as follows:
<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>void initMainCharacterItem()
{
ref ch = GetMainCharacter();
//trace("initMainCharacterItem " + ch.HeroParam.HeroType);
switch (ch.HeroParam.HeroType)
{
case "Master":
GiveItem2Character(Pchar, "topor3");
GiveItem2Character(Pchar,"indian11");
EquipCharacterbyItem(Pchar, "topor3");
TakenItems(Pchar, "potion2", 1);
if(CheckCharacterItem(Pchar, "Spyglass1") == 0) GiveItem2Character(Pchar, "Spyglass1");
EquipCharacterbyItem(Pchar, "Spyglass1");
break;

case "Merchant":
GiveItem2Character(Pchar, "blade1");
GiveItem2Character(Pchar,"indian11");
EquipCharacterbyItem(Pchar, "blade1");
GiveItem2Character(Pchar, "pistol2");
EquipCharacterbyItem(Pchar, "Pistol2");
TakenItems(Pchar, "potion1", 3);
TakeNItems(Pchar, "bullet", 5);
if(CheckCharacterItem(Pchar, "Spyglass1") == 0) GiveItem2Character(Pchar, "Spyglass1");
EquipCharacterbyItem(Pchar, "Spyglass1");
pchar.money = 2000;
break;

case "Corsair":
GiveItem2Character(Pchar, "blade2");
GiveItem2Character(Pchar,"indian11");
EquipCharacterbyItem(Pchar, "blade2");
GiveItem2Character(Pchar, "pistol1");
EquipCharacterbyItem(Pchar, "Pistol1");
TakenItems(Pchar, "potion1", 5);
TakeNItems(Pchar, "bullet", 10);
if(CheckCharacterItem(Pchar, "Spyglass1") == 0) GiveItem2Character(Pchar, "Spyglass1");
EquipCharacterbyItem(Pchar, "Spyglass1");
break;

case "Adventurer":
GiveItem2Character(Pchar, "Blade10");
GiveItem2Character(Pchar,"indian11");
EquipCharacterbyItem(Pchar, "Blade10");
TakenItems(Pchar, "potion1", 2);
if(CheckCharacterItem(Pchar, "Spyglass2") == 0) GiveItem2Character(Pchar, "Spyglass2");
EquipCharacterbyItem(Pchar, "Spyglass2");
pchar.money = 500;
break;

case "Inquisitor":
GiveItem2Character(Pchar, "blade5");
EquipCharacterbyItem(Pchar, "blade5");
TakenItems(Pchar, "potion1", 3);
TakenItems(Pchar, "jewelry9", 1);
if(CheckCharacterItem(Pchar, "Spyglass1") == 0) GiveItem2Character(Pchar, "Spyglass1");
EquipCharacterbyItem(Pchar, "Spyglass1");
break;

case "SecretAgent":
GiveItem2Character(Pchar, "blade5");
EquipCharacterbyItem(Pchar, "blade5");
if(CheckCharacterItem(Pchar, "Spyglass1") == 0) GiveItem2Character(Pchar, "Spyglass1");
EquipCharacterbyItem(Pchar, "Spyglass1");
break;
}
}</div>

***Back up any files before you edit them!***
 
How many times have i wished to have a cat aboard... <img src="style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />
However... i've got some good laughs with <i>"blistering barnacles!. On the Libertad rats have devoured 150 units of rum"</i>... Now, THAT'S GOT TO BE A PARTY !!!!! <img src="style_emoticons/<#EMO_DIR#>/24.gif" style="vertical-align:middle" emoid=":rofl" border="0" alt="24.gif" />
 
If you add that line outside the switch, it'll still work and save you adding it several times.
 
<!--quoteo(post=335399:date=Jul 6 2009, 04:26 AM:name=Pieter Boelen)--><div class='quotetop'>QUOTE (Pieter Boelen @ Jul 6 2009, 04:26 AM) <a href="index.php?act=findpost&pid=335399"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->If you add that line outside the switch, it'll still work and save you adding it several times.<!--QuoteEnd--></div><!--QuoteEEnd-->

Cool, thanks
 
Also is you add these lines you can have as many as you want.

GiveItem2Character(Pchar,"indian11");
EquipCharacterbyItem(Pchar,"indian11");
GiveItem2Character(Pchar,"indian11");
EquipCharacterbyItem(Pchar,"indian11");
GiveItem2Character(Pchar,"indian11");
EquipCharacterbyItem(Pchar,"indian11");
GiveItem2Character(Pchar,"indian11");
EquipCharacterbyItem(Pchar,"indian11");
GiveItem2Character(Pchar,"indian11");
EquipCharacterbyItem(Pchar,"indian11");
GiveItem2Character(Pchar,"indian11");
EquipCharacterbyItem(Pchar,"indian11");


this will give you 6 of said item....No more rats....
 
You have to equip an indian idol? And what's the point in having several?
Anyway, there's probably a TakeNItems function too, just like in PotC.
You could just do <i>TakeNItems(PChar,"indian11",6);</i> and also get six of them things.
 
<!--quoteo(post=337146:date=Jul 14 2009, 01:04 PM:name=Pieter Boelen)--><div class='quotetop'>QUOTE (Pieter Boelen @ Jul 14 2009, 01:04 PM) <a href="index.php?act=findpost&pid=337146"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->And what's the point in having several?<!--QuoteEnd--></div><!--QuoteEEnd-->
That you can give them to your officers so that your other ships are also vermin free.
 
Back
Top