Archers and Crossbowmen performance insanely good in 1.5.5

正在查看此主题的用户

@Dabos37 some Input, but not tested. The underlined ones, can be important for further investigation though

protected void SetAiRelatedProperties(Agent agent, AgentDrivenProperties agentDrivenProperties, WeaponComponentData equippedItem, WeaponComponentData secondaryItem)
{
int meleeSkill = this.GetMeleeSkill(agent, equippedItem, secondaryItem);
SkillObject skill = (equippedItem == null) ? DefaultSkills.Athletics : equippedItem.RelevantSkill;
int effectiveSkill = this.GetEffectiveSkill(agent.Character, agent.Origin, agent.Formation, skill);
float num = this.CalculateAILevel(agent, meleeSkill);
float num2 = this.CalculateAILevel(agent, effectiveSkill);
float num3 = num + agent.Defensiveness;
agentDrivenProperties.AiRangedHorsebackMissileRange = 0.3f + 0.4f * num2;
agentDrivenProperties.AiFacingMissileWatch = -0.96f + num * 0.06f;
agentDrivenProperties.AiFlyingMissileCheckRadius = 8f - 6f * num;
agentDrivenProperties.AiShootFreq = 0.3f + 0.7f * num2;
agentDrivenProperties.AiWaitBeforeShootFactor = (agent._propertyModifiers.resetAiWaitBeforeShootFactor ? 0f : (1f - 0.5f * num2));
bool flag = secondaryItem != null;
agentDrivenProperties.AIBlockOnDecideAbility = MBMath.Lerp(0.25f, 0.99f, MBMath.ClampFloat((float)Math.Pow((double)num, 1.0), 0f, 1f), 1E-05f);
agentDrivenProperties.AIParryOnDecideAbility = MBMath.Lerp(0.01f, 0.95f, MBMath.ClampFloat((float)Math.Pow((double)num, 1.5), 0f, 1f), 1E-05f);
agentDrivenProperties.AiTryChamberAttackOnDecide = (num - 0.15f) * 0.1f;
agentDrivenProperties.AIAttackOnParryChance = 0.3f - 0.1f * agent.Defensiveness;
agentDrivenProperties.AiAttackOnParryTiming = -0.2f + 0.3f * num;
agentDrivenProperties.AIDecideOnAttackChance = 0.15f * agent.Defensiveness;
agentDrivenProperties.AIParryOnAttackAbility = MBMath.ClampFloat((float)Math.Pow((double)num, 3.0), 0f, 1f);
agentDrivenProperties.AiKick = -0.1f + ((num > 0.4f) ? 0.4f : num);
agentDrivenProperties.AiAttackCalculationMaxTimeFactor = num;
agentDrivenProperties.AiDecideOnAttackWhenReceiveHitTiming = -0.25f * (1f - num);
agentDrivenProperties.AiDecideOnAttackContinueAction = -0.5f * (1f - num);
agentDrivenProperties.AiDecideOnAttackingContinue = 0.1f * num;
agentDrivenProperties.AIParryOnAttackingContinueAbility = MBMath.Lerp(0.05f, 0.95f, MBMath.ClampFloat((float)Math.Pow((double)num, 3.0), 0f, 1f), 1E-05f);
agentDrivenProperties.AIDecideOnRealizeEnemyBlockingAttackAbility = 0.5f * MBMath.ClampFloat((float)Math.Pow((double)num, 2.5) - 0.1f, 0f, 1f);
agentDrivenProperties.AIRealizeBlockingFromIncorrectSideAbility = 0.5f * MBMath.ClampFloat((float)Math.Pow((double)num, 2.5) - 0.1f, 0f, 1f);
agentDrivenProperties.AiAttackingShieldDefenseChance = 0.2f + 0.3f * num;
agentDrivenProperties.AiAttackingShieldDefenseTimer = -0.3f + 0.3f * num;
agentDrivenProperties.AiRandomizedDefendDirectionChance = 1f - (float)Math.Log((double)num * 7.0 + 1.0, 2.0) * 0.33333f;
agentDrivenProperties.AISetNoAttackTimerAfterBeingHitAbility = MBMath.ClampFloat((float)Math.Pow((double)num, 2.0), 0.05f, 0.95f);
agentDrivenProperties.AISetNoAttackTimerAfterBeingParriedAbility = MBMath.ClampFloat((float)Math.Pow((double)num, 2.0), 0.05f, 0.95f);
agentDrivenProperties.AISetNoDefendTimerAfterHittingAbility = MBMath.ClampFloat((float)Math.Pow((double)num, 2.0), 0.05f, 0.95f);
agentDrivenProperties.AISetNoDefendTimerAfterParryingAbility = MBMath.ClampFloat((float)Math.Pow((double)num, 2.0), 0.05f, 0.95f);
agentDrivenProperties.AIEstimateStunDurationPrecision = 1f - MBMath.ClampFloat((float)Math.Pow((double)num, 2.0), 0.05f, 0.95f);
agentDrivenProperties.AIHoldingReadyMaxDuration = MBMath.Lerp(0.25f, 0f, Math.Min(1f, num * 1.2f), 1E-05f);
agentDrivenProperties.AIHoldingReadyVariationPercentage = num;
agentDrivenProperties.AiRaiseShieldDelayTimeBase = -0.75f + 0.5f * num;
agentDrivenProperties.AiUseShieldAgainstEnemyMissileProbability = 0.1f + num * 0.6f + num3 * 0.2f;
agentDrivenProperties.AiCheckMovementIntervalFactor = 0.005f * (1.1f - num);
agentDrivenProperties.AiMovemetDelayFactor = 4f / (3f + num2);
agentDrivenProperties.AiParryDecisionChangeValue = 0.05f + 0.7f * num;
agentDrivenProperties.AiDefendWithShieldDecisionChanceValue = Math.Min(1f, 0.2f + 0.5f * num + 0.2f * num3);
agentDrivenProperties.AiMoveEnemySideTimeValue = -2.5f + 0.5f * num;
agentDrivenProperties.AiMinimumDistanceToContinueFactor = 2f + 0.3f * (3f - num);
agentDrivenProperties.AiStandGroundTimerValue = 0.5f * (-1f + num);
agentDrivenProperties.AiStandGroundTimerMoveAlongValue = -1f + 0.5f * num;
agentDrivenProperties.AiHearingDistanceFactor = 1f + num;
agentDrivenProperties.AiChargeHorsebackTargetDistFactor = 1.5f * (3f - num);
agentDrivenProperties.AiWaitBeforeShootFactor = (agent._propertyModifiers.resetAiWaitBeforeShootFactor ? 0f : (1f - 0.5f * num2));
float num4 = 1f - num2;
agentDrivenProperties.AiRangerLeadErrorMin = -num4 * 0.35f;
agentDrivenProperties.AiRangerLeadErrorMax = num4 * 0.2f;
agentDrivenProperties.AiRangerVerticalErrorMultiplier = num4 * 0.1f;
agentDrivenProperties.AiRangerHorizontalErrorMultiplier = num4 * 0.0349065848f;
agentDrivenProperties.AIAttackOnDecideChance = MathF.Clamp(0.23f * this.CalculateAIAttackOnDecideMaxValue() * (3f - agent.Defensiveness), 0.05f, 1f);
agentDrivenProperties.SetStat(DrivenProperty.UseRealisticBlocking, (agent.Controller != Agent.ControllerType.Player) ? 1f : 0f);
}

Edit: Problem....this Method will also be applied to the Multiplayer...

Yes, some time ago someone told me about these parameters and they actually work pretty good to make archers less accurate, but I remember that I had to give archers a huge accuracy nerf to actually notice something in big battles, but then tournaments became a pain where ranged units were not able to hit anyone xD.

Plus I remember that changing one of these parameters where pretty good for the AI to be able to block projectiles without shield wall formation:

agentDrivenProperties.AiRaiseShieldDelayTimeBase = -0.75f + 0.5f * num;
agentDrivenProperties.AiUseShieldAgainstEnemyMissileProbability = 0.1f + num * 0.6f + num3 * 0.2f;

(I am going to check old posts to try to find how I did it)
 
@Medivhtratos Ok I have found that thread, here you can see what I changed and the result, it was actually pretty good and AI was able to raise shields to block projectiles much better:


I am not sure if these modifications still works in the version 1.5.5 and this is the thing, I cannot rely on my own mods if the game is constantly changing and it would be great if devs would fix this issue definitely. As you can see in that thread, I have been complaining about this since a lot of time ago and things have got better but 1.5.5 has been a huge step back in this matter :sad:
 
Yeah i see it.

But just for Fun I´ve found another Method :iamamoron:
public virtual float GetWeaponInaccuracy(Agent agent, WeaponComponentData weapon, int weaponSkill)
{
float val = 0f;
if (weapon.IsRangedWeapon)
{
val = (100f - (float)weapon.Accuracy) * (1f - 0.002f * (float)weaponSkill) * 0.001f;
}
else if (weapon.WeaponFlags.HasAllFlags(WeaponFlags.WideGrip))
{
val = 1f - (float)weaponSkill * 0.01f;
}
return Math.Max(val, 0f);
}

Maybe a change there will help to increase the inaccuracy(but i think this will be applied to the player too), since it uses the weapon accuracy and the Skill lvl.
 
I have just tested and changing this:

agentDrivenProperties.AiRaiseShieldDelayTimeBase = -0.75f + 0.5f * num;

To this:

agentDrivenProperties.AiRaiseShieldDelayTimeBase = 2f + 0.5f * num;

Still works pretty well as you can see here:



You can see that AI units use shield pretty well since the beggining before giving the shield wall order. The only reson because devs want the AI to be dumb is due to Captain Mode. They probably want that if you do not use shield wall (because you are a bad player or just forget it), your units get massacred by archers and the game would be more skilled. This is nice for Captain Mode but horrible for AI in SP.

Yeah i see it.

But just for Fun I´ve found another Method :iamamoron:
public virtual float GetWeaponInaccuracy(Agent agent, WeaponComponentData weapon, int weaponSkill)
{
float val = 0f;
if (weapon.IsRangedWeapon)
{
val = (100f - (float)weapon.Accuracy) * (1f - 0.002f * (float)weaponSkill) * 0.001f;
}
else if (weapon.WeaponFlags.HasAllFlags(WeaponFlags.WideGrip))
{
val = 1f - (float)weaponSkill * 0.01f;
}
return Math.Max(val, 0f);
}

Maybe a change there will help to increase the inaccuracy(but i think this will be applied to the player too), since it uses the weapon accuracy and the Skill lvl.

Going to test this later too, thanks.
 
I have just tested and changing this:

agentDrivenProperties.AiRaiseShieldDelayTimeBase = -0.75f + 0.5f * num;

To this:

agentDrivenProperties.AiRaiseShieldDelayTimeBase = 2f + 0.5f * num;

Still works pretty well as you can see here:



You can see that AI units use shield pretty well since the beggining before giving the shield wall order. The only reson because devs want the AI to be dumb is due to Captain Mode. They probably want that if you do not use shield wall (because you are a bad player or just forget it), your units get massacred by archers and the game would be more skilled. This is nice for Captain Mode but horrible for AI in SP.



Going to test this later too, thanks.

Well done
 
How do you know that? Genuinely wondering.

I am just speculating. I have the feeling that SP battles would be like x3 better and more balanced if Captain Mode would not exist. For example, archers are OP again because Captain Mode players complained a lot about Archers and now they are too good again.

Not saying that Captain Mode should disappear xD, of course not, just that it should be balanced separately. Concerning the AI, why the hell would you like to dumb down infantry AI to not be able to block anything without shieldwall then? Devs want the AI to be horrible for some hidden conspirancy inside TW maybe? As you can see, I can make the AI to block projectiles pretty good just by changing a number.
 
Well done

I have not tested yet what you said in your last post but I can confirm that modifying these parameters:

agentDrivenProperties.AiRangerLeadErrorMin = -num4 * 0.35f;
agentDrivenProperties.AiRangerLeadErrorMax = num4 * 0.2f;
agentDrivenProperties.AiRangerVerticalErrorMultiplier = num4 * 0.1f;
agentDrivenProperties.AiRangerHorizontalErrorMultiplier = num4 * 0.034906585f;

To this:

agentDrivenProperties.AiRangerLeadErrorMin = -num4 * 0.7f;
agentDrivenProperties.AiRangerLeadErrorMax = num4 * 0.4f;
agentDrivenProperties.AiRangerVerticalErrorMultiplier = num4 * 0.2f;
agentDrivenProperties.AiRangerHorizontalErrorMultiplier = num4 * 0.069906585f;

Also work pretty well.

I would love if I could find something to increase reload speed for all ranged units (modifying thruth speed in weapons.xml just works for archers and it is horribly time consuming) and/or something to nerf the piercing damage for all ranged weapons just by modifying one or two parameters. I have the feeling that there should be a parameter to nerf how effective each kind of damage is against armor. Going to try to find that.
 
First thing that needs to be done is make armor worth something again. Maybe it was too good originally. Maybe weapon skill wasn’t doing it’s job.....I don’t know. But armor has got to do a better job. I mean QUILT armor has been tested and proven to reject arrows, why am I dressed like a legionnaire but get taken out in 2-3 hits?

Second is look at accuracy. It’s been a while, but when I was first playing, I rode to a point in a giant army battle on a ridge and fired arrows at a stationary ground of soldiers.

First arrow missed so I aimed higher

Second hit a target in the head

Third hit the SAME target in the head and kill him

adjusted a hair slightly to the left and the fourth, fifth, and sixth arrows all hit the same target then dropped him.

No way. This should not be happening. The variance of the shot doesn’t even cover the whole of the targeting reticle. Flock shooting in a pack of soldiers should garner results, but this pinpoint accuracy we’ve seen from stationary archers has got to go
 
I have not tested yet what you said in your last post but I can confirm that modifying these parameters:

agentDrivenProperties.AiRangerLeadErrorMin = -num4 * 0.35f;
agentDrivenProperties.AiRangerLeadErrorMax = num4 * 0.2f;
agentDrivenProperties.AiRangerVerticalErrorMultiplier = num4 * 0.1f;
agentDrivenProperties.AiRangerHorizontalErrorMultiplier = num4 * 0.034906585f;

To this:

agentDrivenProperties.AiRangerLeadErrorMin = -num4 * 0.7f;
agentDrivenProperties.AiRangerLeadErrorMax = num4 * 0.4f;
agentDrivenProperties.AiRangerVerticalErrorMultiplier = num4 * 0.2f;
agentDrivenProperties.AiRangerHorizontalErrorMultiplier = num4 * 0.069906585f;

Also work pretty well.

I would love if I could find something to increase reload speed for all ranged units (modifying thruth speed in weapons.xml just works for archers and it is horribly time consuming) and/or something to nerf the piercing damage for all ranged weapons just by modifying one or two parameters. I have the feeling that there should be a parameter to nerf how effective each kind of damage is against armor. Going to try to find that.
you can, i posted it. ComputeRawDamageNew is the Method

num4 = Math.Max(0f, magnitude * num3 - armorEffectiveness * 0.33f); change this to a higher number against pierce attacks(all sorts)

num4 = Math.Max(0f, magnitude * num3 - armorEffectiveness * 0.5f); change this to a higher number against cut attacks(all sorts)

for Blunt Weapon, there is only that:
float num2 = magnitude * bluntDamageFactorByDamageType; => Can be Pierce/Cut/Blunt
float num3 = 100f / (100f + armorEffectiveness);
num += num2 * num3;
return num * absorbedDamageRatio;



if you change or add something in this method you can make armor more/less effective against all types of dmg.
 
最后编辑:
you can, i posted it. ComputeRawDamageNew is the Method

num4 = Math.Max(0f, magnitude * num3 - armorEffectiveness * 0.33f); change this to a higher number against pierce attacks(all sorts)

num4 = Math.Max(0f, magnitude * num3 - armorEffectiveness * 0.5f); change this to a higher number against cut attacks(all sorts)

for Blunt Weapon, there is only that:
float num2 = magnitude * bluntDamageFactorByDamageType; => Can be Pierce/Cut/Blunt
float num3 = 100f / (100f + armorEffectiveness);
num += num2 * num3;
return num * absorbedDamageRatio;



if you change or add something in this method you can make armor more/less effective against all types of dmg.

You.... you.... you are amazing my friend :razz:

Thanks, I can now actually start playing the game again and stop crying in the forum waiting for a fix. I just hope that these small tricks continue working after every patch.

Thanks!


First thing that needs to be done is make armor worth something again. Maybe it was too good originally. Maybe weapon skill wasn’t doing it’s job.....I don’t know. But armor has got to do a better job. I mean QUILT armor has been tested and proven to reject arrows, why am I dressed like a legionnaire but get taken out in 2-3 hits?

Second is look at accuracy. It’s been a while, but when I was first playing, I rode to a point in a giant army battle on a ridge and fired arrows at a stationary ground of soldiers.

First arrow missed so I aimed higher

Second hit a target in the head

Third hit the SAME target in the head and kill him

adjusted a hair slightly to the left and the fourth, fifth, and sixth arrows all hit the same target then dropped him.

No way. This should not be happening. The variance of the shot doesn’t even cover the whole of the targeting reticle. Flock shooting in a pack of soldiers should garner results, but this pinpoint accuracy we’ve seen from stationary archers has got to go


Let's see what happen in the following patches but to be honest, I have not much hopes. I have been complaining about archers since months ago and when everythin looked fixed, now archers are OP again and crossbowmen have just as OP as archers now.
 
NP
But every patch reset the dlls so you will have to change them every time....

Yes I know, for this reason I want something which I can change fast and not having to modify each weapon in the xml file. The thing is that eventually devs change some things and I cannot compile dlls anymore (I know that I have to upload them again to dnSpy), so I get totally ****ed when this happens. For example, I was turning off the Khuzaits cultural bonus in 1.5.4 but now I get an error when I try to compile the new dll :'-(
 
Yeah, no point in having infantry in the game at this point. The fire rate is absurd, nobody fires a bow like that, it takes a few seconds to zero in on a target, this is Robinhood on steroids.
 
Sorry to intrude on your activity in coding mods with a question - but everyone seems to be talking about Captain mode. What is it?
 
Sorry to intrude on your activity in coding mods with a question - but everyone seems to be talking about Captain mode. What is it?
It's one of the 3 main multiplayer game modes in which you and a team of players control/command Ai units as a "captain" and work together to fight and defeat the enemy teams army. 6 v 6

As far as multiplayer game-modes are concerned, it is the closest to the Singleplayer gameplay experience in similarity, albeit with Real people as commanders rather than an Ai commander.

Unfortunately, the developers have designed Bannerlord to have all systems connected including Singleplayer and Multiplayer, therefor a change made to one is a change made to all, so often we find ourselves arguing over the proper way to manage this tricky balance from many different gameplay perspectives.

If the developers are open to feedback: The collective Bannerlord community wants these systems to be independent of eachother so that we can maintain a proper balance for each unique mode /gameplay experience without worrying about ruining the balance and structure of the other modes.
 
最后编辑:
these systems to be independent of eachother so that we can maintain a proper balance for each unique mode /gameplay experience without worrying about ruining the balance and structure of the other modes.
Pretty much this.
Whoever linked MP with SP should be send to salt mine.
 
If you have a talk about the AI behavior, i think at least for this method it shouldnt be a problem. Copy+Paste the Method in the same class. Rename it like

SetAiRelatedProperties and the pasted one SetAiRelatedPropertiesMP.

Go into the MultiplayerClass and change the callup from base.SetAiRelatedProperties to base.SetAiRelatedPropertiesMP.

Done, now you will have to different methods, one for SP and one for MP. But that is just thinking, never tried it before. :sneaky:
 
If you have a talk about the AI behavior, i think at least for this method it shouldnt be a problem. Copy+Paste the Method in the same class. Rename it like

SetAiRelatedProperties and the pasted one SetAiRelatedPropertiesMP.

Go into the MultiplayerClass and change the callup from base.SetAiRelatedProperties to base.SetAiRelatedPropertiesMP.

Done, now you will have to different methods, one for SP and one for MP. But that is just thinking, never tried it before. :sneaky:
+1
And don't forget the SPitems and MPitems folders with weapons and different panoply with different values and effects.
#adequatebalancenow
 
后退
顶部 底部