Skip to content
Contractsv1.9.0

Player Calories

⭐ Premium

Progress counts only when the calories of the player performing the action are within the specified bounds at that instant. This is the food number on the vitals HUD, which runs from 0 to 500.

{
"type": "PlayerCalories",
"maxCalories": 40
}
FieldTypeDescription
typestringExactly 'PlayerCalories'
minCaloriesnumber | nullMinimum calories. Null (or omitted) means no lower bound.
maxCaloriesnumber | nullMaximum calories. Null (or omitted) means no upper bound.
  • The hungry warning shows at low calories, around 40 and below. Starvation damage starts at 20 or below. So “while hungry” is maxCalories: 40, “while starving” is maxCalories: 20.
  • The abundance direction works too: “while well fed” is something like minCalories: 400.
  • Either bound can be null (or omitted entirely) for “no limit on that side”, but at least one bound is required. A condition with neither bound would always be satisfied, so it is invalid and the contract will not load.
  • If minCalories is greater than maxCalories, the plugin swaps them and logs a warning.

Gather 500 wood while hungry:

{
"type": "Gather",
"amountRequired": 500,
"items": ["wood"],
"conditions": {
"hungry": {
"type": "PlayerCalories",
"maxCalories": 40
}
}
}