Class EntityBehaviorMultiply
- Namespace
- Vintagestory.GameContent
- Assembly
- VSEssentials.dll
Allows an entity to get pregnant and give birth.
Uses the "multiply" code Open in GitHub
[DocumentAsJson]
[AddDocumentationProperty("spawnEntityCode", "Used instead of spawnEntityCodes if the latter is not defined", "System.String", "Optional", "", false)]
public class EntityBehaviorMultiply : EntityBehaviorMultiplyBase
- Inheritance
-
EntityBehaviorMultiply
- Inherited Members
Examples
"behaviors": [
{
"code": "multiply",
"enabledByType": {
"*-female": true,
"*": false
},
"spawnEntityCodes": [{ "code": "sheep-{type}-baby-male" }, { "code": "sheep-{type}-baby-female" }],
"requiresNearbyEntityCode": "sheep-bighorn-adult-male",
"requiresNearbyEntityRange": 10,
"spawnQuantityMin": 1,
"spawnQuantityMax": 1,
"pregnancyDays": 20,
"multiplyCooldownDaysMin": 4,
"multiplyCooldownDaysMax": 11,
"portionsEatenForMultiply": 10
},
],
Fields
SpawnEntityCodes (Required)
The entity codes used to spawn the offspring
[DocumentAsJson("Required", "", false)]
protected AssetLocation[] SpawnEntityCodes
Field Value
PregnancyDays (Optional) (Default: 3)
How long the pregnancy should last in in-game days.
[DocumentAsJson("Optional", "3", false)]
[JsonProperty]
public double PregnancyDays
Field Value
requiresNearbyEntityCode (Optional)
Specifies an entity required for this entity to be able to get pregnant. Will only set if plural version is not set.
[DocumentAsJson("Optional", "", false)]
[JsonProperty]
private AssetLocation requiresNearbyEntityCode { set; }
Field Value
RequiresNearbyEntityCodes (Optional)
Specifies an list of entities required nearby for this entity to be able to get pregnant. Only one needs to match.
[DocumentAsJson("Optional", "", false)]
[JsonProperty]
public AssetLocation[] RequiresNearbyEntityCodes
Field Value
RequiresNearbyEntityRange (Optional) (Default: 5)
Specifies the range within which the entity with code defined in RequiresNearbyEntityCode should be located in order for this entity to be able to get pregnant
[DocumentAsJson("Optional", "5", false)]
[JsonProperty]
public float RequiresNearbyEntityRange
Field Value
spawnEntityCode (Optional)
Used instead of spawnEntityCodes if the latter is not defined
Field Value
SpawnQuantityMax (Optional) (Default: 2)
How many offspring should be spawned at maximum
[DocumentAsJson("Optional", "2", false)]
[JsonProperty]
public float SpawnQuantityMax
Field Value
SpawnQuantityMin (Optional) (Default: 1)
How many offspring should be spawned at minimum
[DocumentAsJson("Optional", "1", false)]
[JsonProperty]
public float SpawnQuantityMin