Mineral / Gas cost of Lair and Hive
It seems that the mineral and gas cost of Lair and Hive in the API are cumulative.
For example, the cost of the Lair is listed as 500 minerals and 150 gas, which is the cost of Hatchery + Lair upgrade. Similar for Hive. I'm not sure yet if other upgraded buildings have this property.
I think this is a little confusing, and should probably be changed to just be the cost of purchasing the upgrade
Unfortunately, looks like the problem is even worth: we can't morf anything until we have enough minerals (e.g. 550 for Orbital Command).
@alkurbatov My bot can morph the Command Center to an Orbital Command once it has 150 minerals. You can see this in the replays here.
I can't load replays from this ladder because of unknown reason (I tried to do it several months ago), but I'll recheck the problem more carefully.
@Archiatrus, could you show the code which executes the building order?
Here and then here. unit->getUnit_ptr() just gives the sc2::Unit pointer and the getter functions give exactly what you expect.
Regarding the unable to open map error see here.
Thank you! I will check tomorrow.
I figured out why an orbital command can't be built in my bot. I use 'UnitTypeData->tech_requirement' to identify whether we've have all required techs or not at the particular moment in time. For the orbital lldb reports tech_requirement = (type_id_ = 0) which is sc2::UNIT_TYPEID::INVALID, however, we need at least one finished barrack to be completed.
So I believe we have another API bug related to the orbital command.
Regarding the replays: I use OS X and can't find the 'Maps' folder so the instructions would be slightly different. I believe we can continue this discussion in the related ticket.