This is my first post on SC2Mapster. Many may already know me, since I use the same moniker virtually everywhere. More to the point, this is a tutorial on how to create an auto-harvesting structure. An auto-harvesting structure is any building that mines a resource directly on the node rather than having workers mine the resource and take it back to the town center. A perfect example of this is the already-made Automated Refinery. Well, let's dive in then.
Settings
All these settings are on in this tutorial.
Show Object Explorer
Table View
Sort Fields By Source
Show Basic Field Label
Show Field Categories
Combine Structure Values
Preface
This tutorial already assumes basic knowledge of the editor, such as duplicating units and all that good stuff. To start, I have a pre-made unit which I copied off the assimilator.
Let's Get Down to Business
Duplicate the Behavior Named Automatic Harvestable Vespene Make sure that everything is unchecked because we only want the behavior. Rename it if you wish.
Duplicate Automatic Refinery – Auto Harvest Vespene Make sure to have the effect Automated Refinery – Auto Harvest Vespene and the validators AutoHarvesterFinish and AutoHarvesterHarvest checked because we need duplicates of those as well. Rename it if you so desire.
Change Stats: Period to whatever you want. This changes how fast you want the structure to mine gas.
Go to the duplicated effect Automatic Refinery – Auto Harvest Vespene Copy and change Effect: Resources to however much you want the vespene geyser to mine per tick.
Go to the duplicated validator AutoHarvesterFinish Copy and change the field Validator: Behavior to Automatic Harvestable Vespene Copy or whatever you renamed it to.
Go to the duplicated validator AutoHarvesterHarvest Copy and change the requirements to whatever town center the auto-harvester belongs to. For instance, I’m making an assimilator, so I have to create a new requirement, dont have nexus, and use that. If it’s a Terran structure, you can leave it as dont have command center, if its Zerg, use dont have hatchery, etc. If it’s a custom town center, you have to create your own requirement for that, bub. This field keeps the structure from gathering resources if it has no town center to place it in.
These are all ready to go now, no need to come back and mess with them.
Go back to the Unit and Add the two behaviors you duplicated to the unit.
If you haven’t already, remove whatever harvesting behaviors that were previously on the unit.
Under Behavior: Resource State, change to none. Otherwise gatherers can still mine from it.
Done?
Well, if you’re not worried about visuals, then yes. But what if you want the green text that pops up after every tick? Then let’s continue.
Go back into actors and duplicate Automated Refinery Text Kicker4 and Automated Refinery Text Mover (Don't worry about Automated Refinery Text Kicker5, that's for microfiltering).
Go into Automated Refinery Text Kicker4 and change Actor: Text to whatever you want, I recommend adding a field reference so that if you change the amount harvested either through the editor or in-game, the text will change to reflect that.
In Events, change TimerExpired > Create AutomatedRefineryTextMover to its respective duplicate. You can fiddle around with those to affect speed and movement if you wish, however for this tutorial I won’t go into that.
We’re done with all that, now go to your structure’s actor and into events and add a new event called Effect.AutoHarvestVespeneCopy.Start > Create AutomatedRefineryTextKicker4.
That's it! If your structure was set up properly prior to this tutorial, and you followed this tutorial in its entirety, then you should have a fully working structure that automatically harvests gas! If you have any questions I would be happy to answer them, and don't be shy to ask me for more tutorials as I am quite experienced with the Data Editor.
...Err, didn't mean to make that sound like a boast.
Absolutely. The basic gist of it is the same, except in addition, you need to use a search area effect that modifies a unit (the mineral field) and reduces its resource amount, and make the auto-harvest behavior have a validator that checks if there are any mineral fields within range.
A good tutorial although I have two thoughts on it.
First, bluntly put, it's a nice giant wall of text with a scattering of bolded words that is slightly less than appealing to look at, let alone read. It would be better if you separated it into a specific component for each data object with sub-components for each field you change.
Second, I feel like the tutorial would be effective if you explained how to create the auto-harvesting behaviour from scratch instead of just duplicating a few values. Your method doesn't explain why it works and anyone can just write a text saying duplicate this, this, and this then tweak some numbers. People don't learn by being handed a calculator and a near-finished equation and being told to solve it, they learn by taking the raw problem then working it through step by step.
I hope you don't me being critical.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
How to Create Auto-Harvesting Structures
This is my first post on SC2Mapster. Many may already know me, since I use the same moniker virtually everywhere. More to the point, this is a tutorial on how to create an auto-harvesting structure. An auto-harvesting structure is any building that mines a resource directly on the node rather than having workers mine the resource and take it back to the town center. A perfect example of this is the already-made Automated Refinery. Well, let's dive in then.
Settings
All these settings are on in this tutorial. Show Object Explorer Table View Sort Fields By Source Show Basic Field Label Show Field Categories Combine Structure Values
Preface
This tutorial already assumes basic knowledge of the editor, such as duplicating units and all that good stuff. To start, I have a pre-made unit which I copied off the assimilator.
Let's Get Down to Business
Duplicate the Behavior Named Automatic Harvestable Vespene Make sure that everything is unchecked because we only want the behavior. Rename it if you wish. Duplicate Automatic Refinery – Auto Harvest Vespene Make sure to have the effect Automated Refinery – Auto Harvest Vespene and the validators AutoHarvesterFinish and AutoHarvesterHarvest checked because we need duplicates of those as well. Rename it if you so desire. Change Stats: Period to whatever you want. This changes how fast you want the structure to mine gas.
Go to the duplicated effect Automatic Refinery – Auto Harvest Vespene Copy and change Effect: Resources to however much you want the vespene geyser to mine per tick. Go to the duplicated validator AutoHarvesterFinish Copy and change the field Validator: Behavior to Automatic Harvestable Vespene Copy or whatever you renamed it to. Go to the duplicated validator AutoHarvesterHarvest Copy and change the requirements to whatever town center the auto-harvester belongs to. For instance, I’m making an assimilator, so I have to create a new requirement, dont have nexus, and use that. If it’s a Terran structure, you can leave it as dont have command center, if its Zerg, use dont have hatchery, etc. If it’s a custom town center, you have to create your own requirement for that, bub. This field keeps the structure from gathering resources if it has no town center to place it in. These are all ready to go now, no need to come back and mess with them. Go back to the Unit and Add the two behaviors you duplicated to the unit. If you haven’t already, remove whatever harvesting behaviors that were previously on the unit. Under Behavior: Resource State, change to none. Otherwise gatherers can still mine from it.
Done?
Well, if you’re not worried about visuals, then yes. But what if you want the green text that pops up after every tick? Then let’s continue.
Go back into actors and duplicate Automated Refinery Text Kicker4 and Automated Refinery Text Mover (Don't worry about Automated Refinery Text Kicker5, that's for microfiltering). Go into Automated Refinery Text Kicker4 and change Actor: Text to whatever you want, I recommend adding a field reference so that if you change the amount harvested either through the editor or in-game, the text will change to reflect that. In Events, change TimerExpired > Create AutomatedRefineryTextMover to its respective duplicate. You can fiddle around with those to affect speed and movement if you wish, however for this tutorial I won’t go into that. We’re done with all that, now go to your structure’s actor and into events and add a new event called Effect.AutoHarvestVespeneCopy.Start > Create AutomatedRefineryTextKicker4.
That's it! If your structure was set up properly prior to this tutorial, and you followed this tutorial in its entirety, then you should have a fully working structure that automatically harvests gas! If you have any questions I would be happy to answer them, and don't be shy to ask me for more tutorials as I am quite experienced with the Data Editor.
...Err, didn't mean to make that sound like a boast.
Can you make one that automatically harvests minerals within a set distance of itself? ;)
Absolutely. The basic gist of it is the same, except in addition, you need to use a search area effect that modifies a unit (the mineral field) and reduces its resource amount, and make the auto-harvest behavior have a validator that checks if there are any mineral fields within range.
A good tutorial although I have two thoughts on it.
First, bluntly put, it's a nice giant wall of text with a scattering of bolded words that is slightly less than appealing to look at, let alone read. It would be better if you separated it into a specific component for each data object with sub-components for each field you change.
Second, I feel like the tutorial would be effective if you explained how to create the auto-harvesting behaviour from scratch instead of just duplicating a few values. Your method doesn't explain why it works and anyone can just write a text saying duplicate this, this, and this then tweak some numbers. People don't learn by being handed a calculator and a near-finished equation and being told to solve it, they learn by taking the raw problem then working it through step by step.
I hope you don't me being critical.