Factorio.com|Forums|Wiki|Mod Portal|API Docs

# Factorio Prototype Docs Version 2.0.77

# TreeVariation - Prototype Docs

## TreeVariation :: struct

Tree has number of "dying" stages, which is deduced from frame count of `shadow` if shadow is defined, otherwise from frame count of `trunk`. Frame count of `leaves` has to be one less than deduced number stages, as last stage is always assumed to be leafless.

## Properties

- default
- sorted

trunk | :: Animation | If `shadow` is not specified, this has to have one more frame than `leaves`.
If `shadow` is not specified, this has to have one more frame than `leaves`.
leaves | :: Animation |
leaf_generation | :: CreateParticleTriggerEffectItem |
branch_generation | :: CreateParticleTriggerEffectItem |
shadow optional | :: Animation | Shadow must have 1 more `frame_count` than `leaves`.
Shadow must have 1 more `frame_count` than `leaves`.
disable_shadow_distortion_beginning_at_frame optional | :: uint32 | Only loaded if `shadow` is present. [...]
Only loaded if `shadow` is present. [...]
normal optional | :: Animation | Normal must have the same frame_count as `leaves`.
Normal must have the same frame_count as `leaves`.
overlay optional | :: Animation | Overlay must have the same frame_count as `leaves`. [...]
Overlay must have the same frame_count as `leaves`. [...]
underwater optional | :: Animation |
underwater_layer_offset optional | :: int8 |
leaves_when_mined_manually optional | :: uint8 |
leaves_when_mined_automatically optional | :: uint8 |
leaves_when_damaged optional | :: uint8 | This value is multiplied with the percent of health lost.
This value is multiplied with the percent of health lost.
leaves_when_destroyed optional | :: uint8 |
branches_when_mined_manually optional | :: uint8 |
branches_when_mined_automatically optional | :: uint8 |
branches_when_damaged optional | :: uint8 | This value is multiplied with the percent of health lost.
This value is multiplied with the percent of health lost.
branches_when_destroyed optional | :: uint8 |
water_reflection optional | :: WaterReflectionDefinition |

branch_generation | :: CreateParticleTriggerEffectItem |
leaf_generation | :: CreateParticleTriggerEffectItem |
leaves | :: Animation |
trunk | :: Animation | If `shadow` is not specified, this has to have one more frame than `leaves`.
If `shadow` is not specified, this has to have one more frame than `leaves`.
branches_when_damaged optional | :: uint8 | This value is multiplied with the percent of health lost.
This value is multiplied with the percent of health lost.
branches_when_destroyed optional | :: uint8 |
branches_when_mined_automatically optional | :: uint8 |
branches_when_mined_manually optional | :: uint8 |
disable_shadow_distortion_beginning_at_frame optional | :: uint32 | Only loaded if `shadow` is present. [...]
Only loaded if `shadow` is present. [...]
leaves_when_damaged optional | :: uint8 | This value is multiplied with the percent of health lost.
This value is multiplied with the percent of health lost.
leaves_when_destroyed optional | :: uint8 |
leaves_when_mined_automatically optional | :: uint8 |
leaves_when_mined_manually optional | :: uint8 |
normal optional | :: Animation | Normal must have the same frame_count as `leaves`.
Normal must have the same frame_count as `leaves`.
overlay optional | :: Animation | Overlay must have the same frame_count as `leaves`. [...]
Overlay must have the same frame_count as `leaves`. [...]
shadow optional | :: Animation | Shadow must have 1 more `frame_count` than `leaves`.
Shadow must have 1 more `frame_count` than `leaves`.
underwater optional | :: Animation |
underwater_layer_offset optional | :: int8 |
water_reflection optional | :: WaterReflectionDefinition |

## Properties

### trunk :: Animation

If `shadow` is not specified, this has to have one more frame than `leaves`.

### leaves :: Animation

### leaf_generation :: CreateParticleTriggerEffectItem

### branch_generation :: CreateParticleTriggerEffectItem

### shadow :: Animation optional

Shadow must have 1 more `frame_count` than `leaves`.

### disable_shadow_distortion_beginning_at_frame :: uint32 optional

Only loaded if `shadow` is present. Defaults to `shadow.frame_count - 1`.

### normal :: Animation optional

Normal must have the same frame_count as `leaves`.

### overlay :: Animation optional

Overlay must have the same frame_count as `leaves`. Won't be tinted by the tree color unless `apply_runtime_tint` is set to `true` in the sprite definition. See here.

### underwater :: Animation optional

### underwater_layer_offset :: int8 optional

Default: `1`

### leaves_when_mined_manually :: uint8 optional

Default: `40`

### leaves_when_mined_automatically :: uint8 optional

Default: `20`

### leaves_when_damaged :: uint8 optional

Default: `200`

This value is multiplied with the percent of health lost.

### leaves_when_destroyed :: uint8 optional

Default: `40`

### branches_when_mined_manually :: uint8 optional

Default: `15`

### branches_when_mined_automatically :: uint8 optional

Default: `8`

### branches_when_damaged :: uint8 optional

Default: `0`

This value is multiplied with the percent of health lost.

### branches_when_destroyed :: uint8 optional

Default: `15`

### water_reflection :: WaterReflectionDefinition optional

Type used in

- TreePrototype::variations