• 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 Custom Quest Musket

Is "LongRifle" really right?
The way I made it there were LongRifle_C and LongRifle_CT for most storylines.
 
The part "HasSubStr(weaponID, "LongRifle")" returns true for ALL Long Rifles, because it checks if "LongRifle" is anywhere in the weapon ID.
It is for all of them, so that is OK. Since I want "LongRifle_BT" to be an exception to the default behaviour, I added an extra check on that.
Then I set weaponID to "LongRifle" internally in that function so that they all behave the same, without me needing to make a separate case for each one.
I'm just lazy that way.... :wp
 
Marking this as "Solved" as the feature itself seems to be operation.

@Jack Rackham's further improvements are always welcome though, of course. :doff
 
Could we have them so you can put them in the Ship Chest?
They aren't quest items, so that should be allowed. Maybe their price is zero, messing things up?

There was an issue that I received the Telescopic sight from the priest before I picked up the rifle. This resulted in it being selected as my best gun when using the keypad number 2 and I had to manually select the pistol every time after.
Maybe the minlevel for the telescopic sight is the same as for the rifle itself; that would mess up the Quick-Equip keys.
Setting it to minlevel 1 should be a simple fix to that one.

Would also be nice to have this weapon be able to kill the immortal skeletons that are spawned when digging for treasure in the crypt as well - gives the rifle a definite purpose.
I like that idea! Bit similar to Blackbeard who can only be killed by being poisoned.
Would need to look into that, but now I definitely want to make that happen. Makes sense in the context of how you get it too. :yes
 
have to have lots of shovels as well as they break properly now) and run away a lot.
In the Maltese Knight Abbey?
Indeed I fixed that functionality a while ago when I was doing that "shotgun kills skeleton" update for you and noticed that didn't actually work as intended anymore.
 
My error Pieter - I was indeed the Abbey of the Maltese Order - not the Crypt. Did the shotgun kills the skeleton code change work with the new rifle you collect from the dead guy or do you need to get the telescope and come back? I don't seem able to kill them yet.
 
Did the shotgun kills the skeleton code change work with the new rifle you collect from the dead guy or do you need to get the telescope and come back? I don't seem able to kill them yet.
Any gun in First Person Mode should actually do it. So that does indeed require the telescope for the Long Rifle.
 
I noted that if you have the telescope (separated from the rifle but not the rifle in your inventory) and press the 2 key to equip the best gun, the game equips the telescope in lieu of the excellent horse pistol.

probably not a normal scenario but I tested it anyway by putting the rifle in the ships chest and received the telescope the next landfall.
 
I noted that if you have the telescope (separated from the rifle but not the rifle in your inventory) and press the 2 key to equip the best gun, the game equips the telescope in lieu of the excellent horse pistol.
Still? But I fixed that in PROGRAM\Characters\CharacterUtilite.c!
Code:
string FindCharacterItemByGroup(ref chref, string groupID)
{
   // TIH --> new method that uses the blade/guns sorted arrays Aug24'06
   if(!CheckAttribute(chref,"items")) return "";

   int i,n;
   int itmqual;
   int high = -1;
   string highid = "";
   string curId = "";

   aref chit; makearef(chit, chref.items);
   for(i = GetAttributesNum(chit)-1; i >= 0; i--)
   {
     aref refItm;
     curId = GetAttributeName(GetAttributeN(chit, i));
     n = Items_FindItem(curId,&refItm);// returns item index and fills aref refItm

     // check to see if this item is even something we can bother with selecting
     if ( n < 0 )                  continue;// invalid item
     if ( !CheckAttribute(refItm,"id") )      continue;// no valid id
     if ( !CheckAttribute(refItm,"groupID") )    continue;// no valid groupid
     if ( refItm.groupID != groupID )        continue;// not what we are looking for, move along now
     if ( refItm == "telescope")          continue;// PB: do not find this for auto-equipping!

That should work as that is the function that is called from seadogs.c:
Code:
    case "BI_ChargeGrapes":
     // PB: Equip [Regular Gun]
       if(CheckCharacterItem(Pchar,FindCharacterItemByGroup(&PChar, GUN_ITEM_TYPE)))
       {
// KK -->
         newitm = FindCharacterItemByGroup(PChar, GUN_ITEM_TYPE);
         EquipCharacterByItem(&PChar, newitm);
         logstr = GetItemQualityName(GetItemQualityByID(newitm));
         if (logstr == "")
           logstr = " ";
         else
           logstr = " " + logstr + " ";
         Logit(TranslateString("","You equipped") + logstr + GetItemNameByID(newitm) + ".");
// <-- KK
       } else {
         Logit(TranslateString("","You don't have a regular gun to equip."));
       }
       break;

:modding :modding :modding
 
Pieter, you cannot equip the telescope from the Inventory screen but the other (pressing 2on the keyboard) still works in my game - I am wondering if this is a problem with my installation as I am still working my way through to test the previous issues that I had (but you didn't) before starting a new game.
 
Do you have a save just prior to the telescope being auto equipped?
Then at least I can check what is going on as well.
 
Back
Top