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

WIP Level of boarding enemies

Let me think if I can come up with a "final" approach here.... How about:

Boarder Level = Player Level scaled by Difficulty (Journeyman = 1.0)

Please provide values, I'd say:
difficulty ranges between 1-4 so:
difficulty*5+5
this will have the boarder at level 10 for easy games while its level 25 for difficult games.

Boarder Type = based on captain type:
- NAVY: "guard" with focus is 100% on fighting skills, so toughest possible enemies
- PIRATE: "abordage" with focus halfway on fighting skills, so medium enemies
- MERCHANT: "citizen" (or possibly a new "sailor" type?) with focus NOT at all on fighting skills, so easiest possible enemies
This is done now with the help of @Tingyun

Boarder HP Bonus = value based on ratio between ship morales.
OPTIONAL: Include ratio of boarding skills.
There should be a min/max limit on how much this can be scaled so that enemies aren't too strong/weak.
This limit can be skipped for Swashbuckler.
This is how it's done now:
Code:
ResetMaxHP(mchr);    // just in case
    ResetMaxHP(echr);    // this is being set way too low on easy difficulty
    boarding_player_hp = LAi_GetCharacterMaxHP(mchr);    // restored original game code
    boarding_enemy_hp  = CHAR_START_HITPOINTS + (boarding_erank - 1) * CHAR_HITPOINTS_PER_LEVEL;    // normal hitpoint calc based on level

    SDLogIt("Original enemy HP = " + boarding_enemy_hp + ", enemy rank = " + boarding_erank + ", difficulty = " + GetDifficulty() + ", player rank = " + mchr.rank);

// KK -->
    // LDH - playerHP should be left alone.  EnemyHP is scaled by difficulty and morale differences.
    if (!IsTown) {
        boarding_enemy_hp += boarding_enemy_hp * ((stf(echr.ship.crew.morale) - stf(mchr.ship.crew.morale))/200.0); // LDH - change from absolute morale diff to percentage diff, 0.5 to 1.5 - 19Jan09
        boarding_enemy_hp = boarding_enemy_hp * (1.0 + (GetDifficulty()-1.0)/5.0));    // 1.0, 1.2, 1.4, 1.6
    } else {
        boarding_enemy_hp = boarding_enemy_hp + ((makefloat(GetTownCrewMorale(echr.town)) - stf(mchr.ship.crew.morale))/4.0);    // fix parenthesis as above
        boarding_enemy_hp = boarding_enemy_hp * (1.0 + (GetDifficulty()-1.0)/5.0));    // 1.0, 1.2, 1.4, 1.6
    }
    //SDLogIt("Final enemy HP = " + boarding_enemy_hp + ", emorale = " + echr.ship.crew.morale + ", mmorale = " + mchr.ship.crew.morale + ", morale change = " + (stf(echr.ship.crew.morale)-stf(mchr.ship.crew.morale))/2.0 + " percent"); // LDH changed 19Jan09
// <-- KK

    if (boarding_enemy_hp < LAI_DEFAULT_HP) boarding_enemy_hp = LAI_DEFAULT_HP;        // 40
This is done in a very weird way so I will change/move this at least. If the formule is right I won't change that. I do think atm this is overwritten so I probably have to fix that by changing this to a HPbonus.

Number of Boarders = based on ratio between crew sizes.
There should be a limit so this ratio is never more than 1:3. This limit can be skipped for Swashbuckler.
This is how it's handled now:
Code:
    maxcrew = GetBoardingLimit(locIndex);
    float CrewRatio = fclamp(1.0/3.0, 2.0/3.0, 1.0 * mcrew / (mcrew + ecrew));    // No more than 2:1 odds on any deck

    mcrew = makeint(CrewRatio * maxcrew + 0.5);
    ecrew = makeint((1.0 - CrewRatio) * maxcrew + 0.5);
    if (mcrew < 1) mcrew = 1;
    if (ecrew < 1) ecrew = 1;
    int crewtotal = mcrew + ecrew;
    SDLogIt("locIndex = " + locIndex + ", Maxcrew = " + maxcrew + ", CrewRatio = " + CrewRatio + ", mcrew = " + mcrew + ", ecrew = " + ecrew + ", total = " + crewtotal);

    // LDH - this is where the boarding actor numbers are set
    boarding_enemy_crew = ecrew;
    boarding_enemy_crew_start = ecrew;
    boarding_player_crew = mcrew;
    boarding_player_crew_start = mcrew;
I believe this is right. Altough I might move this because its programmed a bit weird...

Boarder Weapons = based on captain type:
- NAVY: Get period-correct soldier weapons. Could make for excessive loot, but these are ALSO the toughest enemies, so having a larger reward is OK.
- PIRATE and MERCHANT: Get random weapons based on nation.
For now we don't do this.

some more questions:

This piece of code is now only called for friendly characters as far as I see:
Code:
        {
// added by MAXIMUS [abordage mod] -->
            if ((boarderindex_val == 0) || (boarderindex_val == 100)) boarder_num++;
            switch(boardermodel_val)
            {
                case "skeleton": gmodel = SelectBoardingGroup("skel", 1, 4, boarder_num, "man"); model = ExtractBoarderModel(gmodel); break;
                case "corsair": gmodel = SelectBoardingGroup("corsair", 1, 5, boarder_num, "man"); model = ExtractBoarderModel(gmodel); break;
                case "marine": gmodel = SelectBoardingGroup("rn_warnt18_", 1, 5, boarder_num, "man"); model = ExtractBoarderModel(gmodel); break;
                case "masked": gmodel = SelectBoardingGroup("mask_", 2, 4, boarder_num, "man"); model = ExtractBoarderModel(gmodel); break;
                case "girl": gmodel = SelectBoardingGroup("towngirl", 1, 7, boarder_num, "woman"); model = ExtractBoarderModel(gmodel); break;
                case "soldier": gmodel = SelectBoardingSoldiers(iNation, boarder_num); model = ExtractBoarderModel(gmodel); break;
                case "boarder": gmodel = SelectBoardingBoarders(boarder_num); model = ExtractBoarderModel(gmodel); break;
                case "standard": model = LAi_GetBoardingModel(mchr, &ani); break;
            }
// added by MAXIMUS [abordage mod] <--
        }

Shouldn't this be added to the enemies as well?
 
Please provide values, I'd say:
difficulty ranges between 1-4 so:
difficulty*5+5
this will have the boarder at level 10 for easy games while its level 25 for difficult games.
Since we wanted to remove the player level from the equation, something else would be needed to determine the boarder rank.

My first suggestion would be to have:
- Boarder level depend on the crew ratios
- Number of boarders depend on the morale ratios
- HP Bonus depend on difficulty

That sounds like the simplest and the fairest.

Though I admit I'd prefer crew ratio to have an influence on number of boarders as that would make much more logical sense. :facepalm
So alternate idea would be:
- Boarder level depend on the morale ratios
- Number of boarders depend on the crew ratios
- HP Bonus depend on difficulty

Then lower morale would quite literally lead to weaker crew.

This piece of code is now only called for friendly characters as far as I see:
The boardermodel code is a big bad mess. It should really be taken out of the game and added in a simpler and cleaner way some day.
For the time being, I recommend leaving it as it is.
 
So is this also about the captains of enemy ships?

Boarding crew themselves should behave like this IMO:
- Crew ratios should say how many boarders in every level are. As Pieter said. If its possible, it should also give a HP bonus at a certain ratio (e.g. attacking ship has 3 times as many men).
- The level should be lets say 80% morale and 20% leadership (A good motivational speech before a boarding^^)
- More difficulty - more HP exactly as Pieter said.
- There should also be a noticable difference in level for navy and merchant crews. Let's say pirate crews are at *1 for level, navy should then be at *1.25 and merchant at *0.75

Captains should take vagely the player level into account. There should be a maximum difference between levels. The same as for boarders, navy captains should be harder, and merchants (much) weaker.
If there is a really strong captain on board, it would be nice if the game gives you a hint/warning (at least for easy and normal difficulty).
If it is not too difficult to implement, the player should have the opportunity to take officers with him when talking to a surrendered captain, therefore maybe fame goes down or the chance that the enemy captain wants to fight up.

Those are my thoughts to this so far.
 
I strongly believe NPC ship strength should not be affected by the player level at all.
You'll know that a ship will be tough if it is big, navy, has many crew and high morale.
If you decide to board under those conditions while being low level yourself, it's your own responsibility if it fails.

Either you wait until you're ready, you reduce difficulty or at the very least you grapeshot and demoralise them until you've evened the odds through your own actions.
No need for the game to try and make it easier for you just because you're in the early game. :no
 
True that - but as I posted in the main forum - I boarded a surrendered tier 7 merchant pinnace and the captain had over 200 HP. And I was level 3. You are right, it shouldnt be possible to deal with any captain at the beginning. But I don't know how to say this the game in an easy way. Also, if you fight good in a sea battle and actually make it that you e.g. de-mast and grapeshot the whole crew of a huge warship with a simple sloop - shouldnt the player be rewarded instead of punished because he fought a ship he "wasn't supposed to fight at this level"? :/ I mean, we have to differentiate here between gameplay and realism. And completely ignore the balance between playerlevel and npclevel kills the RPG-style IMHO. Maybe we could agree on a realistic/rpg-style behaviour here which you can switch in Game options?
 
The captain level has nothing to do with the crew level. They're two quite separate things.

Once you managed to get a ship to surrender, sure you should not be punished.
But that is not to be solved by arbitrarily making the captain weaker just because you are.
The real solution is in modifying the logic behind surrendering so that those duels would not be forced to trigger all the time.

As I said before, @Tingyun already made a quick fix for that which is in the recent ZIPs.
This isn't the final version though. A proper final version would need to tie in with reputation and fame.
This is something I've been wanting to tackle for over a year now, but I won't start until after the next public release has been made and is confirmed to be properly playable.

The reason for this is that the change I have in mind would probably have a notable impact on gameplay in a great many ways.
And I don't want to risk breaking things until what we already have works as it is supposed to.
So in the meantime, the quick fix will have to do.

I do not believe a toggle is required on this particular subject.
Once it actually does work as we intend (which we already established is not the case right now), most likely it'll be perfectly fine.

Long story short: The real issue is with the surrendered captain dialog.
Basically, he should not have been fighting you at all, considering he surrendered. ;)
 
I know but even in standard boardings, those captains can be very hard even with your crew around. And the thing is, though they have unrelated levels to the player, I never encountered an enemy captain who was actually weaker than me.. I think that shouldn't be the case.

ah yes, if they always should be civilized it is not important at all. Though I liked these duells.. they just got somehow impossible by now :/
 
This is how the captain level is determined at the moment:
Code:
int GetCaptainRank(ref SCaptain, int shipclass)
{
    //Class 8 ship should have a rank 1 captain. TY Class 1 ship has a minimum captain rank of 39, but usually should be in the 50s. Class 1 Navy ship should have a navy officer on average of level 57, given a rank bonus of 10 for him. 
    int rank = (8-shipclass)*7;
    rank = rank*0.8 + 0.3*rand(rank);
    rank += GetOfficTypeRankBonus(SCaptain.quest.officertype);
    rank += (4*(GetDifficulty()-2)); //TY added difficulty effect
    if(rank < 1) rank = 1;
    return rank;
}

And depening on the type of captain it will have these bonusses:

OFFIC_TYPE_CAPMERCHANT +3
OFFIC_TYPE_REGCAP +5
OFFIC_TYPE_CAPNAVY +10
OFFIC_TYPE_CAPPIRATE +8
OFFIC_TYPE_CAPPRIVATEER +8 (you can't encounter this one yet I believe)
 
The captain levels are currently being completely overhauled by @Levis anyway.
They're supposed to end up linked to their ship tier.
In other words: High level player attacking small ship would be met with feeble resistance from both Captain and crew.

For the duels, refer to our earlier discussion here:
Behaviour of Surrendered Captains | PiratesAhoy!

@Levis: Indeed Privateer Captains were added by me purely for player interface purposes.
 
Where what is? The surrender dialog?
That's Cabinfight_dialog.c .
 
No, I meant the captainrank function, but I already found it, still looking for the bonuses:read
 
No, I meant the captainrank function, but I already found it, still looking for the bonuses:read
the bonusses are defined in the officertypes file :).
 
I just wanted to tweak the levels for my own - I can of course share my expirience from this but Pieter said that he wanted to leave it how it is so:shrug
 
but Pieter said that he wanted to leave it how it is so:shrug
Did I say that? I thought I said several times that I agreed things had to be changed.
I even said how it should probably be changed.
 
I just wanted to tweak the levels for my own - I can of course share my expirience from this but Pieter said that he wanted to leave it how it is so:shrug
we are trying to decide what should influence what. if we've decided I'm going to implement it asap because this bug is annoying me a lot :p.
 
Then based on my suggestion from a few months ago and removing the influence of the player altogether, I get to:

Boarder Level = value based on ratio between ship morales and Boarding/Leadership skills. This should be calculated the same for player and AI.
If we do NOT do this relative to the player level, then we will get a situation where, for a supposedly equally balanced situation,
enemy crew is either too strong compared to the player in the beginning of the game or not strong enough in the later game.
In other words: The crews will be equally balanced, but the player and officers will not!


Boarder Type = based on captain type:
- NAVY: "guard" with focus is 100% on fighting skills, so toughest possible enemies
- PIRATE: "pirate sailor" with focus halfway on fighting skills, so medium enemies
- MERCHANT: "sailor" with focus NOT at all on fighting skills, so easiest possible enemies

Boarder HP Bonus = Offset determined by Difficulty (Journeyman = 0)
There should be a min/max limit on how much this can be scaled so that enemies aren't too strong/weak.
This limit can be skipped for Swashbuckler.

Number of Boarders = based on ratio between crew sizes.
There should be a limit so this ratio is never more than 1:3. This limit can be skipped for Swashbuckler.

FOR BUILD 15:
Boarder Weapons = based on captain type:
- NAVY: Get period-correct soldier weapons. Could make for excessive loot, but these are ALSO the toughest enemies, so having a larger reward is OK.
- PIRATE and MERCHANT: Get random weapons based on nation.

Does that sound about right?
 
Back
Top