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

Poll Some reworks of luck skill and difficulty effect in LAi_Fightparams

Should difficulty and luck be removed from damage calculation?

  • Yes but only luck should be removed

    Votes: 0 0.0%
  • Yes but only difficulty should be removed

    Votes: 0 0.0%

  • Total voters
    4

Tingyun

Corsair
Storm Modder
EDIT Figured out the problem, attaching updated version

These changes are intended to address two broad problems:

1) A series of issues relating to information clarity given to the player, unifying balancing mechanics, and bringing consistency in combat roles of skill and the types of skills given to AI warrior officer types (principally, removing luck's dramatic influence on combat damage). Full details are here: Planned Feature - Replace "Luck Skill" with "Sneak" | Page 2 | PiratesAhoy!

2) At the same time, there have been reports of frustrated players who have found the combat too difficult on landlubber difficulty, including one who was quite frustrated by being killed in 1 hit by an enemy captain on landlubber. Perhaps landlubber needs to be more forgiving a route for new players to learn the game.

Accordingly, the following file aims to do the following:

1) Remove difficulty modifiers to damage from all levels except landlubber. On landlubber, make them more dramatic to protect beginning players from such frustrations.

2) Replace luck's significant role in damage (up to over 40% increase in damage with guns) with other more relevant skills possessed by AI combat type officer types

The first change will generally make the game less difficult, while the second will make the game generally a bit harder, as AI opponents used to lag behind the player in luck. These will partially cancel each other out. Later, additional modifiers to enemy level and hp by difficulty can be used to finetune the effect desired for difficulty levels, and won't be complicated by fudging the real value of 1 HP here.

3) Clarity of information presented to the player will be achieved, with HP numbers and damage ratings understandable and fully accurate for all levels except landlubber, as well as which are the important skills for combat.


On the whole, difficulty should be mostly comparable to before. Future adjustments to difficulty levels can happen through the unified measure of enemy level and HP gains. Luck will be largely removed from combat effect, meaning that the current system of it being the province of peaceful officer types can be preserved.

Specific changes:

I subbed fencing in for luck for the damage boost/reduction for swords

Code:
    dmg *= (0.75 + fRand(CalcCharacterSkill(attack, SKILL_FENCING))/(40.0/3.0));
    dmg *= (1.5  - fRand(CalcCharacterSkill(enemy, SKILL_FENCING))/(40.0/3.0));



I replaced luck with accuracy for the potential 40% damage boost to guns:

Code:
dmg *= (0.75 + fRand(CalcCharacterSkill(attack, SKILL_ACCURACY))/(40.0/3.0));

This makes sense to give accuracy this role, as more accurate players would presumably get more solid hits to better areas, and moreover we currently reward the player with accuracy XP for shooting enemies, so it currently is modeled as the principal skill for gun damage in experience points:

Code:
    if(!noExp) { if(AUTO_SKILL_SYSTEM) { AddCharacterExpChar(attack, "Accuracy", MakeInt(exp*0.5 + 0.5)); }else{ AddCharacterExp(attack, MakeInt(exp*0.5 + 0.5)); } }

I went ahead and changed "accuracy" in that code to SKILL_ACCURACY to be consistent with usage elsewhere in the file, so now that looks like the below:

Code:
    if(!noExp) { if(AUTO_SKILL_SYSTEM) { AddCharacterExpChar(attack, SKILL_ACCURACY, MakeInt(exp*0.5 + 0.5)); }else{ AddCharacterExp(attack, MakeInt(exp*0.5 + 0.5)); } }


For difficulty, I commented out the below sections affecting damage

And then I added new code for landlubber players to get a difficulty reduction

Code:
  //if(sti(attack.index) == GetMainCharacterIndex()) dmg *= (1.45 - 0.15*GetDifficulty()); // NK Diff Mod
   //else { if(sti(enemy.index) == GetMainCharacterIndex()) { dmg *= (0.85 + 0.15*GetDifficulty()); } } // NK Diff Mod
   if(GetDifficulty() < 2)  //TY Commenting out old difficulty mod, HP changes and such are better for balancing difficulty while preserving meaningfulness of hp and damage numbers given to players, and a more forgiving landlubber
   {
     if(sti(attack.index) == GetMainCharacterIndex()) dmg *= 1.3;
     else { if(sti(enemy.index) == GetMainCharacterIndex()) { dmg *= 0.5; } }
   }


I think that should solve the frustrated landlubber player issue--before, landlubbers took full damage, now they get a 50% reduction, while leaving them with their old small damage boost. This should make combat for a landlubber slower, and make them more mistake resistant, as they take damage much more slowly, and end the getting killed in 1 hit issue. I think a damage reduction is the way to do this best.

It is a bit of a dramatic change to make landlubber more forgiving, but I think it will fit what is needed there well. I imagine landlubber players really do not want to die, and the earlier 15% bump between them and mariner was not forgiving enough.

It also gives players "stuck" at a certain point in a storyline a way out--they can turn on landlubber long enough to get through the part bothering them, and with the help of taking only half damage, can probably survive a great deal more.

For guns, the old difficulty operator just worked on damage done, and gave landlubbers a 30% boost, which I retained. EDIT tried to add a damage reduction, but kept getting an error

Code:
  //if(sti(attack.index) == GetMainCharacterIndex()) dmg *= (1.45 - 0.15*GetDifficulty()); // NK Diff Mod
   if(GetDifficulty() < 2)  //TY Commenting out old difficulty mod, HP changes and such are better for balancing difficulty while preserving meaningfulness of hp and damage numbers given to players, and a more forgiving landlubber
   {
     if(sti(attack.index) == GetMainCharacterIndex()) dmg *= 1.3;
   }

We can make the melee damage reduction less dramatic if need be, but I think the game could really use a very forgiving combat system for its learner level, and landlubbers should not be getting one hit killed (as in the recent report).

File attached.

Please leave any suggestions, objections, questions, or anything else. :)

EDIT fixed the file, it seemed to not like me saying
if(GetDifficulty() = 1) but worked when I changed it to
if(GetDifficulty() < 2).
 

Attachments

  • LAi_fightparams.c
    38.2 KB · Views: 167
Last edited:
When doing an "is equal" check, you should use '==' for proper syntax.
The single '=' is reserved for assignments.
 
Thanks Levis! Your tutorials are wonderful, and I am going to work through them again. I think I'll understand more the second time around, now that I have some experience.

I think I got tired last night, hence making such a stupid error. :)
 
Haha, ok, so, there don't seem to be any objections to the implementation, and the general idea was already discussed thoroughly in another thread. Posting to new content now.
 
so should any of this be added to the mod?
 
I prefer Luck being removed from places where it doesn't belong.

What was the problem with Difficulty again?
 
I prefer Luck being removed from places where it doesn't belong.

What was the problem with Difficulty again?
I believe in the fight params in some cases difficulty is also used (if I read the mainpost right). As we've lately improved the difficulty already in the characters themselfs we should probably remove the difficulty from the fight params so you know better what to expect there.
 
Ah, so you mean that difficulty influences NPC health, skills and abilities, so it doesn't actually need to also influence the fencing system itself?
That does make sense to me.
 
@Levis this change was debated for awhile in the general "luck as sneak" thread, when we were brainstorming balance consistency, which is why you don't see much debate here. it was on topic there but needed a new thread to propose the smaller component changes.

Landlubber diffiulty effects remaining is a measure to help with some of the new frustrated players dying too easily, the other levels have their effects removed.

Yes, unifying difficult balancing to take place in one mechanic (ai level, health, skills) was the express purpose here from the beginning, so that the HP and damage numbers the players gets have actual consistent meaning.
 
This is already posted to new content, and that is consistent with the poll results above and discussion, so I am removing the relevant file from my personal mod.

Link to download is included in new content.
 
Back
Top