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

Quick-equip button

Pieter Boelen

Navigation Officer
Administrator
Storm Modder
Hearts of Oak Donator
It worked fine before, but apparently, in NK's newest fleets050511 codebase, my quick-equip code doesn't work properly anymore. It works as long as you don't want to equip your blade, gun and spyglass at once. Then it says you don't have anything to equip. And I haven't got the slightest idea why it shouldn't work anymore because the exact same code did work before.
<img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/modding.gif" style="vertical-align:middle" emoid=":modding" border="0" alt="modding.gif" /> AAAAAAAAARRRRRRRRRRGGGGGGGGGGGHHHHHHHHHHHH!!!!!!!!!!!!!! <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/modding.gif" style="vertical-align:middle" emoid=":modding" border="0" alt="modding.gif" />
 
That's odd...
I'll have a look--yes, one of the things in the pack is a rewritten FindCharacterItemByGroup() so that's how it got borked. Not that I know _why_ it messes fastequip up...
 
It does work about half. It only doesn't work if you want to equip your third item. So if you want to equip everything at once, it says you don't have anything to equip (even if you do). If you, for example, just have your blade and spyglass, it'll work fine. Then, if you get your gun, it'll say you don't have a gun to equip. So only the final equip causes trouble; apparently no matter what the final equip is. And the equip-all doesn't work either.
BTW: I noticed that sometimes, in your new code, it says &PChar, where usually it said just PChar.
<span style='color:red'>Edit:</span> This doesn't seem to be exactly true. But is seems like something is SERIOUSLY wrong with gun-equipping. Which might also explain why the gunsmith says "Equip a gun, a proper gun", while still showing the gun upgrade options. And when choosing one of the options, he does de-equip your gun, but doesn't fix it.
<img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/modding.gif" style="vertical-align:middle" emoid=":modding" border="0" alt="modding.gif" /> AAAAAARRRRRRGGGGGHHHHH!!! <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/modding.gif" style="vertical-align:middle" emoid=":modding" border="0" alt="modding.gif" />
 
The & is to make sure PChar is passed as a writable reference, not just a copy. Occasionally when you pass a ref it gets sent as a copy instead, so I add the & to make sure.
Sorry, I skipped town and didn't get to actually fix this. :\
I'll get to it ASAP.
 
Back
Top