Whilst I've hit some annoying problems with getting the current AI minimod version finished (notably planes not firing rockets, and bots not firing small arms at exposed vehicle crew positions), I've finally found out how to get the AI to use artillery howitzers (and the Nebelwerfer): Just set the indirect fire value for HE shells (weaponTemplate.indirect) to "0" in the weapons.ai file.
Bots will now be able to fire artillery at anything they can see (and with the raised viewpoint, this is quite a lot - for example, the German LeFH18 on Siege of Tobruk can fire at the British forward line, and the British 25pdr at the two bases nearest the main).
By default, all FH2 artillery weapons have HE shells set for indirect fire. However, BF2's AI only seems to recognise mortars as "indirect" weapons. The AI treats howitzers as direct-fire weapons, same as an AT gun (bots can automatically work out the amount of vertical elevation to get the round to hit, same as with low-velocity tank guns) so they won't work if you set them as indirect-fire weapons. (The Nebelwerfer will occasionally fire if set as indirect - but not as much as it does now...)
This is still only a partial fix, bots are still limited to targets in their visual range and they can't fire at spotted targets. They're also oblivious to scenery blocking their line of fire (the Nebelwerfer on Totalize usually ends up hitting the windmill when firing at Allies advancing along the road/railway). Bots also seem very reluctant to use howitzers on some maps, especially if they're on the attack (the US 105mm on Cobra should be able to see plenty of targets from its hilltop position, but I never saw a bot use it).
I suspect there's not a lot more that can be done to improve things, though if I can find a way to raise the viewpoint higher without blocking spawnpoints, it should allow the bot gunners to see more distant targets.
One other thing: I've disabled the AI for howitzer AP rounds, I initially did this just to try and get bots to fire HE, before I discovered the direct fire fix - but I'm thinking it would be a good idea to keep this change, since bots are notoriously bad at picking the right shell type. Direct HE hits appear to be able to kill most FH2 tanks in one shot, so the lack of AP shells isn't a great disadvantage. Anyone have any thoughts on this?