Data/Behaviors/Resource

## Resource

(Editor Screenshot) Needs pic of a selected vespene geyser

### Description

Behaviour that determines the numeric value of resources at a unit, the behaviour applied to units harvesting the resource, the amount harvested per trip and the time taken to do so. The exact resource harvested is determined by the Behavior: Resource Type field of the Units data type.

### Hint

* Important part of a standard economy
* A unit using such a behavior must always have it on, or at least 1 resource behavior. Removing them all results in game crash.
* Having 2 or more resource behavior will let the worker harvest the oldest one before hand, but will show only the newest one.

## Example Usage

### Gas (Raw Vespene Geyser)

The resource behaviour used by the Vespene Geyser unit onto which the various harvestable structures are built. Determines the amount of gas present in the structures built on top of it and the behaviour responsible for the gas carried by the workers gathering it.

#### URL

As the Vespene Geyser, all associated behaviours and units are already in the editor, no URL is needed

### Minerals (Mineral Field)

The resource behaviour used by the Mineral Field unit. Determines the amount of minerals present in the unit and the behaviour responsible for the mineral shard carried by the workers gathering it.

#### URL

As the Mineral Field, all associated behaviours and units are already in the editor, no URL is needed

## Fields Description

### Behavior - Alignment

* Determines if the behaviour texture appears green (Positive), white (Neutral) or red (Negative)

### Behavior - Carry Resource Behavior

* The behaviour applied to units with the Harvest ability when they are carrying at least one unit of the resource
* Is removed when the resource is deposited in a unit with the corresponding Behavior - Resource Drop Off flag enabled
* Is removed when selecting to harvest a different resource
* (Unknown) What behaviours next to buffs work when placed in this field?
* Can be used to encumber/boost units carrying resources

### Behavior - Categories

* Permanent
* Restorable
* Temporary
* These are Filters, used kind of like Unit Attributes. Used by Behavior - Modification - Behavior Categories Disabled/Enabled.

### Behavior - Depletion Threshold

* The amount of resources remaining that triggers the UI - Depletion Alert

### Behavior - Depletion Variation Count

* The number of equal divisions the behaviour has based on the Stats - Amount comparative to the (Unsure) Stats - Capacity which determines the level of the behaviour for use in actor events

### Behavior - Empty Unit

* The unit from the Units data type that replaces the unit with this behaviour once the Stats - Amount reaches 0 by being harvested
* Good for booby traps

### Behavior - Required Alliance

* (Unknown) The diplomatic relationship the harvesting unit must have with the owner of the unit with this behaviour?
* **Chat:** (Unknown)
* **Control:** (Unknown)
* **Defeat:** (Unknown)
* **Give Help:** (Unknown)
* **Passive:** The default
* **Pushable:** (Unknown)
* **Seek Help:** (Unknown)
* **Spend:** (Unknown)
* **Trade:** (Unknown)
* **Vision:** (Unknown)

### Behavior - Requirements

* The requirements from the Requirements data type that need to be met to enable the behavior
* Useful for only enabling harvesting of certain resources once specific conditions are met

### Cost - Cost +

* Standard cost fields associated with applying/using the behavior
* Apparently are not functional

### Stats - Amount

* The starting amount of resources units with this behaviour have that can be harvested by the Harvest ability
* If set to 0 units with the behaviour assume the Stats - Amount of any units with a resource behaviour that the unit is constructed on

### Stats - Capacity

* The maximum amount of resources the behaviour can have if modified by the Effect - Resource Restore+ fields of a Modify Unit effect

### Stats - Empty Harvest Amount

* The base amount of resources harvested per cycle when the Stats - Amount reaches 0 from being harvested
* Think of the SC1 depleted vespene geysers

### Stats - Flags

* Hidden determines if the behaviour icon is hidden or visible in the UI

### Stats - Harvest Amount

* The base amount of resources harvested per cycle when the Stats - Amount is greater than 0

### Stats - Harvest Time

* The base time taken to harvest the Harvest Amount from a resource with a Harvest ability

### Stats - Resource Flags

* Flags for the resource
* **Hide Harvesters:** Makes the harvesters unable to be seen while harvesting the resource eg. harvesting vespene
* **Remove When Empty:** Removes the unit with this behaviour when the Stats - Amount reaches 0 eg. mineral fields

### Stats - Return Delay

* The amount of time taken after having harvested the resource before the harvesting unit moves to deposit the resource at a unit with the corresponding Behavior - Resource Drop Off enabled

### Tech Tree - Tech Alias

* Identifier that can be used as a reference in the requirements.

### UI - Depletion Alert

* Alert from the Alerts data type that is played when the Stats - Amount reaches below the Behavior - Depletion Threshold through harvesting

### UI - Exhausted Alert

* Alert from the Alerts data type that is played when the Stats - Amount reaches 0

### UI - Tooltip

* The text displayed if the mouse cursor is moved over the behaviour icon ingame

## Related

* Units
* Harvest
* Modify Unit
* Unit Compare Resource Contents
* Unit Compare Resource Harvesters
* Behavior Level
* Level (Actor Event Term)