• 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 Coast Raider Captains Receive No Weapons

ANSEL

Corsair
Storm Modder
Hearts of Oak Donator
Udklip.PNG After installing Levis new Zip Captains are unarmed. One ship surrender and the captain
was unarmed, have to kill him and loose reputation. Board another ship, captain unarmed
again. Then the game crash down.
 

Attachments

  • error.log
    2.5 KB · Views: 195
  • compile.log
    55 KB · Views: 196
  • system.log
    7 KB · Views: 166
When you loot the captain, did he have any weapons on him?

I know @Levis has been updating some related code, so he would probably need to look at this.

There should be a fix for those "missed attribute: group" reports in my next upload.
Though that one may take a while to update for all Coast Raiders, because they need to be regenerated first.
 
Also, if you can double-check this on my recent full EXE version, that would be very welcome:
Mod Release - Build 14 Beta 4 Internal WIP For Testing | PiratesAhoy!
I have now run a check with the new exe. The captains of the coastguard are still unarmed.
The captain on the questship are armed with a poor blade and a musket with bayonet, but
fight with his fist. I dont think a captain at sea should be armed with such weapons, the
captain at a ship ought to be the one with the best sword on board. The musket with a bayonet
is an infantry weapon, a soldiers gun, I dont think it belongs to a ships armor.
PS. this test are done with my old save game, I dont start a new game, after installing the new exe.
I can do that if you want me to do it.
 
I started a new game , same problems unarmed captains.
 

Attachments

  • error.log
    3.7 KB · Views: 177
  • system.log
    19.6 KB · Views: 141
I dont think a captain at sea should be armed with such weapons, the
captain at a ship ought to be the one with the best sword on board. The musket with a bayonet
is an infantry weapon, a soldiers gun, I dont think it belongs to a ships armor.
True. The related code does need changing at some point to hand out weapons a bit more appropriately.
See here for some related discussion: Unconfirmed Bug - Ships' captains don't use muskets | PiratesAhoy!

I have now run a check with the new exe. The captains of the coastguard are still unarmed.
But did you loot any weapons from their corpses or not?
I'd like to know if they don't get ANY weapons or if they just don't equip them.

Also, those error.log entries probably should be looked at by @Levis.
He has been doing some work related to "using health items" in addition to some equip/weapon code.
 
Actually, it just occurred to me that this could be related to the "CTD prevention" changes I made. Maybe. Perhaps.

Might I ask if these were ships encountered around islands or from the worldmap? Or does it not matter and it applies to both?

@Levis, does 'InitAutoSkillsSystem' in any way call a function that hands out weapons?
Because I see no "give weapons and equip" function anymore between 'ClearCharacter' and the end of the function where the captains are created.

Actually, now that they get NO weapons anymore, that might make it easier to give them the weapons we want.
The stupidly simplest solution would be to call 'GiveSoldierWeapon' for all ship captains.
That would mean that every single captain of a certain nation will ALWAYS get the same weapons (same that a soldier would get).

Of course that is rather boring and DOES hand out muskets and such.
Maybe a variation of that function called 'GiveCaptainWeapon' would be needed?

I think effectively the game doesn't know about any difference between a "musket" and a "regular pistol".
So I don't know how to hand out only regular pistols and avoid the more serious ones.

Perhaps that should be added in some way. For example, the blunderbuss and musketoon ARE meant for ship-to-ship action, while an actual musket is not.
Especially not the type that gets a bayonet, which is mainly a land battle weapons. I think....
 
Might I ask if these were ships encountered around islands or from the worldmap? Or does it not matter and it applies to both?
The ships I have been talking about is encountered around islands, ships encountered from the worldmap Im
not sure about those, next thing to have a look at for me.
 
The ships I have been talking about is encountered around islands, ships encountered from the worldmap Im
not sure about those, next thing to have a look at for me.
Will be interesting to know if there is a difference as they're generated in different parts of the code.
I recently rewrote the Coast Raiders part to prevent CTDs, but maybe I "missed a spot".
 
@Pieter Boelen the post init only calls equipment code. So the weapons have to be given to them already.
Captains aren't created as fantom characters so probably it isn't called for them indeed.
I think you should call:
"LAi_NPC_Equip" for them. That should give them the rigt weapons :).
 
The issue might be that 'LoadShipsToSea' in sea.c does a whole bunch of extra things that probably are being skipped for "Coast Raiders".

This may require some more thought.... :facepalm
 
[
Will be interesting to know if there is a difference as they're generated in different parts of the code.
I recently rewrote the Coast Raiders part to prevent CTDs, but maybe I "missed a spot".
Captains on ships encountered from the worldmap are well armed.
 
Captains on ships encountered from the worldmap are well armed.
Thanks! I think that narrows down the problem quite clearly.

Probably the 'SetCoastTraffic' function needs to have some stuff from 'LoadShipsToSea' included in it.
Extract attached to PROGRAM\SEA_AI and see if that helps. This adds @Levis' suggestion.

If at all possible, I do think we should try to get some uniformity between "worldmap encounters" and "Coast Raiders" though.
Why would they be generated completely independently in 100% different ways?
Could be quite samey-samey, no? :confused:
 

Attachments

  • sea.zip
    16.7 KB · Views: 144
in the January 10 Version about half the time when you get to the captain during boarding, about half the time he is unarmed and won't talk to you. So the only thing you can do to avoid being stuck here is draw your sword and kill him and take very significant reputation hits.
 
Back
Top