• 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 Disable Toss Button As Appropriate

Jack Rackham

ex train dispatcher
Quest Writer
Storm Modder
There is this new toss button which I like and think has potential. :onya
But there are some problems with it:

If you happen to press it for questitem the quest can be broken.
This goes for questblades, questguns, belt_item_type, outfit_item_type, document_item_type too.
In WoodesRogers, also normal items like the musketoon can break the quest if lossed by a Toss-mistake.

1) Logical would be to skip the function for all the above items types. (For other storylines) Compare to the fact that questitems can't be placed in chests for.ex.
2) I havn't checked yet if for Bartolomeu if this is enough or if exceptions have to be made for certain normal items. In such case I want to lnow where to do it.
3) Best for me would be to have that button NOT activated at all playing WoodesRogers or the GoldBug.
 
The button should already be disabled for ALL quest items. If it isn't, that is a definite bug.

All exceptions are defined in PROGRAM\INTERFACE\items.c .

Disabling it in Woodes Rogers and Gold-Bug sounds like a very sensible thing to do.
Adding the if-statement that is also used in initItems.c for the availability of items should do the trick. :yes
 
Either me or @Levis should be able to do the full quest disabling.

Can you confirm if you can indeed toss quest items right now? That would definitely need to be sorted out.

For any non-quest items outside your storylines, we would need to know which ones are "untossable".
@Bartolomeu o Portugues, anything springs to mind?
 
There can be items in the two puzzles I have been involved in. Inquisition cave and Admirals office.
Have to play them to be sure.
 
As long as they're Quest Items, we're probably OK. Regular items perhaps not so much, though.

Maybe we should check for price = 0 as well? Because I think that applies to most quest items that aren't actually QUEST_ITEM_TYPE. Right?
 
I was wrong: questitems have already toss disabled. :onya
If WoodesRogers and GoldBug => toss disabled all my problems are over.
 
Maybe we should check for price = 0 as well? Because I think that applies to most quest items that aren't actually QUEST_ITEM_TYPE. Right?
But if they appear in any of my 2 stories the toss will be disabled anyway. And I think it's those items
that may have price = 0.
 
I was thinking of any important such items in Bartolomeu's storyline for example.
 
At the moment, I have no idea. I should check that :yes But for my next quest, I know there are some quest-items the player will have to have with him.
 
Very well, we'll put a check on Woodes Rogers and Gold-Bug and a price = 0. Then we will see what happens with those checks in place.
 
@Pieter Boelen if you do that please look for this line in smuggling.c
Code:
AddItem(itemindex,id, "",     13, 7,   0.05,  3,   0000, 0,   0, 0, 0,   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  1,  0,  1);

and replace it with:

Code:
AddItem(itemindex,id, "",     13, 7,   0.05,  3,   0001, 0,   0, 0, 0,   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  1,  0,  1);

So the patrolbook will have a price set at 1, it has skiptrade enabled so it wont still not show up in stores, but this way you can toss those books.
 
PROGRAM\INTERFACE\items.c find:
Code:
  SetNodeUsing("TOSS_BUTTON", true); //Levis
   SetSelectable("TOSS_BUTTON",true);
   if(!GetSelectable("B_QUEST")) { SetSelectable("TOSS_BUTTON", false); } //Levis
   if(itemARef.id == "bladeX4"){ SetSelectable("TOSS_BUTTON", false); } //Levis
   if(itemARef.id == "map"){ SetSelectable("TOSS_BUTTON", false); } //Levis
   if(itemARef.id == "cursedcoin"){ SetSelectable("TOSS_BUTTON", false); } //Levis
   if(itemARef.id == "albatross"){ SetSelectable("TOSS_BUTTON", false); } //Levis
Replace with:
Code:
  //Levis -->
   SetNodeUsing("TOSS_BUTTON", true);
   bool TossEnable = true;
   if(sti(GetStorylineVar(FindCurrentStoryline(), "WR_PUZZLES" )) > 0)   TossEnable = false; // JRH
   if(sti(GetStorylineVar(FindCurrentStoryline(), "BUG_PUZZLES")) > 0)   TossEnable = false; // JRH
   if(GetAttribute(itemARef, "price" == 0))               TossEnable = false; // PB
   if(GetAttribute(itemARef, "id"  == "bladeX4"))           TossEnable = false;
   if(GetAttribute(itemARef, "id"  == "map"))             TossEnable = false;
   if(GetAttribute(itemARef, "id"  == "cursedcoin"))           TossEnable = false;
   if(GetAttribute(itemARef, "id"  == "albatross"))           TossEnable = false;
   if(!GetSelectable("B_QUEST"))                     TossEnable = false;
   SetSelectable("TOSS_BUTTON",   TossEnable);
   //Levis <--
That seems to do the trick.
 
Nice! Here can also be added any standard items that for some reason shouldn't be tossable. Now that word exists.
 
Last edited:
Back
Top