I thought this discussion was interesting enough to deserve its own thread and so here it is - so that we don't annoy LaissezFaire and his thread on the AI's tactics and also so that Norb might see it and comment.I don't actually know what data the AI is given, but if I were a betting man I would bet money that the AI does NOT in any way analyze rendered graphics to determine what units are where, which implies that T-mode has no meaning for the AI, and that changing the sprites in the game would have no effect on the AI.
Changing the sprites would clearly affect what a human player using HITS would see.
Thus, what the AI commanders can be aware of is independent of what the player can physically see in the game's graphics.
My last statement above is a simple deduction; it must be true if the first two parts are true.
The first part would require Norb to verify, although as I said, I am very confident that it is true.
The second part I think is obvious, if anyone disagrees, please say so.
I did not ever say or imply that I thought that.You make the erroneous assumption that if the game knows two units are in sight of each other all the AI commanders do.
All of what follows is just my guesswork and assumptions but based on a lot of logic and a lot of experience with playing games both from an elevated camera position and HITS (set to 2 yards, something the game can't normally do - you have to edit the SOWGB.ini file to get a true first person game view).
To me I think the flags are the critical things. We all know that if the flag of a unit is close to a wall, or a fence or it's in woods or on a road, or in a field of wheat... then the entire unit is granted an effect from that terrain - it gets a cover bonus, or a movement bonus (or penalty), or a morale effect, or whatever. It is also hidden or visible to enemy (you can check this in the unit stats in the OOB screen).
So first, I think its the flag that is "seen". Notice that when you look way over there, 1500 yards into the far distance, what you first see of a unit is a single figure with a flag. What is the flag? Its a central point described in the 3D battlespace very close to the ground surface that is used to measure all kinds of things, one of them being whether flag A is visible from flag B. I don't know how high off the ground surface the "flag" is, but I suspect its something like 6 feet, possibly a bit more, 8 or 9 feet to cover the chance of seeing mounted men or actual real flags held aloft by foot soldiers. For all I know it could vary - 6 feet for infantry and dismounted cannons, 9 feet for cavalry, generals and limbered cannons. *shrugs* I'm just guessing but its logical.
I think Garnier is right... well, half right, in that what he's saying is that the AI and the player are using the same piece of code when the game is deciding if they can "see" an enemy unit. Then again MTG is also right... or half right, when he says the AI and the HITS player see the same thing.
To me there is only one LoS calculation going on. The game takes the location (altitude and surrounding terrain) of an AI flag (lets say its a General commanding a brigade) and looks at all enemy flags on the battlefield, calculating their distance, altitude, terrain they are in and then checking on a direct line between the two flags for blocking terrain (woods, buildings, elevated ground). If <LoS=true> then the AI general is given an XY co-ordinate of a unit ID, knows its an enemy and can react to it. In other words the AI "sees" the flag. The computations going on between all flags are done in a neutral environment away from the battle AI and the <LoS=true> results are fed to those AI flags that are affected.
Now, if the flag in question is a human player general (still a flag, remember) then instead of giving that flag XY co-ords and a unit ID, the game draws a bunch of sprites on the screen which are associated with that unit ID, placing them in the correct XY co-ordinates and associating the correct uniform code and a bunch of other variables like formation, speed, direction and smoke animations, and so on.
Thus the same LoS calculation is happening for human players and AI generals, taking into account EXACTLY the same issues such as terrain etc, except that when a flag is seen the game responds with different information.
With HITS the human players location calculation is a couple of yards off the ground. With the elevated heli-cam option in play the human players "flag tip" is elevated high in the air (and can fly from side to side) and an LoS calculation is made from this extremely tall flexible general (!), thus most hills, some trees and buildings don't block LoS and the player can see the enemy over the hills and far away. The poor AI however is still looking for a player flag that is only a man's height above ground.
This is why its so much easier to beat the AI with an elevated cam position and so much harder with HITS.
Are all AI flags made aware by the game code if any one particular flag is seen by one AI general, in the way that all human players can physically see the sprites when one player does? I do not know, but I suspect they do not and this suspicion comes from the behaviour of the AI I've witnessed in HITS games where AI units and commanders some distance away seem to ignore fighting going on in locations they probably can't "see". Then again this might be due to other factors like the orders they are operating under or how poorly rated their general is.
This answers your concern, Garnier, about 1000 foot tall sprites. These would be completely irrelvant since I think the sprites are not a part of the LoS computation, rather their appearance is the product of its result.
The T-key is also an interesting issue but I think you might be misunderstanding what the T-key does. The T-key toggles tree graphics (and some other scenery) being rendered on and off on the player's screen. It doesn't do anything else. It doesn't reveal "flags" (aka sprites to a human player) that he would otherwise not see if the trees were rendered. The presence of tree graphics in the game isn't making units invisible to the player any more than it causes <LoS=false> results for the AI. What is important is the terrain type the flag is in, or the terrain type intervening between flags. If we go back to the OOB screen I mentioned at the beginning where you can check a unit's stats and its showing as either visible to the enemy or hidden, that status is what the terrain type is contributing towards.
Now a player with a 200 foot high cam view has less trouble with tree graphics because its easier to see down over them or between them, but they don't hide the sprites, they just make it somewhat harder to see them. I sometimes toggle the T key in order to get at the flag graphic of one of my units I can partially see through the trees so as to more easily give it an order, but toggling the trees off doesn't suddenly reveal a bunch of enemy regiments. They are there all the time and if you sit still and use the Z key to watch a forest with enemy in, you'll see them quite easily. What you won't see is their sprites if <LoS=false>.
And my view is that the AI works under exactly the same conditions.
This is another reason why HITS play is more challenging, because the elevated view down over trees or between them isn't there. I find I spend a good while in HITS games simply sitting still, staring at forests through my field glasses, trying to see suspicious movements. I could hit the T key but I don't, because our group has a house rule that we don't use it, but hitting the T-key does not (in my view) make enemy units magically get rendered that are not already being rendered on my screen by the game.
And after all that, it would be interesting to get the real lowdown on how this all works from Norb himself.