
King Karolus Servant
Posts: 2154
Joined: 29 Aug 2007, 22:00
KaM Skill Level: Veteran
Location: In his dark thunderstormy castle
Actually it already uses each group's position for targets 0 and 1:
0: Closest unit from the group's position
1: Closest building from the group's position
2: Closest building from the AI start location
3: Custom XY
Is that the same as KaM? That's what I read in the scripting documentation years ago when I made my editor. Please correct me. So that would mean the new attack you requested would only be different in that it would select a unit OR a building. Is that useful?
I agree it would be neat to make the AI attack at multiple places at the same time. I'm quite happy to add new target types, it's very easy to do. (and there's really no limits, we can add 20 new target types if you think that's necessary)
(Also, a 'refresh' option for attacks could be nice: when attacking, the AI will recalculate every 5 seconds if the original target is still the closest one. So let's say the AI sends his units to attack the closest thing. Let's assume it's a building in this case. If the human player tries to sneak behind the AI's army with some cavalry the AI will change his plan and attack the cavalry first (if the distance between the cavalry and the AI's army is smaller than the distance between the army and the building. And an option to let an army keep attacking untill they're all dead would be nice too. Just throwing up other ideas as I promised.

We never coded anything like that, my guess is that it was caused by a bug(maybe they attacked a unit that moved before they got there?) I think this can wait until we really focus on improving the AI because I can't see a simple way to do this. (how would it decide where to group up?) A better option might be to make soldiers smarter at walking somewhere, because even as a human player it's quite annoying when they always walk single file around mountains.
P.S. How are you testing your coop mission? Because there's no speedup in multiplayer you might be best to save it in single player to test lots of things. Or an easier option might be to edit the gamespeed in KaM_Remake_Settings.ini. Look for the line "SpeedPace=100" and make 100 smaller (100 means it processes 1 game tick every 100 milliseconds, so if you make it 10 it will be x10 faster than 100, processing 1 tick every 10 milliseconds) Don't make it too low or your computer won't be able to keep up with it. 10 should be fine.
