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

Adding new items in the Post Build Mod 12

Elrapido

Scurvy Seadog
Storm Modder
Well, I tried to add a new brace of guns to the game, but it didn't work very well.
I am using the latest Post Build Mod 12. Who can help me and find the mistake?

In <b>Pirates of the Caribbean\PROGRAM\ITEMS\ItemsInit.c</b> I added right after Alan Smithee's Code:

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->    //Alan Smithee's new weapons end
        
        // El Rapido's new weapons
        
        //Brace of Richard Haley Pistols
        makeref(itm,Items[n]);
        itm.id = "pistol10";
        itm.sound = "OBJECTS\DUEL\pistol_shot10.wav"; // new pistol sound by El Rapido
        itm.shottype = "pb"; //JRH
        // NK -->
        itm.skiptrade = false;
        itm.skiprand = false;
        itm.skipequip = false;
        // NK <--
        itm.groupID = GUN_ITEM_TYPE;
        itm.name = "itmname_pistol10";
        itm.describe = "itmdescr_pistol10";
        itm.folder = "ammo";
        itm.model = "pistol9";
        itm.picIndex = 1;
        itm.picTexture = "ITEMS_69";
        itm.price = 15000;
        itm.chargeQ = 2;
        itm.chargespeed = 24;
        itm.dmg_min = 75.0;
        itm.dmg_max = 160.0;
        itm.accuracy = 75;
        itm.minlevel = 1;
        itm.rare = 0.05;
        n++;
        
        // El Rapido's new weapons end
    }
    else
    {

    //--------------------------------------------------------------------------------------------------------
<!--c2--></div><!--ec2-->

And also in <b>Pirates of the Caribbean\PROGRAM\ITEMS\ItemsInit.c</b> right after Alan Smithee:

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->        // Alan Smithee's new weapons -->
            n = InitGun(n, "pistol7", "pistol7",  9,  1, 0.10,  4,  3500, 25.0, 40.0,  40, 3, 30, FRANCE, "OBJECTS\DUEL\pistol_small.wav", "pb"); // Brace of Small Pistols
            n = InitGun(n, "pistol8", "pistol8",  9,  3, 0.05,  7,  7500, 45.0, 60.0,  50, 3, 35, SPAIN, "OBJECTS\DUEL\pistol_medium.wav", "pb"); // Brace of Mid-size Pistols
            n = InitGun(n, "pistol9", "pistol9",  9,  2, 0.05, 17, 12000, 55.0, 80.0,  55, 2, 28, HOLLAND, "OBJECTS\DUEL\pistol_big.wav", "pb"); // Brace of Large Pistols
            // Alan Smithee's new weapons end
            // El Rapido's new weapons
            n = InitGun(n, "pistol10", "pistol9",  69,  1, 0.05, 1, 15000, 60.0, 85.0,  75, 2, 24, ENGLAND, "OBJECTS\DUEL\pistol_shot10.wav", "pb"); // Brace of Richard Haley Pistols
            // El Rapido's new weapons end
<!--c2--></div><!--ec2-->

The <b>#define ITEMS_QUANTITY</b> in <b>"Pirates of the Caribbean\PROGRAMS\ITEMS\items.h"</b> seems to have been recoded, so that it is not needed anymore. It was mentioned in step 3 and 4 of <b><!--coloro:#FF0000--><span style="color:#FF0000"><!--/coloro--><a href="http://robotsdontbleed.com/wacko/wakka.php?wakka=AddingNewItems&v=13ey" target="_blank">Duke Suraknars Item Tutorial in the POTCWiki</a><!--colorc--></span><!--/colorc--></b>. The tutorial seems to be outdated for Post Build Mod 12.

I added the new soundfile <b>"Pirates of the Caribbean\RESOURCE\Sounds\OBJECTS\DUEL\pistol_shot10.wav"</b>.

I have put 6 texture files for the item inventory images in the folder "Pirates of the Caribbean\RESOURCE\Textures\INTERFACES", each one of them refering to a different item quality.
<b>The texture files are:</b>
items69-2.tga.tx
items69-1.tga.tx
items69.tga.tx
items69+1.tga.tx
items69+2.tga.tx
items69+3.tga.tx

You can download my texture files and have a look at them: <!--coloro:#FF0000--><span style="color:#FF0000"><!--/coloro--><b><a href="http://people.freenet.de/philipp.dorok/items69.zip" target="_blank">Download items69.zip</a></b><!--colorc--></span><!--/colorc-->

In the description file "Pirates of the Caribbean\RESOURCE\INI\TEXTS\ENGLISH\<b>ItemsDescribe.txt</b>" I inserted:
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->//  Alan Smithee's new weapons end

// El Rapido's new weapons
itmname_pistol10 {High Precision Pistols}
itmdescr_pistol10
{
The famous armourer Richard Haley of London forged these two masterpieces. The brace is perfectly balanced and light-weighed, but delivers a decent punch. Due to its power the shot is very loud.
}
// El Rapido's new weapons end

// vassal weapons mod start<!--c2--></div><!--ec2-->

<img src="style_emoticons/<#EMO_DIR#>/hi.gif" style="vertical-align:middle" emoid=":gday" border="0" alt="hi.gif" /> <b><!--coloro:#FF0000--><span style="color:#FF0000"><!--/coloro-->EDIT: Allright, mateys. The item seems to work partially now ingame. The trick was to press the Reinitialize-Key...
Sometimes I am very stupid. <img src="style_emoticons/<#EMO_DIR#>/laugh.gif" style="vertical-align:middle" emoid="xD:" border="0" alt="laugh.gif" /> </b><!--colorc--></span><!--/colorc-->

But the textures for the item interface and for the model itself are screwed up unfortunately. <img src="style_emoticons/<#EMO_DIR#>/blink.gif" style="vertical-align:middle" emoid=":blink:" border="0" alt="blink.gif" />

The model textures include some small blue faces (#00FF00 blue I guess).
I did a reskin of pistol9 (Brace of Large Pistols). I copied the pistol9.gm model to pistol10.gm and then hexedited it to set the texture filename for the model to "pistl10.tga".
The texture for the item interface even refuses to show up. And the itmname_pistol10 in the description file does not work as you can see on the screenshots on this page:

<!--coloro:#FF0000--><span style="color:#FF0000"><!--/coloro--><!--sizeo:3--><span style="font-size:12pt;line-height:100%"><!--/sizeo--><a href="http://people.freenet.de/philipp.dorok/elrapido/textureproblem.htm" target="_blank">strange item texture problem page</a><!--sizec--></span><!--/sizec--><!--colorc--></span><!--/colorc-->

Thank you very much for your help! <img src="style_emoticons/<#EMO_DIR#>/me.gif" style="vertical-align:middle" emoid=":onya" border="0" alt="me.gif" />
 
To add the item textures to the interfaces: Add all items69 .tga.tx files to RESOURCE\INI\INTERFACES\pictures.ini:
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->// El Rapido -->
[ITEMS_69-2]
sTextureName    = items69-2.tga
wTextureWidth    = 512
wTextureHeight    = 512

picture = itm1,0,0,128,128
picture = itm2,128,0,256,128
picture = itm3,256,0,384,128
picture = itm4,384,0,512,128
picture = itm5,0,128,128,256
picture = itm6,128,128,256,256
picture = itm7,256,128,384,256
picture = itm8,384,128,512,256
picture = itm9,0,256,128,384
picture = itm10,128,256,256,384
picture = itm11,256,256,384,384
picture = itm12,384,256,512,384
picture = itm13,0,384,128,512
picture = itm14,128,384,256,512
picture = itm15,256,384,384,512
picture = itm16,384,384,512,512

[ITEMS_69-1]
sTextureName    = items69-1.tga
wTextureWidth    = 512
wTextureHeight    = 512

picture = itm1,0,0,128,128
picture = itm2,128,0,256,128
picture = itm3,256,0,384,128
picture = itm4,384,0,512,128
picture = itm5,0,128,128,256
picture = itm6,128,128,256,256
picture = itm7,256,128,384,256
picture = itm8,384,128,512,256
picture = itm9,0,256,128,384
picture = itm10,128,256,256,384
picture = itm11,256,256,384,384
picture = itm12,384,256,512,384
picture = itm13,0,384,128,512
picture = itm14,128,384,256,512
picture = itm15,256,384,384,512
picture = itm16,384,384,512,512

[ITEMS_69]
sTextureName    = items69.tga
wTextureWidth    = 512
wTextureHeight    = 512

picture = itm1,0,0,128,128
picture = itm2,128,0,256,128
picture = itm3,256,0,384,128
picture = itm4,384,0,512,128
picture = itm5,0,128,128,256
picture = itm6,128,128,256,256
picture = itm7,256,128,384,256
picture = itm8,384,128,512,256
picture = itm9,0,256,128,384
picture = itm10,128,256,256,384
picture = itm11,256,256,384,384
picture = itm12,384,256,512,384
picture = itm13,0,384,128,512
picture = itm14,128,384,256,512
picture = itm15,256,384,384,512
picture = itm16,384,384,512,512

[ITEMS_69+1]
sTextureName    = items69+1.tga
wTextureWidth    = 512
wTextureHeight    = 512

picture = itm1,0,0,128,128
picture = itm2,128,0,256,128
picture = itm3,256,0,384,128
picture = itm4,384,0,512,128
picture = itm5,0,128,128,256
picture = itm6,128,128,256,256
picture = itm7,256,128,384,256
picture = itm8,384,128,512,256
picture = itm9,0,256,128,384
picture = itm10,128,256,256,384
picture = itm11,256,256,384,384
picture = itm12,384,256,512,384
picture = itm13,0,384,128,512
picture = itm14,128,384,256,512
picture = itm15,256,384,384,512
picture = itm16,384,384,512,512

[ITEMS_69+2]
sTextureName    = items69+2.tga
wTextureWidth    = 512
wTextureHeight    = 512

picture = itm1,0,0,128,128
picture = itm2,128,0,256,128
picture = itm3,256,0,384,128
picture = itm4,384,0,512,128
picture = itm5,0,128,128,256
picture = itm6,128,128,256,256
picture = itm7,256,128,384,256
picture = itm8,384,128,512,256
picture = itm9,0,256,128,384
picture = itm10,128,256,256,384
picture = itm11,256,256,384,384
picture = itm12,384,256,512,384
picture = itm13,0,384,128,512
picture = itm14,128,384,256,512
picture = itm15,256,384,384,512
picture = itm16,384,384,512,512

[ITEMS_69+3]
sTextureName    = items69+3.tga
wTextureWidth    = 512
wTextureHeight    = 512

picture = itm1,0,0,128,128
picture = itm2,128,0,256,128
picture = itm3,256,0,384,128
picture = itm4,384,0,512,128
picture = itm5,0,128,128,256
picture = itm6,128,128,256,256
picture = itm7,256,128,384,256
picture = itm8,384,128,512,256
picture = itm9,0,256,128,384
picture = itm10,128,256,256,384
picture = itm11,256,256,384,384
picture = itm12,384,256,512,384
picture = itm13,0,384,128,512
picture = itm14,128,384,256,512
picture = itm15,256,384,384,512
picture = itm16,384,384,512,512
// El Rapido <--<!--c2--></div><!--ec2-->
To make the itemname show up, it seems as if you sometimes need to add an additional enter before "itmname_pistol10 {High Precision Pistols}". Why? I don't know. But that's how it is. :wacko
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->// El Rapido's new weapons

itmname_pistol10 {High Precision Pistols}
itmdescr_pistol10
{
The famous armourer Richard Haley of London forged these two masterpieces. The brace is perfectly balanced and light-weighed, but delivers a decent punch. Due to its power the shot is very loud.
}
// El Rapido's new weapons end<!--c2--></div><!--ec2-->
About the pistols being blueish: Could that be because of alpha maps or something? I don't know much about that. But I do know CCC's sandbag used to have the same problem until he fixed it... <img src="style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />
 
Ummm... IIRC Petros and Alan fixed the looks of my SWAK items. I can't help when it comes to graphics <img src="style_emoticons/<#EMO_DIR#>/dunno.gif" style="vertical-align:middle" emoid=":shrug" border="0" alt="dunno.gif" />
 
Thank you very much for your help. Everything works fine now except for the model textures. But I will experiment a bit with them until I get them to work properly. <img src="style_emoticons/<#EMO_DIR#>/me.gif" style="vertical-align:middle" emoid=":onya" border="0" alt="me.gif" />

Maybe Petros and Alan will notice this thread and post a solution...
 
You can always try to PM them about it. They're BOUND to notice it then. <img src="style_emoticons/<#EMO_DIR#>/icon_wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="icon_wink.gif" />
 
<!--quoteo(post=142593:date=Mar 19 2006, 05:08 PM:name=El Rapido)--><div class='quotetop'>QUOTE(El Rapido @ Mar 19 2006, 05:08 PM) [snapback]142593[/snapback]</div><div class='quotemain'><!--quotec-->
... Everything works fine now except for the model textures. But I will experiment a bit with them until I get them to work properly. <img src="style_emoticons/<#EMO_DIR#>/me.gif" style="vertical-align:middle" emoid=":onya" border="0" alt="me.gif" />

Maybe Petros and Alan will notice this thread and post a solution...
<!--QuoteEnd--></div><!--QuoteEEnd-->

<img src="style_emoticons/<#EMO_DIR#>/hi.gif" style="vertical-align:middle" emoid=":gday" border="0" alt="hi.gif" /> Rapido

I'll see if I can find time to look at those files, but don't hold your breath, this will take a while!
 
The problem seems to be with the alpha channel.

I'm not that experienced with this but I simply replaced your alpha channel with the one from Pistol9.

Here it is, see if it looks better to you.
[attachmentid=366]

The silver effect is gone but I think it looks too dark.
 
Dude, that pistol looks awesome now!

Thank you, Petros! You're cool. <img src="style_emoticons/<#EMO_DIR#>/danse1.gif" style="vertical-align:middle" emoid=":dance" border="0" alt="danse1.gif" />

Does anybody know, why there is a different pistol sound played, if you shoot in the air at no target?
This is pretty strange, because a pistol would not sound different depending on where you shoot at. <img src="style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />

For the graphic experts: Does anybody know how to exactly create the glare light effect in the inventory item pictures of excellent items?
Did you just edit an existing pic of an excellent item by cutting the old item out, adding a bit of the background here and there and then pasting the new item in?
 
The sound difference is because in the stock game, all pistols sounded the same. This was hardcoded, so we cannot change it. So what CCC did is replace the shooting sound with something hardly audible and added new shooting sound code to the attack code. However, this code only runs if there is an enemy, so that is why there is a difference. Unfortunately, it is either "all pistols sound the same" or "pistols sound different when not shooting at a target". <img src="style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" />
 
Back
Top