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

High Priority Balancing: Levelling, Income and Fight Difficulty

I can have them focus on other stuff then combat perks.
But if they don't have other perks they won't.
So say I want an enemy who is bad at fighting I would need to give him a officertype which has a lot of other perks and make it focus on that.
Because at the moment I only let them pick perks which they actually contribute.
That's why I was thinking of having a "Sailor" officer type who can also focus on Sailing and Repair, for example.

This does pose the question of what to do with random town folk. It doesn't make so much sense for them to have real seafaring perks, does it?
Maybe for them it is OK to focus on combat first? So at least it won't be too easy to kill them straight away?
Of course the real persistent town folk, for whom this would be the biggest question, generally don't even have any weapons in the first place.
And then it doesn't really matter either way. :facepalm

As far as I'm concerned, it is OK if there is a rather wide variety in the random town folk (Enc_walker), so some may be good at fencing and some not so much.

The idea for enc_walker I had already and I had planned to do that after BETA4.
Good idea! I like it. :cheeky
 
if I give townfolk the citizen type I think they will pick the perks mostly at random. a little bit depending on how much they level in certain things. Say for example there was a fight and they got some XP in the fight there is a good chance after that they will get more perks. But at the start it should be pretty random. But need to test it. The system is quite complex already so I need a calculator with me or some sheets to determine from the top of my head what they will take if I let them pick from ALL perks instead of just the once they can contribute (which are combat only).
I will do some tests with it to see what happens.
 
Indeed if they can pick from ALL stuff semi-randomly, that should probably have the desired effect for citizens.
Especially cool if they "learn" from fights and then decide to focus on more combat-related stuff after getting into some.
Though I cannot imagine many fights in the game that end up with not only the citizens involved, but also surviving. :shock

The system is quite complex already so I need a calculator with me or some sheets to determine from the top of my head what they will take if I let them pick from ALL perks instead of just the once they can contribute (which are combat only).
I cannot help but wonder if any simplifications might be in order.
But I suppose we may want to see the maximum of what this new and advanced system can do and then simplify later depending on how that goes.
 
Last edited:
I cannot help but wonder if any simplifications might be in order.
But I suppose we may want to see the maximum of what this new and advanced system can do and then simplify later depending on how that goes.
It's simpel enough, but I dont know all the variables for the different types from the top of my head :p.
Just tested it and found merchants without any fighting perks at all (and a lot of smuggling perks :p). Now I need to tweak some of the types so I can actually use them for the different scenario's.
But looks like this might work already to get more interesting enemies.
 
Just tested it and found merchants without any fighting perks at all (and a lot of smuggling perks :p).
Good merchant = smuggler? Niiice! :cheeky
Though for the wandering type, I reckon they may be allowed to defend themselves.
But I think they can't now, because I prevented merchants from equipping their own stock. :facepalm

Reason for that one is that now the whole "equipping prevention" is based on whether they have a merchant stock at all.
Originally it was based on the LAi type, but since that got applied to too many characters, I had to move away from that.
I've got to admit I prefer the LAi check because I would want the limitation to apply to ONLY the traders at the stalls.

If I recall, merchant type" never fights back, so there's no point in them having anything equipped.
Otherwise we may decide that it IS okay for even stall traders to take their stock to defend themselves.
 
Incase you are wondering. This is just a first test. Need to tweak things more :). But here you can see what I'm doing.
Now I need to match the right officertypes etc.
I spend some time on speeding up the leveling script also, so I can have ambushes etc be initialized on the fly. You will see higher level characters are now also done in the post init and it should take about the same time as it did before so that means the loadingtime between area's is reduced.
 

Attachments

  • WIP.zip.zip
    19.5 KB · Views: 155
Interesting! So you're saying this should NOT go into the modpack just yet, right?
If I can find the time, I'll happily have a quick look at it. But I can't make any promises there....
 
Interesting! So you're saying this should NOT go into the modpack just yet, right?
If I can find the time, I'll happily have a quick look at it. But I can't make any promises there....
nope. I hope to work on it some more tonight and else tomorrow.
It would be nice if people test it but I do think a new game is required XD, altough in theory F11 should be enough
 
nope. I hope to work on it some more tonight and else tomorrow.
It would be nice if people test it but I do think a new game is required XD, altough in theory F11 should be enough
Had a quick look at that code, but didn't test it.
I cannot begin to think of the impact on game loading, but I think I understand the "noncontribchance" idea.
So any character type MAY get non-contributing abilities, right?
With especially civilians and random characters have a VERY high chance of that, so that they won't get all that much fighting perks?

Does the above include a shift in focus for skill increases too? Or is it just perks?
 
Had a quick look at that code, but didn't test it.
I cannot begin to think of the impact on game loading, but I think I understand the "noncontribchance" idea.
So any character type MAY get non-contributing abilities, right?
With especially civilians and random characters have a VERY high chance of that, so that they won't get all that much fighting perks?

Does the above include a shift in focus for skill increases too? Or is it just perks?
this is just for perks.
The shift in skills can be set with the importance already,
Probably tomorrow evening I have a new update (might give a WIP tonight) where this should all be fixed already. I'm now working on getting the level for the boarding crew right.
 
Looking into it a bit more @Pieter Boelen those enemys which @Grey Roger was talking about seem to have very high blades (pierce 34% and block 20%) when they are only level 5 ... does that seem right to you?
 
Looking into it a bit more @Pieter Boelen those enemys which @Grey Roger was talking about seem to have very high blades (pierce 34% and block 20%) when they are only level 5 ... does that seem right to you?
What blades exactly are those? It depends on their "minlevel" and I think with higher difficulty, enemies can get better blades (e.g. "technically too good for them").

And of course the "period soldier weapons" functionality completely overrides all auto-assigning.
But I didn't think that applies here.

Are you specifically referring to those dungeon enemies or the boarding ones?
 
What blades exactly are those? It depends on their "minlevel" and I think with higher difficulty, enemies can get better blades (e.g. "technically too good for them").

And of course the "period soldier weapons" functionality completely overrides all auto-assigning.
But I didn't think that applies here.

Are you specifically referring to those dungeon enemies or the boarding ones?
These are the enemies in the dungeon on antigua when you start with hornblower
They have different weapons. I don't know exactly which weapon this guy had. but these are some of the blades they have:
Blade4
Bladec11
Bladec6
Blade48
Bladec12
Blade28
Blade49
Blade19
Blade1
Blade46
Blade12
Blade36
So maybe some of those are a bit to good?
The stock function for the piercing chance is this:
Code:
float p = (1.0 + piercing - block)^10 * (1 + askill - eskill);

If the difference between block 0,13 (what your blade is) and piercing 0,34 (what in this case the enemy has) makes it pretty hard for me. As in he has a chance of 100% to pierce according to this formula.
So I think this formula is flawed ...
 
I think I'm going to remove the 10 power in there.
I guess somebody added that at one points because the math was flawed, but if I remove that 10 power I get better results. So doing that in the next update to see if people find it better.
Now he only has a 30% chance of piercing (due to my defense level etc) which is a lot closer to his actual weapon piercing chance
 
I think I'm going to remove the 10 power in there.
I guess somebody added that at one points because the math was flawed, but if I remove that 10 power I get better results. So doing that in the next update to see if people find it better.
Now he only has a 30% chance of piercing (due to my defense level etc) which is a lot closer to his actual weapon piercing chance
For your reference, this was the stock game function:
Code:
float LAi_BladeFindPiercingProbability(aref attack, aref enemy, float hitDmg)
{
   float piercing = 0.05;
   float block = 0.01;
   if(CheckAttribute(attack, "chr_ai.piercing"))
   {
     piercing = stf(attack.chr_ai.piercing);
   }
   if(CheckAttribute(enemy, "chr_ai.block"))
   {
     block = stf(enemy.chr_ai.block);
   }
   float aSkill = LAi_GetCharacterFightLevel(attack);
   float eSkill = LAi_GetCharacterFightLevel(enemy);
   if(aSkill < eSkill) aSkill = eSkill;
   float p = piercing - block + (aSkill - eSkill)*0.5;
   float k = 1.0;
   if(IsCharacterPerkOn(enemy, "BasicDefense")) k = 0.75;
   if(IsCharacterPerkOn(enemy, "AdvancedDefense")) k = 0.5;
   hitDmg = hitDmg*0.5 + 0.5;
   p = p*k*hitDmg*hitDmg;
   return p;
}
Looks like it was changed in Build 14 Alpha 9.5 by Hook:
Code:
float LAi_BladeFindPiercingProbability(aref attack, aref enemy, float hitDmg)
{
   float piercing = 0.05;
   float block = 0.01;
   if(CheckAttribute(attack, "chr_ai.piercing"))
   {
     piercing = stf(attack.chr_ai.piercing);       // 0..1 from blade stats
   }
   if(CheckAttribute(enemy, "chr_ai.block"))
   {
     block = stf(enemy.chr_ai.block);         // 0..1 from blade stats
   }
   float aSkill = LAi_GetCharacterFightLevel(attack);   // fencing skill / 10
   float eSkill = LAi_GetCharacterFightLevel(enemy);

   // LDH change to ratios - 11Apr09
//   if(aSkill < eSkill) aSkill = eSkill;         // NK had removed this and set p to minimum of 0
//   float p = piercing - block + (aSkill - eSkill)*0.5;   // original calculation
   float origP = piercing - block + (floatret(aSkill<eSkill, eSkill, aSkill) - eSkill)*0.5;   // LDH for testing 12Apr09
   if (origP < 0.0) origP = 0.0;

//   if (block == 0) block = 0.01;
//   if (eSkill == 0) eSkill = 0.1;
//   float p = sqrt(piercing/block * sqrt(aSkill/eSkill));       // pierce to block ratio * half skill ratio

   // LDH - 01May09
   float p = (1.0 + piercing - block)^10 * (1 + askill - eskill);

   float k = 1.0;
   if (p > 0)                       // LDH added test 06Apr09
   {
     if(IsCharacterPerkOn(enemy, "BasicDefense")) k = 0.75;
     if(IsCharacterPerkOn(enemy, "AdvancedDefense")) k = 0.5;
   }
   hitDmg = hitDmg*0.5 + 0.5;               // hitDmg is a small number, so this is 0.5 to 0.52 typically, can be higher

//float retVal = p*k*hitDmg*hitDmg*100;  if (retVal > 100.0) retVal = 100.0;
//float retValOrig = origP*k*hitDmg*hitDmg*100;
//TraceAndLog("p=" + makeint(piercing*100) + ", " + stringRet(piercing<0.1," ","") +
//   "b=" + makeint(block*100) + ", " + stringRet(block<0.1," ","") +
//   "aSkill=" + makeint(aSkill*10) + ", " + stringRet(aSkill<1," ","") +
//   "eSkill=" + makeint(eSkill*10) + ", " + stringRet(eSkill<1," ","") +
//   "p=" + strLeft(f2s2(p*100),6) + ", " +
//   "k=" + k + ", " + stringRet(k==1.0,"  ","") + stringRet(k==0.5," ","") +
//   "hitDmg=" + strLeft(f2s2(hitDmg*hitDmg),6) + ", " +
//   "return=" + strLeft(stringRet(retVal<10," ","") + f2s2(retVal),5) + ", " +
//   "orig=" + stringRet(retValOrig==0,"",strLeft(f2s2(retValOrig),6)));

   p = p*k*hitDmg*hitDmg;
   if (p>1.0) p = 1.0;
   return p;
}
Can't remember now how or why this was meant to be better.
 
These are the enemies in the dungeon on antigua when you start with hornblower
They have different weapons. I don't know exactly which weapon this guy had. but these are some of the blades they have:
Blade4
Bladec11
Bladec6
Blade48
Bladec12
Blade28
Blade49
Blade19
Blade1
Blade46
Blade12
Blade36
So maybe some of those are a bit to good?
And for further reference, these are the stats of the weapons you list there:
Code:
  //---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  // BLADES:  picIndex  Price  Piercing  Nation
  //  ItemIndex  bladeID  modelID  |  rare  | minDamage  |Blocking|  DisableWeaponsMod
  //  |  |  |  picTexture |  |  MinLevel |  | maxDamage|  |  |  Disarm  |  Available in period  Last period of availability
  //------------|---------|----------|-------------------|----|----|------|-----|----|-----|----|---|----|---------|------|------------|-----------------------------|---------------
  n = InitBlade(n, "blade1",  "blade1",  6,  11,  0.90,  1,  63, 15.0, 18.0, 14, 13,  "",  0,  0,  PERIOD_COLONIAL_POWERS,  PERIOD_NAPOLEONIC); // Sabre//BB
  n = InitBlade(n, "blade4",  "blade4",  6,  7,  0.90,  1,  60, 15.0, 18.0, 15, 11,  "",  1,  0,  PERIOD_GOLDEN_AGE_OF_PIRACY, PERIOD_NAPOLEONIC); // Cutlass//BB (BASE SWORD WEAPON)
  n = InitBlade(n, "blade6",  "blade6",  6,  12,  0.50,  4,  139, 14.0, 19.0, 19, 19,  PIRATE,  1,  0,  PERIOD_THE_SPANISH_MAIN,  PERIOD_COLONIAL_POWERS); // Schiavona (pirate?)//BB
  n = InitBlade(n, "blade12", "blade12",  3,  5,  0.20,  6,  470, 17.0, 21.0, 30, 28,  "",  1,  0,  PERIOD_EARLY_EXPLORERS,  PERIOD_NAPOLEONIC); // Arabic Scimitar//BB
  n = InitBlade(n, "blade19", "blade19",  3,  12,  0.15,  7,  364, 15.0, 26.0, 38, 20,  "",  1,  0,  PERIOD_THE_SPANISH_MAIN,  PERIOD_NAPOLEONIC); // German Rapier//BB
  n = InitBlade(n, "blade28", "blade28",  9,  15,  0.15,  9,  490, 20.0, 35.0, 30, 15,  "",  2,  0,  PERIOD_THE_SPANISH_MAIN,  PERIOD_NAPOLEONIC); // Shamshir (SLiB KevAtl)//BB
  n = InitBlade(n, "blade36", "blade36",  23,  2,  0.25,  4,  96, 12.0, 20.0, 30, 12,  "",  1,  0,  PERIOD_EARLY_EXPLORERS,  PERIOD_NAPOLEONIC); // Hunting Sword//BB
  n = InitBlade(n, "blade46", "blade46",  23,  12,  0.15,  3,  132, 12.0, 20.0, 19, 21,  "",  1,  0,  PERIOD_EARLY_EXPLORERS,  PERIOD_NAPOLEONIC); // Shortsword//BB renamed 'shortsword' model is very short!
  n = InitBlade(n, "blade48", "blade48",  23,  14,  0.50,  3,  50,  8.0, 12.0, 15, 18,  "",  2,  0,  PERIOD_GOLDEN_AGE_OF_PIRACY, PERIOD_NAPOLEONIC); // Wooden Handled Naval Dirk//BB(defensive)
  n = InitBlade(n, "blade49", "blade49",  23,  15,  0.35,  7,  81, 11.0, 19.0, 17, 20,  "",  3,  0,  PERIOD_GOLDEN_AGE_OF_PIRACY, PERIOD_NAPOLEONIC); // Bronze Handled Naval Dirk//BB(defensive)
  n = InitBlade(n, "bladeC6", "bladeC6",  21,  15,  0.50,  6,  250, 15.0, 19.0, 33, 19,  "",  1,  0,  PERIOD_GOLDEN_AGE_OF_PIRACY, PERIOD_NAPOLEONIC); // Smallsword (CoAS Metazot)//BB
  n = InitBlade(n, "bladeC11","bladeC11",  21,  13,  0.20,  8,  449, 17.0, 22.0, 30, 32,  "",  5,  0,  PERIOD_THE_SPANISH_MAIN,  PERIOD_NAPOLEONIC); // Milanese longsword(CoAS Metazot)//BB model is very long(so now a longsword)
  n = InitBlade(n, "bladeC12","bladeC12",  21,  12,  0.20,  10,  483, 14.0, 35.0, 37, 19,  "",  3,  0,  PERIOD_EARLY_EXPLORERS,  PERIOD_NAPOLEONIC); // Katzbalger (CoAS Metazot)//BB
All with minlevel between 1-10, so that doesn't seem excessively good.

Max piercing in that range is 38. Max in the game total is 70.
Max blocking in that range is 32. Max in the game total is 80.
So those numbers don't sound too high either.

Worth noting is that the sword with those two maximum values is the Sabre of Nicholas Sharp, which you can get for free VERY EARLY in the game!!!
So that may be rather a nice bonus for beginning players. But I think people like @Hylie Pistof already noticed that. :cheeky
 
Changed it back and it seems to be working more like its intended. but we need to test it more to see :).
 
Changed it back and it seems to be working more like its intended.
Having another quick look at Hook's code, I assume the intention was to make the block/pierce values have a relatively greater impact compared to the fencing skills.
So that would make for a greater difference in effect between a bad blade and a great one.

If that is indeed the case, I'm not entirely sure I agree with it.
The victor in a swordfight should be the one who is more skilled; the sword itself shouldn't really make you that much better, right?

Of course with a 1-10 scale in fencing that you can increase quite quickly, you get to the max quite easily.
And players want to have "better weapons" all the time. o_O
 
So how is the fighting difficulty at the start of the game versus when you are more in it.
@Grey Roger do you have some Feedback or @Mirsaneli maybe?
How are the block chances now?
 
Back
Top