Results 1 to 4 of 4

Thread: combat formula?

  1. #1

    Default combat formula?

    What does a +1 attack bonus mean precisely? I mean..mathematically. Does it increase the chance of hitting by X percent or does it multiply the chance of hitting by Y percent?

    and what is X or Y?

    what is the attack/defense/hit formula? is it the same as for MTW 1? I can't find this info anywhere.

    Ive been running tests...taking attack power up and then compensating by taking lethality factor down, but unless I know the mathematical form of the to hit formula, I can't figure out what the coefficients are.

    This is my best guess as to the formula

    Chance to hit = a*(1.2^(attack-defense))/100
    Chace to kill = lethality_factor*a*(1.2^(attack-defense))/100
    attack= attacker attack rating
    defense= defender defense rating (after modifiers dependent upon type of attack, missile, armor piercing, etc.)
    a = the percent chance to hit when attack=defense
    lethality_factor = last entry in the stat_pri line

    I don't really care about 'a' that much. What I want to know is if 1.2 is right and if the form of the formula is even the right form.

    I got this formula by doing two things, first, I assumed the formula was the same form as for MTW 1, second, I did a straight up fight between two identical units except one of them has 10 extra attack points. I then reduced the lethality factor of that unit's weapon incrementally until I found that the two units were approximately equal again. I found they were about equal when I had reduced the lethality by a factor of 6. 1.2^(10) is about 6, so I think I am close. I was just wondering if anyone knows for sure.

  2. #2

    Default Re: combat formula?

    Quote Originally Posted by xerex
    What does a +1 attack bonus mean precisely? I mean..mathematically.

    This is my best guess as to the formula

    Chance to kill = lethality_factor*a*(1.2^(attack-defense))/100
    attack= attacker attack rating
    defense= defender defense rating (after modifiers dependent upon type of attack, missile, armor piercing, etc.)
    a = the percent chance to hit when attack=defense
    lethality_factor = last entry in the stat_pri line

    I don't really care about 'a' that much. What I want to know is if 1.2 is right and if the form of the formula is even the right form.
    Well I don't know for sure, but if the formula is basically the same as in the old engine, a = 0.019 and my tests indicate that the 1.2 constant is now 1.1. I agree that lethality is coming in as a multiplier after the exponential is calculated. The old system saturated at -20 and +20 exponent. The new system saturates at -64 and +64, so it seems they made the steps about half the size. I would say they are now approximately 10% instead of the old 20% change in chance to kill per combat point.

    Missle effectiveness is calculated differently. In the old system, it's a linear relationship. If you double the armor, the kills are cut in half. I have no reason to believe this has changed. The effect of lethality of a missle which was introdiced in MTW is also very linear, and it's easiest to control missle effectiveness with that parameter. The calculation first determines if the missle hits (accuracy), then if it penetrated the armor and if it does then if it's a lethal hit. I think that's how it works, but I'd have to check all the parametes again to be sure. As I recall, the power parameter now determines how many hitpoints are removed from the target for a lethal hit. It appears that the missle model has changed in the new engine (RTW), and I don't know how much of the old system remains in place.
    Last edited by Puzz3D; 02-21-2007 at 18:33.

    _________Designed to match Original STW gameplay.


    Beta 8 + Beta 8.1 patch + New Maps + Sound add-on + Castles 2

  3. #3

    Default Re: combat formula?

    thx for the info,

    I will double check my result of 1.2 when I get home. There is a lot of randomness in the mock battles, so it is difficult to tell when you have the right multiplier to counter the increased attack strength.

    I am still not clear on the missile weapon mechanics though...

    does range affect accuracy/lethality?

    so there are 3 calculations?

    to hit?
    to penetrate?
    to kill?

    but what attributes are used in which calculations?

    I looked at the projectiles file and the damage value is for wall damage. There is no other "damage" or power factor that I can see, so I only see 5 parameters that can be involved in the 3 calculations, attack strength, lethality, velocity, range, and enemy armor/shield. I imagine the units attack strength and range are involved in the to hit calculation, and I imagine lethality or velocity and enemy armor/shield would be involved in the other two, but in what way? just a flat to penetrate=C/(armor+shield+C)? to kill = lethality?

    what about to hit? to hit=D^(-range/max_range)*attack_power/F ?

    C,D, and F are just number i don't know. If I at least knew the form of the formula that is hard coded in, I could figure out the rest.

    or do they calculate individual arrow trajectories and determine which ones intersect soldiers? with attack power somehow determining a random deltaV added to the V which would strike the intended target?

    Why can't they just tell us these formula instead of making us sit there and run custom battles all day.

  4. #4

    Default Re: combat formula?

    Quote Originally Posted by xerex
    or do they calculate individual arrow trajectories and determine which ones intersect soldiers? with attack power somehow determining a random deltaV added to the V which would strike the intended target?
    They calculated individual arrow trajectories in the old engine, but they apparently don't do that in the new engine. Accuracy (small angular error added to the trajectory) affected the chance to hit based on the target size and distance to the target, power determined chance to penetrate the armor = C * power/(armor+shield) and there was no lethality. In MTW, lethality was added to determine the chance that a hit would kill (raw percentage 0% to 100%), and power was changed to, ""The number of hits points damage done to a man or structure.". You no longer had control over a parameter that represented the kinetic energy and therefore the penetrating capability of the projectile.

    I've haven't done any tests on RTW to determine how kills vary with the parameters available. It's not worth the effort involved. Such tests are extremely tedious to perform, and you need two machines on a LAN to do them properly or else a friend who has a lot of spare time to help you run the tests online.
    Last edited by Puzz3D; 02-24-2007 at 13:17.

    _________Designed to match Original STW gameplay.


    Beta 8 + Beta 8.1 patch + New Maps + Sound add-on + Castles 2

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO