Jambo
12-21-2006, 12:11
The attacking siege AI and the way it approaches the walls has always been one of the bugbears of recent TW titles. In Rome we had suicidal charges into phalanx units, buggy ladders and the large siege tower refusing to let the soldiers in. With M2TW, it’s better, but there are still some awkward pathfinding moments – my main one being the blobbing of units round the base of ladders that causes units to get stuck at the bottom and fail to climb, indefinitely. Blobbing on the ground seems to start when there’s a blockage on the exit area of the ladders at the top of the walls and may in part also be related to the variables in a particular xml file (see below). If soldiers from a unit get separated between ground and wall, the AI can’t seem to successfully issue the new orders to progress from the wall into the city. End result is an overall stagnation and a failure to progress.
However, the good news (I think!) is that at least with M2TW we’ve been given a chance to do something about it and that glimmer of hope lies within the battle_config xml file, the contents of which I’ve tried to elucidate below after an inordinate amount of time playtesting various settings in a custom battle (the custom battle involved the AI assaulting my city with 11 or so infantry units and 1 set of ladders and 2 siege towers). This type of situation usually equals pain for a human player defending and I don’t mean by the sword; I mean by the inevitable blob of units round the base of ladders causing an indefinite failure to negotiate from ground to wall and from wall into city.
So here’s a little rundown of my initial impressions of what various settings do –
<!-- should run be the default? -->
<default-run>1</default-run>
Undetermined. Setting to 0 seemed to have no effect.
<!-- distance within which soldiers will step onto the line (in metres squared) -->
<step-on-distance>4.0</step-on-distance>
I set this to 100 (i.e. 10 x 10) and all soldiers from the waiting units formed their blob further a-field from the ladders. Keeping them away further from the ladders seemed very good in preventing blocking and stagnation. Therefore, I’m thinking 225 (15 x 15) or higher may be even better.
<!-- start distance for the blockout region -->
<entry-blockout-inner>0.0</entry-blockout-inner>
<!-- end distance for the blockout region -->
<entry-blockout-outer>25.0</entry-blockout-outer>
<!-- limit on number of soldiers in the blockout region -->
<number-in-blockout>0</number-in-blockout>
The last of these set at 0 meant that the soldiers just fly towards the ladders even when the exit at the top of the wall is blocked. Setting the blockout range to the same as the step-on-distance and the number-in-blockout to around 4 seemed to work well and make soldiers stream to the ladders (in groups of 4) rather than run en mass. More testing is required with these settings.
<!-- queue length limit before movement will be stopped (in number of soldiers -->
<maximum-queue-length>10</maximum-queue-length>
Quite an important setting this one, as this seems to be responsible for (roughly) how many units can get onto the wall before the AI starts to blob at the bottom. Setting this higher (e.g. to 100) definitely seemed to give better results, although realism may be strained a little. Again more testing required.
<!-- when the entrance to a line is blocked all of the soldiers are stopped. -->
<!-- once the entrance is clear then the first x soldiers will be restarted moving. x is set below -->
<restart-threshold>10</restart-threshold>
Haven’t had much success in determining what this variable does exactly, although I think it’s related to the reinitiating of soldier movement once a blockage at the top of the ladders is cleared. Setting higher would seem a more logical approach, but might effect PC performance more (didn’t effect my high-end machine though).
<!-- when the entrance to a line is block any soldiers beyond this position in the queue will be halted. -->
<halt-threshold>-1</halt-threshold>
Again, it was difficult to determine the effect of this variable in what limited testing I did with it. What does the default of -1 actually mean? Maybe setting this to a high positive value will keep soldiers flowing better by preventing all the soldiers that are waiting to get to a line from halting when there’s a block? Definitely more to be tested.
<!-- do the soldiers have to enter in a precise order? -->
<precise-order>1</precise-order>
Didn’t seem to have much effect when I changed to 0. Siege towers have this as 0, ladders as 1. Seems logical, but more to be tested.
<!-- distance soldiers should stop at if the entrance is blocked (in metres squared) -->
<stand-off-distance>25.0</stand-off-distance>
<!-- distance soldiers should stop at if the queue is too long (in metres squared) -->
<long-queue-stand-off-distance>64.0</long-queue-stand-off-distance>
These are settings which didn't seem to impact as greatly, although I did keep these in proportion to changes I made to the step-on-distance and blockout limit. Possibly higher for both is better.
So far my best results with the AI and its ladder usage have come with setting the step-on-distance and maximum-queue-length higher, as well as making the AI stream more by setting the number-in-blockout to greater than 0. It’s a tricky process because there are many variables to examine and they’re clearly inter-dependent. I intend to release a battle_config mod at some point, but only once I’m truly happy with the modifications I’ve made. Any other feedback from willing testers could greatly speed this process up. I just repeated the same custom battle over and over, and possibly a different type of siege setting, e.g. multi-walled castle, might produce very different results.
:hmmm:
Regards
However, the good news (I think!) is that at least with M2TW we’ve been given a chance to do something about it and that glimmer of hope lies within the battle_config xml file, the contents of which I’ve tried to elucidate below after an inordinate amount of time playtesting various settings in a custom battle (the custom battle involved the AI assaulting my city with 11 or so infantry units and 1 set of ladders and 2 siege towers). This type of situation usually equals pain for a human player defending and I don’t mean by the sword; I mean by the inevitable blob of units round the base of ladders causing an indefinite failure to negotiate from ground to wall and from wall into city.
So here’s a little rundown of my initial impressions of what various settings do –
<!-- should run be the default? -->
<default-run>1</default-run>
Undetermined. Setting to 0 seemed to have no effect.
<!-- distance within which soldiers will step onto the line (in metres squared) -->
<step-on-distance>4.0</step-on-distance>
I set this to 100 (i.e. 10 x 10) and all soldiers from the waiting units formed their blob further a-field from the ladders. Keeping them away further from the ladders seemed very good in preventing blocking and stagnation. Therefore, I’m thinking 225 (15 x 15) or higher may be even better.
<!-- start distance for the blockout region -->
<entry-blockout-inner>0.0</entry-blockout-inner>
<!-- end distance for the blockout region -->
<entry-blockout-outer>25.0</entry-blockout-outer>
<!-- limit on number of soldiers in the blockout region -->
<number-in-blockout>0</number-in-blockout>
The last of these set at 0 meant that the soldiers just fly towards the ladders even when the exit at the top of the wall is blocked. Setting the blockout range to the same as the step-on-distance and the number-in-blockout to around 4 seemed to work well and make soldiers stream to the ladders (in groups of 4) rather than run en mass. More testing is required with these settings.
<!-- queue length limit before movement will be stopped (in number of soldiers -->
<maximum-queue-length>10</maximum-queue-length>
Quite an important setting this one, as this seems to be responsible for (roughly) how many units can get onto the wall before the AI starts to blob at the bottom. Setting this higher (e.g. to 100) definitely seemed to give better results, although realism may be strained a little. Again more testing required.
<!-- when the entrance to a line is blocked all of the soldiers are stopped. -->
<!-- once the entrance is clear then the first x soldiers will be restarted moving. x is set below -->
<restart-threshold>10</restart-threshold>
Haven’t had much success in determining what this variable does exactly, although I think it’s related to the reinitiating of soldier movement once a blockage at the top of the ladders is cleared. Setting higher would seem a more logical approach, but might effect PC performance more (didn’t effect my high-end machine though).
<!-- when the entrance to a line is block any soldiers beyond this position in the queue will be halted. -->
<halt-threshold>-1</halt-threshold>
Again, it was difficult to determine the effect of this variable in what limited testing I did with it. What does the default of -1 actually mean? Maybe setting this to a high positive value will keep soldiers flowing better by preventing all the soldiers that are waiting to get to a line from halting when there’s a block? Definitely more to be tested.
<!-- do the soldiers have to enter in a precise order? -->
<precise-order>1</precise-order>
Didn’t seem to have much effect when I changed to 0. Siege towers have this as 0, ladders as 1. Seems logical, but more to be tested.
<!-- distance soldiers should stop at if the entrance is blocked (in metres squared) -->
<stand-off-distance>25.0</stand-off-distance>
<!-- distance soldiers should stop at if the queue is too long (in metres squared) -->
<long-queue-stand-off-distance>64.0</long-queue-stand-off-distance>
These are settings which didn't seem to impact as greatly, although I did keep these in proportion to changes I made to the step-on-distance and blockout limit. Possibly higher for both is better.
So far my best results with the AI and its ladder usage have come with setting the step-on-distance and maximum-queue-length higher, as well as making the AI stream more by setting the number-in-blockout to greater than 0. It’s a tricky process because there are many variables to examine and they’re clearly inter-dependent. I intend to release a battle_config mod at some point, but only once I’m truly happy with the modifications I’ve made. Any other feedback from willing testers could greatly speed this process up. I just repeated the same custom battle over and over, and possibly a different type of siege setting, e.g. multi-walled castle, might produce very different results.
:hmmm:
Regards