Page 1 of 1

How to get mod & map related data to AI code

Posted: 09 Sep 2007, 14:01
by gavan
Hi.. Fooling around with AI code here, based on the ABIC testdemo in trunk..

I'd like to know how to get map related info (size, heightmap, resourcemap at least) to my AI..

And I'd need a unitlist too i guess, preff with unit specs..

thx 4 the clues if u got 'm..



and i'd be happy to update the wiki with some easy links for others to jumpstart an AI project..

Posted: 10 Sep 2007, 16:05
by AF
Look at the initialization routines fo AIs.

Looking at Global::LoadUnitData() in helper.cpp of NTai should help with listing unit definitions.

IAICallback.cpp has a few functions that return 1 dimensional arrays of float values representing the metal map and height map. There are functions that return the size of the map too.