Page 1 of 2 12 LastLast
Results 1 to 20 of 31

Thread: [WIP] Unofficial Unit Cohesion & Charge Improvement Mod

  1. #1

    Icon7 [WIP] Unofficial Unit Cohesion & Charge Improvement Mod

    Hi guys,

    I am really excited for the summer release and was originally going to wait for the big summer update before starting a new campaign, but after playing vanilla Medieval II: Total War for a few weeks, I couldn't wait any longer and had to jump back into a new EBII campaign with the latest (2.03h) update

    Unfortunately, I was getting a bit stressed with some unit cohesion issues in EBII, which feels worse compared to vanilla M2TW. During some battles in EBII, I felt like units were moving in syrup and not very responsive to commands in comparison to vanilla and other mods such as Stainless Steel. No offense intended to the team — this is just my opinion on one aspect of the game, which in all other respects is nearly flawless.

    To solve the problem for myself, and hopefully for other players, I have begun a small re-work of some of the game code related to unit cohesion and charges for both infantry and cavalry. While this is only a WIP, I would like to share my progress so far for cavalry:

    https://www.youtube.com/watch?v=yJAeXeeAmYc (be sure to watch in 1080p!)

    I realize that the video isn't perfect — the comparisons aren't exactly 1:1 — but hopefully the improvement will still be noticeable from quick observation. It takes a lot of time to switch between versions and record and edit all of this footage, so this is only the best I can do for now. I may make another video later this week to illustrate infantry cohesion improvements as well depending on my free time. By then I should also be ready to release an unofficial submod for other players to test. In my opinion, the difference is like night and day, and units are much more responsive. In the meantime, if you have any critiques or suggestions please let me know.

    Here are some screencaps from the video:

    CHARGING:
    Spoiler Alert, click show to read: 





    WITHDRAWING:
    Spoiler Alert, click show to read: 





    EDIT: If anyone is interested in testing the improved cohesion mod, please shoot me a PM. You will need the latest version of EBII. The mod is very easy to install/uninstall. Thanks.

  2. #2

    Default Re: [WIP] Unofficial Unit Cohesion & Charge Improvement Mod

    Alright, the improved cohesion (especially when chasing down routers) is impressive and a definite improvement. What files did you change to make the improvements, and what did you change in them?

    The only thing that has me worried is that light cavalry are now effective at frontally-charging spearmen who are ready to receive them.

  3. #3

    Default Re: [WIP] Unofficial Unit Cohesion & Charge Improvement Mod

    Yes, cavalry charging in a danm pack. Hope it works for infantry too as now it takes minutes from the first unit arriving tot he enemy to the last.If this goes through Im gonna love you man hahaha.

    I hope it doesnt get overpowered due to the comment Quintus has made. But maybe heavy cavalry will be able to break some formation now and be deadly as it should to unready tropps. Light may be able to harm from the sides/rear because now their charges are mainly useless.

    Its a real problem. Im issuing the commands from far away as recommended for extra distance but have got few proper charges and even those are not that deadly, even with cataphracts. WIth infantry I ahvent been able to have a proper one -sigh-

    We will either find a way, or make one.


  4. #4

    Default Re: [WIP] Unofficial Unit Cohesion & Charge Improvement Mod

    Quote Originally Posted by QuintusSertorius View Post
    Alright, the improved cohesion (especially when chasing down routers) is impressive and a definite improvement. What files did you change to make the improvements, and what did you change in them?

    The only thing that has me worried is that light cavalry are now effective at frontally-charging spearmen who are ready to receive them.
    Don't worry, frontal assaults are not impacted greatly. The changes are almost entirely mechanical — i.e., ordering units around the battlefield is way easier and less frustrating. The devastating charge you see at the tail-end of the video (which happens for both old and modded cohesion) is due to the fact that the spearmen (made up of levies by the way, IIRC) are already down to half their original size and in the case of the very last charge, have accidentally turned their backs to the cavalry.

    The files modified are descr_pathfinding.txt and export_descr_unit.txt

    However, I am still in the middle of testing...

  5. #5

    Default Re: [WIP] Unofficial Unit Cohesion & Charge Improvement Mod

    Quote Originally Posted by HaHawk View Post
    Don't worry, frontal assaults are not impacted greatly. The changes are almost entirely mechanical — i.e., ordering units around the battlefield is way easier and less frustrating. The devastating charge you see at the tail-end of the video (which happens for both old and modded cohesion) is due to the fact that the spearmen (made up of levies by the way, IIRC) are already down to half their original size and in the case of the very last charge, have accidentally turned their backs to the cavalry.

    The files modified are descr_pathfinding.txt and export_descr_unit.txt

    However, I am still in the middle of testing...
    That gives me some comfort that we're not just seeing cavalry become overpowered, like in vanilla.

    I'd be very interested to see both files when you're finished testing - what's your timescales?

    z3n is the more knowledgeable about the pathfinding, but the EDU is my bag.

  6. #6

    Default Re: [WIP] Unofficial Unit Cohesion & Charge Improvement Mod

    Great work here! Thanks for the effort

  7. #7
    z3n's Avatar State of Mind
    took an arrow to the knee

    Join Date
    Aug 2011
    Posts
    4,640

    Default Re: [WIP] Unofficial Unit Cohesion & Charge Improvement Mod

    Ah, I see, you walk your cav charges so it stands to reason you would encounter less cohesion. At first I was extremely puzzled by the pictures until I watched the video.

    I originally designed charges around my own playstyle to be honest, as I meant that they would run rather than walk (so a double-click for both infantry/cav) before they reach 'charge' distance due to the realistic necessity (in my opinion) for a build up of momentum. Partly due to the new animations/terrain and the effect both factors have on cohesion. Deliberately perhaps by the developers, although I think it was more by mistake and a lack of care about the bug- as it was an enormous problem before mtw2 v1.3.

    Effective charge distance is in fact 5-10m running distance further than the immediate charge point, due to the necessity of a build up of speed. The further charge distances are meant to mostly automate the process and in the teams opinion helped. Which may be something you want to look into before you release a modified EDU.

    Anyway, I presume the main reason behind the reaction times is due to the fact that you changed the budget for pathfinding? It looks good. I'm just not entirely sure as to what the effects may be in terms of the BAI, I'd have to test your settings to see. Unfortunately budget does play a part in regards to that too. I found that out when I was configuring the horse archer behavior. I doubt it will have an overt effect though. In closing, like others have said, thanks for the effort and good work.
    The AI Workshop Creator
    Europa Barbaroum II AI/Game Mechanics Developer
    The Northern Crusades Lead Developer
    Classical Age Total War Retired Lead Developer
    Rome: Total Realism Animation Developer
    RTW Workshop Assistance MTW2 AI Tutorial & Assistance
    Broken Crescent Submod (M2TW)/IB VGR Submod (BI)/Animation (RTW/BI/ALX)/TATW PCP Submod (M2TW)/TATW DaC Submod (M2TW)/DeI Submod (TWR2)/SS6.4 Northern European UI Mod (M2TW)

  8. #8

    Default Re: [WIP] Unofficial Unit Cohesion & Charge Improvement Mod

    I always single-click my cavalry, because with a double click they run and collide with the target, but don't actually charge properly. Only a single-click, which starts at a walk, ensures they level lances at the right moment and charge home in a damaging fashion, rather than run into the enemy, disordering them a bit but doing no real harm.

  9. #9
    z3n's Avatar State of Mind
    took an arrow to the knee

    Join Date
    Aug 2011
    Posts
    4,640

    Default Re: [WIP] Unofficial Unit Cohesion & Charge Improvement Mod

    ?
    Check this video then, it's the AI properly executing a charge on a unit of hoplites in a damaging fashion. https://vid.me/JQ65
    The AI Workshop Creator
    Europa Barbaroum II AI/Game Mechanics Developer
    The Northern Crusades Lead Developer
    Classical Age Total War Retired Lead Developer
    Rome: Total Realism Animation Developer
    RTW Workshop Assistance MTW2 AI Tutorial & Assistance
    Broken Crescent Submod (M2TW)/IB VGR Submod (BI)/Animation (RTW/BI/ALX)/TATW PCP Submod (M2TW)/TATW DaC Submod (M2TW)/DeI Submod (TWR2)/SS6.4 Northern European UI Mod (M2TW)

  10. #10

    Default Re: [WIP] Unofficial Unit Cohesion & Charge Improvement Mod

    Quote Originally Posted by QuintusSertorius View Post
    I always single-click my cavalry, because with a double click they run and collide with the target, but don't actually charge properly.
    For a long while I was confused about the exact nature of charges in M2TW. However, it turns out that single-click and double-click attack orders will both initiate a charge as long as there is enough distance. I can't emphasize this enough — the most critical factor is distance. However, there is a slight difference between the two orders which make them useful under different circumstances, such as when timing is important (urgent vs. delayed) and when using waypoints. Here is an overly boring and complex description () of what should be a simple mechanic:

    Spoiler Alert, click show to read: 
    1. Single-click attack: Each horseman will turn to face the enemy. The unit as a whole will then begin trotting toward the enemy (walking) while gradually forming up into solid lines. Upon reaching the specified charge distance (ex: 55 meters), the entire unit will come to a complete stop, reform the line if necessary due to terrain, lower their lances in unison, and charge together. This is best used when the cavalry are initially disarrayed and need time to reform, but requires more micromanaging. For example, if the cavalry unit is hundreds of meters away and a single-click attack order is given, it could take ages before the cavalry arrive — literally minutes. Not good! On the other hand, if the cavalry just so happen to be in position (idle) at or around 55 meters away from the enemy and a single-click attack order is given, the unit will immediately lower their lances and charge. That's where the micromanaging part comes in. Finally, single-click attack orders also help conserve stamina since you're not telling the cavalry to gallop everywhere, and are therefore slightly more realistic in that respect.

    2. Double-click attack: All horsemen, regardless of current position, will begin galloping toward the specified target. If there is enough time/distance, the unit will attempt to reform the line; otherwise, if the cavalry are too close to the target, they will charge in piecemeal. Provided that you give enough space (for example, a few hundred meters away), a double-click attack will still result in a solid line charge. This is why I now recommend that double-click be used 99% of the time. It is more simple. Step 1: Move cavalry into position with clear pathway to target at least 100m away. Step 2: Double-click attack for a fast, reliable charge.


    I'm actually glad you brought this point up because I've reversed my previous opinion that "single-click charges are best". With these tweaks, a double-click attack order is preferred.

    Quote Originally Posted by z3n View Post
    Ah, I see, you walk your cav charges so it stands to reason you would encounter less cohesion. At first I was extremely puzzled by the pictures until I watched the video.
    Both single-click and double-click attacks are used in the video. But like I said, the video isn't perfect. It takes hours to collect and process footage into a video, so this was just the best I could come up with to try and show the improvement visually. When you actually play in-game, the difference is like night and day.

    As for how the pathfinding will affect BAI, that's precisely what I'm in the process of testing now. So far everything looks good.

  11. #11

    Default Re: [WIP] Unofficial Unit Cohesion & Charge Improvement Mod

    Good Submod! Really, this is very important in all modifications, but as it works only for EBII, Then, it's only for EBII

  12. #12

    Default Re: [WIP] Unofficial Unit Cohesion & Charge Improvement Mod

    Quote Originally Posted by QuintusSertorius View Post
    I always single-click my cavalry, because with a double click they run and collide with the target, but don't actually charge properly. Only a single-click, which starts at a walk, ensures they level lances at the right moment and charge home in a damaging fashion, rather than run into the enemy, disordering them a bit but doing no real harm.
    Double click also works if they are in order. I have pulled a lot of charges with this. It depends on distance too. If you are very far away you can double click and it should work well. If you are closer oneclicking may be better, but I find that sometimes it delays too much the charge speccially if the enemy moves. What seems to work most is one clicking and when they are already in the path, properly heading the enemy and in order then double click.

    We will either find a way, or make one.


  13. #13

    Default Re: [WIP] Unofficial Unit Cohesion & Charge Improvement Mod

    Are charge distances the only thing you've changed in the EDU, or are there other things too?

    Casual Tactician was talking about some of the other factors that counted in RTW, that may, or may not be valid in M2TW too:

    Quote Originally Posted by Casual Tactician View Post
    On the issue of units loosing their formation when in melee (even in guard mode) and intermingling with the enemy unit creating a kind of fussy blob...

    Have you tried playing around with their hidden radius-value? I remember tweaking it in EB1 to have hoplite units keep a tight formation, even if not in guard mode and it worked quite well. Though a smaller radius (< 0.4) seemed to make them stronger in melee. Here's what I mean (taken from Aradan's RTW EDU guide):

    Code:
    soldier          unit_model, soldiers, extras, mass (,radius,height)
    Details of unit models.

    [unit_model] : Unit's model type as referenced in descr_model_battle.txt. Note that the skeleton scale and its associated animations in the DMB file both significantly affect the combat effectiveness and thus value of the unit. This is done mainly in three ways:
    the unit model's scale improves combat effectiveness as it gets bigger. A way to balance this (though not perfectly safe) is through the hidden parametre 'height' that lies in the soldier line. [see below]
    the unit skeleton attack animations also improve unit effectiveness as they get faster. The way to counter this effect is the min_delay_between_attacks stat, which lies in the stat_pri line [see below]
    the unit skeleton animations also help combat effectiveness, when they have big(ger) impact deltas. The way to counter this is through lethality [see related information]

    [soldiers] : Number of unit's soldiers in medium unit-size settings. Can't be lower than 6 or higher than 60. General units have a max of 31 men.
    [extras] : Number of animals attached to unit again in medium unit-size settings.
    [mass] : Collision mass of the unit. Units with big mass values can "push" their enemies harder and break through enemy lines easier and also hold against enemy pushing better. The mass ratio is not fixed, in that a 1-mass soldier will push a 0.1-mass enemy much easier than a 10-mass soldier would push a 1-mass enemy. In the case of mounted units this stat is of no importance, as it is the mount's mass that's taken into account (see descr_mount.txt).
    [radius](may not be visible) : Hidden attribute radius of the unit. The default value is 0.4. It's the area surrounding each single soldier that he "occupies" as the engine perceives it (not visually that is). Small radius makes a unit fight better, in that it allows soldiers to fight more closely to each other, resulting in more men of the small-radius unit fighting against fewer of the enemy one's.
    [height](may not be visible) : Hidden attribute height of the unit. The default value is 1.7. It represents the height of the unit's soldiers (again not visually). Little is known concerning the exact way that height functions, but it is known that the higher it's value, the weaker the unit.
    Perhaps this doesn't work in the M2TW engine, dunno.

    Regards!

  14. #14

    Default Re: [WIP] Unofficial Unit Cohesion & Charge Improvement Mod

    Looking forward to this. Unit cohesion is a VERY annoying battle flaw
    Alii inferre bellum, facientibus pacem.


  15. #15
    z3n's Avatar State of Mind
    took an arrow to the knee

    Join Date
    Aug 2011
    Posts
    4,640

    Default Re: [WIP] Unofficial Unit Cohesion & Charge Improvement Mod

    Are you using 2.01?
    Unfortunately this can only be mitigated to an extent, as it's a vanilla issue we've tried to work on. Pathfinding in itself is also rather complicated when it comes to controlling the actions of thousands of little soldiers on a battle map.
    The AI Workshop Creator
    Europa Barbaroum II AI/Game Mechanics Developer
    The Northern Crusades Lead Developer
    Classical Age Total War Retired Lead Developer
    Rome: Total Realism Animation Developer
    RTW Workshop Assistance MTW2 AI Tutorial & Assistance
    Broken Crescent Submod (M2TW)/IB VGR Submod (BI)/Animation (RTW/BI/ALX)/TATW PCP Submod (M2TW)/TATW DaC Submod (M2TW)/DeI Submod (TWR2)/SS6.4 Northern European UI Mod (M2TW)

  16. #16

    Default Re: [WIP] Unofficial Unit Cohesion & Charge Improvement Mod

    Quote Originally Posted by reaper101 View Post
    Looking forward to this. Unit cohesion is a VERY annoying battle flaw
    Quote Originally Posted by z3n View Post
    Are you using 2.01?
    Unfortunately this can only be mitigated to an extent, as it's a vanilla issue we've tried to work on. Pathfinding in itself is also rather complicated when it comes to controlling the actions of thousands of little soldiers on a battle map.
    This thread is somewhat out of date now; most of the changes in this video (from July!) were later integrated into the official EBII build. However, I personally still use M2TW's original pathfinding settings, as I've found them to be much more responsive than EBII's modified values. With the EBII pathfinding, I constantly feel like units "don't listen" to movement commands, whereas the original settings ensure units do what they're told. They also don't seem to spread out so far away from their formation, i.e., more cohesive. It would be nice if we could get some more testing in this regard.

  17. #17
    z3n's Avatar State of Mind
    took an arrow to the knee

    Join Date
    Aug 2011
    Posts
    4,640

    Default Re: [WIP] Unofficial Unit Cohesion & Charge Improvement Mod

    First a quick comparison.

    EBII Pathfinding
    https://vid.me/25kF

    Default MTW2 Pathfinding
    https://vid.me/9glx

    In my own experience EBII has quite good unit responsiveness, cohesion etc etc, but the most important part in changing the pathfinding was to do with the BAI. That's what I tested quite strenuously, the difference between BAI behaviour with default pathfinding vs EBII's. EBII's improves on a couple of bugs like infantry/cavalry trying to run through another unit, it's seen significantly less at least in my own test battles.

    Additionally thanks to EBII's pathfinding the Battle AI utilizes terrain more efficiently (i.e. double envelopments and perhaps more importantly, trying to gain an elevation or height advantage). And finally, there's a few bugs EBII's pathfinding fixes, to do with siege equipment not being able to get up a hill to attack a town for example and even getting cavalry to more efficiently avoid forests.
    The AI Workshop Creator
    Europa Barbaroum II AI/Game Mechanics Developer
    The Northern Crusades Lead Developer
    Classical Age Total War Retired Lead Developer
    Rome: Total Realism Animation Developer
    RTW Workshop Assistance MTW2 AI Tutorial & Assistance
    Broken Crescent Submod (M2TW)/IB VGR Submod (BI)/Animation (RTW/BI/ALX)/TATW PCP Submod (M2TW)/TATW DaC Submod (M2TW)/DeI Submod (TWR2)/SS6.4 Northern European UI Mod (M2TW)

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

    Default Re: [WIP] Unofficial Unit Cohesion & Charge Improvement Mod

    Could you explain wich values in descr_pathfinding and in the EDU did you change? I'm very interested in this.
    Huic ab adulescentia bella intestina, caedes, rapinae, discordia civilis grata fuerunt ibique iuventutem suam exercuit

  19. #19
    z3n's Avatar State of Mind
    took an arrow to the knee

    Join Date
    Aug 2011
    Posts
    4,640

    Default Re: [WIP] Unofficial Unit Cohesion & Charge Improvement Mod

    Hello, if you are asking me I tried to explain it here in the very first section.

    There is another section in the second post for the battle pathfinding that goes into some more technical details/conjecture as to the specifics of how it works and examples from in game of why I think the pathfinder works the way it does with links to other sites that explain what the words mean more accurately.
    The AI Workshop Creator
    Europa Barbaroum II AI/Game Mechanics Developer
    The Northern Crusades Lead Developer
    Classical Age Total War Retired Lead Developer
    Rome: Total Realism Animation Developer
    RTW Workshop Assistance MTW2 AI Tutorial & Assistance
    Broken Crescent Submod (M2TW)/IB VGR Submod (BI)/Animation (RTW/BI/ALX)/TATW PCP Submod (M2TW)/TATW DaC Submod (M2TW)/DeI Submod (TWR2)/SS6.4 Northern European UI Mod (M2TW)

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

    Default Re: [WIP] Unofficial Unit Cohesion & Charge Improvement Mod

    Thanks, i will read it
    Huic ab adulescentia bella intestina, caedes, rapinae, discordia civilis grata fuerunt ibique iuventutem suam exercuit

Page 1 of 2 12 LastLast

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
  •