s2client-api icon indicating copy to clipboard operation
s2client-api copied to clipboard

Mineral / Gas cost of Lair and Hive

Open davechurchill opened this issue 8 years ago • 6 comments

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

davechurchill avatar Nov 13 '17 06:11 davechurchill

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 avatar Apr 05 '18 20:04 alkurbatov

@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.

Archiatrus avatar Apr 05 '18 20:04 Archiatrus

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?

alkurbatov avatar Apr 05 '18 20:04 alkurbatov

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.

Archiatrus avatar Apr 05 '18 20:04 Archiatrus

Thank you! I will check tomorrow.

alkurbatov avatar Apr 05 '18 21:04 alkurbatov

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.

alkurbatov avatar Apr 06 '18 19:04 alkurbatov