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

Help on adding new items please!

Cap'n Cornish

Landlubber
Agh

Can someone help me please I have created a new spyglass sword and pistol, after installing build 11. I want to equip my character with these new items when starting a new game but only the spyglass appears can sum body help me out with this please!

regards,

Cap'n Cornish.
 
Cap'n Cornish, I split this off from the WIKI sticky so you can get better attention to your dilemma... <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/icon_mrgreen1.gif" style="vertical-align:middle" emoid=":cheeky" border="0" alt="icon_mrgreen1.gif" />
 
Part of the problem of answering you is that we don't know what you did to create your items in the game.

How did you get the spyglass to appear in the game, and what did you try for the other items?

Please post the code that you created, and we can see what you've done and how to fix it. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/icon_mrgreen1.gif" style="vertical-align:middle" emoid=":cheeky" border="0" alt="icon_mrgreen1.gif" />
 
Rite here is what I added for my new saber as the tutorial says underneath the last sword...

//Great Saber
makeref(itm,Items[n]);
itm.id = "blade1";
// NK -->
itm.skiptrade = false;
itm.skiprand = false;
itm.skipequip = false;
// NK <--
itm.groupID = BLADE_ITEM_TYPE;
itm.name = "itmname_blade28";
itm.describe = "itmdescr_blade28";
itm.model = "blade28";
itm.folder = "ammo";
itm.picIndex = 11;
itm.picTexture = "ITEMS_6";
itm.price = 1500;
itm.dmg_min = 30.0;
itm.dmg_max = 50.0;
itm.piercing = 40;
itm.minlevel = 0;
itm.rare = 0.9;
itm.block = 40;
itm.param.time = 0.05;
itm.param.colorstart = argb(64, 64, 64, 64);
itm.param.colorend = argb(0, 32, 32, 32);
n++;

then I went to the descriptions file and added that, like so,

itmname_blade28 {Great Saber}
itmdescr_blade28
{
Before Bosun Malcolm settled on a life ashore, he decided to make a few leaving gifts for his Captain this Saber being one of them. Its design is based on a typical Saber but made from superior quality metal and far more skill and effort into its creation has enabled a major difference in its abilities. Only one of these exist.
}

then for my pistol i did this,

//Uprated `Double-shot` Pistol
makeref(itm,Items[n]);
itm.id = "pistol7";
// NK -->
itm.skiptrade = false;
itm.skiprand = false;
itm.skipequip = false;
// NK <--
itm.groupID = GUN_ITEM_TYPE;
itm.name = "itmname_pistol7";
itm.describe = "itmdescr_pistol7";
itm.folder = "ammo";
itm.model = "pistol6";
itm.picIndex = 6;
itm.picTexture = "ITEMS_6";
itm.price = 15500;
itm.chargeQ = 2;
itm.chargespeed = 16;
itm.dmg_min = 60.0;
itm.dmg_max = 80.0;
itm.accuracy = 70;
itm.minlevel = 0;
itm.rare = 0.001;
n++;

and then changed its description the same way as the saber that is the easy bit.
and then added the code as described for adding the items to the character in the main character file, like this.

// MainCharacter start parameters
//NK -->
ch.Ship.HP = MakeInt(GetCharacterShipHP(ch) * 3 / 5);
ch.Ship.crew.quantity = MakeInt(GetMaxCrewQuantity(ch) * 3/5);
SetCharacterGoods(&Characters[0],GOOD_BALLS,GetCannonQuantity(ch)*BALLS_PER);
SetCharacterGoods(&Characters[0],GOOD_GRAPES,GetCannonQuantity(ch)*GRAPE_PER);
SetCharacterGoods(&Characters[0],GOOD_KNIPPELS,GetCannonQuantity(ch)*CHAIN_PER);
SetCharacterGoods(&Characters[0],GOOD_BOMBS,GetCannonQuantity(ch)*BOMBS_PER);
SetCharacterGoods(&Characters[0],GOOD_CHOCOLATE,100);
SetCharacterGoods(&Characters[0],GOOD_LEATHER,25);
SetCharacterGoods(&Characters[0],GOOD_WHEAT,sti(ch.ship.crew.quantity) * FOOD_PER_CREW * WHEAT_DAYS);
SetCharacterGoods(&Characters[0],GOOD_RUM,sti(ch.ship.crew.quantity) * FOOD_PER_CREW * RUM_DAYS);
GiveItem2Character(ch, "blade28");
GiveItem2Character(ch, "pistol7");

..........................................

what have i done wrong as i followed the instructions to the letter.


then went to the characters file and added this.
 
Do you have the Weapons mod enabled so that the weapons have got different qualities like Work and Fine?
If so then you have added the blade and sword to the wrong location in the file sof the mod to recognise them.

There are a pair of tables in the initItems.c that need the values for these new weapons to be added.

A quick hint, using "Blade28" will give you an Average quality blade, use "Blade28+1" for Good and go up to "Blade28+3" for Excellent.
 
can you show me what you mean or explain it in more broken down english or dont understand what u mean as im a newbie to things like this.
 
I've figured it but now I have another problem! When attempting to buy things from market sellers in their tents it wont let me buy certain things even though they are there or it wont let me buy the actual full amounts of things that are there!

I really am getting confused with this?!?! one problem seems to stem from another.
 
Just a quick tip, I see that you left the sword's id on "blade1". An ID is a unique identifier for an object, so you should change this to "blade28" (unless that exists already). Otherwise lots of pieces of potc code are going to have a really hard time using your new item.
This could also be the problem you're expreriencing now, as the code might pick the wrong item labelled as "blade1".
 
I've got a similar problem. I wanted to add a "Trident Dagger," but with its own unique picture. So I added a pic to an empty slot in items8.tga and referred to that picture in the item entry it inititems.c, but `in-game` only got the pictures for the dagger. So ok, so I disabled the weapons mod. Then I went `in-game` and couldn't find my dagger for purchase anywhere (and didn't think to simply "giveitem2character"). So I tried editing its entry in the weaponsmod table, since I realized that still referred to the original dagger item picture. But I can't really read that table... anyway, in the end, I would up with the same problem I had last month: Completely black screen on `start-up`, though saved games still load. Got this even after removing all my changes.

So fine, I'll reinstall it all for the 4th or 5th time. I'll just take it for granted that these things will happen and they simply have no explanation.

But for future reference, here are the questions I need answered:

1) Is it possible to add a new weapon, with a new item image reference, whose weaponsmod changes can be shown? That is, all the other weapons are on image6.tga, I think, and for the weapons mod an image in image6_1 or image6+1 or something is referenced to show quality. So if I use a different image file, will it still work?

1b) Just how do I read the weapons condition table, anyway?
// BLADES: ItemIndex picIndex Price Piercing
// | bladeID modelID | rare | minDamage | Blocking
// | | | picTexture | | MinLevel | | maxDamage | |
//----------------|---|----------|---------|---|--|------|-----|---|-----|------|---|-----------------
n = InitBlade(n, "blade5", "blade5", 6, 9, 0.90, 0, 250, 4.0, 10.0, 25, 0); // Dagger

I see it's all labelled, but because of wrecked spacing any everything, I can't match up each number with its definition. If I knew that, maybe I could figure out the answer to my first question.

2) How to edit weapon model textures? When I open them in Paint Shop Pro (the only graphics editor I can afford, as it's free), it's just a clear image no matter what I do about layers. But a small thumbnail preview of the picture before I open it shows the whole thing.

3) With the current armor mod, could I add an item that would behave as armor without it being tied to one of the outfits? I see that table refers to all the soldiers wearing armor, so I have to wonder if an armor item can be made independant of that.

*sigh* Right, I'll start that reload now. Thanks for your help everyone.
 
Back
Top