Class EntityBehaviorHunger
- Namespace
- Vintagestory.GameContent
- Assembly
- VSEssentials.dll
Adds hunger to entity. Allows it to eat and die from starvation.
Uses the "hunger" code Open in GitHub
[DocumentAsJson]
public class EntityBehaviorHunger : EntityBehavior
- Inheritance
-
EntityBehaviorHunger
Examples
"behaviors": [
{
"code": "hunger",
"currentsaturation": 1500.0,
"maxsaturation": 1500.0
},
],
Fields
CurrentSaturation (Optional) (Default: 1500)
The entity will have this much saturation upon spawn if this is set in JSON. Otherwise, this is the current saturation of the entity
[DocumentAsJson("Optional", "1500", false)]
public float Saturation { get; set; }
Field Value
MaxSaturation (Optional) (Default: 1500)
Max possible saturation the entity can have in general
[DocumentAsJson("Optional", "1500", false)]
public float MaxSaturation { get; set; }
Field Value
SatLossPerJump (Optional) (Default: 0.1)
How many satiety points will be consumed per second of sprinting.
[DocumentAsJson("Optional", "0.1", false)]
protected virtual float SatietyLossPerJump { get; set; }
Field Value
SatLossPerMoveSec (Optional) (Default: 0.72)
How many satiety points will be consumed per second of movement.
[DocumentAsJson("Optional", "0.72", false)]
protected virtual float SatietyLossPerMovementSecond { get; set; }
Field Value
SatLossPerSec (Optional) (Default: 0.24)
How many satiety points will be consumed per second of hunger.
[DocumentAsJson("Optional", "0.24", false)]
protected virtual float SatietyLossPerSecond { get; set; }
Field Value
SatLossPerSprintSec (Optional) (Default: 2.22)
How many satiety points will be consumed per second of sprinting.
[DocumentAsJson("Optional", "2.22", false)]
protected virtual float SatietyLossPerSprintSecond { get; set; }
Field Value
SatLossPerSwimSec (Optional) (Default: 0.72)
How many satiety points will be consumed per second of swimming.
[DocumentAsJson("Optional", "0.72", false)]
protected virtual float SatietyLossPerSwimSecond { get; set; }