Thanks for the compliment, and for adding some more insight.
I have a couple more things to add, based on your thoughts.
SirPleb said:
the NW/SE bug was introduced. ... I feel sure that the NW/SE behaviour is a bug.
I agree, the nature of the NW/SE direction leads me to believe it's a simple mistake in a formula. Each tile along that axis will have a coordinate that is an equal number of vertical and horizontal tiles from all the others. (i.e. If the barb is at tile 33,27 the next tile to the direct SE is 34,28, then 35,29, etc.). So I'd guess that somewhere, when it looks for activity it goes through some iterations, probably starting at range one and working out (so it will find the closest 'trigger' first). In that process, which I would assume involve looking at all tiles within an absolute difference in the coordinates, it's somehow requiring the difference to be equal. So instead of saying, I'm at 33,27, is there anyone within +/- 2 of 33 OR +/-2 of 27, its saying is there anyone within +/-2 of 33 AND +/-2 of 27. Not sure if I'm explaining what I mean correctly (I'm not a programmer, but I played one in college
), but hopefully you understand what I mean.
SirPleb said:
Barbarian behaviour as we now understand it in the final PTW patch and in C3C is roughly as follows:
2. If there's a unit on the NW/SE axis of the barbarian, within a fairly large distance, it will move toward that unit. But it won't necessarily move directly, it may go off the axis on its way to that target.
It may even go in a perpendicular direction, if it determines that the closest path to actually reach the target (due to water/impassable terrain) requires it. BUT:
4. The above rules are applied from scratch each turn. Barbarians don't remember what they were previously doing and continue doing it.
so that doesnt do it much good.
SirPleb said:
5. There are a number of other factors which would need to be studied to determine exactly where they fit in the decision process. One barbarian will usually or always stay behind to defend a barbarian camp. Wounded barbarians will fortify to heal. Sometimes barbarians will pillage. They might be affected by colonies or other factors.
I have seen barbarians drawn to an empty colony, even off axis, but it wasnt in a DEBUG game, so Im not sure exactly what range they came from. The point about defending the camp was interesting in practice. The rule appears to require one barb to be in the camp at all times. This overrides the others, I parked a scout adjacent to a camp, and the barb never flinched. HOWEVER, it doesnt have to be the same barb! I have seen a barb, reacting to movement, move onto a guarded camp. The previous guard, now seeing that the camp was defended, then moved out (along the same axis) that same turn. (I would assume that it depends on the internal move order, as to which unit was selected first, whether that would happen).
SirPleb said:
MP players should probably not set NoAIPatrol=0. Certainly not without some testing. I suspect that the changed default for this flag helped MP play noticeably. With barbarians and AI units not making random moves there would be a considerable reduction in inter-machine messages and synchronization. The change to this default setting might even have fixed some MP problems as a side effect. Furthermore, if MP players change this default in their .ini files they may find that all players in a game must have the same setting to avoid crashes or bizarre results.
The whole subject of MP games is a tricky one. My first thought was that it would provide players an exploit, if for example one player had patrol on, and one not, they would be facing tougher barbs than their opponent. Thats one of the reasons I was hesitant to publish too much about my findings at first, until I had a chance to PM a couple of Moderators. However, Im not sure how it would affect MP games. Ive never really played online (I tried a LAN game once with my 10-year old son, but his attention span wasnt up to it!), so I dont know how it handles barbarian movement, but I would think the flag setting of whichever computer is the host, or processes the movement orders, would take precedence, but I really dont know. With PBEM games, it appears all end of turn processing is done at the end of the last human players turn in rotation, prior to creating the save. So I would be more confident it would only be the flag setting of that player that would be in effect, and so everyone would at least be playing under the same set of rules. But I agree, without a lot more testing (not by me
), I wouldnt recommend MP games mess with the flags.
Edit: Watorrey replied while I was still working on my response, so sorry that some of this is redundant. Thanks again to Watorrey, he helped point me in the direction to do the testing!