• 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 Problem with gunner on deck

Jack Rackham

ex train dispatcher
Quest Writer
Storm Modder
Usually when going to deck of ship, gunner gives you ammo... on this version 85% of the time you have to go to sea mode to get the ammo automatically... only 10-15% of the time the gunner gives u ammo on ship deck.
As I remember it you had to go below deck to where the gunpowder storage is located for the Gunner to show up?
If you got one.

Tested one time and I saw no Gunner although I've got one. Not even 3D sailing mode and back helped.
Well I havn't changed anything. :shrug
 
The master @ arms changing to surgeon happened when I hired a new surgeon.
That particular master @ arms I hired a while before the new surgeon.. then suddenly he kept positioning himself as my surgeon and I had to change it back 3 times.



With regards to the gunpowder case.. in all versions whenever you go to ship deck (eg. from town then transport automatically to ship)... gunner gives the ammo.
But in this version it sometimes happens and most times you go to sailing mode (sea mode) for that to happen.



PS. If anyone interested in these error logs, i think something to do with the new officer class update:
RUNTIME ERROR - file: characters\characters.c; line: 133
Cant create class: NPCharacter
RUNTIME ERROR - file: characters\characters.c; line: 133
Cant create class: NPCharacter
 
Tested again being rank 6 and I had to go to 3D sailing mode and back to get ammo.
Never saw the Gunnert though. Looks like a change to me.
 
Tested again being rank 6 and I had to go to 3D sailing mode and back to get ammo.
Never saw the Gunnert though. Looks like a change to me.
As far as I'm aware, that is how you wrote it. I don't remember ever needing to see the Gunner.
Definitely not very new. :no
 
Something like rank 6 + a gunner means the gunner provides you with ammo when you visit your ship.
As I remember it the gunner came running on the cannon deck (and gave you the ammo).
Maybe that was a very early version. I can't remember you had to go into sailing mode for it to work.
 
It does work when you go to 3D sailing mode. Saw it yesterday while testing something else.
It has worked like that for many years now. I see no problem here.
I don't ever remember the Gunner personally handing you the ammo.
 
First: today I have very limited internet time as Caroline K is doing a "home examination" or what it's called.

I'm looking into the gunner problem and have found so far:

He gives you the wrong amount og musket bullets (easy to fix)
At least 1 time I got ammo (from an invisible gunner) by just going to the shipdeck (not sailing mode)
This was and is my intention. You visit the ship and restock. No need to sail for that to happen.

So I have to check if you have reloaded to the shipdeck or to sailing mode.
After that I cam finetune this. For example the gunner should give ammo to the officers as well I think.

And it can be discussed what to happen if you're < rank 6 or without a gunner. Maybe as it is.
If officers restock directly on shipdeck but not you it will only end up with you looting them I guess.

(The ablecaptain mod makes no difference. Does nothing.) I leave that for now.

Sorry for this hasty message. Now my internet time is over again.
 
No worries @Jack Rackham. It has been like this for several years. I'm sure we can stand it a while longer. ;)

If changes are going to be made to this, I'd like to see it done in such a way that we can add different officers providing different services in a similar way.
Visiting your DECK and having the gunner PERSONALLY supply the ammo would definitely be interesting.
Features like that is pretty much why I added the Visit Deck functionality when going from Port to Ship in the first place.
We just never got round to actually using it like that.

I also had the idea of the Bosun coming up to talk to you about various crew affairs, for example.
One day, perhaps....
 
What I'm trying at the moment is:

rank6 + gunner: he provides you and your officers with ammo just visiting the shipdeck
(so there's a difference - an advantage to have a gunner)

<rank6 or no gunner: like now go to sailing mode and all get ammo
OR go yourself to the gunpowder storage
here I want to add that the officers get ammo as well.
(because this almost more trouble than go to sailing mode and back again)

The visible gunner maybe can be added later?

I have fixed the SaoFeng guards. Comes later on.
 
What I'm trying at the moment is:
[...]
The visible gunner maybe can be added later?
Adding the visible gunner later certainly makes sense. Simple but intended functionality first. :cheeky

But do I understand correctly that you get auto-supplied with ammo either way?
But if you have a gunner, then it happens on your deck and otherwise in 3D sailing mode?
That sounds quite odd to me. Why not make this happen any time you reload to your deck AND to 3D Sailing mode?

And remove the rank requirement for simplicity; unless you want to check the rank OF THE GUNNER.
That'd be nice. :cheeky

I have fixed the SaoFeng guards. Comes later on.
:dance
 
There has to be a difference.
As it is now sailing mode gives all ammo. Gunner, rank or not. Also it's not consistent,
sometimes it happens already visiting the deck.

Gunner: I think it's most logical to get ammo direct (visit deck only).

No gunner: It should be harder but how hard? Do you have to go down and get it yourself from the GPS?
(and your mates at the same time) Is this too hard? This was my original idea.
 
There has to be a difference.
As it is now sailing mode gives all ammo. Gunner, rank or not. Also it's not consistent,
sometimes it happens already visiting the deck.
It seems that deck and 3D sailing mode are sometimes treated equally for some reason.
That is probably affecting @Talisman's false flag detection report too.

No gunner: It should be harder but how hard? Do you have to go down and get it yourself from the GPS?
(and your mates at the same time) Is this too hard? This was my original idea.
If you don't need to ever visit the powder store yourself, then what is the point of it even being there? :cheeky
 
I have found out how to check if you're just visiting the deck now.

If you don't need to ever visit the powder store yourself, then what is the point of it even being there? :cheeky
Well if anyone doesn't like it there's always the ablecaptain switch.
 
Well if anyone doesn't like it there's always the ablecaptain switch.
That's the spirit! But on default settings, I reckon you should need to visit the ammo locker yourself.

Actually.... I wonder if anyone ever does or know they can get stuff "for free" from there.
After all, you can get it from the merchants and loot it from enemies too, which are more common methods for players to notice.
 
I agree with @Pieter Boelen. The only reason I knew this was possible was because I saw a reference in the code.
Just have them go to the storage them selfs, when you have a gunner it could be automated.
 
Actually.... I wonder if anyone ever does or know they can get stuff "for free" from there.


I do xD - I never buy ammo from merchants

Looting corpses - you don't always get enough ammo to give you a full load. So when I don't have a gunner I always visit the ammo store in the cargo hold ( I tend to forget the others are there because not all ships have gun decks, but all ships have a cargo hold :yes.

In previous builds - when I had a gunner - my anmo was replenished automatically if needed every time I arrived on deck from a Port/Beach. Did not have to talk to or see anyone.

Now I have to wait till I go to 3D sailing mode for the on Screen Log Message and replenishment sound.

:doff
 
Ok done.

Gunner: you and your officers get ammo direct going to shideck. No sailing mode needed.

No gunner: you have to go to the GPS under deck and take ammo for yourself and your officers.
If you set ammomod_ablecaptain = 1 it will instead work like you have a gunner.
 
@Jack Rackham: Are you sure that new gunner code you wrote is quite correct?
I tried to make some adjustments and also simplified it quite a bit:
Code:
    case "gunner_ammo":
       bool tmpAbleRefill = false;
       if (CharacterHasOfficerType(pchar, OFFIC_TYPE_CANNONEER))   { tmpAbleRefill = true; }
       if (AMMOMOD_ABLECAPTAIN)                   { tmpAbleRefill = true; }

       if (tmpAbleRefill)
       {
         //PLAYER AND OFFICERS
         for(i = 0; i < 4; i++)
         {
           iOfficer = GetOfficersIndex(PChar, i);
           if(iOfficer < 0) continue;
           NPChar = GetCharacter(iOfficer);

           if(!CheckAttribute(NPChar,"equip."+GUN_ITEM_TYPE) )
           {
             //do nothing
           }
           else
           {
             weaponID2 = GetCharacterEquipByGroup(NPChar,GUN_ITEM_TYPE);
             Items_FindItem(weaponID2, &weapon2);
             if(CheckAttribute(weapon2, "shottype"))
             {
               if(weapon2.shottype == "pg2" || weapon2.shottype == "pg" || weapon2.shottype == "mb" || weapon2.shottype == "pb" || weapon2.shottype == "pb2")
               {
                 DeleteAttribute(NPChar,"Items.gunpowder");
                 DeleteAttribute(NPChar,"Items.pistolbullets");
                 DeleteAttribute(NPChar,"Items.pistolgrapes");
                 DeleteAttribute(NPChar,"Items.musketbullets");

                 if(CheckCharacterItem(NPChar,"powderbarrel")) { TakeNItems(NPChar,"gunpowder", (4 * MAX_GUNPOWDER)); }
                 else
                 {
                   if(CheckCharacterItem(NPChar,"powderflask")) { TakeNItems(NPChar,"gunpowder", (2 * MAX_GUNPOWDER)); }
                   else { TakeNItems(NPChar,"gunpowder", MAX_GUNPOWDER); }
                 }
                 if(CheckCharacterItem(NPChar,"ammobag")) { cc = (4 * MAX_SHOTS); }
                 else
                 {
                   if(CheckCharacterItem(NPChar,"ammopouch")) { cc = (2 * MAX_SHOTS); }
                   else { cc = MAX_SHOTS; }
                 }
                 //LogIt("cc = " + cc);

                 if(weapon2.shottype == "pg2" || weapon2.shottype == "pg")   { TakeNItems(NPChar,"pistolgrapes" , cc);  }
                 if(weapon2.shottype == "mb")                  { TakeNItems(NPChar,"musketbullets", cc/2); }
                 if(weapon2.shottype == "pb2" || weapon2.shottype == "pb")   { TakeNItems(NPChar,"pistolbullets", cc);  }
               }
             }
           }
         }
         Log_SetStringToLog(TranslateString("","Your shore party has been resupplied with Ammunition!"));
         PlaySound("INTERFACE\important_item.wav");
       }
     break;
Does that seem like a good idea to you?
 
Does that seem like a good idea to you?

Oh Pieter, I worked really hard to get 3 cases of stringlogs depending on if only pchar, any officer or both
had refilled their ammo. Tested it and yes I could have used bools instead. Worked both ways.

I have the same idea when you refill from the GPS yourself. I would prefer not to have it changed. If there's nothing wrong of course.
 
Back
Top