Results 1 to 6 of 6

Thread: The obscure mechanics of Attila, and where you can change them.

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default The obscure mechanics of Attila, and where you can change them.

    Melee accuracy:

    The Base accuracy of all attacks is 40%. Melee attack, Bonus Versus, and charge bonus add one percentage point to this value. Melee defense subtracts one to this value. (Charge bonus also adds to the units melee damage.)

    Attack accuracy cannot go below 15%, or above 85%.
    In KV rules, these values are Melee_hit_chance_base, Melee_hit_chance_min, and Melee_hit_chance_max.

    Melee hit chance is entirely based in arithmetic with a few caps added on. In the vanilla game, the charge bonus of most units can be expected to cap accuracy in nearly every engagement.

    Charges:
    Charges boost the units weapon damage, and accuracy, as stated above.
    They last for 15 seconds in the base game, as determined by Charge_cool_down_time, in KV_rules.

    The timer for Charge_cool_down_time starts ticking when the unit enters an animation state called "Charge_Adopt_Pose" which can be set in battle_entities_table. The further away you have a unit adopt their charge pose, the more likely they will successfully deliver a charge when intercepted or caught,
    but this gives the unit less time to deal charge bonus in an ideal charge scenario.

    Armor:
    Armor blocks a random amount of damage, from 0, to the armors value. On average, you can assume armor will block a third of its value (For some reason.)

    AP damage ALWAYS bypasses armor, and generally should be set to values where you never expect armor scores to actually trigger AP damage, however, due to the RNG nature of the game, armor may randomly decide to block 100% of the enemies damage for 83% or the battle when you set AP to 0. Having no AP makes battles get wildly unpredictable when armor scores are even remotely close to being as high as the enemies damage score.

    Bonus VS Infantry or Cavalry also bypasses armor when the bonus is applicable.

    Armor_piercing_divisor, and armor_penetrating_divisor, KV_rules values, are used to divide the enemies armor score when enabled on a melee_weapon.

    When regarding missiles, it seems whether the Missile_Armor_Penetrating_Coefficent, or Missile_Armor_Piercing_Coefficient (KV_Rules) is used as a multiplier is actually determined by the Unit_armor_Types. By default, the Missile_Armor_Piercing_Coefficient is used against most armors. If bonus versus missiles is checked on the Unit_armor_type entity, the full armor value is used, if weakness versus missiles is checked, missile_armor_penetrating_coefficient is used.


    • This is used to offset certain KV_Rules values that cause missiles to experience damage falloff. There is a lot of them, and I haven't tested them all.




    • One governs shots that hit targets past the missiles maximum range, as determined by the missile table. Arrows that hit past 150 meters (Or 200 for the longbow,) should do 1/5th less damage.


    Shield armor is always half as effective against missiles, to counterbalance missile block chance. This can be changed with the variable "Missile_Shield_Piercing_Coefficient." A KV_Rules value.

    Missile Weapons:

    Missile Weapon Accuracy is determined by several factors: Velocity (Faster shots hit more often,) An unseen "Base Spread" value, Accuracy Skill+Weapon Accuracy Skill Bonus (Reduces the Base spread,) and by introducing some fixed spread.


    • In baseline Attila, the high velocity of Slings and Crossbows make them the most accurate missile weapons. The faster the projectile flies, the easier time your men will have in hitting the enemy unit.
    • All accuracy scores are 0 (Unit Accuracy Skill,) + 5 (Weapon Accuracy Bonus.)
    • Unit Accuracy Skill is on the Land_Units_Table, Weapon_Accuracy_Bonus (PFM marks it as a "marksmanship_bonus,") can be found on Projectiles_table.
    • Accuracy Scores of above 100 do not seem to become more accurate then 100%.
    • The Spread score found on Projectiles_table creates some inaccuracy that the unit cannot bring down through its accuracy skill. Seems to be the base dispersion in meters. (More testing needed.)
    • Accuracy skill takes a 20% penalty when firing on targets in cover. This is determined by missile_target_in_cover_penalty in KV_Rules
    • There are accuracy multipliers for all weather effects.
    • Shockwave radius can be used to make missiles stagger or knockdown enemy units. This can be found in the Projectiles_Table. A value of 0.05 will reliably stagger medium infantry, so be careful!
    • Missile_saving_bonus is the base chance that a missile that hits a target will miss. This is to account for the chance of a shot passing between someones legs, or past their head. Its a KV_Rules value, and it is set to 20 in the base game.


    Missile units will choose to aim at a random point within a 2 meter radius of the center of the enemies unit. This is based on "Projectile_Target_Calibration_area," in KV rules. This could be considered another method of adding shot spread to units with high accuracy scores.

    Unit movement:

    Units Base speeds (Charge, Walk, Run, "Crawl") are all found in the Battle_Entities_table.
    It is also home to the values regarding the base health, mass, and charge distances of units.

    The KV_Rules value "Pike_Move_Speed_modifier" is used to multiply the walk speed of units that are in any mobile infantry formation, be it shield wall, pike phalanx, or mobile testudo.

    The Battle_entites value "Tracking_Threshold" determines how cohesive units within a certain weight class will try to be when making movements on the battle field. This is disabled when a unit is charging it seems.



    Impact damage:

    The formula for impact damage is (((((BracingX(Mass/100))XSpeed))-((BracingX(EnemiesMass/100))XSpeed))^Collison_Damage_Normalizer)*Collison_Damage_Multiplier+Collison_Damage_Default


    Collision_Damage_Normalizer, Collision_Damage_Multiplier, and Collision_Damage_Default are all KV rules value.
    Collision_Damage_Normalizer=1.5 in the base game
    Collision_Damage_Multiplier=2 in the base game
    Collison_Damage_Default=20 in the base game.

    This makes the base impact damage expodential damage that can easily reach into the thousands.
    It cannot be blocked by anything except having enough bracing force to deflect the enemy charge.

    Half of all collision damage is AP, by default.

    Bracing is always 1 when the unit hasn't stood still for about 2 seconds. Bracing is never used when a unit is getting hit with a flanking charge.
    The strength of bracing can be determined in KV_rules, which allows players to set at how many ranks does the unit get the most bracing per rank, what the maximum bracing per rank is, and what the maximum mass multiplier one can get from any number of bracing factors.

    Charge reflectors get 4X mass from bracing when hit from the front, and standing still. (KV_Rules.)

    Mass bonuses from unit abilities are all bracing, so stand still, and get hit from the front!

    Cavalry is immune to impact damage in the base game. This can be changed in KV rules.


    Flanking:

    Individuals from a unit that are attacking the side of the enemy unit only have to deal with half their melee defense.

    Individuals attacking the rear of an enemy unit face no melee defense.
    This is determined by KV rules values "Melee_Defense_Coefficient_Flank/Rear."

    Factor_Attack_Dir
    _Front/Left/Right/Rear (KV_rules,) Sets the percentage probability that an enemy attack will be ignored, and replaced with one of your attacks by individuals who are flanking. Roughly, the enemy will only attack 14% of the time when looking at individuals who have wrapped around to the rear of their own unit.

    Effectively, one man who wraps around is 7.14 to 9.6 times as effective as one who slams into the front of an enemy unit. Having 3 men of wrap around is like having a unit size that is twenty men higher then that of the enemy.

    FIRST STRIKE:

    An unused innitiative value found in melee_weapons_table. Each point of it gives your unit what is roughly a 1/75 chance to replace one of the enemies attacks with one of their own, in all scnearios.
    It is totally usable, balancable, and fine in Attila.

    In Rome II, this variable would shift the attack ratio by 1/25, as such, I reccomend that you be careful when useing it in Rome II.
    Last edited by Walrusjones; December 06, 2015 at 04:43 PM.

  2. #2
    Cesco's Avatar Decanus
    Join Date
    Apr 2013
    Location
    Italia
    Posts
    595

    Default Re: The obscure mechanics of Attila, and where you can change them.

    Good work. Do you know if there are other "hidden" differences between Rome 2 and Attila's battle systems? In Attila there must be some value that makes pulling units out of combat in Attila much inconvenient since they get a pretty high percentage of casualties...by now the only way i found to reduce this problem is to low the hit rate value in kv rules, but this can't be the heart of the matter, since the value is the same both in vanilla Rome 2 and Attila.
    Huic ab adulescentia bella intestina, caedes, rapinae, discordia civilis grata fuerunt ibique iuventutem suam exercuit

  3. #3

    Default Re: The obscure mechanics of Attila, and where you can change them.

    Quote Originally Posted by Zeion View Post
    Good job, thank you! Really interesting stuff.

    Just wondering:

    Did you find that in the data or is that your gut feeling?

    It would be interesting to know the probability distribution behind it. Or in other words: What is the variance of the blocked damage value? This might increase or decrease volatility in battles signifcantly (especially in regard to the morale system).
    Try setting up a single with one hitpoint, and testing what portion of the time a 3 damage attack that is guaranteed to hit actually kills them.

    With 9 armor, 2/3rds of the attacks thrown against this single man would kill him in my testing.

    Later, I worked on mathmatically solving this information to get an exact "Attacks to kill" that accurately represented what happened in the base game for Rome II and Attila, the breakthrough happened when I was solving a head to head engagement between sword followers, and dacian noble swords.

    The formula worked across both titles with what I consider to be a reasonable degree of accuracy. The only reason I don't use it more is that I haven't factored first strike into it.


    Quote Originally Posted by Cesco View Post
    Good work. Do you know if there are other "hidden" differences between Rome 2 and Attila's battle systems? In Attila there must be some value that makes pulling units out of combat in Attila much inconvenient since they get a pretty high percentage of casualties...by now the only way i found to reduce this problem is to low the hit rate value in kv rules, but this can't be the heart of the matter, since the value is the same both in vanilla Rome 2 and Attila.

    As for the disengage mechanics of Attila: It seems disengaging units are hardcoded to take one hit deaths when attacked. I haven't seen anything regarding this in KV rules, which doesn't mean that there isn't something that we can do about it, but it might not be on the design tables. Similar to the base formations coded into the game, you can find XML's in BOB, that can be compiled into a bin, that will change the formations that the AI itself uses when placed into a pack.

    I wouldn't be surprised if their was a KV_Rules like file among these raw_data XML's, and I will do my best to find it.

  4. #4

    Default Re: The obscure mechanics of Attila, and where you can change them.

    Good job, thank you! Really interesting stuff.

    Just wondering:
    Armor blocks a random amount of damage, from 0, to the armors value. On average, you can assume armor will block a third of its value (For some reason.)
    Did you find that in the data or is that your gut feeling?

    It would be interesting to know the probability distribution behind it. Or in other words: What is the variance of the blocked damage value? This might increase or decrease volatility in battles signifcantly (especially in regard to the morale system).
    Chronicles of Cimmeria - A Kimmerios Bosporos AAR (EB2)
    The Age of Peace - A TW: Warhammer Empire AAR
    Blood Red Eagle - The Sons of Lodbrok Invasion of Northumbrialand [complete]
    Machines - A Sci-Fi Short Story [complete]

  5. #5
    KAM 2150's Avatar Artifex
    Patrician

    Join Date
    Jul 2013
    Location
    Gdańsk, Poland
    Posts
    11,096

    Default Re: The obscure mechanics of Attila, and where you can change them.

    Like I already told you yesterday, very good job on this!
    Official DeI Instagram Account! https://www.instagram.com/divideetimperamod/
    Official DeI Facebook Page! https://www.facebook.com/divideetimperamod

  6. #6

    Default Re: The obscure mechanics of Attila, and where you can change them.

    Regarding missile falloff, I think I may have found out the mechanics behind them in a more concrete fashion, given the numerical values....

    missile_lethality_coefficient_extreme_range seems to be an armor bonus pre-missile coefficient, which applies to missiles past their effective range.

    missile_lethality_coefficient_effective_range seems to be the same, but against targets standing within the units effective range. Might be multiplied by projectile_distance_multiplier, which will be my second test. As such, for the first test, the multiplier will be set to 1.

    I will need to test this. Probably by hitting an armor-less, sheild-less, 1HP man with sling bullets with missile_lethality_coefficient_effective_range set to 300.

    If this is the case, we can expect this man, whose main units entry is currently labeled as "HoC_Patchy," to die 50% of the time to perfectly accurate missile fire, which should be possible, with the help of "Wal_Jones,' our resident slinger.

    Other variables I will be touching: I will be disabling all spread variables, and projectile_distance_multiplier (Old shogun 2 era variable, probably defunct, but potentially active.)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •