Results 1 to 10 of 10

Thread: The AI and skirmishing units

  1. #1
    Senior Member Senior Member Jambo's Avatar
    Join Date
    Jul 2002
    Location
    Athens of the North, Scotland
    Posts
    712

    Default The AI and skirmishing units

    Right, this has been an issue for longer than I can remember for TW games, and it's still not great in Med II.

    The issue is that for certain skirmishing units - those with a short missile range - the AI just cannot use them properly. It moves them into range to engage with their missiles, but the range is too short and they skirmish. The net result is they don't actually throw anything and instead engage in their perpetual seesawing motion. This doesn't affect mounted skirmishing units simply because they can throw use their missiles whilst on the move. For infantry skirmishers it's another matter altogether - here's a list of the obvious offenders that I can think of (AI does sometimes use javelin units ok):

    • All infantry javelin units
    • Handgunners
    • Naffatun


    The last two are just downright awful in the hands of the AI. There is some new code at the start of the battle_config file but it's not overly clear how changing this code for skirmishers would impact on the game as a whole and it's probably a rather arduous task to find out. For instance they might have ramifications on other aspects .... However, there are some steps we can take to somewhat alleviate this problem for the AI:

    1. Increase the range of their missiles so the range they skirmish at isn't as close to the max range of their missiles. This should stop the seesawing action but the AI will probably still use them poorly.

    2. Add "start_not_skirmish" on the unit's attribute line. Most of these short range missile units have ok melee stats anyway and this option definitely allows the AI to use them. Only sticking point is human player's cavalry, but I guess that just depends on how the AI uses them...

    I currently use option 2. Anyone any other suggestions?
    Last edited by Jambo; 05-05-2007 at 12:26.
    =MizuDoc Otomo=

  2. #2
    has a Senior Member HoreTore's Avatar
    Join Date
    Jan 2005
    Location
    Norway
    Posts
    12,014

    Default Re: The AI and skirmishing units

    How 'bout making them able to fire on the move, like the mounted ones? For javelins and naffatuns, it makes perfect sense IMO. I can't see any reason why they should have to stand still to shoot, particularly the javelin, you'll throw it a lot better on the move.

    But is it possible to do that?
    Still maintain that crying on the pitch should warrant a 3 match ban

  3. #3
    BLEEEE! Senior Member Daveybaby's Avatar
    Join Date
    Oct 2002
    Location
    Hastings, UK
    Posts
    767

    Default Re: The AI and skirmishing units

    I dont think option 1 is really viable... long range naffatun - might as well just replace them with rocket launchers.

  4. #4
    Relentless Bughunter Senior Member FactionHeir's Avatar
    Join Date
    Dec 2006
    Location
    London, UK
    Posts
    8,115

    Default Re: The AI and skirmishing units

    Wouldn't work Hore Tore, as that's animation based. Of course you could mount those units onto an elephant (slow speed) with no mass and extra hp, but that would be kind of awkward.

    Option 2 sounds most reasonable to me, unless you want to change skirmish distances, but changing those is basically making the unit more vulnerable to charges, so with 2 at least they'll get off a volley.
    Want gunpowder, mongols, and timurids to appear when YOU do?
    Playing on a different timescale and never get to see the new world or just wanting to change your timescale?
    Click here to read the solution
    Annoyed at laggy battles? Check this thread out for your performance needs
    Got low fps during siege battles in particular? This tutorial is for you
    Want to play M2TW as a Vanilla experience minus many annoying bugs? Get VanillaMod Visit the forum Readme
    Need improved and faster 2H animations? Download this! (included in VanillaMod 0.93)

  5. #5

    Default Re: The AI and skirmishing units

    Quote Originally Posted by FactionHeir
    Wouldn't work Hore Tore, as that's animation based. Of course you could mount those units onto an elephant (slow speed) with no mass and extra hp, but that would be kind of awkward.

    Option 2 sounds most reasonable to me, unless you want to change skirmish distances, but changing those is basically making the unit more vulnerable to charges, so with 2 at least they'll get off a volley.
    Actually, wouldn't HoreTore's idea work based upon how javelins are actually thrown to achieve greater distances? Using a running start before throwing gives you a lot more power behind the javelin rather than standing still while throwing it. If you allowed the animation to start earlier, couldn't you get that effect so the javelin is throw right at the point where the skirmish distance is met, so they retreat and start over?

  6. #6
    blaaaaaaaaaarg! Senior Member Lusted's Avatar
    Join Date
    Feb 2005
    Posts
    1,773

    Default Re: The AI and skirmishing units

    No doesn't work like that, the firing animations for all units are based on the unit being static, but with cavalry the units are mounted so whilst the soldier is still, the mount moves.

  7. #7
    has a Senior Member HoreTore's Avatar
    Join Date
    Jan 2005
    Location
    Norway
    Posts
    12,014

    Default Re: The AI and skirmishing units

    I'll wait for someone to alter the animations then...
    Still maintain that crying on the pitch should warrant a 3 match ban

  8. #8

    Default Re: The AI and skirmishing units

    Quote Originally Posted by Lusted
    No doesn't work like that, the firing animations for all units are based on the unit being static, but with cavalry the units are mounted so whilst the soldier is still, the mount moves.
    Then all you need to do is make from the wait up a "rider" and from the waist down a "mount" for animation purposes

    Could you imagine a skirmisher running in one direction while his torso is turned around 180 degrees the other way, all while throwing a javelin?

  9. #9
    Member Member sunsmountain's Avatar
    Join Date
    Sep 2003
    Location
    Netherlands
    Posts
    414

    Default Re: The AI and skirmishing units

    Hi all, just wanted to pop by and say that I stopped playing this game because of the lacking AI (and other time constraints, but i still play games). Hopefully the next incarnation of the TW genre will be better...

    kind regards,

    suns
    in montem soli non loquitur

    (\_/) (>.<) That's what happens with bunnies
    (x.X)(_)(_) who want to achieve world domination!

    becoming is for people who do not will to be

  10. #10
    Senior Member Senior Member Jambo's Avatar
    Join Date
    Jul 2002
    Location
    Athens of the North, Scotland
    Posts
    712

    Default Re: The AI and skirmishing units

    It appears adding the "start_not_skirmish" attribute doesn't really work for the AI. The AI will simply re-enable this during a battle!

    So, I decided to take a closer look at the battle_config file and in particular this series of entries for gunpowder infantry units:
    Code:
    				<gunpowder>
    					<!-- ignore targets at a distance greater than the maximum range times this scale factor -->
    					<max-range-scale>1.5</max-range-scale>
    					
    					<!-- must skirmish if within this range -->
    					<min-range>40</min-range>
    					
    					<!-- stop at this distance if the enemy is blocking the path -->
    					<min-stopping-range>50</min-stopping-range>
    					
    					<!-- time to react to being intercepted -->
    					<collision-reaction-time>12</collision-reaction-time>
    					
    					<!-- retreat buffer time -->
    					<retreat-time>14</retreat-time>
    					
    					<!-- don't skirmish until attackers are within this fraction of the missile range -->
    					<range-factor>
    						<moving>1.1</moving>
    						
    						<shooting>0.80</shooting>
    					</range-factor>
    				</gunpowder>
    Take a look at the "moving" entry under "don't skirmish until attacks are within this fraction of the missle range." It has a value of 1.1 which to me doesn't make much sense and may be the cause of the seesawing action. As I udnerstand it, this entry means that a moving skirmishing unit shouldn't skirmish until an enemy unit is within 1.1 x its missile range. If true, this explains why a moving skirmish unit with a low missile range weapon (e.g. hand gunners) can never reach a suitable distance which will allow them to stop and fire again after skirmishing.

    Anyway, I modded this to 0.8 and this seems to make them work much better. After skirmishing a value lower than 1.0 will then allow them to return to their missile range distance or the distance mentioned in "stop at this distance if the enemy is blocking the path."
    Last edited by Jambo; 05-05-2007 at 12:40.
    =MizuDoc Otomo=

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