When getting the unit defs from ta spring i get an error message, saying there are "x missed unit defs", for example 35 when starting an aa1.2 game
i dont get this error in connection with xta or ta:wd; there's either a bug in this callback function, (probably some kind of maximum number of unit defs)
or its an aa:ta issue
Problem with GetUnitDefs()
Moderators: hoijui, Moderators
Hmm does GetUnitDefList get ALL unit defs in a mod???
if it does then it is indeed possible to work out the complete buildtrees for either side before the game starts up like we discussed before!
anyways im not sure about your problem, but AA does have some dodgy units:
Compare Category and side and look at the unit number. Maybe some unit numbers are greater than 65k, which could cause trouble with some int types, i dont know...
if it does then it is indeed possible to work out the complete buildtrees for either side before the game starts up like we discussed before!
anyways im not sure about your problem, but AA does have some dodgy units:
Code: Select all
Category=ARM SHIP LEVEL2 WEAPON NOTAIR NOTSUB ALL ;
Description=Long-Range Plasma Ship;
FootprintX=7;
FootprintZ=7;
MaxDamage=12200;
ObjectName=ZULU;
Side=CORE;
unitnumber=19214;
Well, then you can get all units, see what they can build, make trees out of it (should end up with one tree per side). That should be enough to let the AI build, it will start building with whatever unit it starts with, be it a comm or con kbot.
If you need to specifically find the commander, go up it until you find a builder unit that cannot be built, which should be the commander!
That wouldnt need a cfg then would it?
If you need to specifically find the commander, go up it until you find a builder unit that cannot be built, which should be the commander!
That wouldnt need a cfg then would it?
imho build tree like structures are too much hassle. How do you account for places where you have multiple branches converging, such as a factory that builds untis that can be built udner both arm and core tech trees? How to deal with captured units, factories built by a large selection of builders such as the lvl 1 factories.
All too much info beign processed when much better techniques are available.
All too much info beign processed when much better techniques are available.
The debugger is your friend 
But really, IMO all AI developers have the skill and ability to help with debugging such issues, so they should :) Put lesson2 in your VS solution, build spring in debug, search for "missed unit defs" in the code and set a breakpoint, and your bug is probably fixed in no time...
JCAI implements these buildtrees since 0.20 already (BuildTable), you can use it to calculate the shortest build path from unit X to unit Y in constant time. Even from com to krogoth if you want
I solved it as if it's a general pathfinding problem, makes it quite simple if you look at it like that. Even A* could be used for it I guess, but my precomputing is even simpler.

But really, IMO all AI developers have the skill and ability to help with debugging such issues, so they should :) Put lesson2 in your VS solution, build spring in debug, search for "missed unit defs" in the code and set a breakpoint, and your bug is probably fixed in no time...
JCAI implements these buildtrees since 0.20 already (BuildTable), you can use it to calculate the shortest build path from unit X to unit Y in constant time. Even from com to krogoth if you want

I solved it as if it's a general pathfinding problem, makes it quite simple if you look at it like that. Even A* could be used for it I guess, but my precomputing is even simpler.