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

Switching off Item period related availability

KillPhil

Corsair
Storm Modder
I was wondering if you build-in such a nice little switch like on the beginning of ships_init.c ? I really would like to have some guns which are not avaible any more in the period of my game
 
There is no switch, but it is easy enough anyway. In initItems.c find this section:
Code:
  //---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  // GUNS: ItemIndex  picIndex  Price  Charges
  //  | gunID  modelID  |  rare  | minDamage  Accuracy|Reload time  DisableWeaponsMod
  //  |  |  |  picTexture|  |  MinLevel  |  | maxDamage  |  |  | Nation  Sound  Ammo type  |  Available in period  Last period of availability
  //-------------|-------------|------------------|---|---|------|------|-----|-----|------|--|---|--|------------------|-------------------|--------|---------------|----------------------------|-----------------
  n = InitGun(n,"pistol1", "pistol1",  6,  1, 0.50,  1,  150, 15.0, 25.0,  5, 1,  8, "", "OBJECTS\DUEL\pistol_small.wav",  "pb",  0,  PERIOD_EARLY_EXPLORERS,      PERIOD_NAPOLEONIC);  // Short Pistol//BB BASE FOR PISTOLS
  n = InitGun(n,"pistol2", "pistol2",  6,  2, 0.50,  4,  208, 40.0, 60.0,  50, 1, 12, "", "OBJECTS\DUEL\pistol_medium.wav", "pb",  0,  PERIOD_EARLY_EXPLORERS,      PERIOD_NAPOLEONIC);  // Long Pistol//BB small calibre(less dmg)+good accuracy
  n = InitGun(n,"pistol7", "pistol7",  9,  1, 0.20,  5,  357, 15.0, 25.0,  5, 3, 25, "", "OBJECTS\DUEL\pistol_small.wav",  "pb",  0,  PERIOD_EARLY_EXPLORERS,      PERIOD_NAPOLEONIC);  // Brace of Small Pistols (Alan Smithee)
  n = InitGun(n,"PiratesPistol","PiratesPistol", 22, 10, 0.20,  7,  554, 30.0, 60.0,  50, 1, 10, "", "OBJECTS\DUEL\pistol_medium.wav", "pb",  0,  PERIOD_THE_SPANISH_MAIN,  PERIOD_NAPOLEONIC);  // Pirates Pistol (SuperDurnius)
  n = InitGun(n,"pistol6", "pistol6",  6,  6, 0.05,  9,  1026, 30.0, 40.0,  55, 2, 20, "", "OBJECTS\DUEL\pistol_medium.wav", "pb",  0,  PERIOD_GOLDEN_AGE_OF_PIRACY, PERIOD_NAPOLEONIC);  // Double-Shot Pistol
  n = InitGun(n,"pistol3", "pistol3",  6,  3, 0.37,  11,  1402, 30.0, 60.0,  30, 1, 20, "", "OBJECTS\DUEL\pistol_grape.wav",  "pg",  0,  PERIOD_GOLDEN_AGE_OF_PIRACY, PERIOD_NAPOLEONIC);  // Grapeshot Pistol
  n = InitGun(n,"pistol8", "pistol8",  9,  3, 0.15,  20,  1500, 30.0, 60.0,  50, 3, 10, "", "OBJECTS\DUEL\pistol_medium.wav", "pb",  0,  PERIOD_THE_SPANISH_MAIN,    PERIOD_NAPOLEONIC);  // old Brace of Mid-size Pistols (Alan Smithee) now brace of flintlock pistols (JRMM)
  n = InitGun(n,"pistol4", "pistol4",  6,  4, 0.05,  15,  2286, 20.0, 30.0,  60, 4, 35, "", "OBJECTS\DUEL\pistol_small.wav",  "pb",  0,  PERIOD_REVOLUTIONS,  PERIOD_NAPOLEONIC);  // Quad-Barrel Pistol
  n = InitGun(n,"pistol5", "pistol5",  6,  5, 0.10,  16,  2653, 50.0,150.0,  70, 1, 14, "", "OBJECTS\DUEL\pistol_big.wav",  "pb",  0,  PERIOD_GOLDEN_AGE_OF_PIRACY, PERIOD_NAPOLEONIC);  // Horse Pistol (was Scrapper Pistol)
  n = InitGun(n,"pistolmtoon", "musketoon_back",  8,  9, 0.08,  17,  2968, 75.0,125.0,  60, 1, 24, "", "OBJECTS\DUEL\pistol_mtoon.wav",  "pg2",  1,  PERIOD_GOLDEN_AGE_OF_PIRACY, PERIOD_NAPOLEONIC);  // JRH: model was Musketoon
  n = InitGun(n,"pistol9", "pistol9",  9,  2, 0.10,  30,  5000, 50.0,150.0,  70, 2, 28, "", "OBJECTS\DUEL\pistol_big.wav",  "pb",  0,  PERIOD_GOLDEN_AGE_OF_PIRACY, PERIOD_NAPOLEONIC);  // old Brace of Large Pistols (Alan Smithee) now brace of Horse Pistols (JRMM)
  n = InitGun(n,"pistolmket",  "musket_back",  8, 10, 0.05,  20,  3245,150.0,250.0,  60, 1, 30, "", "",           "mb",  1,  PERIOD_GOLDEN_AGE_OF_PIRACY, PERIOD_NAPOLEONIC);  // JRH: model was Musket, sound played in LAi_events
  n = InitGun(n,"pistol10", "pistol10",  "JD",  5, 0.02,  99,  6572, 60.0, 90.0,  60, 1,  1, "", "OBJECTS\DUEL\pistol_shotgun.wav","pg",  1,  PERIOD_EARLY_EXPLORERS,  PERIOD_NAPOLEONIC);  // Pump Shotgun SLiB  LDH fix sound error
  n = InitGun(n,"pistol25", "pistol5",  24,  9, 0.02,  54,  9999, 50.0,150.0,  70, 4, 14, "", "OBJECTS\DUEL\pistol_big.wav",  "pb",  0,  PERIOD_GOLDEN_AGE_OF_PIRACY, PERIOD_NAPOLEONIC);  // Brace of four Horse Pistols (JRMM)
  n = InitGun(n,"pistol26", "pistol26",  24, 10, 0.02,  24,  9999, 30.0, 60.0,  30, 4, 35, "", "OBJECTS\DUEL\pistol_grape.wav",  "pg",  0,  PERIOD_NAPOLEONIC,     PERIOD_NAPOLEONIC);  // Four-barrel Grapeshot Pistol (JRH)
  n = InitGun(n,"pistolbow", "bow",  "BOP",  1, 0.00,  1,  20, 30.0, 40.0,  80, 1, 1.5,"", "OBJECTS\DUEL\bow.wav",  "ar",  1,  PERIOD_EARLY_EXPLORERS,  PERIOD_NAPOLEONIC);  // Bow (BOP)
  n = InitGun(n,"LongRifle_C", "LongRifle_C_back", "BOP2",11,0.00,99,  1, 50.0,150.0,  20, 1, 30, "", "OBJECTS\DUEL\pistol_medium2.wav","pb2",  1,  PERIOD_EARLY_EXPLORERS,  PERIOD_NAPOLEONIC);  // JRH: Long Rifle for All Storylines
  n = InitGun(n,"LongRifle_CT","LongRifle_CT_back","BOP2",12,0.00,99,  1,150.0,250.0,  80, 1, 30, "", "OBJECTS\DUEL\pistol_medium2.wav","pb2",  1,  PERIOD_EARLY_EXPLORERS,  PERIOD_NAPOLEONIC);  // JRH: Long Rifle for All Storylines, with telescope
  n = InitGun(n,"telescope",  "",      "BOP2", 9,0.00,99,  1,150.0,250.0,  80, 1, 30, "", "",  "",  1,  PERIOD_EARLY_EXPLORERS,  PERIOD_NAPOLEONIC);  // JRH: Telescope
  n = InitGun(n,"LongRifle_BT","LongRifle_BT_back","BOP2",10,0.00,99,12000,150.0,250.0,  80, 1,  1, "", "OBJECTS\DUEL\pistol_medium2.wav",  "",  1,  PERIOD_EARLY_EXPLORERS,  PERIOD_NAPOLEONIC);  // JRH: Custom quest musket for BOP, with telescope
  n = InitGun(n,"LongRifle_W", "LongRifle_W_back", "BOP2", 7,0.00,99,  0,150.0,250.0,  80, 1, 30, "", "OBJECTS\DUEL\pistol_medium2.wav", "pb2",  1,  PERIOD_EARLY_EXPLORERS,  PERIOD_NAPOLEONIC);  // JRH: Custom quest musket for WR
  n = InitGun(n,"LongRifle_WT","LongRifle_WT_back","BOP2", 8,0.00,99,  0,150.0,250.0,  80, 1, 30, "", "OBJECTS\DUEL\pistol_medium2.wav", "pb2",  1,  PERIOD_EARLY_EXPLORERS,  PERIOD_NAPOLEONIC);  // JRH: Custom quest musket for WR, with telescope
 
  n = InitGun(n,"pistol11", "pistol11",  "JRH28",  6, 0.15,  4,  750, 40.0, 60.0,  80, 1, 12, "", "OBJECTS\DUEL\pistol_medium.wav", "pb",  0,  PERIOD_EARLY_EXPLORERS,  PERIOD_THE_SPANISH_MAIN);   // JRH: wheellock
  n = InitGun(n,"pistol12", "pistol12",  "JRH28",  7, 0.05,  9,  1500, 40.0, 60.0,  80, 2, 24, "", "OBJECTS\DUEL\pistol_medium3.wav","pb",  0,  PERIOD_EARLY_EXPLORERS,  PERIOD_THE_SPANISH_MAIN);   // JRH: wheellock expensive pair
  n = InitGun(n,"pistol13", "pistol13_back","JRH28",  8, 0.10,  14,  2000, 75.0,125.0,  80, 1, 24, "", "OBJECTS\DUEL\pistol_medium.wav", "pb2",  1,  PERIOD_EARLY_EXPLORERS,  PERIOD_THE_SPANISH_MAIN);   // JRH: Short wheellock musket
  n = InitGun(n,"Arguebuse", "Arguebuse_back",  "JRH28", 1, 0.15,17,2000,100.0,200.0,  40, 1, 24, "", "OBJECTS\DUEL\pistol_big2.wav",  "mb",  1,  PERIOD_EARLY_EXPLORERS,  PERIOD_THE_SPANISH_MAIN);   // JRH: Arguebuse
  n = InitGun(n,"pistolmketB",  "musketB_back",  "JRH28", 4, 0.05,20,4000,150.0,250.0,  60, 1, 30, "", "",           "mb",  1,  PERIOD_REVOLUTIONS,  PERIOD_NAPOLEONIC);      // JRH: Musket with bayonet, sound played in LAi_events
Replace the "PERIOD_" sections with whatever you want, then press F11 on your savegame.
I think that should work. :doff
 
Ok, I thought that there is a simple switch like 0 and 1. Well it isn't that bad, since there arent that many guns which I need to edit.

By the way, if you ever wondered: PotC doesn't care how many bullets your gun holds. If you have more than 4, it simply adds more bullet icons next to the character portraits xD
 
Yes I know. If I did know how to arrange those bullets 4 and 4 I should have fixed it.
At the moment I think 6 is what POTC accepts. (quest pistol20)
 
Ok, I thought that there is a simple switch like 0 and 1.
Nobody ever asked for one, so nobody ever bothered to add one. ;)

If you really want to disable ALL period code for items, it can probably be done with a single toggle somewhere completely different.
But since you mentioned wanting to enable only specific weapons in your game, I figured I'd suggest this approach instead as it allows far more control.
 
I think then somewhere in LAi_equip.c perhaps is the code responsible. It is just one section and you could just comment that out.
Of course you can accomplish the same thing with the method I suggested earlier; won't make a difference for the final result. ;)
 
Back
Top