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

Solved Rebalancing the Fighting System

Is your skill still increasing though in that instance, Hylie?

There might be two problems here:
1. Fencing skill stop increasing: Definitely an actual bug in the code and needs to be hunted down
2. Fencing is too hard regardless of the above: This would be a balancing issue

At the moment, I want to fix #1 above first, because it might help with #2. But we need to be able to replicate it before we can fix it. :facepalm
 
Is your skill still increasing though in that instance, Hylie?

There might be two problems here:
1. Fencing skill stop increasing: Definitely an actual bug in the code and needs to be hunted down
2. Fencing is too hard regardless of the above: This would be a balancing issue

At the moment, I want to fix #1 above first, because it might help with #2. But we need to be able to replicate it before we can fix it. :facepalm


It is impossible to increase one's skill when one keeps dying. I went into another dungeon and used up all of my grenades, poisoned throwing knives, and stinkpots and only found one opponent whom I was able to fight. He was armed with a dagger. For all of the others I was a one strike kill with my guard up. HP 80.
 
I ran into 2 teachers and got my melee up, got the battle cuirass, and the Solingen rapier. I am no longer a one stroke kill. It takes three or more now and I am surviving fights. It feels like a level playing field now.
 
Update. :nerbz

I was dungeon diving at Speightstown and found I could get in but could not get back out. There were just too many of them pouring down those stairs.
Then in one of our attempts to get out I noticed the message that there was no fencing skill increase. Level 10. melee 6.
B25 level 10.jpgB25 level 10 NF.jpg
 
Cheers,

I did not run into that problem right now.
I started the devlin opera and used the Jamaica dungeon for early practice. Adventurer level.
Went into that dungeon, alone. First visit was very deadly, I had to use god mode to survive the first group and some of the other single enemies later.
But I increased melee to 6 during this visit, and thing were much better. Outside, I repaired that Back-bladed Sidesword, and the 2nd visit in the dungeon was much easier. I had a level up, too.

I visited the dungeon 3 more times, leveleed up to level 4, increased melee to 10. Then hired officers and went into the jungles.
It was still dangerous, especially if enemes were equipped with pistols. But it was doable, and enjoyable.

In my opinion, it's the melee skill that has the biggest impact on playability in melee situation.
A decent melee skill is what prevents most of these one-hitters, and what enables you to hit enemies. Wit the actual balance, the true problem in the beginning is, that you are that often one hittet, that you get frustrated from melee soon and start avoiding melee situations at all. Or alternatively, hire officers above your own level with superior melee skill, and let them do the fighting.
In both "strategies" you don't increase your melee skill and you remein weak and one-hittable.

Thus, a solution would be to give a certain boost to the start, like some more HP, or a better melee skill from the beginning. Or a defensive start sword. All these would help.
Increasing the skill-speed of melee also greatly helps, because it get's you through the unenjoyable part of melee in roughly 2 hours.
 
I am at level 12 and melee 7 now. I keep seeing the message about no fencing skill increase, but I am getting melee increases.

It is mostly the guns that are the killer as even with battle cuirasses we are mostly dead by the time we start sword fighting. I grenade them as much as possible to weaken them but they start off so strong it is pretty hard.
I went for a walk on the cliff path at San Juan and lost 2 good officers. One was melee 5, the other 7. The 2 survivors were melee 8 and 9. I need to stay in front to help them, but not too far out or I get surrounded.

I normally avoid combat until I get the golden cuirass and the best swords and then still let my officers do most of the fighting. It gets frustrating dying all the time. True, one needs to get both melee and Health Points up before one can fight with a reasonable chance for success. That is why I play so long. For me the game really does not start until level 16.
 
No trouble. Here is one with a treasure quest to do. See if you can keep all of your officers alive.
 

Attachments

  • -=Player=- La Grenade.7z
    515.3 KB · Views: 145
  • -=Player=- La Grenade. Leviathan Rock. 16-09-1691.7z
    521.3 KB · Views: 151
AGH! It just occurs to me, I've been messing around with my game version too much AGAIN, so no more savegame compatibility for me. :facepalm
 
That's weird.... bool noExp is either "1" or "6". How does THAT work? It should be 0 or 1. :shock

Edit: This is BIZARRE! Look at this code:
Code:
    bool noExp = false;
    LogIt("bool noExp 1 = " + noExp);
Execute that manually, and it returns 0 just like it should.
But execute it inside LAi_ApplyCharacterBladeDamage and it'll be 1 or 6. Even though I set it to 0 one line of code before!!! o_O
 
I think I came up with some sort of a "fix". Turns out whatever is on that bool noExp = false; line is being... randomized or something?
So I added a dummy line above so that can be randomized instead of the one we actually use:
Code:
    int dummy = 1; // PB: Whatever is on this line ends up changing from what you set. Positively BIZARRE behaviour!
    bool noExp = false;
I haven't the faintest clue why this should make any difference whatsoever. But it does.
So attached file should allow you to keep gaining fencing experience throughout the game. o_O
 
What I do is to dodge as much as possible by using backstepping and sidestepping instead of blocking - it is better to avoid the attack entirely than to block and risk getting hurt. I also use the "Attack -> Block -> Attack" technique since that is faster than "Attack -> Attack". Trying to fight in narrow areas so enemies can only fight me one at a time and not surround me also helps. For ranged attacks I try to stand by a corner - fire pistol, and when the enemy is about to fire his, immediately step behind the corner so his attack will miss. When I do get hurt, quickly taking some potions helps.



I found out that noExp returns 0 every time until Professional Fencer is selected, then it starts returning either 0 or 6. I couldn't find out why, but maybe it can help you find out anything.

My findings so far seem to show that the skill never really stops increasing, just slows down significantly. I was thinking it could be fixed by changing this line:
Code:
skillExp = makeint(makefloat(skillExp) * retMin(2.0, 4.0 / stf(_refCharacter.rank)) + 0.5);
Into this:
Code:
skillExp = makeint(makefloat(skillExp) * 2.0 + 0.5);
Keeping skillExp at being multiplied by 2 as it is at level 1, and then tweaking the skill advancement multipliers appropriately. After all, shouldn't it be possible to increase a skill regardless of level?
 
I found out that noExp returns 0 every time until Professional Fencer is selected, then it starts returning either 0 or 6. I couldn't find out why, but maybe it can help you find out anything.
So that's when it happens, eh? Still positively bizarre. :shock

I'd like to hear about the speed of the fencing skill increase now that the "skill getting stuck" bug is sort-of fixed. That should make a difference, at least.
It may not be correctly balanced just yet, but at least it's not actively bugged anymore. At least... I hope there are no other weird effects hiding. o_O

Keeping skillExp at being multiplied by 2 as it is at level 1, and then tweaking the skill advancement multipliers appropriately. After all, shouldn't it be possible to increase a skill regardless of level?
I think that is the code that is responsible for making your skills increase MUCH faster on the first 5 levels or so.
That is intended to simulate the effect of what you specify in during the early game to be what you'll be good at later on.
That always seemed like a fairly good idea to me. If I understand correctly, after level 5 the progression should be fairly linear.

In fact, it has been looking to me like skill progression is perhaps a bit faster than it should be.
But that is based on comparisons with the "stock game system" and not based on actually playing.
It'll probably be challenging enough as-is. And that is what the skill increase speed setting in the Options menu is for anyway.
 
Cheers,

now it happened to me!
I too got the "no fencing skill added" message.
Will try Pieters fix now.

Edit: That works fine.
 
So... that's confirmed the fencing skill increase problem being solved?
(In the world's most strangest way. :confused: )
 
I think that is the code that is responsible for making your skills increase MUCH faster on the first 5 levels or so.
That is intended to simulate the effect of what you specify in during the early game to be what you'll be good at later on.
That always seemed like a fairly good idea to me. If I understand correctly, after level 5 the progression should be fairly linear.

In fact, it has been looking to me like skill progression is perhaps a bit faster than it should be.
But that is based on comparisons with the "stock game system" and not based on actually playing.
It'll probably be challenging enough as-is. And that is what the skill increase speed setting in the Options menu is for anyway.
It drops under 1 at level 5, but maybe it is fast enough, then. :yes

I looked at the stock game code and found that noExp properly returns 0 there, so I tried putting just noExp in the build back to where it was in the stock code, but then suddenly no damage would be done to either enemies or myself.
I found that the whole problem has something to do with my changed critical hit code, but I really can't find any reason for why it doesn't work or why any value changes, regardless if it is a real value or a dummy value, and why it only happens when the Professional Fencer ability is selected, even for ranged weapons. There really shouldn't be any correlation. :facepalm
However, I found a more sensible way to "fix" it. The file should be changed back to use noExp, but instead of the dummy value, we could force it to return 0:
Code:
    bool noExp = false;
    if(noExp != false) noExp = false;
Though instead of forcing it to return 0 when it is not false we could set it to be as it is but on two lines instead of one:
Code:
    bool noExp;
    noExp = false;
Here we declare that noExp is a boolean and set it to false. This means that we set it to do the same thing as it is already set to do, but on two lines instead of one. For some reason this works, and makes somewhat more sense than to use a dummy value.

If the skills increase fast enough, should the advancement multipliers in MAXIMUS_Functions be left as they are, including Melee at 3 and Defense at 6, or should they be tweaked?
 
I really can't find any reason for why it doesn't work or why any value changes, regardless if it is a real value or a dummy value, and why it only happens when the Professional Fencer ability is selected, even for ranged weapons. There really shouldn't be any correlation. :facepalm
That's what I figured. Makes no sense at all. :modding

Though instead of forcing it to return 0 when it is not false we could set it to be as it is but on two lines instead of one:
Code:
    bool noExp;
    noExp = false;
Here we declare that noExp is a boolean and set it to false. This means that we set it to do the same thing as it is already set to do, but on two lines instead of one. For some reason this works, and makes somewhat more sense than to use a dummy value.
That WORKS? Excellent! Does look a lot more sensible! :onya

If the skills increase fast enough, should the advancement multipliers in MAXIMUS_Functions be left as they are, including Melee at 3 and Defense at 6, or should they be tweaked?
For myself, I have set the values back to what they were. Now that the actual BUG is fixed, we can wait for some gameplay results from the code working as intended.
Maybe it does still need further rebalancing somewhere. But that much, I do not know yet. :shrug
 
So attached file should allow you to keep gaining fencing experience throughout the game. o_O
Oops; that was NOT the proper fix at all. Sure, it WORKED. But only because I accidentally left the responsible code bypassed altogether. That was NOT the idea. :facepalm
Attached is the REAL version. Adjusted as per Baste's suggestions above.
 

Attachments

  • LAi_fightparams.zip
    8.4 KB · Views: 131
It needs to be the same for ranged weapons, otherwise it will be the same problem there. I have made the necessary adjustments. :)
I have also made a little tweak to how melee experience is calculated, from this:
Code:
float exp = LAi_BladeCalcExperience(attack, enemy, dmg);
To this:
Code:
float exp = LAi_BladeCalcExperience(attack, enemy, damage);
This takes skill into account as well, not just which weapon is used and level of the contenders.
 

Attachments

  • LAi_fightparams.c
    32.3 KB · Views: 162
Back
Top