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

Fixed Indian weapons stuck in inventory

Hotshot

Freebooter
Storm Modder
Ahoi!

Well, I guess now that I've got quite a lot of these, I come to realize that I can't sell, nor "Toss" these items!?
Like:
  • Quiver
  • Curare
  • Arrows
  • Tar Mixture
Please see the attached savegame.

Thanks & cheers!
 

Attachments

  • -=Player=- Jamaica.zip
    1 MB · Views: 99
The reason is that they're set to "price = 1" in PROGRAM\ITEMS\initItems.c:
Code:
  //----------------------------------------------------------------------------------------------------------------------
  // AMMOMOD:  rare  Price  skiptrade
  //  ItemIndex  picIndex  |  |  | skiprand
  //  |  itmID  groupID  picTexture  |  | MinLevel |  | | skipequip
  //--------------|-------|-------------|-------------------|------|-----|----|-----|------|-|-|--------------------------
  n = InitAmmoMod(n,"powderflask",  FLASK_ITEM_TYPE,  "JRH",  1,  0.10,  3,  150,  0,0,0);// Powder Flask
  n = InitAmmoMod(n,"ammopouch",  POUCH_ITEM_TYPE,  "JRH",  2,  0.10,  3,  120,  0,0,0);// Ammo Pouch
  n = InitAmmoMod(n,"gunpowder",  AMMUNITION_ITEM_TYPE, "JRH",  4,  0.95,  1,  10,  0,0,1);// Gun powder
  n = InitAmmoMod(n,"pistolbullets",AMMUNITION_ITEM_TYPE, "JRH",  5,  0.95,  1,  5,  0,0,1);// Pistol Bullets
  n = InitAmmoMod(n,"pistolgrapes", AMMUNITION_ITEM_TYPE, "JRH",  6,  0.60,  1,  8,  0,0,1);// Grape Shot
  n = InitAmmoMod(n,"musketbullets",AMMUNITION_ITEM_TYPE, "JRH",  7,  0.20,  3,  10,  0,0,1);// Musket Bullets
  n = InitAmmoMod(n,"arrows2",  AMMUNITION_ITEM_TYPE, "BOP2",  2,  0.00,  3,  1,  1,1,1);// JRH: Small poisoned arrows for the Blowgun
  n = InitAmmoMod(n,"rockets",  AMMUNITION_ITEM_TYPE, "BOP2",  5,  0.00,  3,  1,  1,1,1);// JRH: Rockets
  n = InitAmmoMod(n,"rocketbag",  POUCH_ITEM_TYPE,  "BOP2",  6,  0.00,  3,  1,  1,1,0);// JRH: Rocket Bag
  n = InitAmmoMod(n,"quiver",  POUCH_ITEM_TYPE,  "BOP",  3,  0.00,  3,  1,  1,1,0);// JRH: Quiver
  n = InitAmmoMod(n,"curare",  AMMUNITION_ITEM_TYPE, "JRH28",13,  0.00,  3,  1,  1,1,1);// JRH: for poisoned arrows
  n = InitAmmoMod(n,"tar",  AMMUNITION_ITEM_TYPE, "JRH28",14,  0.00,  3,  1,  1,1,1);// JRH: for flaming arrows
Replace it with this, then press F11:
Code:
  //----------------------------------------------------------------------------------------------------------------------
  // AMMOMOD:  rare  Price  skiptrade
  //  ItemIndex  picIndex  |  |  | skiprand
  //  |  itmID  groupID  picTexture  |  | MinLevel |  | | skipequip
  //--------------|-------|-------------|-------------------|------|-----|----|-----|------|-|-|--------------------------
  n = InitAmmoMod(n,"powderflask",  FLASK_ITEM_TYPE,  "JRH",  1,  0.10,  3,  150,  0,0,0);// Powder Flask
  n = InitAmmoMod(n,"ammopouch",  POUCH_ITEM_TYPE,  "JRH",  2,  0.10,  3,  120,  0,0,0);// Ammo Pouch
  n = InitAmmoMod(n,"gunpowder",  AMMUNITION_ITEM_TYPE, "JRH",  4,  0.95,  1,  10,  0,0,1);// Gun powder
  n = InitAmmoMod(n,"pistolbullets",AMMUNITION_ITEM_TYPE, "JRH",  5,  0.95,  1,  5,  0,0,1);// Pistol Bullets
  n = InitAmmoMod(n,"pistolgrapes", AMMUNITION_ITEM_TYPE, "JRH",  6,  0.60,  1,  8,  0,0,1);// Grape Shot
  n = InitAmmoMod(n,"musketbullets",AMMUNITION_ITEM_TYPE, "JRH",  7,  0.20,  3,  10,  0,0,1);// Musket Bullets
  n = InitAmmoMod(n,"arrows2",  AMMUNITION_ITEM_TYPE, "BOP2",  2,  0.00,  3,  2,  1,1,1);// JRH: Small poisoned arrows for the Blowgun
  n = InitAmmoMod(n,"rockets",  AMMUNITION_ITEM_TYPE, "BOP2",  5,  0.00,  3,  2,  1,1,1);// JRH: Rockets
  n = InitAmmoMod(n,"rocketbag",  POUCH_ITEM_TYPE,  "BOP2",  6,  0.00,  3,  2,  1,1,0);// JRH: Rocket Bag
  n = InitAmmoMod(n,"quiver",  POUCH_ITEM_TYPE,  "BOP",  3,  0.00,  3,  2,  1,1,0);// JRH: Quiver
  n = InitAmmoMod(n,"curare",  AMMUNITION_ITEM_TYPE, "JRH28",13,  0.00,  3,  2,  1,1,1);// JRH: for poisoned arrows
  n = InitAmmoMod(n,"tar",  AMMUNITION_ITEM_TYPE, "JRH28",14,  0.00,  3,  2,  1,1,1);// JRH: for flaming arrows

As far as I know, it is by @Jack Rackham to have it like this. Maybe he could confirm/deny that.
Now that these items are "more common", maybe treating them more like regular items would be a good idea?
 
I can't remember why the price was set to 1.

Now that these items are "more common", maybe treating them more like regular items would be a good idea?
Yes I guess so. They have to enabled to buy/sell etc if not now.
 
Not sure if those items should be sold in general shops, but you should probably be able to sell them yourself.
Would be nice if that Indian Trader would still them though; if necessary, just through some lines of dialog.
 
Thanks, that worked!

But, the "Arrows" are still un-tossable!
When equipping them they act as a "sword", so I tried changing this:
itm.id = "bladearrows";
...
itm.price = 1;​
to
itm.price = 2;​
but that doesn't work either, as the save won't load :p
 
Ok, this turned serious!

I've reverted everything back to default (shipsinit and iteminit) but I still cannot load my savegame(s)!

Edit: added logs, configs and last 3 saves
 

Attachments

  • logs and configs.zip
    29.9 KB · Views: 94
  • saves.7z
    720.4 KB · Views: 101
Last edited:
Ok, this turned serious!
Looks like there is garbage in your "options" file.
Delete it from your main game folder, then start the game and set all your ingame settings again (these will have been lost).
That will probably help.
 
Sooo, I just found out this "quick'n'dirty fix" doesn't really work...

I've included several screenshots as well as two savegames:
  • 1st save from "before" the fix; items still in inventory and everything's fine ("inventory/maps" and "looting/exchanging items")
  • 2nd save after pressing F11 and getting rid of the Indian weapons: inventory looks fine at first, but there is 1 empty "item/placeholder" under "Items" ( Inventory - Items.jpg ) and "Quest-Items" (Inventory - Quest.jpg ) & there are no maps any longer (Inventory - Maps.jpg )! And there are those... openings in my inventory when exchangin/looting (Inventory - Looting_Chest 1.jpg | Inventory - Looting_Chest 2.jpg )
And as reported before, the arrows can still not be removed from my (or my comrades) inventory.


Please help. I love this game, but these... inconveniences (like with unfinishable quests) is quite the turn-off :-\
 

Attachments

  • Saves.7z
    684.7 KB · Views: 107
I don't know what is going on there. Someone reported weird stuff with items after F11 before, but I could not confirm that when I tried to replicate the issue.
Maybe with your savegame, I can. Will have to look into it, but no guarantees on the timing of that.

In the meantime, open PROGRAM\INTERFACE\items.c and remove this line:
Code:
if(sti(GetAttribute(itemARef, "price")) <= 1)             TossEnable = false; // PB
That'll work for sure to allow you to toss them.

It can be done through console as well of course, because basically everything can be done through console. ;)

like with unfinishable quests
Thankfully it is only one single quest that is well known to be unfinished.
I've been tempted to just disable that quest altogether for quite a while now, just to bypass that buggy content.
 
Code:
if(sti(GetAttribute(itemARef, "price")) <= 1) TossEnable = false; // PB

That'll work for sure to allow you to toss them.
How about quest items then, with a price = 0.
You shouldn't really be able to toss them.
 
Yep, commenting out this line lets me throw away all those Indian weapons.

But still, I might need to use F11 in the future, so a fix for that might be really helpful! :)
 
How about quest items then, with a price = 0.
You shouldn't really be able to toss them.
I know; my suggestion was purely for @Hotshot's benefit to be able to get rid of those items in an easy way.
But I am not at all proposing to change that in the actual modpack. It is indeed there for a reason. :yes

Tbh: I think that wouldn't be such a bad idea...
If @Jack Rackham manages to fix it soon, then with a bit of luck we'll have a corrected version within a month or so.
Lately it has ended up that I basically make a new EXE once every 4 weeks or so.

But still, I might need to use F11 in the future, so a fix for that might be really helpful! :)
Oh, for certain! That is supposed to work and as far as I know, it actually does.
But yours is the second report that it doesn't and now I have a savegame to test from.
So hopefully that finally allows me to figure out what's up there.

I tend to not have much time and energy after work though, so I mostly have only the weekends.
And then only some of them. So I'm basically always have "so much to do, not enough time".
Still, I will try to get it sorted. :yes
 
@Jack Rackham: I'm changing the price to "2" for the following items:
"bladearrows"
"quiver"
"curare"
"tar"

Am I forgetting any then? If you want custom prices, please make your own preferred changes. :doff
 
@Hotshot: The price fix for the arrows is also included in the file attached here:
Fixed - Reinit Deletes Map Items | Page 2 | PiratesAhoy!
I have tested it on your save and it now does exactly what it was meant to.

You were also right that with my initial suggestion, arrows still couldn't be removed.
This was because the section I suggested editing does not actually include the arrow definition itself.
So that is now rectified too.
 
Back
Top