• 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 Early weapons in late periods

Grey Roger

Sea Dog
Staff member
Administrator
Storm Modder
I've been seeing wheellock pistols, both standard single and ornate pair, for sale from street merchants, along with arquebuses and knife bayonets.

Nothing wrong with that, except that this is "Revolutions" period and those weapons shouldn't exist beyond "Spanish Main".
 
So they do have their correct periods set in initItems.c, but they show up afterwards anyway? :facepalm
 
I was afraid of that. Agh! Another thing to be looked into. :(

Later....
 
This one especially @Jack Rackham, but also possibly @Sulan as I seem to remember he originally did the Periods Weapons mod.
Not a game stopping issue, but certainly odd.
 
Has anyone encountered any of the following items outside their intended periods as per below list?
Marked in red are the ones @Grey Roger reported seeing in Revolutions.

Pistol (Wheellock) - Should appear in Early Explorers>The Spanish Main only
Pair of Pistols (Wheellock) - Should appear in Early Explorers>The Spanish Main only

Short Musket - Should appear in Early Explorers>The Spanish Main only
Arquebus - Should appear in Early Explorers>The Spanish Main only
Musket with Bayonet (Gun) - Should appear in Revolutions>Napoleonic

Musket with Bayonet (Blade, Socket Bayonet) - Should appear in Revolutions>Napoleonic
Musket with Bayonet (Blade, plug-in Knife as Bayonet) - Should appear in Golden Age of Piracy>Colonial Powers
Knife Bayonet (Blade) - Should appear in Golden Age of Piracy>Colonial Powers
 
In Tales of Sea Hawk I have found wheellock pistol, single and pair, musket with plug-in Bayonet too.
I think that it can be not a bug. Please consider that we are acting in an peripheral area.
Caribbean are not Paris, Madrid or London. Old (but perfectly useful) weapons can be found in merchant's stock; moreover, if you have to shoot only one ball, it is tantamount to use a wheellock instead of a flintlock one.
Old weapons can appear with less frequency and be cheaper, maybe, but, not too many years after the Treaty of Utrecht and in not too rich areas they can still be found easily, I guess.
 
In Tales of Sea Hawk I have found wheellock pistol, single and pair, musket with plug-in Bayonet too.
I think that it can be not a bug. Please consider that we are acting in an peripheral area.
While it may be explained on a historical basis, if you saw it too, it IS a bug because the code was written to not allow that.

Which makes this very strange indeed. Are there any OTHER weapons that are appearing outside their intended periods?
 
In Tales of the Sea Hawk - I have found these:-

I have also seen the Wheellock pistols mentioned. :yes


:doff
 

Attachments

  • PotC_ Short Musket.jpg
    PotC_ Short Musket.jpg
    266.9 KB · Views: 111
  • PotC_Arquebus.jpg
    PotC_Arquebus.jpg
    259.9 KB · Views: 83
This is confirmed and needs to be fixed. As @Levis is busy doing other things, I suppose it falls to me to have a look into it.

Unless @Jack Rackham has any clue on this one, that is....
 
I have no idea but here are the files where "lastperiod" is mentioned:

itemlogic: line 2157, 2222 (spawn items ...)
LAi_equip: line 50, 141 (npc equip)
items_utilite: line 1918 (items to trader) I think this line looks suspect, shouldnt it be firstperiod || lastperiod?
 
@Baddy and @Talisman: Can you confirm if you saw these items ONLY in the "item trading" interface or also as random items in chests or used by NPCs?

items_utilite: line 1918 (items to trader) I think this line looks suspect, shouldnt it be firstperiod || lastperiod?
That must indeed be the relevant file as that is the one that deals with giving items to traders.

Here is the relevant section of code:
Code:
    // Sulan: weapons periods -->
     int currentPeriod = GetCurrentPeriod();
     if(CheckAttribute(itm,"firstperiod"))
     {
       if(currentPeriod<sti(itm.firstperiod) || currentPeriod>(itm.lastperiod))
       {
         TakeNItems(&ch, itm.id, itmqty*-1); // remove those items from the list
         continue;  // and continue with the next item
       }
     }
     // Sulan: weapons periods <--
Usually "firstperiod" and "lastperiod" are defined together, so apparently it was assumed that if it has one of the two, it must have the other one too.
It does look a bit odd like that though; here is an alternate suggestion:
Code:
    // Sulan: weapons periods -->
     int currentPeriod = GetCurrentPeriod();
     if( currentPeriod < sti(GetAttribute(itm,"firstperiod")) || currentPeriod > sti(GetAttribute(itm,"lastperiod")) )
     {
       TakeNItems(&ch, itm.id, itmqty*-1); // remove those items from the list
       continue;  // and continue with the next item
     }
     // Sulan: weapons periods <--
 
That section I posted above had some unintended side-effects, so I rewrote it to this:
Code:
    // Sulan: weapons periods -->
     int currentPeriod = GetCurrentPeriod();
     itmqty = GetCharacterItem(&ch, itm.id);
     if(CheckAttribute(itm,"firstperiod") && currentPeriod<sti(itm.firstperiod))
     {
       TraceAndLog("Remove " + itm.id + " from trader because of Periods Mod: Should not yet appear!");
       TakeNItems(&ch, itm.id, itmqty*-1); // remove those items from the list
       continue;  // and continue with the next item
     }

     itmqty = GetCharacterItem(&ch, itm.id);
     if(CheckAttribute(itm,"lastperiod") && currentPeriod>sti(itm.lastperiod))
     {
       TraceAndLog("Remove " + itm.id + " from trader because of Periods Mod: Should no longer appear!");
       TakeNItems(&ch, itm.id, itmqty*-1); // remove those items from the list
       continue;  // and continue with the next item
     }
     // Sulan: weapons periods <--
That resulted in:
Code:
Remove pistol11+2 from trader because of Periods Mod: Should no longer appear!
Remove pistol12-1 from trader because of Periods Mod: Should no longer appear!
Remove pistol12 from trader because of Periods Mod: Should no longer appear!
Remove pistol12+1 from trader because of Periods Mod: Should no longer appear!
Remove pistol12+2 from trader because of Periods Mod: Should no longer appear!
Remove pistol13 from trader because of Periods Mod: Should no longer appear!
Remove Arguebuse from trader because of Periods Mod: Should no longer appear! // <-------- SEE HERE ------------
And indeed I did not see the "Arguebuse" in the Item Trade Interface. :no

So I think this should be "Fixed" now?
 
I have seen them in stores - not sure about chests or NPC's

I know I have collected muskets off dead bodies - but I can't remember if it is the version that should be there, since I am playing Colonial Powers period.

I will keep a look out.

:drunk
 
I have seen them in stores - not sure about chests or NPC's
Doubly confirmed, then. Nobody noticed seeing them anywhere other than stores.
So with the above change, I confirmed this fixed for the "Arguebuse", so I assume that extends to those other items too.
 
Back
Top