Results 1 to 6 of 6

Thread: How does the magic work?

  1. #1

    Default How does the magic work?

    Hi there,

    thinking a lot of R:TW and its predecessors I started to wonder how the battles actually work? I mean how does the system work?
    In gudies and forums I read a lot of bonuses etc on attack and charge and penalties on getting flanked or sandwitched... but what do all those numbers mean and what is the basis? How does the engine calculate? In my own unknowing mind I thought of some dice system... ya know... engine "throws a dice" and adds the bonuses or penalties and then decides whos winning (the horseman or the spearman)... well that's where my imagination goes.

    I know it's an odd question and maybe a bit difficult to answer but possibly there are some people out there who can tell me the answer to this.

    Thanx in advance

    Keep up conquering

    KampfHase
    DUDE
    Mr. Treehorn treats objects like women, man.

  2. #2

    Default Re: How does the magic work?

    You have units each composed of many men. When a man gets close to an enemy man they fight by taking turns striking at each other. This is called a combat cycle. Most men only have one hit point, but some have two and the general will have more than that. A calculation is made on each strike to see if it is a hit. When a man gets to zeo hit points (which is a single hit for most cases), the man dies. We don't know the exact algorithm being used in RTW to calculate chance of a hit in the combat cycle. STW and MTW used:

    chance to hit = 1.9% * 1.2 ** (attack - defend + bonus)

    where attack is the striker's attack value, defend is the target's defend value and bonus is the sum of any combat modifiers that apply to the situation. There are many situational combat modifiers. The chance to hit is compared to a uniformly distrbuted random number in the range 0 < n < 1. If chance to hit exceeds n, you get a hit. In STW and MTW, men always get to strike once within a combat cycle. A single man could parry multiple strikes from several men in one combat cycle, but only strike at one of those men.

    I believe the algorithm in RTW is the same as used in STW and RTW, but the constant 1.2 is now 1.1, and there is a new "lethality" parameter for different weapon types that modifies the chance to hit. In STW and MTW, the system cutoff at - 20 and + 20 points difference which is very close to 1% and 99% chance to hit. The cutoff points will be different in RTW because each point apparently represents a smaller step on the chance to hit scale so you have more points covering the 1% to 99% range.

    Ranged units shoot a projectile on a trajectory which is governed by a simple vacuum physics gravity model. Accuracy is a small random error placed on the initial trajectory. I believe lethality in this case is the projectile's ability to penetrate armor. A target's armor rating is used to calculate the probablility of a penetrating hit using a simple linear calculation and comparing the result to a random number as with melee combat. I think penetrating hits always reduce the hitpoints of the target. Some weapons such as artillery have a power parameter larger than 1 which means they can remove more than one hit point at a time.

    Morale is a unit wide condition. Each unit has a starting moral and can gain or loose morale depending on its combat situation such as casualties, condition of the general and positioning relative to friendly and enemy units. If morale drops below a certain threshold, all the men in the unit rout. Lots of factors affect morale and they are deterministic in that random numbers are not used in the calculations.

    Fatigue is a unit wide condition. Fatigue reduces a unit's combat points, morale and movement speed. The stamina and heat parameters modify the fatigue rate which varies depending on whether the unit is standing, walking, running, charging or fighting. There is a recovery rate which allows units to come back up to a less fatigued state. Standing is the fastest way to recover, but you might notice some recovery while walking with very fatugued units. Fatigue is also deterministic with no random differences entering the calculation.

    Creative Assembly has yet to make known either the combat algorithms or the combat situational modifiers used in RTW. They did this for the previous battle engine used in STW and MTW.
    Last edited by Puzz3D; 07-22-2005 at 17:08.

    _________Designed to match Original STW gameplay.


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

  3. #3

    Default Re: How does the magic work?

    Wow, sounds complex to me. Thanks for the info. I can imagine how it works. Not too complex after all, if you know how it's done, I guess.

    Concerning these algorithms, how are they developed? Can't just buy them at Wal Mart I guess. But was it invented just for TW or can everybody use em?

    For sure, ya need to study computer science to understand the whole idea, I guess. Don't wanna go into much detail here.

    I'm just asking because I know nothing at all about that programming stuff and algorithms... I'm just a consumer.
    DUDE
    Mr. Treehorn treats objects like women, man.

  4. #4
    Amanuensis Member pezhetairoi's Avatar
    Join Date
    Apr 2005
    Location
    South of Sabara
    Posts
    2,719

    Default Re: How does the magic work?

    you'd have to be a very trained consumer... O_o


    EB DEVOTEE SINCE 2004

  5. #5

    Default Re: How does the magic work?

    Quote Originally Posted by KampfHase
    Concerning these algorithms, how are they developed? Can't just buy them at Wal Mart I guess. But was it invented just for TW or can everybody use em?
    A programmer who used to post as longjohn developed the battle engine and the battle AI for Creative Assembly. It's a brilliant system. He wrote two chapters in the Official Medieval Strategy Guide which details how the system works, and he made many informative posts about the engine over the years here in these forums. He hasn't posted in over a year. You can checkout this Shogun Strategy Guide for more info about the system. Look at the chapters on Intangibles, Military Units and Battle Factors. Longjohn was consulted for these chapers.

    Keep in mind that some of the refinements in the battle engine used in STW and MTW are missing from the new battle engine used in RTW. The RTW engine has more parameters associated with each unit, but the engine is not yet working properly. I don't know if refinements such as the loss of combat efficiency when men are squeezed too tight will be brought back.
    Last edited by Puzz3D; 07-26-2005 at 15:26.

    _________Designed to match Original STW gameplay.


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

  6. #6
    Passionate MTW peasant Member Deus ret.'s Avatar
    Join Date
    May 2005
    Location
    Behind the lines
    Posts
    460

    Default Re: How does the magic work?

    Quote Originally Posted by Puzz3D
    I don't know if refinements such as the loss of combat efficiency when men are squeezed too tight will be brought back.
    Hopefully they will! At least this named feature would end the habit of stacking half-decent phalanx units like Levies onto each other to make them more deadly... MTW clearly was more "realistic" in that respect.
    Vexilla Regis prodeunt Inferni.

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