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

Feature Request Soldier Weapon Types During Boarding

Pirates shouldn't matter. In one version of "LAi_boarding.c" at least, soldier weapons are skipped if the nation is "PIRATE". Pirates shouldn't be using standard weapons, they use whatever they stole from someone else. But if they do use standard weapons, the Dragon's Head is a rare, powerful sword which you can get three ways. You can join the Brethren of the Coast and be promoted to level 3. You can take it from the dead hands of one or two captains. Or now you can just kill any regular pirate. ;)
Good catch.
Indeed Pirate boarding crews won't pass through this function anyway, so it probably doesn't matter.
But your suggestion does sound better. :onya

Likewise, the Crab Claw broadsword is described in "initItems.c" as "rare+'fantasy' blade" and in "ItemsDescribe.txt" as "Ancient and rare". This is why I didn't suggest it as suitable for a general Portuguese weapon. ;)
Your alternate is fine by me. :doff

Why give Spain the more powerful tizona in earlier periods and the light tizona later? It's available in all periods, so you could use it for all periods.
Mainly just to distinguish between the two periods. Otherwise it'd be a bit samey-samey.
But either way can work, so whatever you prefer.

Having musketoons as general issue firearms is perhaps not a good idea. The guy in front is going to be engaged in close combat pretty quickly, which means it's the guy at the back who will fire his musketoon, much to the annoyance of the guy in front. Also, firearms in general are now more dangerous due to the reduced effect of armour on firearms, so giving the opposition area effect weapons as standard is likely to make boarding much nastier. Perhaps use "pistol2" (duelling pistol, available in all periods) for early times and "pistol8" (brace of flintlock pistols) for later. Besides, the opposition don't always get to use their guns before they are in close combat, so giving them good guns will either make boarding too nasty or give the player a lot of free guns if he wins the sword fights.
I always understood Musketoons are basically intended as "boarding-purpose version of the musket". So that's why I figured it'd make sense to put it to use there.
While you're right that the "area damage" will definitely cause some serious mayhem, I wonder if there might not be an alternate solution.
For example, ensuring every character in the boarding starts on his own side so that you don't begin already in a close quarters situation.

So if at all possible, I would like to use the musketoons.
But for the time being, it may be more wise to stick with your suggested alternate instead, so that's what I'll do.
I'll leave the musketoon line in place, but out-commented, just in case ever we can make use of it as it was meant to.
 
I always understood Musketoons are basically intended as "boarding-purpose version of the musket". So that's why I figured it'd make sense to put it to use there.
While you're right that the "area damage" will definitely cause some serious mayhem, I wonder if there might not be an alternate solution.
For example, ensuring every character in the boarding starts on his own side so that you don't begin already in a close quarters situation.
That may not be possible unless you reduce the choice of boarding decks. It works on really large decks such as if you board a man of war, or on decks which show two ships alongside each other, and indeed already happens on most of them. The exception is the one you get if you board something like a frigate, in which case you and your officers (or some of your crew if you don't have three officers) are on one ship, the rest of your crew are on the other ship, and everyone has opponents to fight right away. That one could perhaps be rearranged so everyone on one side starts on one ship.

But there are also decks in which only one ship is shown. There may not be enough locators, or enough physical space, to have everyone separate at the start.

Meanwhile, I reached the point in "Ardent" when I have to board the payroll ship. As usual I saved game before starting the attack. First time, one of my officers got killed and then so did I. Second time, we won without loss other than a couple of expendable crew. So giving all the payroll ship's crew light tizona and brace of flintlock pistol had little effect apart from giving me a lot of light tizonas and braces of flintlock pistols to hand out to officers, crew, or the next street trader - it was about as difficult as before.

And in "Tales of a Sea Hawk", I'm in a flushdeck frigate with more crew of higher morale than the fast merchantman I boarded. I'm also pretty high level now. So, even though the relative crew strength is well in my favour, the opposition mostly had the likes of backblade swords and Venetian cutlasses. They didn't always have these - early in the game when I was below the minlevel for such swords, they had lower grade weapons too. (Fast merchantmen are nice targets for low level pirates - relatively weak crew compared to the likes of a pinnace, especially after a few broadsides of grapeshot, but plenty of cargo to loot. :rpirate)
 
That may not be possible unless you reduce the choice of boarding decks. It works on really large decks such as if you board a man of war, or on decks which show two ships alongside each other, and indeed already happens on most of them. The exception is the one you get if you board something like a frigate, in which case you and your officers (or some of your crew if you don't have three officers) are on one ship, the rest of your crew are on the other ship, and everyone has opponents to fight right away. That one could perhaps be rearranged so everyone on one side starts on one ship.
Rearranged locators on that one should definitely help there. :yes

But there are also decks in which only one ship is shown. There may not be enough locators, or enough physical space, to have everyone separate at the start.
Can those be the FIRST deck in a boarding? What I have seen sometimes is that you get a ship-vs-ship first and then a single-ship outside deck afterwards.
If there is always a "vs" deck first, then we could have the soldiers with Musketoons only on that deck and switch to sailors with random weapons on the next ones.

Meanwhile, I reached the point in "Ardent" when I have to board the payroll ship. As usual I saved game before starting the attack. First time, one of my officers got killed and then so did I. Second time, we won without loss other than a couple of expendable crew. So giving all the payroll ship's crew light tizona and brace of flintlock pistol had little effect apart from giving me a lot of light tizonas and braces of flintlock pistols to hand out to officers, crew, or the next street trader - it was about as difficult as before.
That's not too bad then, is it?

And in "Tales of a Sea Hawk", I'm in a flushdeck frigate with more crew of higher morale than the fast merchantman I boarded. I'm also pretty high level now. So, even though the relative crew strength is well in my favour, the opposition mostly had the likes of backblade swords and Venetian cutlasses. They didn't always have these - early in the game when I was below the minlevel for such swords, they had lower grade weapons too. (Fast merchantmen are nice targets for low level pirates - relatively weak crew compared to the likes of a pinnace, especially after a few broadsides of grapeshot, but plenty of cargo to loot. :rpirate)
I'm not sure what your point is there...? :unsure
 
Can those be the FIRST deck in a boarding? What I have seen sometimes is that you get a ship-vs-ship first and then a single-ship outside deck afterwards.
If there is always a "vs" deck first, then we could have the soldiers with Musketoons only on that deck and switch to sailors with random weapons on the next ones.
But sometimes you start with a single-ship outside deck.

I'm also wondering what would be the effect on that two-ship deck you get if you board a frigate. This has a couple of raised planks which you climb across to get to the other ship. So, with musketoons as standard and locators re-arranged to put all your crew on one ship and all enemy crew on the other, the deck has just loaded and before you have time to react, a couple of enemy crew run across the planks, fire their musketoons and wipe out your crew.

I'm not sure what your point is there...? :unsure
The point is that if merchant ships have variable weapons depending on your level while naval ships don't, then either naval ships will have the modest blades I've currently assigned them and will look weak in comparison to merchant ships later; or they'll have advanced swords similar in level to what merchants get much later on and will be next to impossible for low level naval officer characters to take. Or naval officer player characters could get the same advanced swords as well, right at the start, and have an easy time of any other fights such as bandits or in side quests. Or it could be that the sword type has less effect on the outcome of a battle than I'm giving it credit for, in which case you'll be able to capture small naval ships early on anyway, and the player gets a source of lots of advanced swords to either hand to his officers and crew, or sell for lots of profit.
 
But sometimes you start with a single-ship outside deck.
Ah, that doesn't help then. Can probably be changed, but would require some further fiddling around with the code.

I'm also wondering what would be the effect on that two-ship deck you get if you board a frigate. This has a couple of raised planks which you climb across to get to the other ship. So, with musketoons as standard and locators re-arranged to put all your crew on one ship and all enemy crew on the other, the deck has just loaded and before you have time to react, a couple of enemy crew run across the planks, fire their musketoons and wipe out your crew.
If we're moving locators anyway, I'd like to put the player in front of the crew.

The point is that if merchant ships have variable weapons depending on your level while naval ships don't, then either naval ships will have the modest blades I've currently assigned them and will look weak in comparison to merchant ships later; or they'll have advanced swords similar in level to what merchants get much later on and will be next to impossible for low level naval officer characters to take. Or naval officer player characters could get the same advanced swords as well, right at the start, and have an easy time of any other fights such as bandits or in side quests. Or it could be that the sword type has less effect on the outcome of a battle than I'm giving it credit for, in which case you'll be able to capture small naval ships early on anyway, and the player gets a source of lots of advanced swords to either hand to his officers and crew, or sell for lots of profit.
I think ideally Navy Ships should be tougher than Merchant ones.
If they're crazy difficult in the early game, then I personally don't see that as being a huge problem.
As beginning pirate, I don't think navy ships should be an easy target.

That being said, I don't like them carrying unique weapons either, because if they do, then those weapons aren't unique.

Plus, ideally the outcome of the battle should be influenced mainly by number of crewmembers, character skills, slightly by sword type and HP should only gradually increase over time.
But getting to that point would require a complete reworking of the game balancing and a lot of related logic, so let's not do that any time soon.... :wp
 
If we're moving locators anyway, I'd like to put the player in front of the crew.
In that boarding deck for frigates, the player is already close to the boarding planks. But a musketoon doesn't care as it will hit everyone.

I think ideally Navy Ships should be tougher than Merchant ones.
If they're crazy difficult in the early game, then I personally don't see that as being a huge problem.
As beginning pirate, I don't think navy ships should be an easy target.
But as a beginning naval officer, small navy ships similar to your own should be a viable target. So we're back to either you being the only navy ship in the Caribbean not to have naval swords, or a beginning naval officer who has a fighting chance against naval targets and an easy fight against everything else.

That being said, I don't like them carrying unique weapons either, because if they do, then those weapons aren't unique.
Similarly, weapons which are supposedly rare won't be rare if every naval crewman is carrying them. ;) (Even if it's only the crew on the first deck, that's usually the deck with most enemy crew.)

Plus, ideally the outcome of the battle should be influenced mainly by number of crewmembers, character skills, slightly by sword type and HP should only gradually increase over time.
But getting to that point would require a complete reworking of the game balancing and a lot of related logic, so let's not do that any time soon.... :wp
To some extent that already happens with player vs. NPC fights. Enemy HP is, I believe, based on number and morale of crew, while your "Fencing" skill and perks can help. Keep your block up, only hit the enemy just after he's hit you, and you have a decent chance against an enemy with a better sword, which is why Ardent can start with a cutlass, take the light tizona from the prison commandant, then take the tizona from the snow brig captain and ultimately the Spanish cup-hilt rapier from the captain of the payroll ship - and that's a nice sword. But if someone with a musketoon has just wiped out your crew then you're facing a bunch of enemies, so one has just hit you and the other four are ready to hit you when you hit him. And you're down a lot of HP because you were hit by that musketoon too.
 
To some extent that already happens with player vs. NPC fights. Enemy HP is, I believe, based on number and morale of crew,
On boardings, yes.

But if someone with a musketoon has just wiped out your crew then you're facing a bunch of enemies, so one has just hit you and the other four are ready to hit you when you hit him. And you're down a lot of HP because you were hit by that musketoon too.
I'd imagine if those Musketoons are overpowered, then their damage could be reduced.
And if you equip your own crew with Musketoons, then you get the advantage too.

Anyway, all of this sounds like it would not be very easy and would require substantial further development.
I don't expect to be doing any of that any time soon, so we might as well skip my Musketoon wish for the time being.

Is there any feasible way to use Soldier Weapons in boardings at all? If not, we can fully disable that again.
For that to truly work the way it should, we'd need to be able to define and define and use appropriate character types per weapon.
That would do away with the 'GiveSoldierWeapon' function altogether, which would be definitely better as that function is quite a "hack" anyway.
But again.... would require substantial rewrites, which I am currently quite wary of....
 
Only large calibre musketoons were area effect. Smaller bore versions were basically short-barrelled muskets. Perhaps define "light musketoon", similar to regular musketoon but using musket ammo and not area effect.

Equipping your own crew with musketoons requires first that you acquire enough of them to hand to your crew. Which means surviving long enough to either take them from enemy crew or make enough money and then find them for sale.

The best way I can think of for Soldier Weapons to work is if it has selections based on player level as well as period. Something like:
Code:
if (level + rand(4) < 12) use_low_level_weapons;
else use_high_level_weapons;
Low level weapons could be the modest types I put into "Periods.c", while high level weapons could be the types with minlevel 10+. That ought to keep naval boarders competitive with merchants who will be getting the likes of swept-hilt rapiers round about then. Don't forget that naval ships are tougher than merchants anyway, due to having fuller crew complements at higher morale. Playing "Tales of a Sea Hawk", I found it impractical to take on naval ships other than little coastal patrol ships until I and my officers had decent weapons, armour and melee skills and perks.
 
it should be depended on the level of the enemy instead of that of the player I think.
 
Only large calibre musketoons were area effect. Smaller bore versions were basically short-barrelled muskets. Perhaps define "light musketoon", similar to regular musketoon but using musket ammo and not area effect.
Where would the Light Musketoon be used compared to the regular one?
Did I misunderstand that Musketoons are meant for boarding specifically because they're area affect weapons?
Seems massively convenient to me to shoot at the enemy crew when they're all grouped together on the enemy ship.
This is something I'd quite like to see replicated in the game, since it sounds like it makes complete sense.

The best way I can think of for Soldier Weapons to work is if it has selections based on player level as well as period.
I thought that might be difficult, but thinking about it again, that shouldn't be so difficult at all.
Your final weapon choices are the "low level" ones. Do you reckon we already had and/or could you make a similar list of high-level ones?

it should be depended on the level of the enemy instead of that of the player I think.
I agree with you there. That would be preferred over having it player-dependent.
 
Where would the Light Musketoon be used compared to the regular one?
Did I misunderstand that Musketoons are meant for boarding specifically because they're area affect weapons?
Seems massively convenient to me to shoot at the enemy crew when they're all grouped together on the enemy ship.
This is something I'd quite like to see replicated in the game, since it sounds like it makes complete sense.
It might make sense, but might also ruin the fun of boarding actions.

I thought that might be difficult, but thinking about it again, that shouldn't be so difficult at all.
Your final weapon choices are the "low level" ones. Do you reckon we already had and/or could you make a similar list of high-level ones?
The main problem is that higher level swords, especially nation-specific ones, are mostly those used as officer promotion swords in "NK.c". It seems a bit odd that if you're playing for England then you only receive the English Officer's Sabre when you are a Lieutenant, but if you're playing against England then everyone on an English warship receives it. Nevertheless, that seems to be the only way to create a list of national swords of higher level, so:
  • England: bladeC2 (Back-bladed Sidesword) / blade24 (English Officer's Sabre) - Back-bladed Sidesword isn't specifically English but it's available in early periods.
  • France: blade9 (French Admiralty Rapier) / bladeC30 (Swept Hilt Rapier) - Swept Hilt Rapier isn't specifically French but the only other French swords available in late periods are for nobility and very expensive.
  • Holland: blade23 (Dutch Admiralty Sword) / bladeC33 (Walloon Sword) - the Dutch Admiralty Sword is valid for all periods. The Walloon Sword is weak compared to others here, so only use it if you're desperate to have different swords for later periods.
  • Spain: blade16 ( Tizona) / blade44 (Spanish Cup-Hilt Rapier) - the Tizona is a weak compared to some others but is the only Spanish-specific sword I can see which is valid for "Early Explorers", reasonably high ability and not excessively expensive.
  • Portugal: blade29 (Portuguese Officer's Sword) / bladeC2 (Back-bladed Sidesword) - Portuguese Officer's Sword is valid for all ages, but if you must have something different for later periods, Back-bladed Sidesword won't be used by England in later periods so is free for Portugal. Other Portuguese swords are either lower level or supposed to be very rare.
  • America: blade45 (Crab Claw BroadSword) / blade43 (US Cavalry Sabre) - Crab Claw BroadSword is "Ancient and rare", and so are Americans in early periods because they're time travellers. xD
  • Pirate: bladeC18 (Shellcup Falchion) / blade50 (Venetian Navy Cutlass) - Shellcup Falchion isn't specific to Pirates but it's available in early periods and won't make the player rich too quickly by victimising pirates.
 
It might make sense, but might also ruin the fun of boarding actions.
If it makes historical and realistic sense, is it not something we should want?
I can imagine they might be too overpowered, but then that is a balancing issue that could be solved by reducing the damage they deal.

The main problem is that higher level swords, especially nation-specific ones, are mostly those used as officer promotion swords in "NK.c". It seems a bit odd that if you're playing for England then you only receive the English Officer's Sabre when you are a Lieutenant, but if you're playing against England then everyone on an English warship receives it.
Indeed I'm not particularly happy about that either.
The only "solution" I can think of is to use some of the gazillion sword models that we don't have in the game and add those specifically for soldier use.
That would be a tremendous amount of effort though, to get initItems.c filled in, interface icons made (possibly for different qualities) and all the item descriptions.
Would that be worth the trouble?

Nevertheless, that seems to be the only way to create a list of national swords of higher level, so:
Cheers! :cheers

Would I be asking too much if I'd request you to also put that in Periods.c? That would certainly save me a fair bit of time.... :unsure
 
If it makes historical and realistic sense, is it not something we should want?
I can imagine they might be too overpowered, but then that is a balancing issue that could be solved by reducing the damage they deal.
Getting randomly killed by a cannonball during a sea battle also makes historical and realistic sense. It would also ruin gameplay. We're back to the same compromise between realism and gameplay which is also the reason Portugal is still in the game. ;)

Would I be asking too much if I'd request you to also put that in Periods.c? That would certainly save me a fair bit of time.... :unsure
Unfortunately, yes. Partly because I've no idea how to make it dependent on player level, let alone enemy level. And partly because if coding it would cost even you that much time then it would probably take me ages, while I'm still trying to work on "Ardent". ;)
 
this is the part which now determines which weapons they get right?
Code:
// Scheffnow - weaponsmod -->
            string blade;
            if(ENABLE_WEAPONSMOD == 1)
            {
                blade = GetRandomBladeForLevel(rank-3+diffoffset, rank+diffoffset, 3+(diffoffset/2));
            }
            else
            {
                blade = LAi_NPC_EquipBladeSelection(rank);
            }
            // Scheffnow - weaponsmod <--

            // LDH test is also in LAi_NPC_EquipBladeSelection() and GetRandomBladeForLevel - 20Apr09
            aref bladeItm;
            Items_FindItem(blade,&bladeItm);

            // Sulan: fixed random weapon equip code -->
            bool isValidWeapon = false;
            int isNotPirate = false;
            for(int i=0;i<10;i++)
            {
                //  item is available for equip      item is not unique      item is already available in period        item is still available in period
                if (bladeItm.skipequip==false && stf(bladeItm.rare)>0.0 && currentPeriod>=sti(GetAttribute(bladeItm, "firstperiod")) && currentPeriod<=sti(GetAttribute(bladeItm, "lastperiod")))
                {
                    isNotPirate = isSoldier(chr);
                    //if(ModelIsType(chr.model, "Land_Officers")) trace("soldier model");
                    if(CheckAttribute(bladeItm, "nation") && isNotPirate > 0)
                    {
                        if(bladeItm.nation!="")  // if weapon has a nation limit and the chr is a soldier
                        {
                            if(sti(bladeItm.nation)==isNotPirate) isValidWeapon = true; // weapon's nation must match chars nation
                        }
                        else
                        {
                            isValidWeapon = true;
                        }
                    }
                    else
                    {
                        isValidWeapon = true;
                    }
                }
                if(isValidWeapon)
                {
                    break;
                }
                else
                {
                    if(ENABLE_WEAPONSMOD == 1)
                    {
                        blade = GetRandomBladeForLevel(rank-3+diffoffset, rank+diffoffset, 3+(diffoffset/2));
                    }
                    else
                    {
                        blade = LAi_NPC_EquipBladeSelection(rank);
                    }
                    Items_FindItem(blade,&bladeItm);
                }
            }
            if(isValidWeapon==false)
            {
                blade = "blade36";  // Sulan: default blade: Hunting Sword
                Items_FindItem(blade,&bladeItm);
            }
            trace("Equip Character "+GetMySimpleName(chr)+" with "+bladeItm.id+" his nation: "+chr.nation+" blade nation="+bladeItm.nation);

from "LAi_NPC_Equip(ref chr, int rank, bool isWeapons, float GunProb) ".
 
Actually
Getting randomly killed by a cannonball during a sea battle also makes historical and realistic sense. It would also ruin gameplay.
The "realistic excuse" I have for that one is that you play through the life of a character who is "historically known" for at least one thing, which is NOT dying through a random cannonball.
But that logic only applies to the player. Eventually, I would have no problem with random officers potentially being killed by cannonballs.
That makes realistic sense AND gives the player something to do in the later game, e.g. to find replacement officers if the need arises.
Otherwise you'd go from zero to hero without ever a setback. Before you get nervous though, I wouldn't count on this being done aaany time soon.

Anyway, the point I'm trying to make is that I don't think random crewmembers should need to have that "main character invulneraribility" at all.
Plus since Musketoons COULD be really useful in boarding and the player can get them and equip the crew with them, why should NPC ships not be able to do the same?

This is just free brainstorming here though. No decisions have been made and none of this will be done for the foreseeable future. :no

Unfortunately, yes. Partly because I've no idea how to make it dependent on player level, let alone enemy level. And partly because if coding it would cost even you that much time then it would probably take me ages, while I'm still trying to work on "Ardent". ;)
You are misunderstanding me. If it were as difficult as you seem to think, I wouldn't dream of asking you. :no

Actually, the reason for me asking is because it is simple.
If other people can reasonably do it, I don't want to be the person who ends up doing it.
That way I can spend what time and effort I can afford to on stuff that is harder and that other people probably could not do. ;)

You almost answered the question already with this:
Code:
if (level + rand(4) < 12) use_low_level_weapons;
else use_high_level_weapons;
You just need to know that you can define the player character with:
Code:
ref PChar = GetMainCharacter();
Then you can use:
Code:
if (sti(pchar.rank) + rand(4) < 12)
{
// do something
}
else
{
// do something else
}

Checking the enemy level is even easier, because the reference to the character being equipped is actually already being fed into the 'GiveSoldierWeapon' function.
So you can skip the 'define character part' and just use:
Code:
if (sti(curchar.rank) + rand(4) < 12)
{
// do something
}
else
{
// do something else
}

All you'd need to decide is what that if statement looks like and what assignments you want inside of them.

this is the part which now determines which weapons they get right?
I do believe so. Then the 'GiveSoldierWeapon' function ends up overriding what that function did.
But if that function immediately does what we want, then we don't need the call to 'GiveSoldierWeapon' at all.
 
Last edited:
wait, the thing I posted is from GiveSoldierWeapon I think ... I pretty know for sure :p.
 
wait, the thing I posted is from GiveSoldierWeapon I think ... I pretty know for sure :p.
Most definitely not. Your post says it is from LAi_NPC_Equip, which I believe. That is in PROGRAM\Loc_ai\LAi_equip.c, if I recall.
GiveSoldierWeapon, on the other hand, looks completely different and can be found at the bottom of PROGRAM\Periods.c .
You can find a copy of that file on the previous page.
 
Have I ever told you I hate the equipment code because its all over the place?
 
It's messy, alright! Why do you think we have these sort of "override functions"? :facepalm
:rumgonewhich don't make it easier to read :drunk

So what is the plan now?
I think what we wanna do is have a file somewhere to define weapons for soldiers (and maybe other types of boarding crew) like this for example:
Code:
Type = Soldier
  Nation = Dutch
     MinRank = 0
        Sword = 1
           Sword_0 = blade23
        Gun = 0
      MinRank = 10
         Sword = 2
            Sword_0 = blade23
            Sword_1 = blade24
         Gun = 1
             Gun_0 = gun1
  Nation = England
...
etc

Then we can take the data from there.
As I set it up now it wouldn't pick weapons from lower ranks unless set as optional weapon. This could be changed to include all weapons from the levels, but I think it would be better to have more control.
Maybe the period should be added in here too .. I'm not sure about that but I think it should now I think about it more.

We only need to change the GiveSoldierWeapon (for now) to get its data from this object.
 
Back
Top