The builder manager of my fledgling AI thinks that in BA, a corlab can assist nearby construction because canAssist is true, and buildDistance is 128.
Yet I know the UI doesn't allow ordering a corlab to assist construction.
Is the corlab able to assist construction? If not, how can I reliably determine that a unit can assist construction without hardcoding mod-specific knowledge?
I am using the Java interface.
BTW, is there some documentation of what exactly the attributes in UnitDef mean? (Most of them don't have any javadoc ...)
The corlab can assist??
Moderators: hoijui, Moderators
Re: The corlab can assist??
canAssist = true on the lab seems like a modmakers mistake, afaik factories can never assist, ony be assisted. (is that the reason why nano towers are units and not buildings?)
I think buildDistance has no effect on factories either.
There are many cases like that, ie a unit might have isTransport = true but ingame it will not be a useable transport unless it has some other tags such as TransportCapacity set.
http://springrts.com/wiki/Units:FBI
http://springrts.com/wiki/Lua_UnitDefs
https://github.com/spring/spring/blob/m ... nitDef.cpp

I think buildDistance has no effect on factories either.
There are many cases like that, ie a unit might have isTransport = true but ingame it will not be a useable transport unless it has some other tags such as TransportCapacity set.
http://springrts.com/wiki/Units:FBI
http://springrts.com/wiki/Lua_UnitDefs
https://github.com/spring/spring/blob/m ... nitDef.cpp

Re: The corlab can assist??
My Diagnosis?

BADBABYSITTING MODDING.

BAD
Re: The corlab can assist??
Thanks for the links Knorke, they already proved helpful in another matter
I am not sure I understand your distinction between units and buildings though. How does the engine know whether a UnitDef represents a "building" or a "unit"?

I am not sure I understand your distinction between units and buildings though. How does the engine know whether a UnitDef represents a "building" or a "unit"?
Re: The corlab can assist??
I do not know.How does the engine know whether a UnitDef represents a "building" or a "unit"?
Some things might be:
-only buildings have yardmaps?
-some tags like canFly=true will always make it a unit?
TEDClass?
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: The corlab can assist??
tedclass is not used.
How does spring know? Easy. canMove = true/false,
How does spring know? Easy. canMove = true/false,
Re: The corlab can assist??
Building does not have movedef (UnitDef->movedata == NULL). But for example NOTA mod has movable defences: Hatrack (armmllt). It HAS movedef but max velocity is 0.001.
Re: The corlab can assist??
It is just for button in GUI. Do not rely on it. For exmaple it can be used to set rally point for factory.Forboding Angel wrote:...canMove = true/false,
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: The corlab can assist??
Yar, I forgot about the obvious fact that a building won't have a movedef.
Does spring round maxvelocity=0, up to 0.1?Another way to do it would be to give the nanotower a massive footprint and 0 crushstrength so that it can't path anywhere.
Does spring round maxvelocity=0, up to 0.1?Another way to do it would be to give the nanotower a massive footprint and 0 crushstrength so that it can't path anywhere.
Re: The corlab can assist??
2 out of 3 ain't half bad.knorke wrote:I do not know.How does the engine know whether a UnitDef represents a "building" or a "unit"?
Some things might be:
-only buildings have yardmaps?
-some tags like canFly=true will always make it a unit?
TEDClass?
