FLWL / aoe2-ai-module

Library to extend AI scripting capabilities in Age of Empires 2.
GNU Lesser General Public License v2.1
16 stars 6 forks source link

GetGoals() and GetStrategicNumbers() for other players #13

Open 01010100b opened 3 years ago

01010100b commented 3 years ago

It would be useful to have GetGoals(int player) and GetStrategicNumbers(int player) commands which return the goal/sn arrays for allied players. The underlying facts would be up-allied-goal and up-allied-sn. In the current situation with 3 allies it takes about 3000 commands (512 goals + 512 sn's per ally) per tick, or about 3ms per tick, which can be brought down to 6 commands and negligible time per tick through the proposed additions. If the given player is not an ally then return an array of 512 -1's (the up facts should also return -1 in that case).