-
Notifications
You must be signed in to change notification settings - Fork 2
English
This wiki page is up to date for 0.3.0
- Toml Format
- Layout
- Rules
- Selectors (Vanilla)
- Selectors (Modded)
- Sub Rules
- Misc Features & Info
- Example
Spawning rules for the mod are parsed via a TOML file in the config folder with the name specifiedspawning.toml. If you want to read an in depth explanation of the TOML format you can read about that here or look at this section of the Music Triggers wiki since the backend parser is the same
The config file has some global options has the top, but other than that, each rule will be placed under a separate table. The accepted rules are group, spawn, modify, and remove. Multiple of the same type of rule can be added.
The group rule lets you assign and modify spawning groups for entities. The accepted parameters are name, count, weight, peaceful, animal, and aquatic. Here are what those do:
name: The name of the spawn group. This is what you will need to reference in the other rule types.
The vanilla groups can be modified by using "hostile" for mobs, "passive" for animals, "ambient" for
creatures like bats, and "aquatic" for aquatic entities like squids. Any other name will create a new
spawn group. Accepts any string value with a default "hostile" if this parameter is not included.
count: This is the maximum number of mobs in the group that will able to be spawned at once. Accepts
any integer value with a default 20 for new groups or in the case of a vanilla group the normal count
will be inherited if this parameter is not included.
weight: Accepts any integer value with a default of 100 if this parameter is not included.
(currently unused)
peaceful: Set to true if this group is for non hostile mobs. Accepts true/false with a default of
false if this parameter is not included. (currently unused)
animal: Set to true if this group is for animals. Accepts true/false with a default of
false if this parameter is not included. (currently unused)
aquatic: Set to true if this group is for aquatic mobs. Accepts true/false with a default of
false if this parameter is not included. (currently unused)
The spawn rule allows you to add new spawn entries.
Here are what the parameters do:
group: The name of the spawn group to check for spawn entries under. Accepts any string value with a
default of "hostile" if this parameter is not included.
The modify rule allows you to modify existing spawn entries.
Here are what the parameters do:
group: The name of the spawn group to check for spawn entries under. Accepts any string value with a
default of "hostile" if this parameter is not included.
new_group: The name of the spawn group to reassign any matching spawn entries to. Accepts any string
value group and does not do anything if this parameter is not included.
The remove rule allows you to remove existing spawn entries.
- Accepts all selectors, but does not check for weight and spawn counts of spawn entries to remove for entity selectors.
- Accepts the
groupparameter - Does not currently accept any sub rules.
Here are what the parameters do:
group: The name of the spawn group to check for spawn entries under. Accepts any string value with a
default of "hostile" if this parameter is not included.
Selectors are the conditions for your rule tables. If there are multiple of the same type of selector present under a single rule table, any of that type is allowed to pass. Note that if a rule only has biome and entity selectors it will only need to get run once and will therefore have no virtually no lasting impact on performance. Beyond those 2 selectors, other selector types are all checked before an entity is instantiated only only what is needed to get checked will be checked for.
This is a sub table
[rule]
[rule.biome]
biome = "minecraft:plains"
Determines the biome or collection of biomes for the parent rule to look for spawn entries in. If no parameters are present, this will match all registered biomes. Similarly, if no biome selector is present for a rule that looks for one, that rule will also be run for all registered biomes. The accepted parameters are biome, matcher, mod, and inverted. Here are what those do:
biome: The registered ID of the biome to match, such as "minecraft:plains". This must match the name
of the biome exactly to pass. This can only match with one biome. Accepts any string value.
mod: The modid of registered biome ID to match. For example, in "minecraft:plains", the modid would
be "minecraft". This must match the modid exactly to pass. This can match with multiple biomes.
Accepts any string value.
matcher: The registered biome ID must contain this. For example, in "minecraft:plains", matchers of
"plains", "ins", "la", "mine", "minecraft", or even just ":" would be valid. This can match with
multiple biomes. Accepts any string value.
inverted: If this is true, the other 3 parameters of biome, mod, and matcher will be used as a
blacklist and all biomes other than the matching ones will be selected. Accepts true/false with a
default of false if this parameter is not included.
Note that if biome, mod, and matcher are used concurrently, it is not an additive check! This means that a biome will be able to match any of those three parameters that are present!
This is NOT a sub table
[rule]
dimension = 0
Determines the dimension or dimensions the parent rule will be run in. Note that all of the following are valid for parsing this selector, with the exception that brackets must be present when selecting multiple dimensions
dimension = 0dimension = "0"dimension = [ 0 ]dimension = [ "0" ]dimension = [ 0 -1 ]dimension = [ "0" "-1" ]dimension = [ -343800852 -23 1 20 694 28885 ]dimension = [ "-343800852" "-23" "1" "20" "694" "28885" ]
(bonus points to anyone who can name all of the dimensions associated with those ids by default in the last 2 examples)
This is a sub table
[rule]
[rule.entity]
entity = "minecraft:skeleton"
Determines the entity or collection of entities for the parent rule to look for matching spawn entries of. If no parameters are present, this will match all registered entities . Similarly, if no entity selector is present for a rule that looks for one, that rule will also be run for all registered entities. The accepted parameters are entity, matcher, mod, min_group_size, max_group_size, weight, and inverted. Here are what those do:
entity: The registered ID of the entity to match, such as "minecraft:skeleton". This must match the
name of the entity exactly to pass. This can only match with one biome. Accepts any string value.
mod: The modid of registered entity ID to match. For example, in "minecraft:skeleton", the modid
would be "minecraft". This must match the modid exactly to pass. This can match with multiple
entities. Accepts any string value.
matcher: The registered entity ID must contain this. For example, in "minecraft:skeleton", matchers
of "skeleton", "ton", "le", "mine", "minecraft", or even just ":" would be valid. This can match
with multiple entities. Accepts any string value.
min_group_size: The minimum number of mobs that will be spawned in a group when a matching spawn
entry is spawned from. Note that in the case of multiple entity selectors being present for the same
rule, this parameter will be taken from the first one even if it is not present. Accepts any integer
value with a default of 1 if this parameter is not included.
max_group_size: The maximum number of mobs that will be spawned in a group when a matching spawn
entry is spawned from. Note that in the case of multiple entity selectors being present for the same
rule, this parameter will be taken from the first one even if it is not present. Accepts any integer
value with a default of what the min_group_size is set to if this parameter is not included.
weight: The weight of all matching spawn entries. Note that spawn weight is not equivalent to spawn
chance. This means that rather than this parameter being "X percent chance" that the entity will
spawn, it is instead the weight over the total weights of all potential spawn entries in an area.
Also note that in the case of multiple entity selectors being present for the same rule, this
parameter will be taken from the first one even if it is not present. Accepts any integer value with
a default value of 10 if this parameter is not included.
inverted: If this is true, the 3 parameters of entity, mod, and matcher will be used as a blacklist
and all entities other than the matching ones will be selected. Accepts true/false with a default of
false if this parameter is not included.
Note that if entity, mod, and matcher are used concurrently, it is not an additive check! This means that an entity will be able to match any of those three parameters that are present!
This is a sub table
[rule]
[rule.height]
min = 10
max = 30
Determines the y coordinate bounds that the parent rule must be running in. The accepted parameters are min, max, check_sky, and inverted. Here are what those do:
min: The minimum y value. This value is inclusive meaning the y position must be at or greater than
this value. Accepts any integer value with a default value of 0 if this parameter is not included.
max: The maximum y value. This value is inclusive meaning the y position must be at or less than
this value. Accepts any integer value with a default value of 255 if this parameter is not included.
check_sky: If this is true, the potential spawn position must not be able to see the sky. Accepts
true/false with a default value of false if this parameter is not included.
inverted: If this is true, the y position must be outside of the min/max bounds. Any y position less
than the min value or greater than the max value will be valid. Accepts true/false with a default of
false if this parameter is not included.
This is a sub table
[rule]
[rule.light]
max = 3
Determines the light level that the parent rule must be running in. The accepted parameters are min, max, and inverted. Here are what those do:
min: The minimum light level. This value is inclusive meaning the light level must be at or greater
than this value. Accepts any integer value with a default value of 0 if this parameter is not
included.
max: The maximum light level. This value is inclusive meaning the light level must be at or less
than this value. Accepts any integer value with a default value of 7 if this parameter is not
included.
inverted: If this is true, the light level must be outside of the min/max bounds. Any light level
less than the min value or greater than the max value will be valid. Accepts true/false with a
default of false if this parameter is not included.
This is a sub table
[rule]
[rule.moonphase]
moon_phase = [ 1 2 7 8 ]
Determines the moon phase that the parent rule must be running in. The accepted parameters are moon_phase and inverted. Here are what those do:
moon_phase: The phase or phases of the moon that the dimension of the potential spawning position
must be in. Accepts 1, 2, 3, 4, 5, 6, 7, 8, or any combination of those numbers. The phase for each
number is listed below.
1 = Full Moon
2 = Waning Gibbous
3 = Last Quarter
4 = Waning Crescent
5 = New Moon
6 = Waxing Crescent
7 = First Quarter
8 = Waxing Gibbous
inverted: If this is true, the moon_phase parameter will act as a blacklist and any phase other than
those listed will be valid. Accepts true/false with a default of false if this parameter is not
included.
This is a sub table
[rule]
[rule.regionaldifficulty]
min = 2
max = 5
Determines the bounds of the local difficulty that the parent rule must be running in. The accepted parameters are min, max, and inverted. Here are what those do:
min: The minimum local difficulty. This value is inclusive meaning the local difficulty must be
at or greater than this value. Accepts any decimal value at or greater than 0 with a default
value of 0 if this parameter is not included.
max: The maximum local difficulty. This value is inclusive meaning the local difficulty must be
at or less than this value. Accepts any decimal value at or greater than 0 with a default value
of 6.75 (the maximum possible local difficulty in hard/hardcore) if this parameter is not
included.
inverted: If this is true, the local difficulty must be outside of the min/max bounds. Any local
difficulty value less than the min value or greater than the max value will be valid. Accepts
true/false with a default of false if this parameter is not included.
This is a sub table
[rule]
[rule.spawnblock]
matcher = "stone"
Determines a valid spawn block type for the parent rule. Note that this selector checks both the potential spawning position as well as the position under the potential spawning position for a more accurate check. The accepted parameters are block, matcher, mod, and inverted. Here are what those do:
block: The registered ID of the block to match, such as "minecraft:stone". This must match the
name of the block exactly to pass. This can only match with one biome. Accepts any string value.
mod: The modid of registered block ID to match. For example, in "minecraft:stone", the modid
would be "minecraft". This must match the modid exactly to pass. This can match with multiple
entities. Accepts any string value.
matcher: The registered block ID must contain this. For example, in "minecraft:stone", matchers
of "stone", "ton", "ne", "mine", "minecraft", or even just ":" would be valid. This can match
with multiple blocks. Accepts any string value.
inverted: If this is true, the 3 parameters of block, mod, and matcher will be used as a blacklist
and all blocks other than the matching ones will be selected. Accepts true/false with a default of
false if this parameter is not included.
This is a sub table
[rule]
[rule.structure]
matcher = "stone"
Determines the structure that the parent rule must be running in. The accepted parameters are structure and inverted. Here are what those do:
structure: The registered name of the structure to match. This must match exactly, like
"Village", "Mansion, or "Stronghold" and may only be able to match vanilla structures (needs
verification). Accepts any string value.
inverted: If this is true, the structure parameter will act as a blacklist and all other
structures will be valid. Accepts true/false with a default of false if this parameter is not
included.
Requires the Game Stages mod
This is a sub table
[rule]
[rule.gamestage]
gamestage = "stageOne"
Determines the gamestage or gamestages that must be present or absent for the players in the same dimension as the rule is getting run in depending on how the parameters are set up. The accepted parameters are gamestage, isWhitelist, allStages, allPlayers, and invert. Here are what those do:
gamestage: The name of the gamestage or gamestages to check for. When checking for multiple stages,
brackets must be used, like 'gamestage = [ "stageOne" "stageTwo" ]. Accepts any string value in the
case of single gamestages or any list of string values in the case of multiple. If this parameter is
not present it will treat any player as having the required stage.
is_whitelist: Determines whether the selector checks if a player is required to have the
stage(s) [true] or if a player is required to not have the stage(s) [false]. Accepts true/false with
a default value of true if this parameter is not included.
all_stages: Determines whether a player is required to have all stages if multiple stages are listed
under the gamestage parameter. If is_whitelist is false, the player will be required to have none of
the stages either way. Accepts true/false with a default value of false if this parameter is not
included.
all_players: Determines whether all players in the dimension the parent rule is getting run in need
to meet the other three parameters of gamestage, is_whitelist, and all_stages. Accepts true/false with
a default value of false if this parameter is not included.
Requires the Nyx mod
This is NOT a sub table
[rule]
bloodmoon = true
Determines whether a bloodmoon should be happening in dimension the parent rule is getting run in. Accepts true/false with a default value of false if this selector is not included.
Requires the Nyx mod
This is NOT a sub table
[rule]
fullmoon = true
Determines whether a full moon (the Nyx variant, not the vanilla full moon phase) should be present in dimension the parent rule is getting run in. Accepts true/false with a default value of false if this selector is not included.
Requires the Nyx mod
This is NOT a sub table
[rule]
harvestmoon = true
Determines whether a harvest moon should be happening in dimension the parent rule is getting run in. Accepts true/false with a default value of false if this selector is not included.
Requires the Nyx mod
This is NOT a sub table
[rule]
starshower = true
Determines whether a star shower should be happening in dimension the parent rule is getting run in. Accepts true/false with a default value of false if this selector is not included.
Requires the Scaling Health mod
This is a sub table
[rule]
[rule.scalingdifficulty]
min = 50
Determines the bounds of the Scaling Health difficulty that the nearest player to the potential spawning position of the parent rule must be within. The accepted parameters are min, max, and inverted. Here are what those do:
min: The minimum difficulty value. This value is inclusive meaning the difficulty must be at or
greater than this value. Accepts any decimal value at or greater than 0 with a default value of
0 if this parameter is not included.
max: The maximum difficulty value. This value is inclusive meaning the difficulty must be at or
less than this value. Accepts any decimal value at or greater than 0 with a default value of the
maximum difficulty from the Scaling Health config if this parameter is not included.
inverted: If this is true, the difficulty value must be outside of the min/max bounds. Any
difficulty value less than the min value or greater than the max value will be valid. Accepts
true/false with a default of false if this parameter is not included.
A sub rule is a rule that can go in a sub table of a rule or another sub rule in some cases. For example, a jockey sub rule defined under a modify rule may look something like this:
[modify]
[modify.entity]
entity = "minecraft:spider"
[modify.jockey]
entity = "minecraft:creeper"
The jockey sub rule may be defined under any rule that accepts it as well as any sub rule that counts as an entity. As the jockey sub rule counts as an entity itself, you may define a jockey sub rule under another jockey sub rule. See the full scale example for that. The accepted parameters are entity, matcher, mod, and weight. Here are what those do:
entity: The registered ID of the entity to match, such as "minecraft:skeleton". This must match the
name of the biome exactly to pass. This can only match with one biome. Accepts any string value.
mod: The modid of registered entity ID to match. For example, in "minecraft:skeleton", the modid
would be "minecraft". This must match the modid exactly to pass. This can match with multiple
entities. Accepts any string value.
matcher: The registered entity ID must contain this. For example, in "minecraft:skeleton", matchers
of "skeleton", "ton", "le", "mine", "minecraft", or even just ":" would be valid. This can match
with multiple entities. Accepts any string value.
weight: The weight of this jockey sub rule respect to other jockey sub rules that are present in the
same level. Note that weight is not equivalent to chance. This means that rather than this parameter
being "X percent chance" that this jockey sub rule will be chosen, it is instead the weight over the
total weights of all jockey sub rules of the same level. Accepts any integer value with a default
value of 10 if this parameter is not included.
Note that if entity, mod, and matcher are used concurrently, it is not an additive check! This means that an entity will be able to match any of those three parameters that are present!
You can reload the rule file in game by running the command /specifiedspawning reload
Default spawn entry weights and groups sizes:
- Sheep: group="passive" weight=12 min_group_size=4 max_group_size=4
- Pig: group="passive" weight=10 min_group_size=4 max_group_size=4
- Chicken: group="passive" weight=10 min_group_size=4 max_group_size=4
- Cow: group="passive" weight=8 min_group_size=4 max_group_size=4
- Spider: group="hostile" weight=100 min_group_size=4 max_group_size=4
- Zombie: group="hostile" weight=95 min_group_size=4 max_group_size=4
- Zombie Villager: group="hostile" weight=5 min_group_size=1 max_group_size=1
- Skeleton: group="hostile" weight=100 min_group_size=4 max_group_size=4
- Creeper: group="hostile" weight=100 min_group_size=4 max_group_size=4
- Slime: group="hostile" weight=100 min_group_size=4 max_group_size=4
- Enderman: group="hostile" weight=10 min_group_size=1 max_group_size=4
- Witch: group="hostile" weight=5 min_group_size=1 max_group_size=1
- Squid: group="aquatic" weight=10 min_group_size=4 max_group_size=4
- Bat: group="ambient" weight=10 min_group_size=8 max_group_size=8
# General Config Options
# Write more things to the log. Helpful for debugging purposes. Default value is false
more_logging = true
[[group]]
name = "test_group"
count = 200
[[group]]
name = "hostile"
count = 50
[[remove]]
[remove.entity]
entity = "minecraft:skeleton"
[[remove]]
[remove.entity]
matcher = "slime"
[[modify]]
group = "passive"
new_group = "hostile"
[modify.entity]
matcher = "chicken"
[modify.jockey]
entity = "minecraft:villager_golem"
[modify.jockey.jockey]
entity = "minecraft:villager_golem"
[modify.jockey.jockey.jockey]
entity = "minecraft:villager_golem"
[spawn]
group = "test_group"
[spawn.entity]
entity = "minecraft:blaze"
[spawn.jockey]
entity = "minecraft:skeleton"
[spawn.jockey.jockey]
matcher = "ghast"