any to create a mineral harvester

Editor Discussion
i am thinking something similar to automated refineries.
Basically you want to adjust your structure so that the Behaviour: Built On + field has Mineral Fields and Rich Mineral Fields listed in its object list. In this way, your structure will only be constructable on top of the objects that are on the list similar to how you can't construct regular Refineries unless it's on top of a Vespene Geyser.

You will also need to change the footprint to match the mineral fields unless you want to deliberately make them big.

And then there's the Automatic Refinery - Auto Harvest Vespene behaviour which sets the delay between each collection. Whenever this delay passes, it calls the Automated Refinery - Auto Harvest Vespene effect. This effect determines the amount of vespene (in your case minerals) that will be extracted per cycle.

So basically, just take a closer look at how the default Automated Refinery does it. You can even duplicate the AR if you want and simply customise it from there.
i am having trouble understanding the behavior system. the rest i had no trouble with. how for example do i set the behavior to extract a resource without a worker present?
The Automated Refinery unit has a field called Behaviour: Resource State set to None. This automatically prevents workers from harvesting from it because the Gather ability can only be used on resources that have their state set to Harvestable and not None or Raw.

None or Raw means that the resource cannot be gathered from unless something else is built over it (an Assimilator, Refinery or Extractor for example; it doesn't necessarily have to be those structures) that has that its Behaviour: Resource State field set to Harvestable.

Likewise, the Automated Refinery has another behaviour called Automatic Harvestable Vespene which acts as a failsafe, and prevents workers from being able to obtain any resources even if they somehow manage to gather from it. It also means that when the Automated Refinery morphs back into a regular geyser on destruction that the total amount of gas left will be preserved since they both use the same Resource type behaviours.

You will also notice that the Stats: Harvest Amount and Behaviour: Depletion Variation Count fields for the Automatic Harvestable Vespene behaviour are set to zero, while its standard non-automated counterpart called Gas (Raw Vespene Geyser) has 4 set to both fields.

So basically, constructing the automated refinery over a regular vespene node is essentially the same as building another geyser over an existing geyser (if that makes sense); except that the refinery unit switches to using its own Resource behaviour instead and has its Behaviour: Resource State field set to None to prevent workers from being able to gather from it.

If you really wanted to, it would be possible to allow your workers to harvest from automated refineries on top of having 4 gas get collected automatically per cycle by simply changing those fields.
that is the stuff i already understood. the thing i am unable to figure out is automatic harvestable vespene behavior.
Like I mentioned, it's simply a modified version of the Gas (Raw Vespene Geyser) behaviour used by all regular geysers. It's just changed to not give workers any resources if they somehow manage to collect from it.

You need to have it on your custom extractor so that the geyser (mineral field in your case) will inherit the same amount of gas still remaining before and after it's built on, and so that the extractor will actually have resources to gather from.

This behaviour by itself doesn't obtain any resources for you; it just "creates" a geyser that the refinery can gather from. The actual gathering is done via the Automatic Refinery - Auto Harvest Vespene behaviour which runs a periodic effect once per cycle whenever the timer passes.
now i found another issue: With the build system. it is built through Call Down but i can not figure out how to change built on for that. please help me.
Both the dummy unit and the actual harvester need to have the same resources listed for their Behaviour: Built On + field.

Make sure your dummy unit is the structure that gets built by the calldown ability and not your actual mineral harvester. The dummy unit will transform into the actual harvester after it gets "built" via a Morph ability later.
where do i Access the dummy unit?
Did you create one for your Calldown Build ability? You need to make one or the structure will just magically appear once your SCV tries to "build" one (or get an error about being unable to build it).

If you need an example, look at what behaviours and abilities that the Calldown Supply Depot Beacon unit uses. This is the dummy unit that uses a Morph to transform into an actual Supply Depot. If you based your mineral harvester on this properly then there shouldn't be any issues.
now i have dealt with that but while the editor works on my gtx 770m the game does not so i can not test it.
one thing i noticed is that the automated mineral Harvester becomes neutral after Construction. how do i fix that? i also noticed that the scvs can still gather and then Return Resources to the automated refinery. how do i stop that?
i still need help With this.
If SCVs can still gather from it then it means that you didn't change the harvester's Behaviour: Resource State field to None.

As for the harvester becoming neutral...I can't really help you there. There shouldn't be a reason for it to become neutral unless you added a flag for it to inherit and switch alliances after it's built.
the scvs can gather from the mineral Field which can still be accessed, not from the harvester. after it is built, the Harvester is unselectable while the mineral Field can still be selected.
Seems like there's an issue with your calldown dummy unit. Does your Mineral Harvester (the actual structure, not the dummy building) also have the Behaviour: Built On + field defined?
there is clearly several issues here. the building can be selected properly when placed in the editor but when built it looks different and can not be selected. the harvester itself have mineral fields as built on however. something is also wrong about the production of minerals because the harvester have minerals but does not harvest them.
i still need help With this. i will need help until i say that i do not.

Join the Conversation

Return to Forum