diff --git a/BSharpReferenceSheet.md b/BSharpReferenceSheet.md index b4eb271..df5187a 100644 --- a/BSharpReferenceSheet.md +++ b/BSharpReferenceSheet.md @@ -1,5 +1,6 @@ # B# Reference Sheet -## Core B# + +## Core `B#` ### Listeners @@ -30,7 +31,7 @@ SNIPPET_EntitySpawned("es_snippet_to_execute", (entity, payload) => { ``` - `"es_snippet_to_execute"` : First parameter is the snippet name. Listeners with the same `snippet` value will trigger this snippet. - - It is possible to have multiple listeners point to a single snippet, but not the other way around (when a snippet is defined its name must be unique). + - It is possible to have multiple listeners point to a single snippet, but not the other way around (when a snippet is defined its name must be unique). - `(entity, ...)` : Each snippet will be provided a set number of arguments to operate on. See the documentation for more details on each snippet type. - `(..., payload)` : The last argument for any snippet is always the payload. @@ -57,7 +58,7 @@ declare function SNIPPET_GameLoadBootstrap(snippetName: string, callback: GameLo declare type GameLoadBootstrapCallback = (isSaveLoaded: boolean) => void /** - * Similiar to Bootstrap. The name of the snippet should match the rule that is being reacted to. + * Similar to Bootstrap. The name of the snippet should match the rule that is being reacted to. * Passes along the value of the rule as a parameter. * No listener required. All rule initialized snippets will fire at the beginning of a new game. */ @@ -65,7 +66,7 @@ declare function SNIPPET_RuleInitialized(snippetName: string, callback: RuleInit declare type RuleInitializedCallback = (ruleValue: VariantData) => void /** - * Similiar to Bootstrap. The name of the snippet should match the game mode this is being reacted to. + * Similar to Bootstrap. The name of the snippet should match the game mode this is being reacted to. * No listener required. All rule initialized snippets will fire at the beginning of a new game. */ declare function SNIPPET_InheritsFromGameMode(snippetName: string, callback: RuleInitializedCallback): void @@ -75,13 +76,13 @@ declare type RuleInitializedCallback = () => void In general, this is when you would use this specific bootstrap: - `SNIPPET_Bootstrap` when you need shared “core” functionality between all game modes. **In general this shouldn’t be used**. -- `SNIPPET_InheritsFromGameMode` when you need behaviour specific to a game mode. **This should be your default go to.** -- `SNIPPET_RuleInitialized` when you want to enable modular behaviour defined by game-rules, the idea being it is functional across multiple game modes. +- `SNIPPET_InheritsFromGameMode` when you need behavior specific to a game mode. **This should be your default go to.** +- `SNIPPET_RuleInitialized` when you want to enable modular behavior defined by game-rules, the idea being it is functional across multiple game modes. - `SNIPPET_GameLoadBootstrap` used in special circumstances when you need to do something on game reload (from a save file). The intended use for this is for DLC islands, when we need to add content after a world has already been generated. ### Callbacks -Another class of special snippets that don’t use a listener. Instead some B# functions (OUTPUTS) when executed can specify a callback as the last parameter, which will execute the associated snippet when relevant. +Another class of special snippets that don’t use a listener. Instead some`B#`functions (OUTPUTS) when executed can specify a callback as the last parameter, which will execute the associated snippet when relevant. There are 2 callbacks, taken from the documentation itself: @@ -113,15 +114,15 @@ Payloads are supported for all listeners and snippets. It allows you to past con - Listeners can pass **one of each** payload type via `payloadString`, `payloadInt`, `payloadFloat`, `payloadEntities` - Snippets can receive the payload **as the last argument of the snippet** via `payload.string`, `payload.int`, `payload.float`, `payload.entities` - - You can also use `payload.ownerVillageId` which will be defined if the listener defined `ownerVillageId`. (This is the preferred way of getting the village in a snippet when possible) + - You can also use `payload.ownerVillageId` which will be defined if the listener defined `ownerVillageId`. (This is the preferred way of getting the village in a snippet when possible) ### Villages & Suspension -A core concept in Minecraft Legends (not just B#) are villages. You can think of villages as a “Location” - an area in the game world which can house entities such as buildings, mobs, or even invisible things (like music emitters, trigger volumes, etc.). +A core concept in Minecraft Legends (not just B#) are villages. You can think of villages as a “Location” - an area in the game world which can house entities such as buildings, mobs, or even invisible things (like music emitters, trigger volumes, etc.). -Suspension is the act of saving out an entity and having it enter a state of stasis due to our massive open world which makes keeping everything loaded infeasible. Special care has been made sure to ensure B# only ever works with fully loaded active entities (so all the information on the entity will be on as you expect). +Suspension is the act of saving out an entity and having it enter a state of stasis due to our massive open world which makes keeping everything loaded infeasible. Special care has been made sure to ensure`B#`only ever works with fully loaded active entities (so all the information on the entity will be on as you expect). -Villages are crucial to B# as they can guarantee what entities are queryable and useable at the time of your snippet execution. **When a listener that belongs to a village executes it is guaranteed that all entities belonging to the same village will also be loaded**. +Villages are crucial to`B#`as they can guarantee what entities are queryable and useable at the time of your snippet execution. **When a listener that belongs to a village executes it is guaranteed that all entities belonging to the same village will also be loaded**. - For example: querying the number of structures in a village when a village owned listener executes is safe. @@ -135,13 +136,13 @@ The mechanism that drives this group un/suspension is called Atomic Village Susp An Entity Group (EG) is how we represent an entity or entities in B#. It is a special data type, don't ask about it. -Note some functions require an entity group of one and only one (referred to as "**entity**" in the documentation). +Note some functions require an entity group of one and only one (referred to as "**entity**" in the documentation). Conversely, some functions require a group of entities (referred to as “**entities**” in the documentation) which includes a group of 0 entities or more. ### Queries -Queries are how we read game state - without mutating it - such as getting the count in an entity group. +Queries are how we read game state - without mutating it - such as getting the count in an entity group. All queries are prefixed with `QUERY_` @@ -159,17 +160,17 @@ All filters are prefixed with `FILTER_` ### Operations -Operations are how combine entity groups into another group. For example doing the union of two groups (combine with no duplicates). If you consider an EG as a set of entities, there is an operation function for each mathematical set operation. +Operations are how combine entity groups into another group. For example doing the union of two groups (combine with no duplicates). If you consider an EG as a set of entities, there is an operation function for each mathematical set operation. All operations are prefixed with `OPER_` ### Global Variables -B# is largely stateless, we listen to events and respond to them "right away". However, if you do need to store some information you can use our global variable storage via commands such as `OUTPUT_SetGlobalVariable(key, intergerValue)` allowing you to store integer values to retrieve at a later time. +B# is largely stateless, we listen to events and respond to them "right away". However, if you do need to store some information you can use our global variable storage via commands such as `OUTPUT_SetGlobalVariable(key, integerValue)` allowing you to store integer values to retrieve at a later time. Please **DO NOT** store variables like this `var thing = 123` at the global scope. Values like this still be lost to the void when the player exits and reloads. -# **Advanced topics** +## **Advanced topics** These topics dive a little deeper into the nuance of our game, how we author scripts, as well as functions specific to game-modes like campaign. @@ -177,19 +178,25 @@ These topics dive a little deeper into the nuance of our game, how we author scr Located at the top of scripts generally, are configuration objects which only contain “data” (and no logic). This presents an easy way to tune the functionality of a script as all the tunable values are grouped in one location. -**Notes** - -You may notice special config objects existing in separate files entirely by themselves, with *another* script utilizing the config elsewhere. For example imagine `const gameConfig = {}` moved to a `a_moba_config.js` file. This is generally done for two reasons +**Notes**: +You may notice special config objects existing in separate files entirely by themselves, with *another* script utilizing the config elsewhere. +For example imagine `const gameConfig = {}` moved to a `a_new_game_mode_config.js` file. This is generally done for two reasons -- It allows our teams to completely override the config (including removing it) for separate game-modes, useful for DLC (note there are other approaches to this too). -- Separates massive config files to shorten scripts, this is especially useful if multiple configs exists (eg. `a_config_horde_attack.js`, `a_config_horde_defend.js`) which makes tracking changes much easier. +- This allows developers to completely override the config (including removing it!) for separate game-modes, such as user-created `Lost Legends` and `Myths`! +- Separates massive config files to shorten scripts, this is especially useful if multiple configs exists (e.g. `a_config_horde_attack.js`, `a_config_horde_defend.js`) which makes tracking changes much easier. +- Modularity is always nice to have! ### Naming Conventions -When a constant or function at the global scope is prefixed with `_` it means this **constant/function is only used within this file.** For example `_SpawnAttackingUnits = () => { // return stuff }` .This provides an easy way to know if changing a function’s behaviour could affect other scripts. +When a constant or function at the global scope is prefixed with `_` it means this constant/function is **only** used within this file. -To be clear this is purely used for semantics - all scripts are loaded at the global level meaning you *can* reference other file’s constants (but you shouldn’t!). If you get a ‘x declared already’ error this is most likely why! +Take, for example: +`_SpawnAttackingUnits = () => { // return stuff }` + +This provides an easy way to *know* if changing a function’s behavior could affect other scripts. +Mojang note on semantics: +To be clear this is purely used for semantics - all scripts are loaded at the global level meaning you *can* reference other file’s constants (but you shouldn’t!). If you get a ‘x declared already’ error this is most likely why! When `_` is used in a function though, it means the **function argument is not used**. For example `SNIPPET_EntitySpawned(..., (_spawnedEntity))` - if you don’t actually need to operate on the spawned entity in anyway. ### File Naming Conventions & Load Order @@ -198,9 +205,9 @@ The file *path* (that includes the folder name!) determines the load order, sort ### Helper functions -Helper functions (local to a file or global to all) are ways to execute common functionality repeatedly. If you notice yourself duplicating scripts or doing something very similar make a helper function or reach out to fellow scripters for assistance! +Helper functions (local to a file or global to all) are ways to execute common functionality repeatedly. If you notice yourself duplicating scripts or doing something very similar make a helper function or reach out to fellow developers for assistance! -In B# land we define functions like so: +In the wonderful and mythical world of `B# land` we define functions like so: ```jsx // or MyLocalFunction if you wanted it to be global! @@ -211,16 +218,18 @@ const _myLocalFunction = (argument1, argument2) => { ``` If you have used Javascript before then you may be more familiar with this syntax: + ```function _myLocalFunction(argument1, argument2) => { }``` + We don’t do this because you can redefine and *stomp* an existing function - which leads to really hard to catch bugs! ### Special “Libraries” -B# has some special libraries fully* defined in script, utilizing all of Core B# to do neat things. +`B#` has some special libraries fully*(some things do rely on the C++ backend) defined in script, utilizing all of `B#` to do neat things. For example -- `DECK_` : Used to drawn and set B# decks (this is a special case and is not *fully* scripted) +- `DECK_` : Used to drawn and set`B#`decks (this is a special case and is not *fully* scripted) - [DEPRECATED] `RALLYMAN_` : Used to group and dispatch units. - `aaaa_ai_helpers.js` : Supersedes above, and unfortunately doesn’t have a prefix. Used to interface with base AI. @@ -238,7 +247,6 @@ Due to the massive open world nature of Minecraft Legends, we’ve had to introd Avoid the standard library's `Math.random()` as it is not deterministic between instances of the game. Stick to `QUERY_RandomNumber` and `QUERY_RandomNumberGroup`. -The `Number` returned by `QUERY_RandomNumber` and `QUERY_RandomNumberGroup` is an integer and can immediately be used as an array index. +The `Number` returned by `QUERY_RandomNumber` and `QUERY_RandomNumberGroup` is an integer and can immediately be used as an array index. Consider using `QUERY_RandomNumberGroup` for consistent randomness that you do not want to be affected by other areas of the game (eg: the player affecting the state of the game world). - diff --git a/BarrierBlocks.md b/BarrierBlocks.md index 1bb1043..40bf8ee 100644 --- a/BarrierBlocks.md +++ b/BarrierBlocks.md @@ -1,7 +1,9 @@ # Barrier Blocks in Minecraft Legends + In most cases barrier blocks are invisible blocks used to block player and mob collision. We have a few barrier blocks that are very specific and used in a handful of specialized cases. ## Blocks + Each barrier block used in game are listed below with examples of how and where to use them: ### block_barrier_soft @@ -10,7 +12,7 @@ Player and Mob collision, no damage receiver. Can be used for blocking the player and mobs from entering the structure. -![](images/barrier_blocks/image01.png) +![block_barrier_soft](images/barrier_blocks/image01.png) ### block_barrier_solid @@ -18,37 +20,42 @@ Player and Mob collision, has damage receiver. Can be used for blocking the player and mobs from passing through the deco block, but also if hit with the player sword it would plink off the block. -![](images/barrier_blocks/image02.png) +![block_barrier_solid](images/barrier_blocks/image02.png) ### block_barrier_path + Player and Mob collision, no damage receiver, ignored by pathfinding. Not currently used for anything. ### block_barrier_door + Player and Mob collision, has damage receiver, ignored by pathfinding. -Gate closed and Piglin Gate closed structure entites both use this block to prevent entities entering through the gate. +Gate closed and Piglin Gate closed structure entities both use this block to prevent entities entering through the gate. -![](images/barrier_blocks/image03.png) +![block_barrier_door](images/barrier_blocks/image03.png) ### block_barrier_boss + Player is able to walk through. Stops boss mobs from entering lava in boss fights. (Only used in base gen boss areas) Used in the defend horde boss battle. The block is generated above all lava areas so the boss cannot fall in. -![](images/barrier_blocks/image04.png) +![block_barrier_boss](images/barrier_blocks/image04.png) ### block_village_solid_air + Player is able to pass through. Stops mobs from leaving village houses through windows. (Only used in village houses) - -Used in the medium village house. The blocks are placed in the areas we don't want the mobs traveling. Forcing them to use the door but still allowing the player to pass through.  -![](images/barrier_blocks/image05.png) +Used in the medium village house. The blocks are placed in the areas we don't want the mobs traveling. Forcing them to use the door but still allowing the player to pass through. + +![block_village_solid_air](images/barrier_blocks/image05.png) ### block_barrier_soft_denether + Player and Mob collision, no damage receiver. Block is denetherable and gatherable. (Only used in denetherable/gatherable structures) Used in the obstacle horde mushroom trees. This act the same as the `block_barrier_soft` but when the tree is denethered the barrier blocks will also disappear. -![](images/barrier_blocks/image06.png) +![block_barrier_soft_denether](images/barrier_blocks/image06.png) diff --git a/Biomes.md b/Biomes.md index 1484414..b482f98 100644 --- a/Biomes.md +++ b/Biomes.md @@ -1,21 +1,26 @@ # Biomes in Minecraft Legends + Biomes describe how a local patch of the world should look and behave. By writing custom biome data you could: + 1) Change the general shape of terrain for a biome. 2) Change the ratio of frequency of biome types. 3) Change the blocks that make up the biome, both at the surface and below. 4) Change the distribution of decorative features (e.g. trees, grass, etc.) for a biome. -5) ...and more! +5) Change the settings for a biome's sub-biomes. +6) Set UI-related information(e.g. `biome_banner`, `biome_display_name`) for a biome -# JSON format +## JSON format All biomes should specify the version that they target via the "format_version" field. The remainder of the biome data is divided up into independent JSON sub-objects, or components. In general you can think of the presence of a component as defining what game behaviors a biome participates in with the component fields defining how it participates. Broadly there are two categories of components: + 1) Namespaced components (i.e. those with a 'name:' prefix) map to specific behaviors in-game; they may have member fields that parameterize that behavior; only names that have a valid mapping are supported. 2) Components with no namespace are treated as 'tags': any name consisting of alphanumeric characters, '.' and '_' is permitted; the tag is attached to the biome so that either code or data may check for its existence; tag components may not have member fields. See the full biome schema below for additional details and the full list of namespaced components. -**Here is a sample biome** -``` +**Here is a sample biome**: + +```json { "format_version" : "1.13.0", "minecraft:biome" : { @@ -109,33 +114,30 @@ See the full biome schema below for additional details and the full list of name } ``` +## Adding biomes +Biomes are read from JSON files in the biomes subfolders of behavior packs. Loading enforces one biome per file; the file name and the actual biome name must match. Adding a file with a new name to the biome data location will make it available for the game to use, while existing biomes can be overridden via files that match their existing name. Note that if you add a new biome you'll need to write component data that allows it to participate in world generation (see full schema below), or else it won't show up in your worlds! -# Adding biomes - -Biomes are read from JSON files in the biomes subfolders of behavior packs. Loading enforces one biome per file; the file name and the actual biome name must match. Adding a file with a new name to the biome data location will make it available for the game to use, while existing biomes can be overriden via files that match their existing name. Note that if you add a new biome you'll need to write component data that allows it to participate in world generation (see full schema below), or else it won't show up in your worlds! - - - -# Schema +## Schema **** -``` + +```json { object "badger:icewave" : opt // Controls the frostlands snow waves and material transition parameters. object "badger:jungle_egg" : opt // Controls the jungle egg rock and material transition parameters. - object "badger:rivers"[0,6] : opt // Controls for river density and replacement biome + object "badger:rivers"[0,6] : opt // Controls for river density and replacement biome. { - array "cell_range"[2] : opt // The range of possible IDs this biome's voronoi cells may take. A wider range means more opportunites for rivers to form in this biome, and a narrow range means fewer opportunites. (Rivers only form across the borders of cells with different IDs) + array "cell_range"[2] : opt // The range of possible IDs this biome's voronoi cells may take. A wider range means more opportunities for rivers to form in this biome, and a narrow range means fewer opportunities. Rivers will only form across the borders of cells with different IDs. { int "[0..0]"<0-255> int "[1..1]"<0-255> } - float "point_chance"<0.000000-1.000000> : opt // Probability that a river cell spawns in a particular region. Smaller values (close to 0) lead to few large cells (few opportunities for rivers to form), while values closer to 1 lead to many small cells (many opportunites for rivers to form) - biome_reference "river_biome" : opt // The biome that this biome's rivers transform into - int "river_width"<-*-64> : opt // Average river width for this biome in blocks - int "river_border_width"<-*-64> : opt // Average border biome width for this biome's rivers - biome_reference "river_border_biome" : opt // Border biome for this biome's rivers + float "point_chance"<0.000000-1.000000> : opt // Probability that a river cell spawns in a particular region. Smaller values(e.g: closer to 0.0) lead to few large cells (which means few opportunities for rivers to form), while higher values(e.g: closer to 1.0) lead to many small cells (which means many opportunities for rivers to form). + biome_reference "river_biome" : opt // The identifier of the biome that this biome's rivers transform into. + int "river_width"<-*-64> : opt // Average river width for this biome in blocks. + int "river_border_width"<-*-64> : opt // Average border biome width for this biome's rivers. + biome_reference "river_border_biome" : opt // The border biome for this biome's rivers. } object "badger:custom_water_level"[0,1] : opt // Control the height of water, the material used for bottom of water bodies, and the depth of the floor material. { @@ -180,7 +182,7 @@ Biomes are read from JSON files in the biomes subfolders of behavior packs. Load int "[0..0]"<0-255> int "[1..1]"<0-255> } - array "clamp_scales"[2] : opt // The degree to which 'natural' heights in this biome are allowed to go beyond the given bound. 0.0 means full clamping (i.e. the height cannot go at all beyond the bound), 1.0 means no clamping, and >1.0 means the natural height will be amplified beyond the lower bound. + array "clamp_scales"[2] : opt // The degree to which 'natural' heights in this biome are allowed to go beyond the given bound. 0.0 means full clamping (i.e. the height cannot go at all beyond the bound), 1.0 means no clamping, and >1.0 means the natural height will be amplified beyond the lower bound. { float "[0..0]"<0.000000-2.000000> float "[1..1]"<0.000000-2.000000> @@ -214,7 +216,7 @@ Biomes are read from JSON files in the biomes subfolders of behavior packs. Load { biome_reference "" } - array "denylist" : opt // A list of biomes which, when situated adjacent to this biome, will prevent a transformation to the given border biome. If any biomes are specified, the border transformation will occur at the interface of ALL other biomes. + array "denylist" : opt // A list of biomes which, when situated adjacent to this biome, will prevent a transformation to the given border biome. If any biomes are specified, the border transformation will occur at the interface of ALL other biomes. { biome_reference "" } @@ -255,7 +257,7 @@ Biomes are read from JSON files in the biomes subfolders of behavior packs. Load int "[0..0]" int "[1..1]" } - bool "repeat_block_sequence" : opt // Should this block sequence repeat over and over? (Or should we switch to the foundation block once we've iterated the stack once?) Not compatible with 'bottom-up' order -- bottom-up always repeats the last block in the stack. + bool "repeat_block_sequence" : opt // Should this block sequence repeat over and over? (Or should we switch to the foundation block once we've iterated the stack once?) Not compatible with 'bottom-up' order -- bottom-up always repeats the last block in the stack. bool "top_down" : opt // Does this stack start from the top down? (Default is 'bottom up') array "layers"[1,*] // A list of weighted blocks and associated depths ('layers') { @@ -311,12 +313,12 @@ Biomes are read from JSON files in the biomes subfolders of behavior packs. Load float "scale" : opt // Horizontal scaling factor for noise map queries. 40.0 is a good starting value; larger values will result in smoother noise. object "range" : opt // Acceptable noise range for block placement to succeed { - array "min"[1,2] // Minimum 'success' noise value. If two floats are provided, a uniform random float in that range will be selected as the minimum value at each block column in the biome. + array "min"[1,2] // Minimum 'success' noise value. If two floats are provided, a uniform random float in that range will be selected as the minimum value at each block column in the biome. { float "[0..0]" float "[1..1]" : opt } - array "max"[1,2] // Maximum 'success' noise value. If two floats are provided, a uniform random float in that range will be selected as the maximum value at each block column in the biome. + array "max"[1,2] // Maximum 'success' noise value. If two floats are provided, a uniform random float in that range will be selected as the maximum value at each block column in the biome. { float "[0..0]" float "[1..1]" : opt @@ -330,7 +332,7 @@ Biomes are read from JSON files in the biomes subfolders of behavior packs. Load float "[1..1]" // Maximum noise band value } } - bool "abs" : opt // If 'true', the absolute value of the noise query will be used instead. This is useful for 'mirrored' bands, e.g. [[-0.7, -0.6], [0.6, 0.7]] -- you can just provide the positive band and the 'abs' flag to achieve the same result. + bool "abs" : opt // If 'true', the absolute value of the noise query will be used instead. This is useful for 'mirrored' bands, e.g. [[-0.7, -0.6], [0.6, 0.7]] -- you can just provide the positive band and the 'abs' flag to achieve the same result. array "wiggle"[2] : opt // A uniform random value to add to the noise query result { float "[0..0]" @@ -339,12 +341,12 @@ Biomes are read from JSON files in the biomes subfolders of behavior packs. Load } object "wetness" : opt // [DEPRECATED] A wetness (distance to nearest water, or 'wet' terrain) range { - array "min"[1,2] // Minimum distance. If two values are provided, the minimum at each block column will be uniform randomly selected from the range. + array "min"[1,2] // Minimum distance. If two values are provided, the minimum at each block column will be uniform randomly selected from the range. { int "[0..0]" int "[1..1]" : opt } - array "max"[1,2] // Minimum distance. If two values are provided, the minimum at each block column will be uniform randomly selected from the range. + array "max"[1,2] // Minimum distance. If two values are provided, the minimum at each block column will be uniform randomly selected from the range. { int "[0..0]" int "[1..1]" : opt @@ -382,12 +384,12 @@ Biomes are read from JSON files in the biomes subfolders of behavior packs. Load float "scale" : opt // Horizontal scaling factor for noise map queries. 40.0 is a good starting value; larger values will result in smoother noise. object "range" : opt // Acceptable noise range for block placement to succeed { - array "min"[1,2] // Minimum 'success' noise value. If two floats are provided, a uniform random float in that range will be selected as the minimum value at each block column in the biome. + array "min"[1,2] // Minimum 'success' noise value. If two floats are provided, a uniform random float in that range will be selected as the minimum value at each block column in the biome. { float "[0..0]" float "[1..1]" : opt } - array "max"[1,2] // Maximum 'success' noise value. If two floats are provided, a uniform random float in that range will be selected as the maximum value at each block column in the biome. + array "max"[1,2] // Maximum 'success' noise value. If two floats are provided, a uniform random float in that range will be selected as the maximum value at each block column in the biome. { float "[0..0]" float "[1..1]" : opt @@ -401,7 +403,7 @@ Biomes are read from JSON files in the biomes subfolders of behavior packs. Load float "[1..1]" // Maximum noise band value } } - bool "abs" : opt // If 'true', the absolute value of the noise query will be used instead. This is useful for 'mirrored' bands, e.g. [[-0.7, -0.6], [0.6, 0.7]] -- you can just provide the positive band and the 'abs' flag to achieve the same result. + bool "abs" : opt // If 'true', the absolute value of the noise query will be used instead. This is useful for 'mirrored' bands, e.g. [[-0.7, -0.6], [0.6, 0.7]] -- you can just provide the positive band and the 'abs' flag to achieve the same result. array "wiggle"[2] : opt // A uniform random value to add to the noise query result { float "[0..0]" @@ -410,12 +412,12 @@ Biomes are read from JSON files in the biomes subfolders of behavior packs. Load } object "wetness" : opt // [DEPRECATED] A wetness (distance to nearest water, or 'wet' terrain) range { - array "min"[1,2] // Minimum distance. If two values are provided, the minimum at each block column will be uniform randomly selected from the range. + array "min"[1,2] // Minimum distance. If two values are provided, the minimum at each block column will be uniform randomly selected from the range. { int "[0..0]" int "[1..1]" : opt } - array "max"[1,2] // Minimum distance. If two values are provided, the minimum at each block column will be uniform randomly selected from the range. + array "max"[1,2] // Minimum distance. If two values are provided, the minimum at each block column will be uniform randomly selected from the range. { int "[0..0]" int "[1..1]" : opt @@ -455,7 +457,7 @@ Biomes are read from JSON files in the biomes subfolders of behavior packs. Load } } } - object "badger:visual_biome_attributes"[0,6] : opt // Client Side information for Map color, Grass color/noise, Water color/transparancy, and Sky parameters + object "badger:visual_biome_attributes"[0,6] : opt // Client Side information for Map color, Grass color/noise, Water color/transparency, and Sky parameters { object "map" : opt // World map settings for this biome { @@ -484,10 +486,10 @@ Biomes are read from JSON files in the biomes subfolders of behavior packs. Load } object "overlay" : opt { - string "grass_overlay_surface_color" : opt // The secondary grass colour that can be blended in + string "grass_overlay_surface_color" : opt // The secondary grass color that can be blended in float "grass_overlay_noise_intensity"<0.000000-*> : opt // Noise strength; higher values means the noise is more broken up, low it's smoother float "grass_overlay_noise_scale"<0.000000-5.000000> : opt // Horizontal scaling factor for the overlay color noise - float "grass_overlay_noise_bias"<0.000000-1.000000> : opt // The blending bias between the 'normal' grass colour and the overlap grass colour + float "grass_overlay_noise_bias"<0.000000-1.000000> : opt // The blending bias between the 'normal' grass color and the overlap grass color } } object "world" : opt // Sky and fog rendering settings for this biome @@ -501,8 +503,8 @@ Biomes are read from JSON files in the biomes subfolders of behavior packs. Load } object "rain" : opt // Precipitation settings for this biome { - float "lower_limit"<-1.000000-1.000000> : opt // The lower bound for when rain should stop. This is sampled from a noise value in [-1, 1]; any time the value is below lower_limit, the rain stops. - float "upper_limit"<-1.000000-1.000000> : opt // The upper bound for when rain should be at maximum intensity. This is sampled from a noise value in [-1, 1]; any time the value is above upper_limit, the rain is set to the maximum level. + float "lower_limit"<-1.000000-1.000000> : opt // The lower bound for when rain should stop. This is sampled from a noise value in [-1, 1]; any time the value is below lower_limit, the rain stops. + float "upper_limit"<-1.000000-1.000000> : opt // The upper bound for when rain should be at maximum intensity. This is sampled from a noise value in [-1, 1]; any time the value is above upper_limit, the rain is set to the maximum level. int "rain_to_snow_height"<0-*> : opt // The world height at which rain transitions to snow float "downfall"<0.000000-60.000000> : opt // How much precipitation should be created at maximum levels float "snow_to_rain_density_ratio"<0.000000-2.000000> : opt // The ratio of snow to rain, used to dampen snow in heavy rain locations (or boost if desired) diff --git a/BlockBench.md b/BlockBench.md index cecaa83..ce7dc17 100644 --- a/BlockBench.md +++ b/BlockBench.md @@ -1,11 +1,12 @@ # Blockbench To Minecraft Legends + This article will walk you through how to add custom models and textures to Minecraft Legends using the popular free software Blockbench. Adding custom art content is essential to make your experience stand out and look different from the base game. For more information on using blockbench please visit the following link: -https://www.blockbench.net/quickstart + -and then go to Minecraft: Bedrock Edition > Entity/model for some quick start information and a few tutorials. +and then go to Minecraft: Bedrock Edition > Entity/model for some quick start information and a few tutorials. -``` +```md Important! Be sure to only use the Bedrock Entity Project type when creating projects as the exporter only supports cube geometry. ``` @@ -16,58 +17,57 @@ In this Article you will learn the following: * How to install the plugin * How to export models, animations and textures - -# Minecraft Legends Exporter Overview +## Minecraft Legends Exporter Overview Minecraft Legends Exporter is a plugin for Blockbench to help with exporting models into a format that Minecraft Legends can use. This Article will cover how to install the plugin and how to export models, textures, animations as well as tips & best practices. -# Download Blockbench +## Download Blockbench To use this plugin, you need [Blockbench](https://www.blockbench.net/downloads) -# Installing the plugin +## Installing the plugin -1. Download the [Minecraft: Legends plugin](https://github.com/Mojang/legends-blockbench-plugin/releases) -2. Unzip the downloaded release. -3. Open Blockbench and using the menu bar select **File** > **Plugins** +1) Download the [Minecraft Legends plugin](https://github.com/Mojang/legends-blockbench-plugin/releases) -![](images/blockbench_doc/image01.png) +2) Unzip the downloaded release. -4. Select the load plugin icon (the icon between “Plugins” and the cloud icon). This will open a file dialog. From the file dialog, navigate to where you unzipped the downloaded plugin, select the `legends-blockbench-plugin -/minecraftLegendsExporter.js` file, and then select Open. +3) Open Blockbench and using the menu bar select **File** > **Plugins** +![File -> Plugins](images/blockbench_doc/image01.png) +4) Select the load plugin icon (the icon between “Plugins” and the cloud icon). This will open a file dialog. From the file dialog, navigate to where you unzipped the downloaded plugin, select the `legends-blockbench-plugin/minecraftLegendsExporter.js` file, and then select `Open`. +![Load Plugin Icon](images/blockbench_doc/image02.png) +![Open Plugin File](images/blockbench_doc/image03.png) -![](images/blockbench_doc/image02.png) -![](images/blockbench_doc/image03.png) +5) There will be a popup that displays the following prompt: ”Do you want to allow this plugin to make changes to your PC? Only load plugins from authors you trust.” Select Ok and the plugin will be loaded. -5. There will be a popup that displays the following prompt: ”Do you want to allow this plugin to make changes to your PC? Only load plugins from authors you trust.” Select Ok and the plugin will be loaded. +![Ok to prompt](images/blockbench_doc/image04.png) -![](images/blockbench_doc/image04.png) +The exporter plugin is now loaded and ready to go. In the next section we’ll take a look at exporting a model. For more information on how to use Blockbench and create a model file please refer to the top of the article for a link to some tutorial information. For some guidelines regarding creating models specifically for Minecraft Legends please go to the best practices section. -The exporter plugin is now loaded and ready to go. In the next section we’ll take a look at exporting a model. For more information on how to use Blockbench and create a model file please refer to the top of the article for a link to some tutorial information. For some guidelines regarding creating models specifically for Minecraft Legends please go to the best practices section. - -``` +```md Important! Again, be sure to only use the Bedrock Entity Project type when creating projects as the exporter only supports cube geometry. ``` -# Exporting a model +## Exporting a model When you have created your model and are ready to export, navigate to **File** > **Export** > **Minecraft Legends Exporter** -![](images/blockbench_doc/image05.png) +![Minecraft Legends Exporter](images/blockbench_doc/image05.png) It will open a dialog box called **Export Options**: -![](images/blockbench_doc/image06.png) +![Export Options](images/blockbench_doc/image06.png) You have three controls within the Export Options dialog: -* **Model export Scale**: This is the scale to which the model will be exported. By default, the scale is set to 1 and the model will be exported to the normal Minecraft legends scale. -* **Alpha Test**: This check box determines if the material will interpret the alpha channel of the texture as transparency. If not checked, all texels will be opaque. -* **Export Animations**: If this is checked when you press confirm it will open a secondary dialog where you can select which animations to export. -![](images/blockbench_doc/image07.png) +1) **Model export Scale**: This is the scale to which the model will be exported. By default, the scale is set to 1 and the model will be exported to the normal Minecraft legends scale. +2) **Alpha Test**: This check box determines if the material will interpret the alpha channel of the texture as transparency. If not checked, all texels will be opaque. +3) **Export Animations**: If this is checked when you press confirm it will open a secondary dialog where you can select which animations to export. + +![Export Animations](images/blockbench_doc/image07.png) When you have set your Export Options it will open a folder selection menu where you can select where the files will be exported. You have now successfully exported the following files: + * model * texture * material @@ -76,40 +76,43 @@ When you have set your Export Options it will open a folder selection menu where To be able to spawn the model in the game you need to create an entire Minecraft legends entity. The following files are required for a Minecraft legends entity: **Behavior pack files**: + * Entity.json **Resource Pack Files**: + * Entity.json * Animation_controllers.json * Render_controllers.json Creation of the behavior and resource pack files, however, is outside of the scope of this article. -# Best Practices +## Best Practices Here are a couple of suggestions when creating the model to avoid any unforeseen errors: - + **Project type**: Only Use the Bedrock Entity Project type in Blockbench as the exporter only supports the block shape. -![](images/blockbench_doc/image08.png) -![](images/blockbench_doc/image09.png) +![Bedrock Entity](images/blockbench_doc/image08.png) +![Bedrock Entity](images/blockbench_doc/image09.png) **Naming conventions**: -Make sure to only use -* letters +Make sure to only use + +* letters * numbers -* ```.``` (period) -* ```-``` (dash) -* ```_``` (underline) +* `.` (period) +* `-` (dash) +* `_` (underline) When creating identifiers and names for files, textures and animations. Otherwise, issues could arise when exporting models or when trying to import them into your project. -![](images/blockbench_doc/image10.png) +![Proper Identifiers](images/blockbench_doc/image10.png) **Root Bone**: It is recommended that every model starts with a root bone that is the parent of everything and that the bone’s Pivot Point and Rotation is left at 0, 0 ,0. Then create the model and animations inside of this root bone -![](images/blockbench_doc/image11.png) +![Root Bone](images/blockbench_doc/image11.png) **Single Texture**: Try to use a single texture for the entire model, so that your material gets exported. If you want to use multiple textures, you will need to edit the material file to contain multiple textures. diff --git a/Blocks.md b/Blocks.md index ac45f2d..cf9eae5 100644 --- a/Blocks.md +++ b/Blocks.md @@ -1,5 +1,9 @@ # Blocks in Minecraft Legends + +We plan to heavily expand on this document. Check this space soon! + ## Block List + Here is a list of all of the blocks that are used in Minecraft Legends. They are used in world generation or in structures. | Name | @@ -1664,7 +1668,7 @@ Here is a list of all of the blocks that are used in Minecraft Legends. They are | badger:block_tree_icecypress_snow_01 | | badger:block_tree_icecypress_top | | badger:block_tree_icecypress_upper_mid | -| badger:block_tree_mang_cinamon_trunk | +| badger:block_tree_mang_cinamon_trunk (*to be corrected) | | badger:block_tree_mang_fallen_01 | | badger:block_tree_mang_fallen_moss_01 | | badger:block_tree_mang_fallen_moss_02 | diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..1803096 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,113 @@ +# Contributing to Minecraft Legends Documentation + +We’re excited to have you contribute to the **Minecraft Legends Documentation** project! Whether you’re helping us improve our documentation, reporting issues, or contributing code snippets or examples, your participation will help us create better resources for the Minecraft Legends **Creator Community**. + +--- + +## Table of Contents + +1. [Introduction](#introduction) +2. [How to Report Issues or Ask Questions](#reporting-issues-or-asking-questions) +3. [Contributing Documentation](#contributing-documentation) + - [Setting Up Your Legendary Documentation Environment](#setting-up-your-legendary-documentation-environment) + - [Submitting a Mythical Pull Request](#submitting-a-mythical-pull-request) + - [Writing and Updating Documentation](#writing-and-updating-documentation) + - [Documentation Style](#documentation-style) +4. [Additional Resources](#additional-resources) +5. [Acknowledgments](#acknowledgments) + +--- + +## Introduction + +The Minecraft Legends Documentation is an open-source project aimed at providing a comprehensive, **Community Creator** resource for the game. Whether you're fixing typos, adding new content, or suggesting new ideas, we welcome contributions from the community. + +## Reporting Issues or Asking Questions + +If you encounter bugs, issues, or if you have questions about anything related to Minecraft Legends or modding it, feel free to submit an issue through our [GitHub Issues Page](https://github.com/LegendsModding/minecraft-legends-docs/issues). + +Be sure to: + +- **Clearly describe** the problem or question. +- If applicable, include **steps to reproduce** the issue. +- Provide **screenshots or logs** to help us understand and resolve the issue faster, if applicable. + +**_Legends Modding Note_**: We will be taking our general(not LCU) Minecraft Legends bug reports here for now, given the bug tracker being closed. While we can't guarantee we can fix anything, it's good to see what main issues are still happening and see what can be addressed. + +## Contributing Documentation + +We’re grateful for any help with improving our documentation, tools, and samples! Follow these steps to contribute: + +### Setting Up Your Legendary Documentation Environment + +--- + +1. **Fork the Repository**: Click the "Fork" button on the GitHub page to create your own copy of the repo. +2. **Clone the Repo Locally**: Use the following command to clone your forked repo: + + ```bash + git clone https://github.com/YOUR-USERNAME/minecraft-legends-docs.git + ``` + +3. **Create a New Branch**: Before making any changes, create a new branch for your work: + + ```bash + git checkout -b docs/new-new-doc + ``` + +## Submitting a Mythical Pull Request + +1. Once your changes are complete, **commit** them to your local branch: + + ```bash + git add . + git commit -m "Add new doc" + ``` + +2. Push your changes to your forked repository: + + ```bash + git push origin docs/new-doc + ``` + +3. Open a **Pull Request** on GitHub. In the PR description, explain: + - What changes were made. + - Why the changes are important. + - Any discussions or issues related to the PR. + +## Writing and Updating Documentation + +Contributions to documentation are just as important as code contributions. Here’s how you can help: + +1. **Create a new Markdown file** in the appropriate folder for new documentation or update an existing file. + - _Note_: We are yet to re-organize things fully still, you are welcome to help! +2. Write **clear and concise** instructions and explanations. Ensure that it is beginner-friendly and follows the style guidelines below. +3. Add thorough and self-describing **examples** whenever possible to help clarify complex concepts. +4. If contributing new features, describe their **purpose, usage, and best practices**. +5. Before submitting your pull request, thoroughly **test your changes**. + +## Documentation Style + +To maintain consistency and readability across our documentation, please follow these guidelines when contributing: + +- Use **Markdown formatting** consistently (headings, lists, links, code blocks, etc.). +- Ensure proper use of headings (`#`, `##`, `###`) to structure content hierarchically. +- Write clear and concise descriptions with bullet points or numbered lists where appropriate. +- Use proper line breaks and indentation for readability. +- Test any code snippets or instructions before including them in the documentation. +- Keep commit messages short, descriptive, and relevant. +- **_PLEASE_** try to avoid all inline html. + +## Additional Resources + +If you’re new to contributing to open-source projects, these resources will help: + +- [GitHub's Open Source Guides](https://opensource.guide/) +- [GitHub's contribution documentation](https://help.github.com/en/articles/what-is-a-contribution) +- [OpenHatch Contributor Guide](https://www.openhatch.org/contributor-guide) + +--- + +## Acknowledgments + +A huge thank you to everyone from Microsoft, Mojang, and BlackBird Interactive who have contributed to the Minecraft Legends Documentation project. Your efforts help us build a valuable resource for the entire community. We couldn't do it without you! 🫶 diff --git a/CustomGameSettings.md b/CustomGameSettings.md index 47292f5..c4bd222 100644 --- a/CustomGameSettings.md +++ b/CustomGameSettings.md @@ -1,6 +1,6 @@ # Minecraft Legends - Custom Game Settings -![](images/custom_game_settings/image01.png) +![Custom Settings Menu](images/custom_game_settings/image01.png) **Figure 1:** Screenshot of custom settings screen @@ -10,9 +10,9 @@ Campaign and PVP have separate 'custom' game modes that feature a wide variety o The data for custom settings lives in `resource_packs/badger_base/gamelayer/launcher/custom_game_settings.json` -## How to add a custom game setting? +## How do I add a custom game setting? -Adding a custom game setting is done through a combination of adding Custom Settings Data as well as data that reads the value of the setting to apply its effects in game. Both of these aspects are explained in greater detail [below](https://github.com/Mojang/minecraft-legends-docs/blob/main/CustomGameSettings.md#using-custom-settings). +Adding a custom game setting is done through a combination of adding Custom Settings Data as well as data that reads the value of the setting to apply its effects in game. Both of these aspects are explained in greater detail [below](#using-custom-settings). The vast majority of custom game settings that already exist are configured this way and can serve as examples for additional options. Note however that options such as 'world_world_seed' and 'world_world_size' have specific functionality in the game's engine which is not accessible. @@ -22,25 +22,25 @@ The settings data is laid out with a category name for the main object, which wi The main categories are the names of the Tabs in the custom settings screen and the sub categories are the names of the headers above each section of settings per tab. -``` +```json { - "mainCategory": { - "subCategory": [ - { // ======== Example ======== - "id": "world_world_seed", - "value_type": "string", - "value": "", - "backend_type": "customgame", - "ui_type": "textfield", - "game_mode_type": "allmodes", - "is_editable": false, - "save_last_used_value": false, - "enable_requirements": [], - "options": [ - ] - }, - ] - } + "mainCategory": { + "subCategory": [ + { + // ======== Example ======== + "id": "world_world_seed", + "value_type": "string", + "value": "", + "backend_type": "customgame", + "ui_type": "textfield", + "game_mode_type": "allmodes", + "is_editable": false, + "save_last_used_value": false, + "enable_requirements": [], + "options": [] + } + ] + } } ``` @@ -52,7 +52,7 @@ The main categories are the names of the Tabs in the custom settings screen and Add the setting to an existing category/subcategory. May choose to create a new category or subcategory, this will create a new tab or sub header respectively. -![](images/custom_game_settings/tabs.png) +![Categories](images/custom_game_settings/tabs.png) --- @@ -68,7 +68,9 @@ This will be the identifier for the setting, and how it will be referenced when (**required**) -_possible values_: "customgame" (always) +_possible values_: + +- "customgame" (always) --- @@ -76,7 +78,11 @@ _possible values_: "customgame" (always) (**required**) -_possible values_: "int", "float" or "string" +_possible values_: + +- "int" +- "float" +- "string" --- @@ -88,13 +94,13 @@ _possible values_: | Type | Visual | "uiType" | "valueType" | "options" | | ----------- | ----------------------------------------------- | ----------------------- | -------------- | --------------------------------- | -| Switch | ![](images/custom_game_settings/switch.png) | "switch" | "int" | | -| Slider | ![](images/custom_game_settings/slider.png) | "slider" | "int", "float" | [{"min": #}, {"max": #}] | -| Button | ![](images/custom_game_settings/button.png) | "button" or "rowbutton" | n/a | | -| Dropdown | ![](images/custom_game_settings/dropdown.png) | "dropdown" | "int" | {"label": string} | -| Textfield | ![](images/custom_game_settings/textfield.png) | "textfield" | "string" | | -| Radio Group | ![](images/custom_game_settings/radiogroup.png) | "radiogroup" | "string" | [{"label": option name}, {} ....] | -| Toggles | ![](images/custom_game_settings/toggles.png) | "toggles" | "int" | | +| Switch | ![Switch](images/custom_game_settings/switch.png) | "switch" | "int" | | +| Slider | ![Slider](images/custom_game_settings/slider.png) | "slider" | "int", "float" | [{"min": #}, {"max": #}] | +| Button | ![Button](images/custom_game_settings/button.png) | "button" or "rowbutton" | n/a | | +| Dropdown | ![Dropdown](images/custom_game_settings/dropdown.png) | "dropdown" | "int" | {"label": string} | +| Textfield | ![Textfield](images/custom_game_settings/textfield.png) | "textfield" | "string" | | +| Radio Group | ![Radiogroup](images/custom_game_settings/radiogroup.png) | "radiogroup" | "string" | [{"label": option name}, {} ....] | +| Toggles | ![Toggles](images/custom_game_settings/toggles.png) | "toggles" | "int" | | --- @@ -102,8 +108,12 @@ _possible values_: (**optional**) -Dictates if the setting can be edited when loading a saved custom game. -_possible values_: true or false +Dictates if the setting can be edited when loading a saved custom game. (_default_ is currently unknown) + +_possible values_: + +- true +- false --- @@ -111,8 +121,10 @@ _possible values_: true or false (**optional**) -_possible values_: true or false -Defaults to _true_ +_possible values_: + +- true (_default_) +- false --- @@ -142,7 +154,11 @@ _possible values_: Dictates which game mode the setting will appear in -_possible values_: "allmodes", "campaign" or "pvp" +_possible values_: + +- "allmodes" +- "campaign" +- "pvp" --- @@ -152,12 +168,14 @@ _possible values_: "allmodes", "campaign" or "pvp" For slider settings only. Setting this to _true_ will convert the value to a percent visually in the menu. It will not affect the actual value used by the gameplay system. -_possible values_: true or false -Defaults to _false_ +_possible values_: + +- true +- false (_default_) --- -#### Property: "slider_step_incremenet" +#### Property: "slider_step_increment" (**optional**) @@ -165,7 +183,7 @@ For slider settings only. Numeric value to be used as the slider value increment _possible values_: any whole number (preferably a number that will divide the full range of the slider evenly) -![](images/custom_game_settings/sliderSteps.png) +![Slider Step Increment](images/custom_game_settings/sliderSteps.png) --- @@ -177,13 +195,13 @@ The values for each custom game setting can then be used with entity archetype d #### Entity Archetypes -Entities are constructed with a series of components that describe their behaviour. Since custom game settings are server-bound, this section only applies to server entity descriptions. For more general information about how entities are constructed, as well as a list of all the available components and their properties, check out the documentation for [Entities](https://github.com/Mojang/minecraft-legends-docs/blob/main/Entities.md#server-entity-documentation). +Entities are constructed with a series of components that describe their behavior. Since custom game settings are server-bound, this section only applies to server entity descriptions. For more general information about how entities are constructed, as well as a list of all the available components and their properties, check out the documentation for [Entities](https://github.com/Mojang/minecraft-legends-docs/blob/main/Entities.md#server-entity-documentation). -In particular, there is a family of components with similar names: badger:difficulty_modifier_... +In particular, there is a family of components with similar names: _badger:difficulty_modifier_ These components are the mechanism in which an entity's properties can be altered based on what difficulty is chosen by the player. Consider this example: -``` +```json "badger:difficulty_modifier_damage": { "difficulties": { "Peaceful": { @@ -202,18 +220,18 @@ These components are the mechanism in which an entity's properties can be altere } ``` -Since `badger:difficulty_modifier_damage` changes the damage of an entity's target actions, attaching this component to an entity would mean that the damage they deal through their target actions would increase as players choose harder difficulties. _See [the documentation](https://github.com/Mojang/minecraft-legends-docs/blob/main/Entities.md#badgerdifficulty_modifier_damage) for these components for a complete description of these properties._ +Since `badger:difficulty_modifier_damage` changes the damage of an entity's target actions, attaching this component to an entity would mean that the damage they deal through their target actions would increase as players choose harder difficulties. [_See the documentation for these components for a complete description of these properties._](https://github.com/LegendsModding/minecraft-legends-docs/blob/main/Entities.md#badgerdifficulty_modifier_damage) -Custom game modes have their own 'Custom' difficulty as they don't rely on traditional difficulty options for modifications such as this, however the same machanism is used to modify entities. Rather than defining a static value for a traditional difficulty, a separate section `"custom_game_settings"` can be used instead or in tandem: +Custom game modes have their own 'Custom' difficulty as they don't rely on traditional difficulty options for modifications such as this, however the same mechanism is used to modify entities. Rather than defining a static value for a traditional difficulty, a separate section `"custom_game_settings"` can be used instead or in tandem: -``` +```json "badger:difficulty_modifier_damage": { "difficulties": { ... }, "custom_game_settings": [ { "setting_name": "unit_damage", "numeric_modifier_type": "post_multiply", - "scaling_factor": 1.0 + "scaling_factor": 1.0 } ] } @@ -229,17 +247,19 @@ A description of each property is as follows: | numeric_modifier_type | pre_add, post_add, pre_multiply, post_multiply | Descriptor for how the value of the custom game setting should be applied to the base value. | | scaling_factor | any float between (0.0, 1.0] | Scales the value of the custom game setting before it is applied to the entity's base value. | -This applies to all the components in the _badger:difficulty*modifier*..._ family. Check out the [Entities](https://github.com/Mojang/minecraft-legends-docs/blob/main/Entities.md#server-entity-documentation) documentation to see all of these components that are available. +This applies to all the components in the _badger:difficulty*modifier*..._ family. Check out the [Entities](https://github.com/LegendsModding/minecraft-legends-docs/blob/main/Entities.md#server-entity-documentation) documentation to see all of these components that are available. -A special mention here for the `"badger:template"` component as well. This component can be used for specific entity descriptions to inherit the components from the descriptions of other entities. This can be really useful for custom game settings since we can define a single difficulty modifier elsewhere and apply it to any number of different entities. Just define the difficulty modifier on a generic entity and then include its identifier in the template component for your specific entity and it will be modified the same as if you added it directly. **Note that if an entity inherits from another and they both define the same component, the resulting component will have a combination of both copmonents' properties, using the property of the inheriting entity's components when they're defined for both.** +A special mention here for the `"badger:template"` component as well. This component can be used for specific entity descriptions to inherit the components from the descriptions of other entities. This can be really useful for custom game settings since we can define a single difficulty modifier elsewhere and apply it to any number of different entities. Just define the difficulty modifier on a generic entity and then include its identifier in the template component for your specific entity and it will be modified the same as if you added it directly. + +_Note: If an entity inherits from another and they both define the same component, the resulting component will have a combination of both components' properties, using the property of the inheriting entity's components when they're defined for both._ #### B# Scripts -_This section only covers specifically how custom game settings are used within B# scripts. For a better idea how B# is used generally, check out the [B# Reference Sheet](https://github.com/Mojang/minecraft-legends-docs/blob/main/BSharpReferenceSheet.md#b-reference-sheet)_ +_This section only covers specifically how custom game settings are used within B# scripts. For a better idea how B# is used generally, check out the [B# Reference Sheet](https://github.com/LegendsModding/minecraft-legends-docs/blob/main/BSharpReferenceSheet.md#b-reference-sheet)_ -When the game is started from the lobby and the values of each setting have been receieved, each value is provided to scripts through a special bootstrap snippet **SNIPPET_GameSettingInitialized** wherever the custom game setting's id matches the first argument of the snippet. +When the game is started from the lobby and the values of each setting have been received, each value is provided to scripts through a special bootstrap snippet **SNIPPET_GameSettingInitialized** wherever the custom game setting's id matches the first argument of the snippet. -``` +```js SNIPPET_GameSettingInitialized("custom_game_setting_id", (value) => { const settingValue = value.value @@ -249,4 +269,4 @@ SNIPPET_GameSettingInitialized("custom_game_setting_id", (value) => { These snippets trigger before any other bootstrap snippets so that their effects can be applied before they are used anywhere else. This can be helpful in cases where things like data structures need to be altered based on the provided value(s). -These snippets also trigger every time a game mode is launched, either from a new game or one that was previously saved. This is because B# script files are always parsed at this time, so previous changes in scripts that are not saved need to be re-applied each time a saved game is loaded to keep the behaviour consistent. +These snippets also trigger every time a game mode is launched, either from a new game or one that was previously saved. This is because B# script files are always parsed at this time, so previous changes in scripts that are not saved need to be re-applied each time a saved game is loaded to keep the behavior consistent. diff --git a/Entities.md b/Entities.md index eb09005..4bf53e9 100644 --- a/Entities.md +++ b/Entities.md @@ -1,15 +1,12 @@ -###### Version: 1.18.65535.0 - - - # Client Entity Documentation Client entity definitions are contained within a Resource Pack and contain all of the information necessary to describe how an entity should look (model, texture, animation) and sound. To create your own, start by navigating to the "entity" folder inside the root of the Resource Pack. In the entity folder create a JSON file and give it a name. The JSON file needs a format version and minecraft:client_entity information. -The minecraft:client_entity section contains the description for the entity. Under description there are a number of things that you can set about an entity. +The minecraft:client_entity section contains the description for the entity. Under description there are a number of things that you can set about an entity. -**Example client entity definition JSON for the prismarine item drop** -``` +**Example client entity definition JSON for the prismarine item drop**: + +```json { "format_version": "1.10.0", "minecraft:client_entity": { @@ -45,12 +42,8 @@ The minecraft:client_entity section contains the description for the entity. Und ``` - - ## Entity Description Properties - - ### badger:animal_interaction Handles animal interaction information. @@ -61,9 +54,6 @@ Handles animal interaction information. | String| molang_variable| | The molang variable to toggle the pat pat animation on both the animal and the player | | String| trigger_event| | The presentation event to trigger when the interaction occurs | - - - ### badger:animation_variation Settings to determine which animation is played based on which interval an action occurs within @@ -73,20 +63,27 @@ Settings to determine which animation is played based on which interval an actio | Array| intervals| | The set of intervals used to determine the molang index based on the last time an action was performed. | | String| molang_index_name| | The name of the molang used by animation for a given set of intervals. | - - - ### badger:area_overlays Defines any visual overlay effects applied to this entity, such as auras and attack range circles. -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| List| auras| | Defines a list of aura-type overlays.

filter_team

When true, the overlay is only visible to allied players.

layer

Defines what layer the aura is rendered to. Valid values: zone, aoi, aura, or overlay

size

Size of the overlay, in blocks.

type

Defines the type of overlay, which affects when and how it will be rendered. Valid values: default, aura, buff, culture, tower, highlight

uses_zone_size

When true, the overlay expands to match the entity's zone of effect. See 'badger:owned_territory'.

views

Defines when the overlay should be visible. Valid values: gameplay, placement. Gameplay overlays are active during normal gameplay, and placement overlays are active during buildable placement.

| -| List| circles| | Defines a list of circle-type overlays.

filter_team

When true, the overlay is only visible to allied players.

layer

Defines what layer the aura is rendered to. Valid values: zone, aoi, aura, or overlay

size

Size of the overlay, in blocks.

type

Defines the type of overlay, which affects when and how it will be rendered. Valid values: default, aura, buff, culture, tower, highlight

uses_zone_size

When true, the overlay expands to match the entity's zone of effect. See 'badger:owned_territory'.

views

Defines when the overlay should be visible. Valid values: gameplay, placement. Gameplay overlays are active during normal gameplay, and placement overlays are active during buildable placement.

| +**Area Overlays**: +| **Type** | **Name** | **Description** | +|----------|----------|-----------------| +| **List** | **auras** | Defines a list of aura-type overlays. | +| **List** | **circles** | Defines a list of circle-type overlays. | +| **Attributes** | **Description** | **Default Value** | **Valid Values** | +|---------------------|-------------------------------|-------------------|--------------------------------------| +| filter_team | When true, the overlay is only visible to allied players. | _Unknown_ | true, false | +| views | Defines when the overlay should be visible. | gameplay | gameplay, placement | +| layer | Defines what layer the aura is rendered to. | aura | zone, aoi, aura, overlay | +| size | Size of the overlay, in blocks. | | Any positive integer | +| type | Defines the type of overlay, which affects when and how it will be rendered. | default | default, aura, buff, culture, tower, highlight | +| uses_zone_size | When true, the overlay expands to match the entity's zone of effect. | _unknown_ | true, false | +--- ### badger:attacker_damage_prediction @@ -97,9 +94,6 @@ Defines presentation behaviour for when the entity anticipates performing an att | String| apply_buff| | The buff applied to the entity about to perform an attack that deals damage of a certain hit reaction threshold. | | String| hit_reaction_type| | The hit reaction threshold which applies the buff. | - - - ### badger:audio_beat_sync This component allows an entity to trigger presentation events based on beats or marker triggers from the music. @@ -108,21 +102,20 @@ This component allows an entity to trigger presentation events based on beats or |:-----------:|:-----------:|:-----------:|:-----------:| | Boolean| receive_only_markers| | If this is true, this entity will not be sent any Beat callbacks, only Marker callbacks. | - - - ### badger:audio_block_scanning This component provides information for the block scanning system for which biomes to look for and which audio events to play when it finds it. -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| Array| biomes| | Array of all of the biomes this block scan will look for.

biome_name

This is the name of the biome the block scan is looking for.

fmod_event

This is the name of the FMOD Event that will start when the biome is found. It's recommended to use a looping sound.

liquid_only

When this bool is true, only liquid type blocks will be valid when detecting a biome type.

| -| Integer| max_step_dist| | The maximum distance in blocks that this block scanner will go. | -| Integer| min_step_dist| | The minimum distance in blocks that this block scanner will go. | - - +| **Type** | **Name** | **Description** | +|-------------|-------------------|-----------------| +| **Array** | **biomes** | Array of all the biomes this block scan will look for. | +| | biome_name | The name of the biome the block scan is looking for. Type: _string_ | +| | fmod_event | The name of the FMOD Event that will start when the biome is found. It's recommended to use a looping sound. Type: _string_ | +| | liquid_only | When this boolean is true, only liquid-type blocks will be valid when detecting a biome type. Type: _boolean_ | +| **Integer** | **max_step_dist** | The maximum distance in blocks that this block scanner will go. | +| **Integer** | **min_step_dist** | The minimum distance in blocks that this block scanner will go. | +--- ### badger:audio_interactable @@ -132,27 +125,18 @@ This flags an entity to apply attributes about the audio event that should be pl |:-----------:|:-----------:|:-----------:|:-----------:| | String| enter_range_audio_event| | The name of the audio event that should be played when the player comes into interaction range. | - - - ### badger:audio_molang_to_fmod This flag component indicates that the entity will update any specified Molang to FMOD audio parameters, these molang parameters are not data driven due to expensive molang calls. - - ### badger:audio_time_of_day This flags an entity to apply an FMOD event parameter for 'time_of_day'. - - ### badger:audio_update_FMOD_projectile_velocity This flags an entity so its velocity will be sent to FMOD for all of the audio events it triggers. - - ### badger:audio_vo_sequence_speaker_tag This flags an entity to apply attributes about a tag that will allow the VO Sequence System to play 3D audio at it's position. @@ -161,19 +145,21 @@ This flags an entity to apply attributes about a tag that will allow the VO Sequ |:-----------:|:-----------:|:-----------:|:-----------:| | String| speaker_tag| | A tag for this entity so that VO sequence audio may be positioned on it. | - - - ### badger:beacon_render_info Provides a beacon on a village entity -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| List| states| | A list of beacon states this entity can have. By default the first state is active.

beacon_color

Base color to be multiplied onto the beacon texture

beacon_width

Width of Beacon

emissive_scale

Flat value to scale the emissiveness of the beacon - Default is tuned for near camera beacons

max_distance

Maximum distance after this beacon is no longer rendered

meta_material

Meta material name used to render beacon

min_distance

Minimum distance before this beacon is no longer rendered

| - - +| **Type** | **Name** | **Description** | +|-----------|-------------------|-----------------| +| **List** | **states** | A list of beacon states this entity can have. By default, the first state is active. | +| | beacon_color | Base color to be multiplied onto the beacon texture. (String) | +| | beacon_width | Width of the beacon. (Integer) | +| | emissive_scale | Flat value to scale the emissiveness of the beacon - Default is tuned for near-camera beacons. (Float) | +| | max_distance | Maximum distance after which this beacon is no longer rendered. (Integer) | +| | meta_material | Meta material name used to render the beacon. (String) | +| | min_distance | Minimum distance before this beacon is no longer rendered. (Integer) | +--- ### badger:block_source_cull_distance_override @@ -183,21 +169,14 @@ Adds a distance override for the block source culling distance for this entity |:-----------:|:-----------:|:-----------:|:-----------:| | Decimal| distance| | Override to the maximum distance from the player at which the block source culling occurs | - - - ### badger:block_source_info Allows the entity to track the block source information for the current block it's on. This is to detect things like, biome data, water, on the ground, etc... - - ### badger:block_source_removal Remove the BlockSourceComponent on the client because this entity doesn't need one. - - ### badger:boom_camera Badger's boom camera. @@ -215,21 +194,14 @@ Badger's boom camera. | Decimal| starting_relative_yaw| | The initial yaw of the boom camera. | | Decimal| target_vertical_offset| | Vertical offset from the camera's follow target. | - - - ### badger:cam_overrides_look_orientation Attach to a camera to indicate whether a camera overrides the direction the player looks when they move - - ### badger:cam_overrides_move_orientation Attach to a camera to indicate whether a camera inhibits the player from moving - - ### badger:camera_avoidance Badger's main camera avoidance logic. @@ -245,9 +217,6 @@ Badger's main camera avoidance logic. | Decimal| target_disk_radius| | Target disk radius to use to move camera for avoidance. | | Decimal| target_vertical_offset| | Vertical offset from target that should use as anchor avoidance/follow point. | - - - ### badger:camera_bounds Describes how and when a camera makes rotational and/or positional changes @@ -260,9 +229,6 @@ Describes how and when a camera makes rotational and/or positional changes | Decimal| position_smoothing_spring| | Smoothing Spring constant determining how long the spring takes to get the camera to the appropriate position. | | Decimal| soft_bounds_scale| | Scale applied to the spherical cone used to recenter the camera IF the hard bounds spherical cone angle has been broken. | - - - ### badger:camera_distance_activation Describes the range this camera can activate in. @@ -271,9 +237,6 @@ Describes the range this camera can activate in. |:-----------:|:-----------:|:-----------:|:-----------:| | Decimal| distance| | The distance from the camera to it's look target. This determines the range this camera will try to activate in. | - - - ### badger:camera_input_layout_override Defines how cameras can override an existing input layout. @@ -282,29 +245,28 @@ Defines how cameras can override an existing input layout. |:-----------:|:-----------:|:-----------:|:-----------:| | String| layout_name| | The name of the input layout. | - - - ### badger:camera_locomotion Alters the camera position based on follow target's locomotion -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| Decimal| default_seconds_ahead| | Default amount of seconds to multiply the follow taget's average velocity with in order to position the camera ahead of the follow target. | -| List| pitch_modifiers| | List of pitch angle [0, 360] modifiers written in ascending order. These modifiers are used to identify which yaw modifiers should be applied for the camera positioning. Note, this angle is the difference in pitch between the player's velocity vector and the camera look pitch.

angle

Angle boundary in degrees [0,360]. Note we interpolate between these boundaries.

yaw_modifiers

List of yaw angle modifiers [0, 360] written in ascending order. These modifiers are used to identiify which additive changes we should apply to our seconds ahead and camera positioning calculation. This angle is the difference in yaw between the player's velocity vector and the camera look yaw.

angle

Angle boundary in degrees [0,360]. Note we interpolate between these boundaries.

seconds_ahead_delta

Additive change in seconds ahead amount if modifier met

| -| List| speed_modifiers| | List of possible speed modifiers.

seconds_ahead_multiplier

Multiplying change in seconds ahead amount if modifier met

speed

Speed boundary. Note we interpolate between these boundaries.

| -| Integer| ticks_to_average_velocity_over| | Amount of ticks we use to create our average velocity. The larger this is the more 'smooth' changes in camera positioning compared to changes in velocity. 10 is a good baseline. | - - +| **Type** | **Name** | **Description** | +|----------|----------------------------------|---------------------------------------------------------------------------------------------------------| +| **Decimal** | **default_seconds_ahead** | Default amount of seconds to multiply the follow target's average velocity with to position the camera ahead of the follow target. | +| **List** | **pitch_modifiers** | List of pitch angle modifiers [0, 360] written in ascending order. These modifiers identify which yaw modifiers should be applied for camera positioning. Note: This angle is the difference in pitch between the player's velocity vector and the camera look pitch. | +| | angle | Angle boundary in degrees [0, 360]. Interpolation occurs between these boundaries. (Float) | +| | yaw_modifiers | List of yaw angle modifiers [0, 360] written in ascending order. These modifiers identify which additive changes should be applied to our seconds ahead and camera positioning calculation. This angle is the difference in yaw between the player's velocity vector and the camera look yaw. (List) | +| | seconds_ahead_delta | Additive change in seconds ahead amount if the modifier is met. (Decimal) | +| **List** | **speed_modifiers** | List of possible speed modifiers. | +| | seconds_ahead_multiplier | Multiplying change in seconds ahead amount if the modifier is met. (Decimal) | +| | speed | Speed boundary. Interpolation occurs between these boundaries. (Decimal) | +| **Integer** | **ticks_to_average_velocity_over** | Amount of ticks used to create the average velocity. A larger value results in smoother camera positioning changes relative to velocity. A value of 10 is a good baseline. | +--- ### badger:camera_show_indicators Describes whether or not the camera is able to see circular indicators under mobs. - - ### badger:camera_show_zone Describes whether or not the camera be able to see zones. @@ -314,15 +276,10 @@ Describes whether or not the camera be able to see zones. | Boolean| show_all_zones| | When set to true, this camera will display all zones in preview | | Decimal| zone_distance| | The distance that this camera should show zones at | - - - ### badger:cinematic_camera Attach to a camera to indicate that it's used in the cinematic system as a camera. - - ### badger:clamp_camera Badger's boom camera. @@ -332,9 +289,6 @@ Badger's boom camera. | Decimal| horizontal_clamp| | Horizontal clamp for the camera. | | Decimal| vertical_clamp| | Vertical clamp for the camera. | - - - ### badger:decal_visualization Optional parameters to control how decals are rendered. @@ -380,9 +334,6 @@ Optional parameters to control how decals are rendered. | Decimal| texture_slice_corner_size| | Amount from [0.0-1.0] to trim the corner of the square texture. | | Decimal| yaw| | Sets the yaw rotation of the decal. | - - - ### badger:decoration_collider_request Define the decoration collider to be attached to an entity. @@ -391,15 +342,10 @@ Define the decoration collider to be attached to an entity. |:-----------:|:-----------:|:-----------:|:-----------:| | String| name| | Archetype name of the decoration collider. | - - - ### badger:entity_age Enables the age timer. - - ### badger:face_animation Defines facial animation properties for the entity. @@ -413,9 +359,6 @@ Defines facial animation properties for the entity. | Array| blink_time_open| | Range (in seconds) to hold non-blink frame. | | Positive Integer| default_frame| | Default frame index. | - - - ### badger:fast_travel_presentation Defines the entity's presentation event & molang variable names for fast travel. @@ -428,9 +371,6 @@ Defines the entity's presentation event & molang variable names for fast travel. | String| windup| | The name of the windup presentation event & molang variable. | | Decimal| windup_event_time| | The time, in seconds, when the fast travel start trigger event is triggered after initiating fast travel. | - - - ### badger:hero_lure_presentation Defines the entity's presentation event names for hero lure. @@ -440,9 +380,6 @@ Defines the entity's presentation event names for hero lure. | String| start_trigger| | The name of the start presentation event. | | String| stop_trigger| | The name of the stop presentation event. | - - - ### badger:hit_reaction_threshold Defines this entity as a hit reaction threshold prototype. @@ -451,20 +388,20 @@ Defines this entity as a hit reaction threshold prototype. |:-----------:|:-----------:|:-----------:|:-----------:| | Decimal| activation_percent| | The percentage of target's max health that attacking damage will do, on the range [0,1]. | - - - ### badger:hud_message_interaction_failed This describes HUD messages to show if we have a failed interaction that requires a resource/unlock cost. -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| JSON Object| resource_cost_failed_message| | Defines the HUD message that will be shown if the player doesn't have resources for the interaction cost.

hud_message_args

Arguments to pass into the HUD message. Message needs to support arguments.

hud_message_id

HUD message id from hud_text_messages.json

| -| JSON Object| unlock_cost_failed_message| | Defines the HUD message that will be shown if the player doesn't have resources for the unlock.

hud_message_args

Arguments to pass into the HUD message. Message needs to support arguments.

hud_message_id

HUD message id from hud_text_messages.json

| - - +| **Type** | **Name** | **Description** | +|----------------|------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **JSON Object**| **resource_cost_failed_message** | Defines the HUD message displayed when the player lacks the resources for the interaction cost. | +| | hud_message_args | Arguments to pass into the HUD message; the message must support these arguments. | +| | hud_message_id | HUD message ID sourced from `hud_text_messages.json`. | +| **JSON Object**| **unlock_cost_failed_message** | Defines the HUD message displayed when the player lacks the resources to unlock an item or feature. | +| | hud_message_args | Arguments to pass into the HUD message; the message must support these arguments. | +| | hud_message_id | HUD message ID sourced from `hud_text_messages.json`. | +--- ### badger:input_actions @@ -479,9 +416,6 @@ Defines the entity's input mapping of possible actions. | String| target_facing| | The relative direction to shoot in e.g. player_facing (only valid when action type is set to target) | | Decimal| target_range| | The range of the target (only valid when action type is set to target) | - - - ### badger:interaction_presentation Defines toggles to enable or disable certain interaction presentation events from firing when interacting with this entity. @@ -491,9 +425,6 @@ Defines toggles to enable or disable certain interaction presentation events fro | Boolean| trigger_generic_events| true| When true, will trigger generic presentation events when interacted with (archetype doesn't matter). Can be combined with specific events. | | Boolean| trigger_specific_events| false| When true, will trigger archetype specific presentation events when interacted with. Can be combined with generic events. | - - - ### badger:interpolation Defines the entity's interpolation parameters. @@ -504,9 +435,6 @@ Defines the entity's interpolation parameters. | Decimal| position_interpolation_steps| | How many fixed update ticks (there are 20 per second) an interpolation of an position change takes. Default is 1, the value can be greater then 1 but also be a fraction (for example 0.5f). | | Decimal| position_interpolation_steps_y_down| | How many fixed update ticks (there are 20 per second) an interpolation of an position change while falling downwards takes. Default is 1, the value can be greater then 1 but also be a fraction (for example 0.5f). | - - - ### badger:invasion_icon The colour for the backing of the healthbar icon during invasions @@ -515,9 +443,6 @@ The colour for the backing of the healthbar icon during invasions |:-----------:|:-----------:|:-----------:|:-----------:| | Array| icon_color| | The The RGBA value of the icon colour. Formatted as an array | - - - ### badger:invulnerability_heartbeat_view This component provides which audio events to play when the invulnerability heartbeat pulses. @@ -526,9 +451,6 @@ This component provides which audio events to play when the invulnerability hear |:-----------:|:-----------:|:-----------:|:-----------:| | String| audio_bae_event| | This is the name of the Audio BAE Event that will start when the invulnerability render pulse occurs. It's recommended to not use a looping sound. | - - - ### badger:keep_alive_timer Defines the settings for keeping client-side entities alive after they have died. @@ -539,9 +461,6 @@ Defines the settings for keeping client-side entities alive after they have died | Decimal| time_if_refunded| | How much time, in seconds, the entity will stay alive for after it has died, before being unloaded IF it dies due to refund. | | Boolean| trigger_event_only_on_death| false| If true, the on_death event will only be triggered if the entity died due to reaching zero health. | - - - ### badger:knockback_reaction_threshold Defines this entity as a knockback reaction threshold prototype. @@ -550,15 +469,10 @@ Defines this entity as a knockback reaction threshold prototype. |:-----------:|:-----------:|:-----------:|:-----------:| | Decimal| activation_value| | The amount of knockback force that an attacking entity needs to do. | - - - ### badger:locator This flags an entity that it is used as a locator for vfx - - ### badger:locator_effect Defines how effects are spawned at given locators. @@ -570,9 +484,6 @@ Defines how effects are spawned at given locators. | Array| particle_effects| | The container that holds the data for each tyep of particle effect. | | Decimal| removal_time| | The time delay between when the effect is disabled and when to remove it. | - - - ### badger:lookat Defines the ability for an entity to look at other things. @@ -586,9 +497,6 @@ Defines the ability for an entity to look at other things. | Decimal| min_range| | Defines the min range that this entity will look at. | | Decimal| turning_delta| | Defines how many degrees per frame the head will turn to target. | - - - ### badger:map3_child_offset Used on a Map Entity (for World Map 3), defines a relative offset another Map Entity can use (like a VFX entity). @@ -599,27 +507,18 @@ Used on a Map Entity (for World Map 3), defines a relative offset another Map En | Decimal| y| | Y offset. | | Decimal| z| | Z offset. | - - - ### badger:map3_copy_local_camera_orientation Map entity will inherit the local camera's orientation. - - ### badger:map3_copy_orientation Map entity will inherit the icon entity's (and game entity) orientation. - - ### badger:map_entity_3d_icon Map Entity (for World Map 3) will have an icon on the map screen - - ### badger:map_icon_offset Adds an offset to an map source entity. @@ -630,9 +529,6 @@ Adds an offset to an map source entity. | Decimal| y| | Y offset. | | Decimal| z| | Z offset. | - - - ### badger:mount_molang Defines the molang variable name to be used when this entity is mounted. @@ -641,9 +537,6 @@ Defines the molang variable name to be used when this entity is mounted. |:-----------:|:-----------:|:-----------:|:-----------:| | String| mount_variable| | The molang variable name that is set when this entity is mounted. | - - - ### badger:music_2d_emitter Defines the 2D Music emitter component. Attaching this to an entity allows it to interface with the music system and determine what music to play. @@ -658,9 +551,6 @@ Defines the 2D Music emitter component. Attaching this to an entity allows it to | Integer| priority| | Determines which emitter to choose when more than one is active. Higher is more priority. | | String| state_name| | Name of the state for Debugging | - - - ### badger:music_emitter_states Defines the current state of this music emitter entity. @@ -669,9 +559,6 @@ Defines the current state of this music emitter entity. |:-----------:|:-----------:|:-----------:|:-----------:| | List| badger:music_emitter_states| | A list of the current states this emitter can be in. This must match the resource_pack music_states for badger:music_2d_emitter. | - - - ### badger:on_destruction This flags an entity to apply attributes with the details about the entity to spawn when the applied-to entity is destroyed. @@ -681,9 +568,6 @@ This flags an entity to apply attributes with the details about the entity to sp | String| locator| | The locator at the position where the new entity should be spawned | | String| spawn_entity| | The archetype name for the entity that should be spawned | - - - ### badger:orbital_arm Settings that define how a camera orbits a follow target while focusing on a look target. @@ -700,9 +584,6 @@ Settings that define how a camera orbits a follow target while focusing on a loo | Decimal| zoom_cursor_multiplier| | A multiplier to drive the amount of zoom relative to cursor distance. Larger numbers means greater cursor distance change is needed for same amount of zoom | | Decimal| zoom_lerp| | How smoothly the orbital camera zooms in and out, on the range [0,1]. | - - - ### badger:placement_molang Defines the molang string sent for structure placement @@ -711,9 +592,6 @@ Defines the molang string sent for structure placement |:-----------:|:-----------:|:-----------:|:-----------:| | String| name| | Defines the tag string | - - - ### badger:point_lights Defines point lights possibly attached to entity locators. @@ -729,40 +607,46 @@ Defines point lights possibly attached to entity locators. | Vector [a, b, c]| offset| | Offset for light, in local space (can also be a Molang expression per channel). | | Decimal| radius| | Radius of light (can also be a Molang expression). | - - - ### badger:presentation_event Defines the presentation triggers this entity can respond to, and the animation events to play. -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| JSON Object| animation| | Descriptor for an animation object. | -| String| attachment| | Descriptor for an attachment object. | -| JSON Object| audio| | Descriptor for an audio effect object. | -| JSON Object| beacon| | Descriptor for an beacon effect object. | -| JSON Object| distance_curve| | Details for how the duration curve will be impacted due to distance between the event sender and the client player.

min_range

Minimum Distance whereby any distance smaller than or equal will be treated as 1.0f multiplier.

multiplier_function

Multiplier Curve that will be used to process the distance curve.

range

Maximum distance whereby any distance greater than or equal will be treated as a 0.0f multiplier.

| -| JSON Object| duration_curve| | Details for how you want the duration curve to look

duration

The duration of the rumble in seconds, note if there is a start delay, this duration does not start until AFTER that delay.

in_duration

Amount of time it takes to get from Minimum to Max Rumble Strength.

in_easing_function

Function used to ease into the rumble (i.e. at the initiation of the rumble).

minimum_strength

The Minimum of the curve, at start of rumble this will be the first amount set and the amount the easing_out will move towards.

out_duration

Amount of time it takes to get from Rumble Max to Minimum strength

out_easing_function

Function used to ease out of rumble (i.e. at the tail-end of the rumble.

pulse_duration

The duration of the pulse in seconds. Note that this will be uniform so the number of pulses will be the duration / pulse_duration. Therefore the duration must be divisible by the pulse to get an integer of pulses.

start_delay

The amount of time we delay before we start the initial rumble.

strength

The Maximum strength of the rumble that the in_easing_function will move towards.

| -| JSON Object| invulnerability_decal| | Descriptor for a visual only invulnerability decal. | -| String| outline| | Descriptor for an outline object | -| Boolean| override| | Boolean value determining whether this type of rumble can override other rumble events | -| JSON Object| particles| | Descriptor for an particle effect object. | -| Integer| priority| | The priority of this rumble event, lower integer value means higher priority | -| String| script| | Descriptor for the script name to execute on trigger | -| String| spawn_entity| | If the handler is a single string, then it's spawning only a single entity with 100% chance of success. | -| String| visual_state| | Descriptor for a visual state object. | - - - +| **Type** | **Name** | **Description** | +|----------------|------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **JSON Object**| **animation** | Descriptor for an animation object. | +| **String** | **attachment** | Descriptor for an attachment object. | +| **JSON Object**| **audio** | Descriptor for an audio effect object. | +| **JSON Object**| **beacon** | Descriptor for a beacon effect object. | +| **JSON Object**| **distance_curve** | Details on how the duration curve is affected by the distance between the event sender and the client player. | +| | min_range | Minimum distance; any distance smaller than or equal to this will be treated as a 1.0f multiplier. | +| | multiplier_function | Multiplier curve used to process the distance curve. | +| | range | Maximum distance; any distance greater than or equal to this will be treated as a 0.0f multiplier. | +| **JSON Object**| **duration_curve** | Details for configuring the appearance of the duration curve. | +| | duration | Total duration of the rumble in seconds. Note: If there is a start delay, this duration begins after that delay. | +| | in_duration | Time taken to transition from minimum to maximum rumble strength. | +| | in_easing_function | Function used to ease into the rumble (i.e., at the start of the rumble). | +| | minimum_strength | Minimum strength of the curve; this will be the initial amount set at the start of the rumble, towards which the easing-out function will move. | +| | out_duration | Time taken to transition from maximum rumble strength to minimum. | +| | out_easing_function | Function used to ease out of the rumble (i.e., at the end of the rumble). | +| | pulse_duration | Duration of each pulse in seconds. The number of pulses is calculated as total duration divided by pulse duration, requiring the total duration to be divisible by pulse duration for an integer result. | +| | start_delay | Time delay before initiating the initial rumble. | +| | strength | Maximum strength of the rumble that the in-easing function will approach. | +| **JSON Object**| **invulnerability_decal** | Descriptor for a visual-only invulnerability decal. | +| **String** | **outline** | Descriptor for an outline object. | +| **Boolean** | **override** | Determines whether this type of rumble can override other rumble events (true/false). | +| **JSON Object**| **particles** | Descriptor for a particle effect object. | +| **Integer** | **priority** | Priority of this rumble event; lower integer values indicate higher priority. | +| **String** | **script** | Descriptor for the script name to execute upon trigger. | +| **String** | **spawn_entity** | If the handler is a single string, it indicates that a single entity is spawned with a 100% chance of success. | +| **String** | **visual_state** | Descriptor for a visual state object. | + +--- ### badger:projectile_trail_request Determine a projectile trail from projectile trail collection. - - -### badger:removal_time +### badger:removal_time (_duplicate?_) destroys an entity after a given period of time @@ -772,9 +656,6 @@ destroys an entity after a given period of time | Boolean| sync_presentation_event| | Whether or not the event should be synced over the server, or if it should be local only | | Decimal| time| | Amount of time in seconds before the entity is destroyed | - - - ### badger:rendering The rendering parameters for the entity. @@ -786,9 +667,6 @@ The rendering parameters for the entity. | Boolean| render_controllers_are_constant| | Flag to indicate if the render controllers should be reprocessed each frame. | | Boolean| static| | Flag to indicate the entity type requires a static intitialization render pass. | - - - ### badger:respawn_trigger The trigger that occurs when an entity is respawned @@ -797,15 +675,10 @@ The trigger that occurs when an entity is respawned |:-----------:|:-----------:|:-----------:|:-----------:| | String| trigger| | The trigger event to send when an entity respawns | - - - ### badger:rig_operations Specifies a list of rig operations to apply. - - ### badger:rotation_presentation Defines clientside presentation-related tunings for rotation. @@ -814,9 +687,6 @@ Defines clientside presentation-related tunings for rotation. |:-----------:|:-----------:|:-----------:|:-----------:| | String| rotation_stop_presentation_event_delay| | Defines the delay after rotation ends before the stop presentation event is sent. This can be used to avoid excessive event triggering when rapidly starting and stopping rotation. | - - - ### badger:skin Defines the entity with this data as a clientside skin archetype @@ -825,9 +695,6 @@ Defines the entity with this data as a clientside skin archetype |:-----------:|:-----------:|:-----------:|:-----------:| | String| archetype| | The name of the base archetype that this clientside skin is for. Gameplay behaviour will be inherited from this base archetype.. | - - - ### badger:smooth_look_at Settings for smoothing camera look. @@ -836,9 +703,6 @@ Settings for smoothing camera look. |:-----------:|:-----------:|:-----------:|:-----------:| | Decimal| focus_radius| | The radius around the look target that will trigger smoothing if the target moves beyond it. | - - - ### badger:speed_data_to_fmod This component allows an entity to send data related to its speed to FMOD. It sends its speed and it's Y velocity to the FMOD parameters specified in data. @@ -852,15 +716,10 @@ This component allows an entity to send data related to its speed to FMOD. It se | Decimal| min_speed| | The minimum value we want to track for the entity's speed parameter. Setting this will normalize the parameter value between the min and max. | | Decimal| min_velocity_y| | The minimum value we want to track for the entity's Y velocity parameter. Setting this will normalize the parameter value between the min and max. | - - - ### badger:terrain_type_molang Specify that an entity should define and update the 'variable.terrain_type' molang variable - - ### badger:threat_owner Defines this entity as a host for music threat level. @@ -873,9 +732,6 @@ Defines this entity as a host for music threat level. | Decimal| max_threat| | Max possible threat value for this host. | | Decimal| min_threat| | Min threat value for this host. | - - - ### badger:threat_source Defines this entity as a contributor to threat level for an owning source village/base. @@ -886,9 +742,6 @@ Defines this entity as a contributor to threat level for an owning source villag | Decimal| spawn_value| | How much threat this entity contributes when spawned. | | Decimal| transition_time| | Time in seconds it takes for this entity to transition in threat value from the spawn value to the base value. | - - - ### badger:toggleable_decorative_child Defines an entity archetype to add as a child of this entity, that will be destroyed and recreated as necessary to hide and display it. @@ -899,21 +752,14 @@ Defines an entity archetype to add as a child of this entity, that will be destr | Integer| molang_variant_id| | Sets the molang parameter 'variable.variant_id' on the child when it is created. This is used to create visual variants of the child entity using things like material swaps. | | Boolean| start_enabled| | Defines whether the child should be enabled by default. | - - - ### badger:variable_propagation Allows specification of what variables propagate from a parent to a parented entity - - ### badger:verlet_dynamics Specifies a list of verlet dynamics to apply. - - ### badger:visual_only_invulnerability_decal Triggers invulnerability decal on entity along with offsets for modifying the bounds of the AABB stored by the decal @@ -924,15 +770,10 @@ Triggers invulnerability decal on entity along with offsets for modifying the bo | Vector [a, b, c]| min_aabb_additive_offset| | Offset vector to add to min AABB bound of the decal | | List| states| | A list of invulnerability states this entity can have. By default the first state is active. | - - - ### badger:visualize_local_player_allegiance This flags an entity to apply a molang variable encoding allegiance to the local player for visual purposes. - - ### minecraft:camera Defines Badger functionality to the existing Bedrock camera. @@ -953,9 +794,6 @@ Defines Badger functionality to the existing Bedrock camera. | Decimal| shadow_depth_bias| | Overrides the depth bias used for shadow cascades. | | Decimal| shadow_slope_bias| | Overrides the slope bias used for shadow cascades. | - - - ### minecraft:camera_attach Describes how a camera entity should attach to another entity. @@ -966,9 +804,6 @@ Describes how a camera entity should attach to another entity. | Vector [a, b, c]| offset| | The offset from the locator/entity where the camera will be attached. | | Boolean| use_locator_orientation| | True if the camera should use the locator's orientation as it's view orientation. | - - - ### minecraft:camera_avoidance Describes how cameras that orbit a target should avoid collision and occlusion. @@ -977,9 +812,6 @@ Describes how cameras that orbit a target should avoid collision and occlusion. |:-----------:|:-----------:|:-----------:|:-----------:| | String| relax_distance_smoothing_spring| | How quickly the camera will return to it's desired distance once a collison or occulsion is cleared. | - - - ### minecraft:camera_blend_in_default Describes how a camera can pitch around the x axis and yaw around the y axis. @@ -991,9 +823,6 @@ Describes how a camera can pitch around the x axis and yaw around the y axis. | String| ease| | The type of easing function used to control the blend. | | Decimal| input_dampening_coefficient| | Dampens the input on the camera to if the camera to is accepting input during the blend. | - - - ### minecraft:camera_fly Describes how a camera flies around. @@ -1004,9 +833,6 @@ Describes how a camera flies around. | Decimal| speed_alt| | The alternative speed of the camera when flying. | | Decimal| sprint_multiplier| | The multiplier set by /sprint of the speed of the camera when flying. | - - - ### minecraft:camera_look_at Describes how a camera frames it's look target. @@ -1021,9 +847,6 @@ Describes how a camera frames it's look target. | Vector [a, b]| soft_bounds_min| | The bottom left coordinates of the soft bounds. | | Decimal| soft_bounds_smoothing_spring| | How quickly the camera's orientation will correct to keep it's look target within the soft bounds. | - - - ### minecraft:camera_orbit Describes how a camera orbits around it's follow target. @@ -1038,9 +861,6 @@ Describes how a camera orbits around it's follow target. | Decimal| polar_smoothing_spring| | How quickly the camera's polar angle will correct to match the desired azimuth. | | Decimal| radius| | The ideal distance the camera will keep from it's follow target. | - - - ### minecraft:camera_speed_modifier Used as a multiplier for the fly camera / first person camera. @@ -1051,9 +871,6 @@ Used as a multiplier for the fly camera / first person camera. | Boolean| slow_mode_modified_by_sprint| | Boolean for whether or not slow mode speed is affected by sprint multiplier. | | Decimal| translation_speed_modifier| | Multiplier for the translation speed. | - - - ### minecraft:first_person_look Describes how a camera can pitch around the x axis and yaw around the y axis. @@ -1063,42 +880,32 @@ Describes how a camera can pitch around the x axis and yaw around the y axis. | Decimal| pitch_max| | The maximum pitch angle in degrees that the camera can have. | | Decimal| pitch_min| | The minimum pitch angle in degrees that the camera can have. | - - - ### minecraft:follow_target A target to follow. - - ### minecraft:look_target A target to look at. - - ## identifier The identifier is used to register the entity with the server. In the Client Entity Definitions JSON the identifier sets the appearance of the entity(materials, textures, geometry, etc.) The matching identifier in the Entity Behavior JSON in the Behavior Pack is what gives the entity its behaviors. - - ## materials, textures, animations Players can set the materials, texture and geometry used for the entity in this section. Players can set one or more materials, textures, and geometries that can be used by the mob. Players must set user defined names for them. These names are used in the Render Controllers JSON. Players can reference materials, textures, and geometry from the vanilla Minecraft Resource Pack or create their own. Custom materials, textures, and geometry should be in the corresponding folder at the root of the Resource Pack. - - ## scripts Scripts allow players to use MoLang to compute calculations once and store that value. This value than can be used over and over again without the need to constantly recompute the calculations. Scripts currently support pre - animation and scale.More script types will be added later. -Pre-animation scripts are evaluated immediately before animations are processed. -Scale sets the scale of the mob's geometry. - +_NOTE: This section is to be completely rewritten as it is thoroughly inaccurate. FISH and a BAT in LEGENDS? Imagine_ **Example pre-animation script for cod** -``` + +```json "scripts": { "pre_animation": [ "variable.ZRot = !query.is_in_water ? Math.cos((query.time_stamp + global.frame_alpha) * 14.32) * 90 : 0.0;", @@ -1107,41 +914,32 @@ Scripts allow players to use MoLang to compute calculations once and store that }, ``` -**Example scale script for the bat** -``` +**Example scale script for the bat**: + +```json "scripts": { "scale": "0.35" }, ``` - - ## animations Allows the player to assign names to reference the long name for animations. These names are used by the animation controller JSON. Players can reference animations from the vanilla Minecraft Resource Pack or create their own. Custom animations should be in the animation folder at the root of the Resource Pack. - - ## render_controllers Specifies the names of render controllers. This name needs to match the name of a corresponding JSON located in the Render Controllers folder. Players can reference Render Controllers from the vanilla Minecraft Resource Pack or create their own. Custom Render Controllers should be in the textures folder at the root of the Resource Pack. - - ## enable_attachables Legacy, not used. - - -# Filters +## Filters Filters allow data objects to specify test criteria which allows their use. For example, a model that includes a filter will only be used when the filter criteria is true. - - A typical filter consists of four parameters: name: the name of the test to apply. @@ -1152,16 +950,12 @@ A typical filter consists of four parameters: value: the value being compared with the test. - - A typical filter looks like the following: - { "test" : "moon_intensity", "subject" : "self", "operator" : "greater", "value" : "0.5" } + { "test" : "moon_intensity", "subject" : "self", "operator" : "greater", "value" : "0.5" } Which results in the calling entity (self) calculating the moon_intensity at its location and returning true if the result is greater than 0.5. - - Tests can be combined into groups using the collections 'all_of', 'any_of', or 'none_of'. All tests in an 'all_of' group must pass in order for the group to pass. @@ -1170,43 +964,58 @@ Tests can be combined into groups using the collections 'all_of', 'any_of', or ' All tests in a 'none_of' group must fail in order for the group to pass. - - - - ## has_biome_tag Tests whether the biome the subject is in has the specified tag. -| Type| Name| Default| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| String| operator| equals| (Optional) The comparison to apply with 'value'.
Options Description
!=Test for inequality.
<Test for less-than the value.
<=Test for less-than or equal to the value.
<>Test for inequality.
=Test for equality.
==Test for equality.
>Test for greater-than the value.
>=Test for greater-than or equal to the value.
equalsTest for equality.
notTest for inequality.
| -| String| subject| self| (Optional) The subject of this filter test.
Options Description
blockThe block involved with the interaction.
damagerThe damaging actor involved with the interaction.
otherThe other member of an interaction, not the caller.
parentThe caller's current parent.
playerThe player involved with the interaction.
selfThe entity or object calling the test
targetThe caller's current target.
| -| String| value| | (Required) The tag to look for | - +| **Type** | **Name** | **Default** | **Description** | +|----------------|-------------|-------------|----------------------------------------------------------------------------------------------------------| +| **String** | **operator**| equals | (Optional) The comparison to apply with 'value'. Possible options include: | +| | | | - `!=` : Test for inequality. | +| | | | - `<` : Test for less-than the value. | +| | | | - `<=` : Test for less-than or equal to the value. | +| | | | - `<>` : Test for inequality. | +| | | | - `=` : Test for equality. | +| | | | - `==` : Test for equality. | +| | | | - `>` : Test for greater-than the value. | +| | | | - `>=` : Test for greater-than or equal to the value. | +| | | | - `equals` : Test for equality. | +| | | | - `not` : Test for inequality. | +| **String** | **subject** | self | (Optional) The subject of this filter test. Possible options include: | +| | | | - `block` : The block involved with the interaction. | +| | | | - `damager` : The damaging actor involved with the interaction. | +| | | | - `other` : The other member of an interaction, not the caller. | +| | | | - `parent` : The caller's current parent. | +| | | | - `player` : The player involved with the interaction. | +| | | | - `self` : The entity or object calling the test. | +| | | | - `target` : The caller's current target. | +| **String** | **value** | | (Required) The tag to look for. | + +--- ### Examples **Full..** -``` + +```json { "test": "has_biome_tag", "subject": "self", "operator": "equals", "value": " " } ``` **Short (using Defaults)..** -``` + +```json { "test": "has_biome_tag", "value": " " } ``` - - -# Server Entity Documentation +## Server Entity Documentation Server entity definitions are contained within a Behaviour Pack and contain all of the information necessary to describe how an entity should behave. To create your own, start by navigating to the "entity" folder inside the root of the Behaviour Pack. In the entity folder create a JSON file and give it a name. The JSON file needs a format version and minecraft:entity information. -The minecraft:entity section contains the description for the entity. Under description there are a number of things that you can set about an entity. +The minecraft:entity section contains the description for the entity. Under description there are a number of things that you can set about an entity. -**Example server entity definition JSON for the prismarine item drop** -``` +**Example server entity definition JSON for the prismarine item drop**: + +```json { "format_version": "1.8.0", "minecraft:entity": { @@ -1235,11 +1044,7 @@ The minecraft:entity section contains the description for the entity. Under desc ``` - - -## Entity Description Properties - - +## Server Entity Description Properties ### badger:aabb @@ -1251,19 +1056,18 @@ Dimensions of this entities bounding box | Decimal| length| | The length of the entity (optional if not specified the width is used). | | Decimal| width| | The width of the entity. | - - - ### badger:action_tickets Defines the action tickets that this entity has -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| JSON Object| action_tickets| | Defines the number of 'action tickets' this entity has, which limits how many entities can target it simultaneously. Separated by category of action.

cc

Close combat tickets.

ct

Creeper-target tickets.

ht

Heal-target tickets.

rc

Ranged combat tickets.

sc

Secondary combat tickets.

| - - - +| Type | Name | Description | +|:------------:|:---------------:|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------| +| JSON Object | action_tickets | Defines the number of "action tickets" this entity has, which limits how many entities can target it simultaneously. Separated by category of action: | +| | - cc | Close combat tickets. | +| | - ct | Creeper-target tickets. | +| | - ht | Heal-target tickets. | +| | - rc | Ranged combat tickets. | +| | - sc | Secondary combat tickets. | ### badger:advanced_direct_reticle @@ -1274,9 +1078,6 @@ Defines the entity archetype applied to the advanced direct reticle on the clien | String| reticle_entity_id| | Defines the name of the entity archetype to use. | | Decimal| reticle_radius| | Defines the size of the advanced direct targeting reticle. | - - - ### badger:aimable Defines the ability to be aimed at a target location. @@ -1294,15 +1095,10 @@ Defines the ability to be aimed at a target location. | Decimal| starting_range| | Defines the starting range that this entity will be aimed at when first interacted with. | | Boolean| uses_move_stick| | Sets whether this aimable should be controlled by the move stick, rather than the aim stick, when using a controller. | - - - ### badger:aimable_turret Flags an entity as a turret for an aimable entity. - - ### badger:allay Handles allay movement information. @@ -1319,35 +1115,39 @@ Handles allay movement information. | Decimal| spin_speed| | How fast the allay rotates around its target | | Decimal| travel_time| | How many seconds it takes to move between destinations. | - - - ### badger:allay_panic sends a panicked allay home after a given time, destroying the gather order -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| String| panicked_path| | Icon name for panicked version | -| Decimal| return_timer| | Amount of time in seconds after being scared before the allay returns home. Leave undeclared for infinite time. | -| Decimal| scare_delay| | Amount of time in seconds before the allay gets scared. | -| JSON Object| scare_filter| | Allay Panic on filter

alliance_rule_filter

Alliance rule filter name

exclude_tags

The tags to be excluded from when filtering

include_tags

The tags to be included in when filtering

| - - +| **Type** | **Name** | **Description** | +|----------------|----------------------|-----------------------------------------------------------------------------------------------------------------| +| **String** | **panicked_path** | Icon name representing the panicked version of the allay. | +| **Decimal** | **return_timer** | Duration in seconds after being scared before the allay returns home. Leave undeclared for an infinite return time. | +| **Decimal** | **scare_delay** | Duration in seconds before the allay becomes scared. | +| **JSON Object**| **scare_filter** | **Configuration for the allay's panic filtering** criteria. | +| | alliance_rule_filter | Name of the alliance rule filter applied to the allay's panic behavior. | +| | exclude_tags | List of tags to be excluded when filtering potential threats. | +| | include_tags | List of tags to be included when filtering potential threats. | +--- ### badger:aoe Defines the settings used to spawn an AoE entity -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| Array| damage_effects| | Defines the damage effects for the AoE.

damage

The amount of damage dealt to entities inside this AoE.

exclude_tags

The tags required to NOT be on an entity for it to be influenced by this AoE.

include_tags

The tags required to be on an entity for it to be influenced by this AoE.

requires_los

Whether or not the AoE requires LoS from the shape pivot to the target to hit.

| -| JSON Object| shape| | The shape used for the AoE. | -| JSON Object| timer| | Defines an timer for the effects of the AoE.

interval

The time between applying the effect(s) of the AoE, in seconds.

jitter

Array of ticks to modify the intervals to provide pseudo-randomness and ease strain on AOE performance.

| - - +| **Type** | **Name** | **Description** | +|----------------|-----------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------| +| **Array** | **damage_effects** | Defines the damage effects applied within the AoE. | +| | damage | The amount of damage dealt to entities inside this AoE. | +| | exclude_tags | The tags required for an entity to **not** be influenced by this AoE. | +| | include_tags | The tags required for an entity to be influenced by this AoE. | +| | requires_los | Indicates whether the AoE requires line of sight (LoS) from the shape pivot to the target to apply damage. | +| **JSON Object**| **shape** | Specifies the shape used for the AoE. | +| **JSON Object**| **timer** | Defines the timing for applying the effects of the AoE. | +| | interval | The time, in seconds, between applying the effect(s) of the AoE. | +| | jitter | An array of ticks that modifies the intervals, providing pseudo-randomness to ease performance strain on the AoE. | +--- ### badger:applies_buffs @@ -1364,9 +1164,6 @@ Defines this entity's ability to confer buffs to nearby entities. | Array| preset_buffs| | The preset buffs to be applied by this entity. Use this if the buffs applied by this entity should not be modifiable. | | Boolean| wipe_buffs| | Whether this buff applicator wipes existing buffs on the receiving entity before applying its own buffs | - - - ### badger:apply_damage Defines the settings for applying damage. @@ -1375,9 +1172,6 @@ Defines the settings for applying damage. |:-----------:|:-----------:|:-----------:|:-----------:| | JSON Object| damage| | The damage to apply. | - - - ### badger:apply_status Defines the settings for applying status effects. @@ -1386,9 +1180,6 @@ Defines the settings for applying status effects. |:-----------:|:-----------:|:-----------:|:-----------:| | JSON Object| apply_status| | The list of status effects to apply. | - - - ### badger:atomic_village_exempt Dictates whether this entity can cause its owning village to force suspension. @@ -1398,26 +1189,36 @@ Dictates whether this entity can cause its owning village to force suspension. | Boolean| exempt_from_requests| | This entity won't cause its owning village to force suspension. | | Boolean| exempt_from_requests_and_suspension| | This entity won't cause its owning village to force suspension nor will it forcefully be suspended when it's owning village is. | - - - ### badger:audio_ignore_vo_reminder This flags an entity to ignore VO reminders if the player is near this entity. Used for entities like villages - - ### badger:aura_applicator When applied to a structure, provides a buffing aura to entities within its zone of control. -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| Array| auras| | The list of buff auras used by this entity.

alliance_rule_filter

The rule that determines which types of entities that will be buffed (friendly, enemy, etc.).

apply_to_build_previews

Does this buff apply to build previews? (for things such as area overlay buffs)

buff_id

The buff to be applied by this entity.

can_apply_to_self

Whether this buff can be applied to the aura applicator itself.

exclude_tags

Entities with any of these tags will not be given a buff.

include_tags

Entities must have all these tags to get a buff.

load_affected_entities_on_construction_completion

If true, the entity will load all suspended entities affected by the aura.

only_apply_to_construction_completed

Does this buff only apply to structures who have completed construction?

only_apply_to_damaged

Does this buff only apply to damaged entities?

persistent

Whether this buff should persist after the aura applicator is gone.

search_mode

What entities this aura affects. Valid values are `zone`, `village`, `spawner_controller`.

unlock_condition

Enable or disable this aura depending on the presence of a given unlock resource.

has_unlock

If true, this aura will only be active when this resource is acquired. If false, this aura will only be active if this resource is not acquired.

resource

The name of a resource used to enable or disable this aura.

| -| JSON Object| buff_queue| | Optional data to add if the aura should be applied to entiies in a queue

limit_concurrent_applications

The number of entities the aura is applied to per unit of time

time_interval

The time interval when the aura is applied

| - - - +| **Type** | **Name** | **Description** | +|----------------|------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **Array** | **auras** | A list of buff auras used by this entity. | +| | **alliance_rule_filter** | The rule that determines which types of entities will be buffed (friendly, enemy, etc.). | +| | **apply_to_build_previews** | Indicates whether this buff applies to build previews (e.g., area overlay buffs). | +| | **buff_id** | The identifier of the buff to be applied by this entity. | +| | **can_apply_to_self** | Specifies whether this buff can be applied to the aura applicator itself. | +| | **exclude_tags** | Entities with any of these tags will not receive a buff. | +| | **include_tags** | Entities must have all these tags to receive a buff. | +| | **load_affected_entities_on_construction_completion** | If true, the entity will load all suspended entities affected by the aura. | +| | **only_apply_to_construction_completed** | Specifies whether this buff only applies to structures that have completed construction. | +| | **only_apply_to_damaged** | Specifies whether this buff only applies to damaged entities. | +| | **persistent** | Indicates whether this buff should persist after the aura applicator is gone. | +| | **search_mode** | Defines what entities this aura affects. Valid values include `zone`, `village`, and `spawner_controller`. | +| | **unlock_condition** | Enables or disables this aura depending on the presence of a given unlock resource. | +| | **has_unlock** | If true, this aura will only be active when the specified resource is acquired; if false, it will only be active if the resource is not acquired. | +| | **resource** | The name of the resource used to enable or disable this aura. | +| **JSON Object**| **buff_queue** | Optional data to add if the aura should be applied to entities in a queue. | +| | **limit_concurrent_applications** | The number of entities to which the aura is applied per unit of time. | +| | **time_interval** | The time interval for applying the aura. | + +--- ### badger:auto_deconstruction @@ -1429,9 +1230,6 @@ Values used to tune the trigger points for auto deconstruction | Boolean| team_owned| true| If true, will not deconstruct as long as in range of at least 1 team member. If false, deconstructs based on distance to constructing player. | | Integer| warning_distance| | The minimum block distance at which the player receives a warning that their structures will be deconstructed | - - - ### badger:auto_despawn Makes this entity be despawned when its too far from any player. @@ -1440,9 +1238,6 @@ Makes this entity be despawned when its too far from any player. |:-----------:|:-----------:|:-----------:|:-----------:| | Integer| distance| | Distance from players at which this entity will despawn. | - - - ### badger:auto_fire Settings to determine how auto firing behaves. @@ -1457,9 +1252,6 @@ Settings to determine how auto firing behaves. | String| shots_molang_name| | The name of the molang variable representing the number of shots. | | Integer| total_shots| | number of shots to auto fire before needing to cool down. | - - - ### badger:auto_lure Controls if this spawner will automatically lure units on spawn/recall and which lures to apply @@ -1469,21 +1261,19 @@ Controls if this spawner will automatically lure units on spawn/recall and which | String| lure_action_id| | The action ID triggered on the player if the player does not already have an active lure of the defined archetype. This should be the action that spawns the desired lure on the player. | | String| lure_archetype| | The lure Archetype to apply when this spawner creates a unit (Between it and the player that triggered it) | - - - ### badger:auto_teleport Attributes required for auto teleport lured distant entities to their luring entities -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| Decimal| auto_teleport_distance| | The minimum distance between a lured entity and the luring entity for the lured entity to be auto teleported | -| Decimal| auto_teleport_offset_behind_camera| | The distance between the camera and the auto-teleport destination; this distance is in the opposite direction of the camera's orientation | -| JSON Object| auto_teleport_tag_filter| | The tag filter used to determine if a lured entity could potentially be auto-teleported

exclude_tags

The tags that a lured entity must not have for it to be potentially auto-teleported to its luring entity

include_tags

The tags that a lured entity must have for it to be potentially auto-teleported to its luring entity

| - - +| **Type** | **Name** | **Description** | +|----------------|----------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------| +| **Decimal** | **auto_teleport_distance** | Minimum distance required between a lured entity and the luring entity for the lured entity to be auto-teleported. | +| **Decimal** | **auto_teleport_offset_behind_camera** | Distance from the camera to the auto-teleport destination, measured in the opposite direction of the camera's orientation. | +| **JSON Object**| **auto_teleport_tag_filter** | Tag filter to determine if a lured entity is eligible for auto-teleportation. | +| | exclude_tags | Tags that a lured entity must not possess to be considered for auto-teleportation to its luring entity. | +| | include_tags | Tags that a lured entity must have to qualify for auto-teleportation to its luring entity. | +--- ### badger:background_loading @@ -1493,27 +1283,27 @@ Dictates how a village entity is loaded in the background. |:-----------:|:-----------:|:-----------:|:-----------:| | Integer| priority| | Villages with a lower priority value will be planned and loaded first. The default value is 0. | - - - ### badger:becomes_lost Signifies that this entity can become lost, and gives the configuration for the lost state -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| Array| alone_exclude_filters| | The list containing the data for what units can't be around this entity for it to be considered lost

alliance_rule_filter

The alliance rule filter for this type of unit

exclude_tags

The tags units must not have to be considered in this filter

exclusion_radius

The distance this type of unit must be from the entity for it to become lost

include_tags

The tags units must have to be considered in this filter

| -| String| lost_unit_pacing_buff_id| | The buff to put on the unit when it's pacing | -| Boolean| must_be_player_spawned| | Whether or not the unit must be player spawned to become lost | -| Decimal| pace_destination_radius| | The radius of destinations from the initial lost location that the unit will choose to pace to | -| Decimal| pace_frequency| | The frequency of (in average times per second) the unit will change direction when pacing | -| String| return_to_player_alliance_rule| | Alliance rule of who to return to | -| Decimal| time_alone_to_become_lost| | How long a unit has to be 'alone' (where alone is defined by the filter) before it is considered lost | -| Decimal| time_pacing_before_returning| | How long a lost unit paces before it returns to the nearest friendly player | -| Decimal| time_suspended_to_become_lost| | How long a unit has to be suspended before it is considered lost | - - - +| **Type** | **Name** | **Description** | +|----------------|-------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------| +| **Array** | **alone_exclude_filters** | A list of criteria specifying which units cannot be nearby for the entity to be considered lost. | +| | alliance_rule_filter | The alliance rule filter for this type of unit. | +| | exclude_tags | Tags that units must not have to be considered in this filter. | +| | exclusion_radius | The minimum distance that this type of unit must maintain from the entity to be considered lost. | +| | include_tags | Tags that units must have to be included in this filter. | +| **String** | **lost_unit_pacing_buff_id** | The buff applied to the unit when it is pacing. | +| **Boolean** | **must_be_player_spawned** | Indicates whether the unit must be spawned by the player to be considered lost. | +| **Decimal** | **pace_destination_radius** | The radius within which the unit will choose destinations to pace toward from the initial lost location. | +| **Decimal** | **pace_frequency** | The average frequency (in times per second) with which the unit changes direction while pacing. | +| **String** | **return_to_player_alliance_rule** | The alliance rule determining which player the unit will return to. | +| **Decimal** | **time_alone_to_become_lost** | The duration for which a unit must be 'alone' (as defined by the filter) before it is considered lost. | +| **Decimal** | **time_pacing_before_returning** | The duration a lost unit will pace before returning to the nearest friendly player. | +| **Decimal** | **time_suspended_to_become_lost** | The duration for which a unit must be suspended before it is considered lost. | + +--- ### badger:behavior_offline_traits @@ -1523,9 +1313,6 @@ The component allows behaviors to change offline trait phase on behaviour swaps. |:-----------:|:-----------:|:-----------:|:-----------:| | Enumerator| traits_phase| | Defines which offline phase will be applied by the behaviour swap. List of valid values: PRECONSTRUCTION, CONSTRUCTING, BUILT, DECONSTRUCTING, DISABLED | - - - ### badger:behavior_swap_interaction Enables the use of an interaction to trigger behavior swap. @@ -1534,9 +1321,6 @@ Enables the use of an interaction to trigger behavior swap. |:-----------:|:-----------:|:-----------:|:-----------:| | String| behavior| | The behavior name to swap to upon interacting | - - - ### badger:block_conversion Converts any listed blocks to a modified version @@ -1549,19 +1333,20 @@ Converts any listed blocks to a modified version | JSON Object| modifiers| | Key value pairs that describe which keywords should be replaced with other strings in block names | | Boolean| top_to_bottom| | Changes the order of block conversion to top to bottom | - - - ### badger:block_damage states what is required to place a buildable. -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| List| phases| | Array of damage phase descriptions.

damage_level

from 0.0 the normalized damage level to apply phase.

max_clamp

normalized lowest position that gets min damage.

max_damage

max damage level.

min_clamp

normalized highest position that gets max damage.

min_damage

min damage level.

| - - +| **Type** | **Name** | **Description** | +|----------|------------|------------------------------------------------------------------------------------------------------------------------| +| **List** | **phases** | An array of damage phase descriptions, each containing the following properties: | +| | damage_level | The normalized damage level applied to the phase, ranging from 0.0 (no damage) to the maximum defined damage. | +| | max_clamp | The normalized position that represents the minimum damage applied. | +| | max_damage | The maximum damage level that can be applied during this phase. | +| | min_clamp | The normalized position that represents the maximum damage applied. | +| | min_damage | The minimum damage level that can be applied during this phase. | +--- ### badger:block_reversal @@ -1571,9 +1356,6 @@ Reverts any changed blocks to the original version |:-----------:|:-----------:|:-----------:|:-----------:| | Decimal| duration_percentage| | What percentage of the time this block revert process should take | - - - ### badger:bsharp_interact_cost states what is required to perform a B# interaction with this entity. @@ -1583,9 +1365,6 @@ states what is required to perform a B# interaction with this entity. | Array| resource_cost| | An array of items and amounts. | | Array| unlock| | These are the unlocks needed to use this interaction. An array of items with an amount. | - - - ### badger:bsharp_lifetime Defines which global variable controls the lifetime of an entity. @@ -1595,9 +1374,6 @@ Defines which global variable controls the lifetime of an entity. | Integer| value| | Defines the value of the global variable that causes the entity to despawn. | | String| variable| | Defines name of the bSharp global variable. | - - - ### badger:bsharp_teleport_presentation Defines the entity's presentation event for teleportation. @@ -1608,9 +1384,6 @@ Defines the entity's presentation event for teleportation. | String| engaged_event| | The name of the presentation event fired before/during the entity's teleportation | | Decimal| windup_time| | The time, in seconds, the entity waits after it and the teleport engaged presentation event is triggered before teleporting. | - - - ### badger:buff Defines a buff @@ -1622,9 +1395,6 @@ Defines a buff | Array| ingredients| | The resources which will be spent / consumed to apply this buff. A buff must have costs to be placeable on a slotted buff applicator. | | Boolean| propagates_to_projectiles| | Whether this buff is propagated to projectiles created by the entity this buff is applied on. | - - - ### badger:build_speed_change_on_damage Temporarily change the build speed of a buildable structure when being damaged @@ -1634,9 +1404,6 @@ Temporarily change the build speed of a buildable structure when being damaged | Decimal| build_speed_multiplier| | the multiplier that will be used to adjust the build speed | | Integer| duration| | the time in seconds for which the adjustment will be applied | - - - ### badger:buildable_controller_spawner will spawn Mobs from components position. @@ -1660,19 +1427,22 @@ will spawn Mobs from components position. | String| variable_name| | The Gobal B-Sharp Variable to Watch | | Integer| weight| | The weight to pick this choice | - - - ### badger:buildable_creation_influence_source Provides a list of sources of additive or substractive influence upon building creation for this AI. -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| List| sensors| | List of building creation sources.

building_start_or_complete

Designate whether building creation will be tracked at the start or completion of the placement

damage_receiver_filter

Track particular types of structures

alliance_rule_filter

Team Alliance rules for this tracking

exclude_tags

Excule tags for building structures

include_tags

Include tags for building structures

multiplier

The weight of the heat stamp for this building creation source

propagation_decay

The propagation/spread decay of the heat stamp for this building creation source

| - - +| **Type** | **Name** | **Description** | +|----------------|-------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **List** | **sensors** | List of building creation sources. | +| | **building_start_or_complete** | Designate whether building creation will be tracked at the start or upon completion of placement. | +| | **damage_receiver_filter** | Specify particular types of structures to track based on damage received. | +| | **alliance_rule_filter** | Define team alliance rules for tracking. | +| | **exclude_tags** | Tags to exclude for building structures. | +| | **include_tags** | Tags to include for building structures. | +| | **multiplier** | The weight of the heat stamp for this building creation source, affecting how significant the heat impact is. | +| | **propagation_decay** | The propagation or spread decay of the heat stamp for this building creation source, determining how quickly the heat impact diminishes over time. | +--- ### badger:buildable_destruction @@ -1682,19 +1452,21 @@ states what is required to animate a building's destruction. |:-----------:|:-----------:|:-----------:|:-----------:| | String| particle_effect| | The name of the particle effect that will be played when the structure is removed. | - - - ### badger:buildable_destruction_influence_source Provides a list of sources of additive or substractive influence upon building destruction for this AI. -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| List| sensors| | List of building creation sources.

damage_receiver_filter

Track particular types of structures

alliance_rule_filter

Team Alliance rules for this tracking

exclude_tags

Excule tags for building structures

include_tags

Include tags for building structures

multiplier

The weight of the heat stamp for this building destruction source

propagation_decay

The propagation/spread decay of the heat stamp for this building destruction source

| - - +| **Type** | **Name** | **Description** | +|----------|--------------------------------|-----------------------------------------------------------------------------------------------------------------------| +| **List** | **sensors** | List of building creation sources. | +| | damage_receiver_filter | Tracks particular types of structures. | +| | alliance_rule_filter | Defines team alliance rules for tracking. | +| | exclude_tags | Tags to exclude for building structures. | +| | include_tags | Tags to include for building structures. | +| | multiplier | The weight of the heat stamp for this building destruction source. | +| | propagation_decay | The decay rate of the propagation/spread of the heat stamp for this building destruction source. | +--- ### badger:buildable_foundation @@ -1710,9 +1482,6 @@ Dictates what to place as the foundation. | String| placement_rule| | The rule that dictates when to place this foundation: always, instant_only | | String| style| | Style of foundation to generate: inverted_pyramid, pillar, bowl, dome, supports | - - - ### badger:buildable_health_generation Parameters used to calculate the normalized initial health of structures upon initial constructing. @@ -1721,15 +1490,10 @@ Parameters used to calculate the normalized initial health of structures upon in |:-----------:|:-----------:|:-----------:|:-----------:| | Decimal| initial_health_percentage| | The initial health of the entity normalized. Calculated by a percent of their max health | - - - ### badger:buildable_intangible When applied to a buildable, it prevents it from blocking the placement of other buildings. - - ### badger:buildable_presentation Structure information to display in the UI. @@ -1749,33 +1513,30 @@ Structure information to display in the UI. | String| tooltip_description| | The structure tooltip description to display in the UI. | | String| tooltip_title| | The structure tooltip title to display in the UI. | - - - ### badger:buildable_replaceable Flag Attribute that indicates if the structure can be replaced by other structures - - ### badger:buildable_requirement states what is required to place a buildable. -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| JSON Object| blocker_entities| | The entities that cannot be colliding with this structure for it to be built

alliance_rule_filter

Alliance filter rule

exclude_tags

List of blocker exclude filters

include_tags

List of blocker include filters

| -| String| exclusive_zone_alliance_rule| | exclusive zone alliance rule | -| Boolean| invalid_block_snaptoground| | When checking for invalid blocks, should we snap to the ground blocks below the building | -| Array| invalid_block_tags| | List of all the block tag types that this buildable can not be placed on. | -| Array| invalid_blocks| | The name (dirt/air/water/lava..etc) of block types that a structure cannot be built upon | -| Array| recipe| | An array of items and amounts. | -| Array| ticket_cost| | An array of tickets and amounts. | -| Array| unlock| | These are the items needed to unlock certain buildings. An array of items with an amount. | -| String| zone_alliance_rule| | Alliance rule filter on what zone this can be placed in - any_team, enemy, friendly, etc. | - - - +| **Type** | **Name** | **Description** | +|----------------|-----------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------| +| **JSON Object**| **blocker_entities** | The entities that must not collide with this structure for it to be built. | +| | alliance_rule_filter | Alliance filter rule that applies to this structure. | +| | exclude_tags | List of tags for entities that are excluded from colliding with this structure. | +| | include_tags | List of tags for entities that are included as blockers for this structure. | +| **String** | **exclusive_zone_alliance_rule** | Alliance rule that defines the restrictions for this exclusive zone. | +| **Boolean** | **invalid_block_snaptoground** | Determines whether to snap to ground blocks below the building when checking for invalid blocks. | +| **Array** | **invalid_block_tags** | List of block tag types that this buildable cannot be placed on. | +| **Array** | **invalid_blocks** | List of block types (e.g., dirt, air, water, lava) that this structure cannot be built upon. | +| **Array** | **recipe** | An array of items and their corresponding amounts needed for crafting this structure. | +| **Array** | **ticket_cost** | An array representing the cost in tickets and their respective amounts required for this structure. | +| **Array** | **unlock** | List of items and amounts required to unlock certain buildings. | +| **String** | **zone_alliance_rule** | Alliance rule filter that determines the zones in which this structure can be placed (e.g., any_team, enemy, friendly, etc.). | + +--- ### badger:buildable_snap_point @@ -1785,35 +1546,26 @@ When applied to a buildable, it flags it as being a position snapping target for |:-----------:|:-----------:|:-----------:|:-----------:| | Integer| top_snap_offset| | This adjusts the height which previews snap to, when they snap to the top of this structure. | - - - ### badger:buildable_spawner will spawn Mobs from components position. -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| Integer| batch| | Batch count | -| JSON Object| batch_size_phase| | Batch size phases definitions.

continuous_spawn_timeout

Maximum number of seconds between two spawns events for them to be considered continuous spawn events.

phases

Array of spawner batch size phases definitions.

batch_size

Batch size that spawner will use when its continuous spawns exceed the corresponding threshold.

threshold

Number of continuous spawn events required for spawner to apply corresponding batch size.

| -| Integer| cap| | Max mobs spawned that are still alive. -1 indicates there is no cap | -| Boolean| disable_pop_cap_culling| | When true, mobs spawned by this spawner cannot be despawned by the pop cap system. | -| Boolean| disable_wander| | When true, mobs spawned by this spawner will have wandering disabled. | -| Boolean| enable_recall| | When true, mobs spawned by this spawner will be able to be recalled. | -| Boolean| has_spawn_cost| | Setting this to true will make the spawner test the spawners' resource list if it can afford the cost of spawning the mobs. | -| Integer| max_height_difference| | Maximum height difference between spawned unit location and spawner location. | -| Decimal| max_radius| | Max radius within which mobs will be spawned. | -| Decimal| min_radius| | Min radius within which mobs will not be spawned. | -| Vector [a, b, c]| offset| | Offset to spawn the entities at relative to the spawner. Only used when no spawn position is set on the structure. | -| Decimal| rate| | Rate of mobs spawned in seconds. | -| Boolean| requires_input| | Setting this to true will require an input from the player to spawn mobs. | -| Decimal| spawn_delay| | Delay after the spawn trigger that the mobs will be spawned in seconds. | -| String| spawning_trigger| | Spawning trigger tag | -| String| type| | Name of the type of mob. | -| Array| types| | List of mob type names | - - - +| **Type** | **Name** | **Description** | +|----------------|-----------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------| +| **JSON Object**| **blocker_entities** | The entities that must not collide with this structure for it to be built. | +| | alliance_rule_filter | Alliance filter rule that applies to this structure. | +| | exclude_tags | List of tags for entities that are excluded from colliding with this structure. | +| | include_tags | List of tags for entities that are included as blockers for this structure. | +| **String** | **exclusive_zone_alliance_rule** | Alliance rule that defines the restrictions for this exclusive zone. | +| **Boolean** | **invalid_block_snaptoground** | Determines whether to snap to ground blocks below the building when checking for invalid blocks. | +| **Array** | **invalid_block_tags** | List of block tag types that this buildable cannot be placed on. | +| **Array** | **invalid_blocks** | List of block types (e.g., dirt, air, water, lava) that this structure cannot be built upon. | +| **Array** | **recipe** | An array of items and their corresponding amounts needed for crafting this structure. | +| **Array** | **ticket_cost** | An array representing the cost in tickets and their respective amounts required for this structure. | +| **Array** | **unlock** | List of items and amounts required to unlock certain buildings. | +| **String** | **zone_alliance_rule** | Alliance rule filter that determines the zones in which this structure can be placed (e.g., any_team, enemy, friendly, etc.). | + +--- ### badger:buildable_structure @@ -1829,9 +1581,6 @@ Dictates what to place as the structure. | String| nbt_file| | Name of the nbt file to place as the structure. | | Boolean| silence_destroyed_trigger_when_killed| | Whether the on_building_destroyed trigger should be silenced when the building is killed. | - - - ### badger:campaign_team Some general attributes that describe a faction. @@ -1840,21 +1589,14 @@ Some general attributes that describe a faction. |:-----------:|:-----------:|:-----------:|:-----------:| | String| team_tag| | Name of the team to put this entity on. | - - - ### badger:causes_fear Defines this entity as a status effect that causes its target to fear the status inflictor. - - ### badger:chunk_reload_indestructible_flag Used to exclude a buildable from a destructive world reload - - ### badger:cinematic_death The entity should play a cinematic on death. This encodes which cinematic plays. Note there is a 60 second failsafe to ensure the entity dies. @@ -1863,15 +1605,10 @@ The entity should play a cinematic on death. This encodes which cinematic plays. |:-----------:|:-----------:|:-----------:|:-----------:| | List| cine_id| | The IDs of the cinematic that plays when this entity dies. | - - - ### badger:claimed_area_excluded For entities that should always be excluded from ClaimedAreaSystem. This is only in regards to bases being assigned to claimed areas. - - ### badger:clear_from_zone_of_control Flags this entity to be removed if it overlaps with a Zone of Control of an entity that passes the tag filter @@ -1882,9 +1619,6 @@ Flags this entity to be removed if it overlaps with a Zone of Control of an enti | Array| filter_tag_set| | Tags that filters out entities with ZOC | | Array| include_tags| | The tags to be included in when filtering | - - - ### badger:collision_weight Defines the weight of an entity. @@ -1893,9 +1627,6 @@ Defines the weight of an entity. |:-----------:|:-----------:|:-----------:|:-----------:| | Decimal| weight| | Defines weight of this entity for the purposes of collision with other entities. | - - - ### badger:conditionally_solid_blocks Defines which extra blocks will be considered solid during pathfinding & collision checks. @@ -1905,9 +1636,6 @@ Defines which extra blocks will be considered solid during pathfinding & collisi | Array| exclude_tags| | Defines the exclude set of block tags to consider conditionally solid. | | Array| include_tags| | Defines the include set of block tags to consider conditionally solid. | - - - ### badger:conflict_config Configuration data if this entity has special overrides when managed by a conflict coordinator. @@ -1916,9 +1644,6 @@ Configuration data if this entity has special overrides when managed by a confli |:-----------:|:-----------:|:-----------:|:-----------:| | String| invulnerable_behavior| | Behaviour to use when this entity is invulnerable via a conflict coordinator. Reverted to default when vulnerable. | - - - ### badger:conflict_coordinator Declares a (spawn controller) entity to be a conflict coordinator, prolonging spawned mob conflict until player interaction. @@ -1928,26 +1653,26 @@ Declares a (spawn controller) entity to be a conflict coordinator, prolonging sp | String| activated_tag| | Tag added/removed from the coordinator when activated. | | Decimal| player_engagement_distance| | Distance from the coordinator a player needs to be, to be considered as engaged. | - - - ### badger:core_resource_consumer Dictates resource consumer behaviour. -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| | Array| | force_gather_non_surface_blocks_list | -| Boolean| always_gather_damaged| | Will always gather damaged blocks no matter the material if true | -| Array| material_category| | List of Material categories | -| Boolean| only_gather_surface| | Will only gather blocks with no solid blocks on top | -| String| replacement_block| | The name of the block to replace a gathered resource with | -| Array| special_replacements| | A map of 'initial' block names to 'replacement' block names to replace specific gathered resources with

initial

The block type you want to change

replacement

The block type you want to change to

| -| Integer| step_height| | The height of the step in blocks | -| Integer| step_width| | The width of the step in blocks | - - - +| **Type** | **Name** | **Description** | +|----------------|-----------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------| +| **JSON Object**| **blocker_entities** | The entities that must not collide with this structure for it to be built. | +| | alliance_rule_filter | Alliance filter rule that applies to this structure. | +| | exclude_tags | List of tags for entities that are excluded from colliding with this structure. | +| | include_tags | List of tags for entities that are included as blockers for this structure. | +| **String** | **exclusive_zone_alliance_rule** | Alliance rule that defines the restrictions for this exclusive zone. | +| **Boolean** | **invalid_block_snaptoground** | Determines whether to snap to ground blocks below the building when checking for invalid blocks. | +| **Array** | **invalid_block_tags** | List of block tag types that this buildable cannot be placed on. | +| **Array** | **invalid_blocks** | List of block types (e.g., dirt, air, water, lava) that this structure cannot be built upon. | +| **Array** | **recipe** | An array of items and their corresponding amounts needed for crafting this structure. | +| **Array** | **ticket_cost** | An array representing the cost in tickets and their respective amounts required for this structure. | +| **Array** | **unlock** | List of items and amounts required to unlock certain buildings. | +| **String** | **zone_alliance_rule** | Alliance rule filter that determines the zones in which this structure can be placed (e.g., any_team, enemy, friendly, etc.). | + +--- ### badger:counterattacker @@ -1957,9 +1682,6 @@ Defines counterattacks that are performed when the entity is attacked by others. |:-----------:|:-----------:|:-----------:|:-----------:| | List| counterattacks| | List of counterattacks. | - - - ### badger:culture Base culture values for entity @@ -1971,9 +1693,6 @@ Base culture values for entity | Decimal| base_culture_c| | Base culture Score_A value intended for scoring buildings. Todo: Can later be improved to do dynamic culture modifiers based on upgrades. | | Boolean| is_hq| | Does this culture count as an HQ (used for determining new buildings culture type, for now) | - - - ### badger:culture_status Data related to the accumulation of culture. @@ -1985,31 +1704,38 @@ Data related to the accumulation of culture. | Integer| thresholdC| | Reward threshold for culture value C. | | Array| thresholds| | Array of culture reward thresholds. | - - - ### badger:damage_influence_source Provides a list of sources of additive or substractive damage influence for this AI. -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| List| sensors| | List of damage sources.

damage_receiver_filter

Track particular types of units/structures

alliance_rule_filter

Team Alliance rules for this tracking

exclude_tags

Excule tags for damage receiver units

include_tags

Include tags for damage receiver units

damage_type_filter

Track particular types of damage

exclude_any

Exclude tags of damage

include_all

Include tags of damage

inflictor_or_receiver_position

Designate whether damage will be tracked at the inflictor or receiver position

multiplier

The weight of the heat stamp for this damage source

propagation_decay

The propagation/spread decay of the heat stamp for this damage source

| - - - +| **Type** | **Name** | **Description** | +|----------------|-------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------| +| **List** | **sensors** | A collection of damage sources with specific filters and settings. | +| | **damage_receiver_filter** | Tracks particular types of units or structures that receive damage. | +| | **alliance_rule_filter** | Specifies team alliance rules for tracking damage sources. | +| | **exclude_tags** | Tags for units that should be excluded from receiving damage. | +| | **include_tags** | Tags for units that should be included in damage tracking. | +| | **damage_type_filter** | Tracks specific types of damage relevant to the sensors. | +| | **exclude_any** | Excludes any tags of damage from being considered. | +| | **include_all** | Includes all tags of damage for tracking purposes. | +| | **inflictor_or_receiver_position** | Designates whether the tracking occurs at the inflictor (source of damage) or receiver (recipient of damage) position. | +| | **multiplier** | The weight or intensity of the heat stamp applied to this damage source. | +| | **propagation_decay** | The rate at which the heat stamp decays or spreads over time for this damage source. | + +--- ### badger:damage_over_time Makes a status effect apply damage over time to its host. -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| JSON Object| damage| | Damage data applied by this effect.

damage_amount

Amount of damage

damage_types

List of damage type names (strings).

| -| Decimal| interval| | Defines the time interval in secods at which damage is applied | - - +| **Type** | **Name** | **Description** | +|----------------|------------------|-----------------------------------------------------------------------------------------------------| +| **JSON Object**| **damage** | Contains the damage data applied by this effect. | +| | damage_amount | Specifies the amount of damage inflicted. | +| | damage_types | A list of damage type names, represented as strings. | +| **Decimal** | **interval** | Defines the time interval, in seconds, at which damage is applied. | +--- ### badger:damage_receiver @@ -2022,9 +1748,6 @@ Allows entities to be damaged by attacks. | JSON Object| damage_resistances| | Specifies the damage resistance values | | String| shape| | Defines the shape of the damage receiver (the shape tested as the recipient for damage during an attack) to be used for collision against damage applicators (weapons' collision shapes). | - - - ### badger:damage_receiver_material Defines the material tag to use when an entity is hit with an action. @@ -2033,21 +1756,14 @@ Defines the material tag to use when an entity is hit with an action. |:-----------:|:-----------:|:-----------:|:-----------:| | String| material| | Defines the material to be used for presentation events when this entity is hit by an appropriate damage applicator. | - - - ### badger:damage_source_telemetry_tracker Determines whether or not the latest damage source is tracked for telemetry by this entity - - ### badger:death_telemetry_tracking Defines the settings used when tracking telemetry for killed entities. - - ### badger:deconstruction Scalar values to tune the amount of resources refunded and the time to deconstruct structures @@ -2062,9 +1778,6 @@ Scalar values to tune the amount of resources refunded and the time to deconstru | Array| ticket_cost| | The list of tickets required to apply this deconstruction action. | | Array| unlock| | The list of unlocks required to apply this deconstruction action. | - - - ### badger:delayed_jump An entity with this component is able to jump after leaving the group for a set amount of time. @@ -2073,9 +1786,6 @@ An entity with this component is able to jump after leaving the group for a set |:-----------:|:-----------:|:-----------:|:-----------:| | Decimal| delay_time| | The time that the player will still be able to jump after no longer touching the ground. | - - - ### badger:destroy_on_village_destruction Determines if this entity has custom destruction behaviour when its owner village is destroyed. @@ -2085,9 +1795,6 @@ Determines if this entity has custom destruction behaviour when its owner villag | Boolean| group| | The special destruction behaviour to use (eg. staggered destruction). Correlates to what is defined in badger:village_heart_destruction on the village entity. | | Boolean| ignore| false| If this entity should not be destroyed when the village is destroyed. | - - - ### badger:destruction_vfx Customized VFX behaviour upon being destroyed. @@ -2096,246 +1803,612 @@ Customized VFX behaviour upon being destroyed. |:-----------:|:-----------:|:-----------:|:-----------:| | Boolean| always_play_vfx| | Whether or not to force the destruction VFX. | +### `badger:difficulty_modifier_accuracy_min_range` & `badger:difficulty_modifier_accuracy_max_range` +Modifiers for min and max accuracy range based on difficulty. +**Custom Game Settings**: -### badger:difficulty_modifier_accuracy_max_range +| **Type** | **Name** | **Description** | +|----------------|------------------------------|------------------------------------------------------------------------------------------------------------------| +| **JSON Object**| **custom_game_settings** | Defines which custom game settings impact this numeric modifier. | +| | **numeric_modifier_type** | Type of modifier for the named custom game setting. Valid values include: `pre_multiply`, `pre_add`, `pre_subtract`, `pre_divide`, and their corresponding `post_` counterparts. Multiple settings with the same modifier will stack. | +| | **scaling_factor** | Multiplier that adjusts how much the custom game setting affects this numeric modifier. The formula used is: `((CustomGameSettingValue - 1.0) * ScalingFactor) + 1.0`. Useful for scaling modifiers differently. | +| | **setting_name** | Name of the custom game setting to read from. | -Modifiers for max accuracy range based on difficulty +--- -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| JSON Object| custom_game_settings| | Defines what custom game settings affect this numeric modifier.

numeric_modifier_type

What type of modifier the named custom game setting will apply on this entity. Valid values are pre_multiply, pre_add, pre_subtract, pre_divide, and their corresponding 'post_' counterparts. The effects of multiple game settings set to the same modifier WILL stack.

scaling_factor

A multiplier that changes how much the custom game setting will affect this numeric modifier. This is useful for when multiple numeric modifiers need to use the same custom game setting, but scale with it differently. The formula for this is: '((CustomGameSettingValue - 1.0) * ScalingFactor) + 1.0'

setting_name

Name of the custom game setting to read from.

| -| JSON Object| difficulties| | The settings for each difficulty.

Custom

Custom difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

wave_post_multiply

Multiplied with the Wave Level then added after all other modifier values. Only applied if WAVE_SCALING_DIFFICULTY game rule is true

Easy

Easy difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

wave_post_multiply

Multiplied with the Wave Level then added after all other modifier values. Only applied if WAVE_SCALING_DIFFICULTY game rule is true

Hard

Hard difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

wave_post_multiply

Multiplied with the Wave Level then added after all other modifier values. Only applied if WAVE_SCALING_DIFFICULTY game rule is true

Normal

Normal difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

wave_post_multiply

Multiplied with the Wave Level then added after all other modifier values. Only applied if WAVE_SCALING_DIFFICULTY game rule is true

Peaceful

Peaceful difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

wave_post_multiply

Multiplied with the Wave Level then added after all other modifier values. Only applied if WAVE_SCALING_DIFFICULTY game rule is true

| +**Difficulty Settings**: +| **Type** | **Difficulty** | **Modifiers** | +|----------------|------------------|------------------------------------------------------------------------------------------------------------------------| +| **JSON Object**| **difficulties** | Settings for each difficulty level. | +| | **Custom** | Custom difficulty modifiers. | +| | **Easy** | Easy difficulty modifiers. | +| | **Normal** | Normal difficulty modifiers. | +| | **Hard** | Hard difficulty modifiers. | +| | **Peaceful** | Peaceful difficulty modifiers. | +For each difficulty, the following modifiers are applicable: +| **Modifier** | **Description** | +|--------------------------|---------------------------------------------------------------------------------| +| **post_add** | Amount added after all other modifier values. | +| **post_multiply** | Percentage multiplied after all pre-modifier values are applied. | +| **pre_add** | Amount added after pre-multiply values, but before any other modifiers. | +| **pre_multiply** | Percentage multiplied before any other modifier values are applied. | +| **wave_post_multiply** | Multiplied by the Wave Level, then added after all other modifiers. Applied only if the `WAVE_SCALING_DIFFICULTY` game rule is true. | -### badger:difficulty_modifier_accuracy_min_range +--- -Modifiers for min accuracy range based on difficulty +### badger:difficulty_modifier_build_speed -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| JSON Object| custom_game_settings| | Defines what custom game settings affect this numeric modifier.

numeric_modifier_type

What type of modifier the named custom game setting will apply on this entity. Valid values are pre_multiply, pre_add, pre_subtract, pre_divide, and their corresponding 'post_' counterparts. The effects of multiple game settings set to the same modifier WILL stack.

scaling_factor

A multiplier that changes how much the custom game setting will affect this numeric modifier. This is useful for when multiple numeric modifiers need to use the same custom game setting, but scale with it differently. The formula for this is: '((CustomGameSettingValue - 1.0) * ScalingFactor) + 1.0'

setting_name

Name of the custom game setting to read from.

| -| JSON Object| difficulties| | The settings for each difficulty.

Custom

Custom difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

wave_post_multiply

Multiplied with the Wave Level then added after all other modifier values. Only applied if WAVE_SCALING_DIFFICULTY game rule is true

Easy

Easy difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

wave_post_multiply

Multiplied with the Wave Level then added after all other modifier values. Only applied if WAVE_SCALING_DIFFICULTY game rule is true

Hard

Hard difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

wave_post_multiply

Multiplied with the Wave Level then added after all other modifier values. Only applied if WAVE_SCALING_DIFFICULTY game rule is true

Normal

Normal difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

wave_post_multiply

Multiplied with the Wave Level then added after all other modifier values. Only applied if WAVE_SCALING_DIFFICULTY game rule is true

Peaceful

Peaceful difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

wave_post_multiply

Multiplied with the Wave Level then added after all other modifier values. Only applied if WAVE_SCALING_DIFFICULTY game rule is true

| +Modifiers for build speed based on difficulty and custom game options +**Custom Game Settings**: +| **Type** | **Name** | **Description** | +|----------------|------------------------------|------------------------------------------------------------------------------------------------------------------| +| **JSON Object**| **custom_game_settings** | Defines which custom game settings impact this numeric modifier. | +| | **numeric_modifier_type** | Type of modifier for the named custom game setting. Valid values include: `pre_multiply`, `pre_add`, `pre_subtract`, `pre_divide`, and their corresponding `post_` counterparts. Multiple settings with the same modifier will stack. | +| | **scaling_factor** | Multiplier that adjusts how much the custom game setting affects this numeric modifier. The formula used is: `((CustomGameSettingValue - 1.0) * ScalingFactor) + 1.0`. Useful for scaling modifiers differently. | +| | **setting_name** | Name of the custom game setting to read from. | +--- -### badger:difficulty_modifier_build_speed - -Modifiers for build speed based on difficulty and custom game options +**Difficulty Settings**: -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| JSON Object| custom_game_settings| | Defines what custom game settings affect this numeric modifier.

numeric_modifier_type

What type of modifier the named custom game setting will apply on this entity. Valid values are pre_multiply, pre_add, pre_subtract, pre_divide, and their corresponding 'post_' counterparts. The effects of multiple game settings set to the same modifier WILL stack.

scaling_factor

A multiplier that changes how much the custom game setting will affect this numeric modifier. This is useful for when multiple numeric modifiers need to use the same custom game setting, but scale with it differently. The formula for this is: '((CustomGameSettingValue - 1.0) * ScalingFactor) + 1.0'

setting_name

Name of the custom game setting to read from.

| -| JSON Object| difficulties| | The settings for each difficulty.

Custom

Custom difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

Easy

Easy difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

Hard

Hard difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

Normal

Normal difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

Peaceful

Peaceful difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

| +| **Type** | **Difficulty** | **Modifiers** | +|----------------|------------------|------------------------------------------------------------------------------------------------------------------------| +| **JSON Object**| **difficulties** | Settings for each difficulty level. | +| | **Custom** | Custom difficulty modifiers. | +| | **Easy** | Easy difficulty modifiers. | +| | **Normal** | Normal difficulty modifiers. | +| | **Hard** | Hard difficulty modifiers. | +| | **Peaceful** | Peaceful difficulty modifiers. | +For each difficulty, the following modifiers are applicable: +| **Modifier** | **Description** | +|--------------------------|---------------------------------------------------------------------------------| +| **post_add** | Amount added after all other modifier values. | +| **post_multiply** | Percentage multiplied after all pre-modifier values are applied. | +| **pre_add** | Amount added after pre-multiply values, but before any other modifiers. | +| **pre_multiply** | Percentage multiplied before any other modifier values are applied. | +--- ### badger:difficulty_modifier_building_cost Modifier for building costs based on difficulty or custom game setting. -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| JSON Object| custom_game_settings| | Defines what custom game settings affect this numeric modifier.

numeric_modifier_type

What type of modifier the named custom game setting will apply on this entity. Valid values are pre_multiply, pre_add, pre_subtract, pre_divide, and their corresponding 'post_' counterparts. The effects of multiple game settings set to the same modifier WILL stack.

scaling_factor

A multiplier that changes how much the custom game setting will affect this numeric modifier. This is useful for when multiple numeric modifiers need to use the same custom game setting, but scale with it differently. The formula for this is: '((CustomGameSettingValue - 1.0) * ScalingFactor) + 1.0'

setting_name

Name of the custom game setting to read from.

| -| JSON Object| difficulties| | The settings for each difficulty.

Custom

Custom difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

Easy

Easy difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

Hard

Hard difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

Normal

Normal difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

Peaceful

Peaceful difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

| +**Custom Game Settings**: + +| **Type** | **Name** | **Description** | +|----------------|------------------------------|------------------------------------------------------------------------------------------------------------------| +| **JSON Object**| **custom_game_settings** | Defines which custom game settings impact this numeric modifier. | +| | **numeric_modifier_type** | Type of modifier for the named custom game setting. Valid values include: `pre_multiply`, `pre_add`, `pre_subtract`, `pre_divide`, and their corresponding `post_` counterparts. Multiple settings with the same modifier will stack. | +| | **scaling_factor** | Multiplier that adjusts how much the custom game setting affects this numeric modifier. The formula used is: `((CustomGameSettingValue - 1.0) * ScalingFactor) + 1.0`. Useful for scaling modifiers differently. | +| | **setting_name** | Name of the custom game setting to read from. | +--- +**Difficulty Settings**: +| **Type** | **Difficulty** | **Modifiers** | +|----------------|------------------|------------------------------------------------------------------------------------------------------------------------| +| **JSON Object**| **difficulties** | Settings for each difficulty level. | +| | **Custom** | Custom difficulty modifiers. | +| | **Easy** | Easy difficulty modifiers. | +| | **Normal** | Normal difficulty modifiers. | +| | **Hard** | Hard difficulty modifiers. | +| | **Peaceful** | Peaceful difficulty modifiers. | + +For each difficulty, the following modifiers are applicable: + +| **Modifier** | **Description** | +|--------------------------|---------------------------------------------------------------------------------| +| **post_add** | Amount added after all other modifier values. | +| **post_multiply** | Percentage multiplied after all pre-modifier values are applied. | +| **pre_add** | Amount added after pre-multiply values, but before any other modifiers. | +| **pre_multiply** | Percentage multiplied before any other modifier values are applied. | + +--- ### badger:difficulty_modifier_damage Modifiers for damage based on difficulty -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| JSON Object| custom_game_settings| | Defines what custom game settings affect this numeric modifier.

numeric_modifier_type

What type of modifier the named custom game setting will apply on this entity. Valid values are pre_multiply, pre_add, pre_subtract, pre_divide, and their corresponding 'post_' counterparts. The effects of multiple game settings set to the same modifier WILL stack.

scaling_factor

A multiplier that changes how much the custom game setting will affect this numeric modifier. This is useful for when multiple numeric modifiers need to use the same custom game setting, but scale with it differently. The formula for this is: '((CustomGameSettingValue - 1.0) * ScalingFactor) + 1.0'

setting_name

Name of the custom game setting to read from.

| -| JSON Object| difficulties| | The settings for each difficulty.

Custom

Custom difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

wave_post_multiply

Multiplied with the Wave Level then added after all other modifier values. Only applied if WAVE_SCALING_DIFFICULTY game rule is true

Easy

Easy difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

wave_post_multiply

Multiplied with the Wave Level then added after all other modifier values. Only applied if WAVE_SCALING_DIFFICULTY game rule is true

Hard

Hard difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

wave_post_multiply

Multiplied with the Wave Level then added after all other modifier values. Only applied if WAVE_SCALING_DIFFICULTY game rule is true

Normal

Normal difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

wave_post_multiply

Multiplied with the Wave Level then added after all other modifier values. Only applied if WAVE_SCALING_DIFFICULTY game rule is true

Peaceful

Peaceful difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

wave_post_multiply

Multiplied with the Wave Level then added after all other modifier values. Only applied if WAVE_SCALING_DIFFICULTY game rule is true

| +**Custom Game Settings**: + +| **Type** | **Name** | **Description** | +|----------------|------------------------------|------------------------------------------------------------------------------------------------------------------| +| **JSON Object**| **custom_game_settings** | Defines which custom game settings impact this numeric modifier. | +| | **numeric_modifier_type** | Type of modifier for the named custom game setting. Valid values include: `pre_multiply`, `pre_add`, `pre_subtract`, `pre_divide`, and their corresponding `post_` counterparts. Multiple settings with the same modifier will stack. | +| | **scaling_factor** | Multiplier that adjusts how much the custom game setting affects this numeric modifier. The formula used is: `((CustomGameSettingValue - 1.0) * ScalingFactor) + 1.0`. Useful for scaling modifiers differently. | +| | **setting_name** | Name of the custom game setting to read from. | + +--- +**Difficulty Settings**: +| **Type** | **Difficulty** | **Modifiers** | +|----------------|------------------|------------------------------------------------------------------------------------------------------------------------| +| **JSON Object**| **difficulties** | Settings for each difficulty level. | +| | **Custom** | Custom difficulty modifiers. | +| | **Easy** | Easy difficulty modifiers. | +| | **Normal** | Normal difficulty modifiers. | +| | **Hard** | Hard difficulty modifiers. | +| | **Peaceful** | Peaceful difficulty modifiers. | +For each difficulty, the following modifiers are applicable: + +| **Modifier** | **Description** | +|--------------------------|---------------------------------------------------------------------------------| +| **post_add** | Amount added after all other modifier values. | +| **post_multiply** | Percentage multiplied after all pre-modifier values are applied. | +| **pre_add** | Amount added after pre-multiply values, but before any other modifiers. | +| **pre_multiply** | Percentage multiplied before any other modifier values are applied. | +| **wave_post_multiply** | Multiplied by the Wave Level, then added after all other modifiers. Applied only if the `WAVE_SCALING_DIFFICULTY` game rule is true. | + +--- ### badger:difficulty_modifier_fall_damage Modifiers for fall damage on difficulty and custom game option -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| JSON Object| custom_game_settings| | Defines what custom game settings affect this numeric modifier.

numeric_modifier_type

What type of modifier the named custom game setting will apply on this entity. Valid values are pre_multiply, pre_add, pre_subtract, pre_divide, and their corresponding 'post_' counterparts. The effects of multiple game settings set to the same modifier WILL stack.

scaling_factor

A multiplier that changes how much the custom game setting will affect this numeric modifier. This is useful for when multiple numeric modifiers need to use the same custom game setting, but scale with it differently. The formula for this is: '((CustomGameSettingValue - 1.0) * ScalingFactor) + 1.0'

setting_name

Name of the custom game setting to read from.

| -| JSON Object| difficulties| | The settings for each difficulty.

Custom

Custom difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

Easy

Easy difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

Hard

Hard difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

Normal

Normal difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

Peaceful

Peaceful difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

| +**Custom Game Settings**: + +| **Type** | **Name** | **Description** | +|----------------|------------------------------|------------------------------------------------------------------------------------------------------------------| +| **JSON Object**| **custom_game_settings** | Defines which custom game settings impact this numeric modifier. | +| | **numeric_modifier_type** | Type of modifier for the named custom game setting. Valid values include: `pre_multiply`, `pre_add`, `pre_subtract`, `pre_divide`, and their corresponding `post_` counterparts. Multiple settings with the same modifier will stack. | +| | **scaling_factor** | Multiplier that adjusts how much the custom game setting affects this numeric modifier. The formula used is: `((CustomGameSettingValue - 1.0) * ScalingFactor) + 1.0`. Useful for scaling modifiers differently. | +| | **setting_name** | Name of the custom game setting to read from. | + +--- + +**Difficulty Settings**: +| **Type** | **Difficulty** | **Modifiers** | +|----------------|------------------|------------------------------------------------------------------------------------------------------------------------| +| **JSON Object**| **difficulties** | Settings for each difficulty level. | +| | **Custom** | Custom difficulty modifiers. | +| | **Easy** | Easy difficulty modifiers. | +| | **Normal** | Normal difficulty modifiers. | +| | **Hard** | Hard difficulty modifiers. | +| | **Peaceful** | Peaceful difficulty modifiers. | +For each difficulty, the following modifiers are applicable: +| **Modifier** | **Description** | +|--------------------------|---------------------------------------------------------------------------------| +| **post_add** | Amount added after all other modifier values. | +| **post_multiply** | Percentage multiplied after all pre-modifier values are applied. | +| **pre_add** | Amount added after pre-multiply values, but before any other modifiers. | +| **pre_multiply** | Percentage multiplied before any other modifier values are applied. | + +--- ### badger:difficulty_modifier_fall_damage_distance Modifiers for fall damage distance based on difficulty and custom game option -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| JSON Object| custom_game_settings| | Defines what custom game settings affect this numeric modifier.

numeric_modifier_type

What type of modifier the named custom game setting will apply on this entity. Valid values are pre_multiply, pre_add, pre_subtract, pre_divide, and their corresponding 'post_' counterparts. The effects of multiple game settings set to the same modifier WILL stack.

scaling_factor

A multiplier that changes how much the custom game setting will affect this numeric modifier. This is useful for when multiple numeric modifiers need to use the same custom game setting, but scale with it differently. The formula for this is: '((CustomGameSettingValue - 1.0) * ScalingFactor) + 1.0'

setting_name

Name of the custom game setting to read from.

| -| JSON Object| difficulties| | The settings for each difficulty.

Custom

Custom difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

Easy

Easy difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

Hard

Hard difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

Normal

Normal difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

Peaceful

Peaceful difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

| +**Custom Game Settings**: + +| **Type** | **Name** | **Description** | +|----------------|------------------------------|------------------------------------------------------------------------------------------------------------------| +| **JSON Object**| **custom_game_settings** | Defines which custom game settings impact this numeric modifier. | +| | **numeric_modifier_type** | Type of modifier for the named custom game setting. Valid values include: `pre_multiply`, `pre_add`, `pre_subtract`, `pre_divide`, and their corresponding `post_` counterparts. Multiple settings with the same modifier will stack. | +| | **scaling_factor** | Multiplier that adjusts how much the custom game setting affects this numeric modifier. The formula used is: `((CustomGameSettingValue - 1.0) * ScalingFactor) + 1.0`. Useful for scaling modifiers differently. | +| | **setting_name** | Name of the custom game setting to read from. | + +--- + +**Difficulty Settings**: + +| **Type** | **Difficulty** | **Modifiers** | +|----------------|------------------|------------------------------------------------------------------------------------------------------------------------| +| **JSON Object**| **difficulties** | Settings for each difficulty level. | +| | **Custom** | Custom difficulty modifiers. | +| | **Easy** | Easy difficulty modifiers. | +| | **Normal** | Normal difficulty modifiers. | +| | **Hard** | Hard difficulty modifiers. | +| | **Peaceful** | Peaceful difficulty modifiers. | +For each difficulty, the following modifiers are applicable: +| **Modifier** | **Description** | +|--------------------------|---------------------------------------------------------------------------------| +| **post_add** | Amount added after all other modifier values. | +| **post_multiply** | Percentage multiplied after all pre-modifier values are applied. | +| **pre_add** | Amount added after pre-multiply values, but before any other modifiers. | +| **pre_multiply** | Percentage multiplied before any other modifier values are applied. | +--- ### badger:difficulty_modifier_gravity Modifiers for gravity based on difficulty and custom game options -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| JSON Object| custom_game_settings| | Defines what custom game settings affect this numeric modifier.

numeric_modifier_type

What type of modifier the named custom game setting will apply on this entity. Valid values are pre_multiply, pre_add, pre_subtract, pre_divide, and their corresponding 'post_' counterparts. The effects of multiple game settings set to the same modifier WILL stack.

scaling_factor

A multiplier that changes how much the custom game setting will affect this numeric modifier. This is useful for when multiple numeric modifiers need to use the same custom game setting, but scale with it differently. The formula for this is: '((CustomGameSettingValue - 1.0) * ScalingFactor) + 1.0'

setting_name

Name of the custom game setting to read from.

| -| JSON Object| difficulties| | The settings for each difficulty.

Custom

Custom difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

Easy

Easy difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

Hard

Hard difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

Normal

Normal difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

Peaceful

Peaceful difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

| +**Custom Game Settings**: + +| **Type** | **Name** | **Description** | +|----------------|------------------------------|------------------------------------------------------------------------------------------------------------------| +| **JSON Object**| **custom_game_settings** | Defines which custom game settings impact this numeric modifier. | +| | **numeric_modifier_type** | Type of modifier for the named custom game setting. Valid values include: `pre_multiply`, `pre_add`, `pre_subtract`, `pre_divide`, and their corresponding `post_` counterparts. Multiple settings with the same modifier will stack. | +| | **scaling_factor** | Multiplier that adjusts how much the custom game setting affects this numeric modifier. The formula used is: `((CustomGameSettingValue - 1.0) * ScalingFactor) + 1.0`. Useful for scaling modifiers differently. | +| | **setting_name** | Name of the custom game setting to read from. | + +--- +**Difficulty Settings**: +| **Type** | **Difficulty** | **Modifiers** | +|----------------|------------------|------------------------------------------------------------------------------------------------------------------------| +| **JSON Object**| **difficulties** | Settings for each difficulty level. | +| | **Custom** | Custom difficulty modifiers. | +| | **Easy** | Easy difficulty modifiers. | +| | **Normal** | Normal difficulty modifiers. | +| | **Hard** | Hard difficulty modifiers. | +| | **Peaceful** | Peaceful difficulty modifiers. | +For each difficulty, the following modifiers are applicable: + +| **Modifier** | **Description** | +|--------------------------|---------------------------------------------------------------------------------| +| **post_add** | Amount added after all other modifier values. | +| **post_multiply** | Percentage multiplied after all pre-modifier values are applied. | +| **pre_add** | Amount added after pre-multiply values, but before any other modifiers. | +| **pre_multiply** | Percentage multiplied before any other modifier values are applied. | + +--- ### badger:difficulty_modifier_health_regeneration Modifier for health regeneration based on difficulty or custom game setting. -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| JSON Object| custom_game_settings| | Defines what custom game settings affect this numeric modifier.

numeric_modifier_type

What type of modifier the named custom game setting will apply on this entity. Valid values are pre_multiply, pre_add, pre_subtract, pre_divide, and their corresponding 'post_' counterparts. The effects of multiple game settings set to the same modifier WILL stack.

scaling_factor

A multiplier that changes how much the custom game setting will affect this numeric modifier. This is useful for when multiple numeric modifiers need to use the same custom game setting, but scale with it differently. The formula for this is: '((CustomGameSettingValue - 1.0) * ScalingFactor) + 1.0'

setting_name

Name of the custom game setting to read from.

| -| JSON Object| difficulties| | The settings for each difficulty.

Custom

Custom difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

Easy

Easy difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

Hard

Hard difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

Normal

Normal difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

Peaceful

Peaceful difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

| +**Custom Game Settings**: + +| **Type** | **Name** | **Description** | +|----------------|------------------------------|------------------------------------------------------------------------------------------------------------------| +| **JSON Object**| **custom_game_settings** | Defines which custom game settings impact this numeric modifier. | +| | **numeric_modifier_type** | Type of modifier for the named custom game setting. Valid values include: `pre_multiply`, `pre_add`, `pre_subtract`, `pre_divide`, and their corresponding `post_` counterparts. Multiple settings with the same modifier will stack. | +| | **scaling_factor** | Multiplier that adjusts how much the custom game setting affects this numeric modifier. The formula used is: `((CustomGameSettingValue - 1.0) * ScalingFactor) + 1.0`. Useful for scaling modifiers differently. | +| | **setting_name** | Name of the custom game setting to read from. | + +--- + +**Difficulty Settings**: +| **Type** | **Difficulty** | **Modifiers** | +|----------------|------------------|------------------------------------------------------------------------------------------------------------------------| +| **JSON Object**| **difficulties** | Settings for each difficulty level. | +| | **Custom** | Custom difficulty modifiers. | +| | **Easy** | Easy difficulty modifiers. | +| | **Normal** | Normal difficulty modifiers. | +| | **Hard** | Hard difficulty modifiers. | +| | **Peaceful** | Peaceful difficulty modifiers. | +For each difficulty, the following modifiers are applicable: +| **Modifier** | **Description** | +|--------------------------|---------------------------------------------------------------------------------| +| **post_add** | Amount added after all other modifier values. | +| **post_multiply** | Percentage multiplied after all pre-modifier values are applied. | +| **pre_add** | Amount added after pre-multiply values, but before any other modifiers. | +| **pre_multiply** | Percentage multiplied before any other modifier values are applied. | + +--- ### badger:difficulty_modifier_jump_gravity Modifiers for jump gravity based on difficulty and custom game options -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| JSON Object| custom_game_settings| | Defines what custom game settings affect this numeric modifier.

numeric_modifier_type

What type of modifier the named custom game setting will apply on this entity. Valid values are pre_multiply, pre_add, pre_subtract, pre_divide, and their corresponding 'post_' counterparts. The effects of multiple game settings set to the same modifier WILL stack.

scaling_factor

A multiplier that changes how much the custom game setting will affect this numeric modifier. This is useful for when multiple numeric modifiers need to use the same custom game setting, but scale with it differently. The formula for this is: '((CustomGameSettingValue - 1.0) * ScalingFactor) + 1.0'

setting_name

Name of the custom game setting to read from.

| -| JSON Object| difficulties| | The settings for each difficulty.

Custom

Custom difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

Easy

Easy difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

Hard

Hard difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

Normal

Normal difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

Peaceful

Peaceful difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

| +**Custom Game Settings**: +| **Type** | **Name** | **Description** | +|----------------|------------------------------|------------------------------------------------------------------------------------------------------------------| +| **JSON Object**| **custom_game_settings** | Defines which custom game settings impact this numeric modifier. | +| | **numeric_modifier_type** | Type of modifier for the named custom game setting. Valid values include: `pre_multiply`, `pre_add`, `pre_subtract`, `pre_divide`, and their corresponding `post_` counterparts. Multiple settings with the same modifier will stack. | +| | **scaling_factor** | Multiplier that adjusts how much the custom game setting affects this numeric modifier. The formula used is: `((CustomGameSettingValue - 1.0) * ScalingFactor) + 1.0`. Useful for scaling modifiers differently. | +| | **setting_name** | Name of the custom game setting to read from. | +--- +**Difficulty Settings**: + +| **Type** | **Difficulty** | **Modifiers** | +|----------------|------------------|------------------------------------------------------------------------------------------------------------------------| +| **JSON Object**| **difficulties** | Settings for each difficulty level. | +| | **Custom** | Custom difficulty modifiers. | +| | **Easy** | Easy difficulty modifiers. | +| | **Normal** | Normal difficulty modifiers. | +| | **Hard** | Hard difficulty modifiers. | +| | **Peaceful** | Peaceful difficulty modifiers. | + +For each difficulty, the following modifiers are applicable: + +| **Modifier** | **Description** | +|--------------------------|---------------------------------------------------------------------------------| +| **post_add** | Amount added after all other modifier values. | +| **post_multiply** | Percentage multiplied after all pre-modifier values are applied. | +| **pre_add** | Amount added after pre-multiply values, but before any other modifiers. | +| **pre_multiply** | Percentage multiplied before any other modifier values are applied. | + +--- ### badger:difficulty_modifier_jump_height Modifiers for jump height based on difficulty and custom game options -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| JSON Object| custom_game_settings| | Defines what custom game settings affect this numeric modifier.

numeric_modifier_type

What type of modifier the named custom game setting will apply on this entity. Valid values are pre_multiply, pre_add, pre_subtract, pre_divide, and their corresponding 'post_' counterparts. The effects of multiple game settings set to the same modifier WILL stack.

scaling_factor

A multiplier that changes how much the custom game setting will affect this numeric modifier. This is useful for when multiple numeric modifiers need to use the same custom game setting, but scale with it differently. The formula for this is: '((CustomGameSettingValue - 1.0) * ScalingFactor) + 1.0'

setting_name

Name of the custom game setting to read from.

| -| JSON Object| difficulties| | The settings for each difficulty.

Custom

Custom difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

Easy

Easy difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

Hard

Hard difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

Normal

Normal difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

Peaceful

Peaceful difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

| +**Custom Game Settings**: + +| **Type** | **Name** | **Description** | +|----------------|------------------------------|------------------------------------------------------------------------------------------------------------------| +| **JSON Object**| **custom_game_settings** | Defines which custom game settings impact this numeric modifier. | +| | **numeric_modifier_type** | Type of modifier for the named custom game setting. Valid values include: `pre_multiply`, `pre_add`, `pre_subtract`, `pre_divide`, and their corresponding `post_` counterparts. Multiple settings with the same modifier will stack. | +| | **scaling_factor** | Multiplier that adjusts how much the custom game setting affects this numeric modifier. The formula used is: `((CustomGameSettingValue - 1.0) * ScalingFactor) + 1.0`. Useful for scaling modifiers differently. | +| | **setting_name** | Name of the custom game setting to read from. | +--- +**Difficulty Settings**: +| **Type** | **Difficulty** | **Modifiers** | +|----------------|------------------|------------------------------------------------------------------------------------------------------------------------| +| **JSON Object**| **difficulties** | Settings for each difficulty level. | +| | **Custom** | Custom difficulty modifiers. | +| | **Easy** | Easy difficulty modifiers. | +| | **Normal** | Normal difficulty modifiers. | +| | **Hard** | Hard difficulty modifiers. | +| | **Peaceful** | Peaceful difficulty modifiers. | + +For each difficulty, the following modifiers are applicable: + +| **Modifier** | **Description** | +|--------------------------|---------------------------------------------------------------------------------| +| **post_add** | Amount added after all other modifier values. | +| **post_multiply** | Percentage multiplied after all pre-modifier values are applied. | +| **pre_add** | Amount added after pre-multiply values, but before any other modifiers. | +| **pre_multiply** | Percentage multiplied before any other modifier values are applied. | + +--- ### badger:difficulty_modifier_knockback Modifiers for knockback based on difficulty and custom game option -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| JSON Object| custom_game_settings| | Defines what custom game settings affect this numeric modifier.

numeric_modifier_type

What type of modifier the named custom game setting will apply on this entity. Valid values are pre_multiply, pre_add, pre_subtract, pre_divide, and their corresponding 'post_' counterparts. The effects of multiple game settings set to the same modifier WILL stack.

scaling_factor

A multiplier that changes how much the custom game setting will affect this numeric modifier. This is useful for when multiple numeric modifiers need to use the same custom game setting, but scale with it differently. The formula for this is: '((CustomGameSettingValue - 1.0) * ScalingFactor) + 1.0'

setting_name

Name of the custom game setting to read from.

| -| JSON Object| difficulties| | The settings for each difficulty.

Custom

Custom difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

Easy

Easy difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

Hard

Hard difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

Normal

Normal difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

Peaceful

Peaceful difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

| +**Custom Game Settings**: + +| **Type** | **Name** | **Description** | +|----------------|------------------------------|------------------------------------------------------------------------------------------------------------------| +| **JSON Object**| **custom_game_settings** | Defines which custom game settings impact this numeric modifier. | +| | **numeric_modifier_type** | Type of modifier for the named custom game setting. Valid values include: `pre_multiply`, `pre_add`, `pre_subtract`, `pre_divide`, and their corresponding `post_` counterparts. Multiple settings with the same modifier will stack. | +| | **scaling_factor** | Multiplier that adjusts how much the custom game setting affects this numeric modifier. The formula used is: `((CustomGameSettingValue - 1.0) * ScalingFactor) + 1.0`. Useful for scaling modifiers differently. | +| | **setting_name** | Name of the custom game setting to read from. | + +--- +**Difficulty Settings**: +| **Type** | **Difficulty** | **Modifiers** | +|----------------|------------------|------------------------------------------------------------------------------------------------------------------------| +| **JSON Object**| **difficulties** | Settings for each difficulty level. | +| | **Custom** | Custom difficulty modifiers. | +| | **Easy** | Easy difficulty modifiers. | +| | **Normal** | Normal difficulty modifiers. | +| | **Hard** | Hard difficulty modifiers. | +| | **Peaceful** | Peaceful difficulty modifiers. | +For each difficulty, the following modifiers are applicable: + +| **Modifier** | **Description** | +|--------------------------|---------------------------------------------------------------------------------| +| **post_add** | Amount added after all other modifier values. | +| **post_multiply** | Percentage multiplied after all pre-modifier values are applied. | +| **pre_add** | Amount added after pre-multiply values, but before any other modifiers. | +| **pre_multiply** | Percentage multiplied before any other modifier values are applied. | + +--- ### badger:difficulty_modifier_knockback_resistance Modifiers for knockback resistance based on difficulty and custom game options -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| JSON Object| custom_game_settings| | Defines what custom game settings affect this numeric modifier.

numeric_modifier_type

What type of modifier the named custom game setting will apply on this entity. Valid values are pre_multiply, pre_add, pre_subtract, pre_divide, and their corresponding 'post_' counterparts. The effects of multiple game settings set to the same modifier WILL stack.

scaling_factor

A multiplier that changes how much the custom game setting will affect this numeric modifier. This is useful for when multiple numeric modifiers need to use the same custom game setting, but scale with it differently. The formula for this is: '((CustomGameSettingValue - 1.0) * ScalingFactor) + 1.0'

setting_name

Name of the custom game setting to read from.

| -| JSON Object| difficulties| | The settings for each difficulty.

Custom

Custom difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

Easy

Easy difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

Hard

Hard difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

Normal

Normal difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

Peaceful

Peaceful difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

| +**Custom Game Settings**: + +| **Type** | **Name** | **Description** | +|----------------|------------------------------|------------------------------------------------------------------------------------------------------------------| +| **JSON Object**| **custom_game_settings** | Defines which custom game settings impact this numeric modifier. | +| | **numeric_modifier_type** | Type of modifier for the named custom game setting. Valid values include: `pre_multiply`, `pre_add`, `pre_subtract`, `pre_divide`, and their corresponding `post_` counterparts. Multiple settings with the same modifier will stack. | +| | **scaling_factor** | Multiplier that adjusts how much the custom game setting affects this numeric modifier. The formula used is: `((CustomGameSettingValue - 1.0) * ScalingFactor) + 1.0`. Useful for scaling modifiers differently. | +| | **setting_name** | Name of the custom game setting to read from. | + +--- + +**Difficulty Settings**: +| **Type** | **Difficulty** | **Modifiers** | +|----------------|------------------|------------------------------------------------------------------------------------------------------------------------| +| **JSON Object**| **difficulties** | Settings for each difficulty level. | +| | **Custom** | Custom difficulty modifiers. | +| | **Easy** | Easy difficulty modifiers. | +| | **Normal** | Normal difficulty modifiers. | +| | **Hard** | Hard difficulty modifiers. | +| | **Peaceful** | Peaceful difficulty modifiers. | +For each difficulty, the following modifiers are applicable: +| **Modifier** | **Description** | +|--------------------------|---------------------------------------------------------------------------------| +| **post_add** | Amount added after all other modifier values. | +| **post_multiply** | Percentage multiplied after all pre-modifier values are applied. | +| **pre_add** | Amount added after pre-multiply values, but before any other modifiers. | +| **pre_multiply** | Percentage multiplied before any other modifier values are applied. | + +--- ### badger:difficulty_modifier_max_health Modifiers for max health based on difficulty -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| JSON Object| custom_game_settings| | Defines what custom game settings affect this numeric modifier.

numeric_modifier_type

What type of modifier the named custom game setting will apply on this entity. Valid values are pre_multiply, pre_add, pre_subtract, pre_divide, and their corresponding 'post_' counterparts. The effects of multiple game settings set to the same modifier WILL stack.

scaling_factor

A multiplier that changes how much the custom game setting will affect this numeric modifier. This is useful for when multiple numeric modifiers need to use the same custom game setting, but scale with it differently. The formula for this is: '((CustomGameSettingValue - 1.0) * ScalingFactor) + 1.0'

setting_name

Name of the custom game setting to read from.

| -| JSON Object| difficulties| | The settings for each difficulty.

Custom

Custom difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

wave_post_multiply

Multiplied with the Wave Level then added after all other modifier values. Only applied if WAVE_SCALING_DIFFICULTY game rule is true

Easy

Easy difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

wave_post_multiply

Multiplied with the Wave Level then added after all other modifier values. Only applied if WAVE_SCALING_DIFFICULTY game rule is true

Hard

Hard difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

wave_post_multiply

Multiplied with the Wave Level then added after all other modifier values. Only applied if WAVE_SCALING_DIFFICULTY game rule is true

Normal

Normal difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

wave_post_multiply

Multiplied with the Wave Level then added after all other modifier values. Only applied if WAVE_SCALING_DIFFICULTY game rule is true

Peaceful

Peaceful difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

wave_post_multiply

Multiplied with the Wave Level then added after all other modifier values. Only applied if WAVE_SCALING_DIFFICULTY game rule is true

| +**Custom Game Settings**: +| **Type** | **Name** | **Description** | +|----------------|------------------------------|------------------------------------------------------------------------------------------------------------------| +| **JSON Object**| **custom_game_settings** | Defines which custom game settings impact this numeric modifier. | +| | **numeric_modifier_type** | Type of modifier for the named custom game setting. Valid values include: `pre_multiply`, `pre_add`, `pre_subtract`, `pre_divide`, and their corresponding `post_` counterparts. Multiple settings with the same modifier will stack. | +| | **scaling_factor** | Multiplier that adjusts how much the custom game setting affects this numeric modifier. The formula used is: `((CustomGameSettingValue - 1.0) * ScalingFactor) + 1.0`. Useful for scaling modifiers differently. | +| | **setting_name** | Name of the custom game setting to read from. | +--- +**Difficulty Settings**: -### badger:difficulty_modifier_resistance +| **Type** | **Difficulty** | **Modifiers** | +|----------------|------------------|------------------------------------------------------------------------------------------------------------------------| +| **JSON Object**| **difficulties** | Settings for each difficulty level. | +| | **Custom** | Custom difficulty modifiers. | +| | **Easy** | Easy difficulty modifiers. | +| | **Normal** | Normal difficulty modifiers. | +| | **Hard** | Hard difficulty modifiers. | +| | **Peaceful** | Peaceful difficulty modifiers. | -Modifiers for damage resistances based on difficulty +For each difficulty, the following modifiers are applicable: -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| JSON Object| custom_game_settings| | Defines what custom game settings affect this numeric modifier.

numeric_modifier_type

What type of modifier the named custom game setting will apply on this entity. Valid values are pre_multiply, pre_add, pre_subtract, pre_divide, and their corresponding 'post_' counterparts. The effects of multiple game settings set to the same modifier WILL stack.

scaling_factor

A multiplier that changes how much the custom game setting will affect this numeric modifier. This is useful for when multiple numeric modifiers need to use the same custom game setting, but scale with it differently. The formula for this is: '((CustomGameSettingValue - 1.0) * ScalingFactor) + 1.0'

setting_name

Name of the custom game setting to read from.

| -| Array| damage_types| | The modifiers for specified damage types as json key names. Modifiers not specified in this array will affect damage resistance across all types.

append_resistance_to_entities

Boolean to append the resistance to entities if absent from the mob data.

custom_game_settings

Defines what custom game settings affect this numeric modifier.

numeric_modifier_type

What type of modifier the named custom game setting will apply on this entity. Valid values are pre_multiply, pre_add, pre_subtract, pre_divide, and their corresponding 'post_' counterparts. The effects of multiple game settings set to the same modifier WILL stack.

scaling_factor

A multiplier that changes how much the custom game setting will affect this numeric modifier. This is useful for when multiple numeric modifiers need to use the same custom game setting, but scale with it differently. The formula for this is: '((CustomGameSettingValue - 1.0) * ScalingFactor) + 1.0'

setting_name

Name of the custom game setting to read from.

difficulties

The settings for each difficulty.

Custom

Custom difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

Easy

Easy difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

Hard

Hard difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

Normal

Normal difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

Peaceful

Peaceful difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

name

Name of damage type.

| -| JSON Object| difficulties| | The settings for each difficulty.

Custom

Custom difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

Easy

Easy difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

Hard

Hard difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

Normal

Normal difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

Peaceful

Peaceful difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

| +| **Modifier** | **Description** | +|--------------------------|---------------------------------------------------------------------------------| +| **post_add** | Amount added after all other modifier values. | +| **post_multiply** | Percentage multiplied after all pre-modifier values are applied. | +| **pre_add** | Amount added after pre-multiply values, but before any other modifiers. | +| **pre_multiply** | Percentage multiplied before any other modifier values are applied. | +| **wave_post_multiply** | Multiplied by the Wave Level, then added after all other modifiers. Applied only if the `WAVE_SCALING_DIFFICULTY` game rule is true. | +--- +### badger:difficulty_modifier_resistance + +Modifiers for damage resistances based on difficulty +#### Custom Game Settings + +| **Type** | **Name** | **Description** | +|----------------|------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **JSON Object**| **custom_game_settings** | Defines which custom game settings affect the numeric modifier. | +| | numeric_modifier_type | What type of modifier the named custom game setting will apply to this entity. Valid values are: `pre_multiply`, `pre_add`, `pre_subtract`, `pre_divide`, and their corresponding 'post_' counterparts. Effects of multiple game settings set to the same modifier WILL stack. | +| | scaling_factor | A multiplier that changes how much the custom game setting will affect the numeric modifier. This is useful for scaling when multiple numeric modifiers need to use the same custom game setting differently. Formula: '((CustomGameSettingValue - 1.0) * ScalingFactor) + 1.0' | +| | setting_name | Name of the custom game setting to read from. | + +#### Damage Types + +| **Type** | **Name** | **Description** | +|----------------|---------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **Array** | **damage_types** | Modifiers for specified damage types as JSON key names. Modifiers not specified in this array will affect damage resistance across all types. | +| | append_resistance_to_entities | Boolean to append the resistance to entities if absent from the mob data. | +| | custom_game_settings | Defines which custom game settings affect this numeric modifier. | +| | numeric_modifier_type | What type of modifier the named custom game setting will apply to this entity. Valid values are: `pre_multiply`, `pre_add`, `pre_subtract`, `pre_divide`, and their corresponding 'post_' counterparts. Effects of multiple game settings set to the same modifier WILL stack. | +| | scaling_factor | A multiplier that changes how much the custom game setting will affect the numeric modifier. This is useful for scaling when multiple numeric modifiers need to use the same custom game setting differently. Formula: '((CustomGameSettingValue - 1.0) * ScalingFactor) + 1.0' | +| | setting_name | Name of the custom game setting to read from. | +| | difficulties | The settings for each difficulty level. | + +**Difficulty Settings**: + +| **Type** | **Difficulty** | **Modifiers** | +|----------------|------------------|------------------------------------------------------------------------------------------------------------------------| +| **JSON Object**| **difficulties** | Settings for each difficulty level. | +| | **Custom** | Custom difficulty modifiers. | +| | **Easy** | Easy difficulty modifiers. | +| | **Normal** | Normal difficulty modifiers. | +| | **Hard** | Hard difficulty modifiers. | +| | **Peaceful** | Peaceful difficulty modifiers. | + +For each difficulty, the following modifiers are applicable: + +| **Modifier** | **Description** | +|--------------------------|---------------------------------------------------------------------------------| +| **post_add** | Amount added after all other modifier values. | +| **post_multiply** | Percentage multiplied after all pre-modifier values are applied. | +| **pre_add** | Amount added after pre-multiply values, but before any other modifiers. | +| **pre_multiply** | Percentage multiplied before any other modifier values are applied. | + +--- ### badger:difficulty_modifier_spawning_cost Modifier for mob spawning costs based on difficulty or custom game setting. -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| JSON Object| custom_game_settings| | Defines what custom game settings affect this numeric modifier.

numeric_modifier_type

What type of modifier the named custom game setting will apply on this entity. Valid values are pre_multiply, pre_add, pre_subtract, pre_divide, and their corresponding 'post_' counterparts. The effects of multiple game settings set to the same modifier WILL stack.

scaling_factor

A multiplier that changes how much the custom game setting will affect this numeric modifier. This is useful for when multiple numeric modifiers need to use the same custom game setting, but scale with it differently. The formula for this is: '((CustomGameSettingValue - 1.0) * ScalingFactor) + 1.0'

setting_name

Name of the custom game setting to read from.

| -| JSON Object| difficulties| | The settings for each difficulty.

Custom

Custom difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

Easy

Easy difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

Hard

Hard difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

Normal

Normal difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

Peaceful

Peaceful difficulty modifiers

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

| +**Custom Game Settings**: +| **Type** | **Name** | **Description** | +|----------------|------------------------------|------------------------------------------------------------------------------------------------------------------| +| **JSON Object**| **custom_game_settings** | Defines which custom game settings impact this numeric modifier. | +| | **numeric_modifier_type** | Type of modifier for the named custom game setting. Valid values include: `pre_multiply`, `pre_add`, `pre_subtract`, `pre_divide`, and their corresponding `post_` counterparts. Multiple settings with the same modifier will stack. | +| | **scaling_factor** | Multiplier that adjusts how much the custom game setting affects this numeric modifier. The formula used is: `((CustomGameSettingValue - 1.0) * ScalingFactor) + 1.0`. Useful for scaling modifiers differently. | +| | **setting_name** | Name of the custom game setting to read from. | +--- +**Difficulty Settings**: -### badger:disable_by_health +| **Type** | **Difficulty** | **Modifiers** | +|----------------|------------------|------------------------------------------------------------------------------------------------------------------------| +| **JSON Object**| **difficulties** | Settings for each difficulty level. | +| | **Custom** | Custom difficulty modifiers. | +| | **Easy** | Easy difficulty modifiers. | +| | **Normal** | Normal difficulty modifiers. | +| | **Hard** | Hard difficulty modifiers. | +| | **Peaceful** | Peaceful difficulty modifiers. | -Converts any listed blocks to a modified version +For each difficulty, the following modifiers are applicable: -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| Decimal| block_conversion_cinematic_delay| 0| The block conversion start delay in seconds if a cinematic is played. | -| JSON Object| block_conversion_states| | Block conversion data for when the structure is disabled or enabled by health.

disabled_state

Block conversion data used when the entity is disabled

enabled_state

Block conversion data used when the entity is enabled

| -| String| cine_id| | The cinematic ID to play when disabled. Optional. | -| Decimal| health_disabled_percent| | What percentage of health that determines if the entity is disabled | -| Decimal| health_enabled_percent| | What percentage of health that determines if the entity is enabled | +| **Modifier** | **Description** | +|--------------------------|---------------------------------------------------------------------------------| +| **post_add** | Amount added after all other modifier values. | +| **post_multiply** | Percentage multiplied after all pre-modifier values are applied. | +| **pre_add** | Amount added after pre-multiply values, but before any other modifiers. | +| **pre_multiply** | Percentage multiplied before any other modifier values are applied. | +--- +### badger:disable_by_health +Converts any listed blocks to a modified version + +| **Type** | **Name** | **Description** | +|----------------|-----------------------------------|----------------------------------------------------------------------------------------------------------| +| **Decimal** | **block_conversion_cinematic_delay** | The delay in seconds before block conversion starts if a cinematic is played (default: 0). | +| **JSON Object**| **block_conversion_states** | Block conversion data for when the structure is disabled or enabled by health. | +| | **disabled_state** | Data used when the entity is disabled. | +| | **enabled_state** | Data used when the entity is enabled. | +| **String** | **cine_id** | The cinematic ID to play when the entity is disabled. This field is optional. | +| **Decimal** | **health_disabled_percent** | The percentage of health that determines when the entity is disabled. | +| **Decimal** | **health_enabled_percent** | The percentage of health that determines when the entity is enabled. | ### badger:disables_actions Defines this entity as a status effect that disables actions/attacks. - - ### badger:disables_influence Defines this entity as a status effect that disables influence on its receiver entity. -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| JSON Object| tag_filter| | The tag filter used to determine if influence should be disabled on receiver entity

exclude_tags

Tags that the receiver entity must not have for influence to be disabled

include_tags

Tags that the receiver entity must have for influence to be disabled

| - - +| **Type** | **Name** | **Description** | +|----------------|----------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **JSON Object**| **tag_filter** | The tag filter determines whether influence should be disabled on the receiver entity. | +| | **exclude_tags** | Tags that the receiver entity must not possess for influence to be disabled. | +| | **include_tags** | Tags that the receiver entity must possess for influence to be disabled. | +--- ### badger:disables_movement Defines this entity as a status effect that disables movement. - - ### badger:disables_sprint Defines this entity as a status effect that disables sprint. - - ### badger:distant_stimulus_movement Attribute that defines how entity moves to pursue the attacker after being attacked by a distant damage source @@ -2349,15 +2422,10 @@ Attribute that defines how entity moves to pursue the attacker after being attac | String| propagation_exclude_tags| | Tags that nearby mobs must NOT have in order to be alerted when this entity is attacked. | | String| propagation_include_tags| | Tags that nearby mobs must have in order to be alerted when this entity is attacked. | - - - ### badger:do_not_replace_buildables Flag Attribute that indicates if the structure can replace existing structures. - - ### badger:dynamic_scale_interpolate Component that enables interpolation and specifies an interpolation speed when this entity is dynamically scaled @@ -2366,15 +2434,10 @@ Component that enables interpolation and specifies an interpolation speed when t |:-----------:|:-----------:|:-----------:|:-----------:| | Decimal| interpolate_time| | The interpolation time in seconds | - - - ### badger:enable_respawn_when_discovered Adds a flag component that we want to enable features when an entity is discovered - - ### badger:engineer Defines this entity as an engineer. @@ -2386,9 +2449,6 @@ Defines this entity as an engineer. | Decimal| travel_timeout| | Duration in seconds for engineer to travel to build zone (a buff will be applied afterwards). | | String| travel_timeout_buff| | The buff to apply when the engineer times out. | - - - ### badger:engineer_station Makes this village use engineers. @@ -2398,15 +2458,10 @@ Makes this village use engineers. | Boolean| destroy_buildable_on_engineer_destroyed| | If buildables should be destroyed if assigned engineer dies before completion. | | Decimal| reassignment_delay| | The cooldown time before a build request can be reassigned to another engineer if the current one died. | - - - ### badger:entity_collision Defines the entity's entity collision properties. - - ### badger:entity_leap Enables the leaping functionality for the entity and defines the leap properties. @@ -2424,15 +2479,10 @@ Enables the leaping functionality for the entity and defines the leap properties | Decimal| prep| | The maximum vertical distance the entity will leap from. | | Decimal| upward| | The maximum vertical distance the entity will leap from. | - - - ### badger:exclude_from_spatial_partition Controls if this entity should be excluded from spatial queries. - - ### badger:faction Some general attributes that describe a faction. @@ -2446,9 +2496,6 @@ Some general attributes that describe a faction. | Boolean| is_default_appearance| | The default appearance all factions should fallback to. Only one faction is allowed to be the default. | | String| name| | Name of this faction. | - - - ### badger:fall_damage Defines the settings used to calculate falling damage. @@ -2460,9 +2507,6 @@ Defines the settings used to calculate falling damage. | Integer| min_damage_distance| | Defines the minimum distance the entity needs fall to get damaged. Measured in meters. | | String| trigger_event| | Optional trigger event to be used when fall damage occurs for this entity. | - - - ### badger:fast_travel Defines parameters for when this entity fast travels @@ -2472,34 +2516,33 @@ Defines parameters for when this entity fast travels | Decimal| cooldown_time| | The amount of time the entity waits after fast travelling. | | Decimal| windup_time| | The amount of time the entity waits before fast travelling. | - - - ### badger:fast_travel_point Indicates that this entity supports fast travel functionality -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| String| incoming_alliance_rule_filter| | The rule that determines which team's players can arrive at this fast travel point. | -| String| outgoing_alliance_rule_filter| | The rule that determines which types of entities that will be considered candidates to fast travel (friendly, enemy, etc.). | -| JSON Object| outgoing_tag_filter| | Determines the tag filters and alliance rule for outgoing entities.

exclude_tags

Entities with any of these tags are not candidates to fast travel when lured.

include_tags

Entities that have these tags are candidates to fast travel when lured.

| -| String| spawn_point_archetype| | The name of the archetype for the destination spawn point entity. | - - +| **Type** | **Name** | **Description** | +|----------------|------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **String** | **incoming_alliance_rule_filter** | The rule that determines which team's players can arrive at this fast travel point. | +| **String** | **outgoing_alliance_rule_filter** | The rule that determines which types of entities will be considered candidates for fast travel (e.g., friendly, enemy, etc.). | +| **JSON Object**| **outgoing_tag_filter** | Determines the tag filters and alliance rule for outgoing entities. | +| | exclude_tags | Entities with any of these tags are excluded from being candidates for fast travel when lured. | +| | include_tags | Entities with these tags are considered candidates for fast travel when lured. | +| **String** | **spawn_point_archetype** | The name of the archetype for the destination spawn point entity. | +--- ### badger:fast_traveller Indicates that this entity can fast travel. -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| String| outgoing_alliance_rule_filter| | The rule that determines which types of entities that will be considered candidates to fast travel (friendly, enemy, etc.). | -| JSON Object| outgoing_tag_filter| | Determines the tag filters and alliance rule for outgoing entities.

exclude_tags

Entities with any of these tags are not candidates to fast travel when lured.

include_tags

Entities that have these tags are candidates to fast travel when lured.

| - - +| **Type** | **Name** | **Description** | +|------------------|-----------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------| +| **String** | **outgoing_alliance_rule_filter** | The rule that determines which types of entities will be considered candidates for fast travel (e.g., friendly, enemy). | +| **JSON Object** | **outgoing_tag_filter** | Determines the tag filters and alliance rules for outgoing entities. | +| | **exclude_tags** | A list of tags; entities with any of these tags are not candidates for fast travel when lured. | +| | **include_tags** | A list of tags; entities with these tags are considered candidates for fast travel when lured. | +--- ### badger:gatherable_resources @@ -2509,9 +2552,6 @@ Contains the most commonly available resources to gather at this entity |:-----------:|:-----------:|:-----------:|:-----------:| | Array| gatherable_resource_names| | A list of resources names the entity drops | - - - ### badger:generate_player_village An entity that creates a village when placed in world @@ -2522,9 +2562,6 @@ An entity that creates a village when placed in world | String| ownership_alliance_rule| | Alliance of structures that can become owned by this structure's 'bagder:owned_territory' when it is placed. | | String| villageId| | Village ID name | - - - ### badger:generate_ruins With this component entities that contained ownedBlocks will leave behind a portion of their blocks when destroyed. @@ -2534,9 +2571,6 @@ With this component entities that contained ownedBlocks will leave behind a port | Integer| max| | maximum block height of columns left behind | | Integer| min| | minimum block height of columns left behind | - - - ### badger:glide An entity with this component is capable of gliding. @@ -2545,15 +2579,10 @@ An entity with this component is capable of gliding. |:-----------:|:-----------:|:-----------:|:-----------:| | Decimal| drag| | The amount of drag to apply to vertical velocity while gliding, in the range (0, 1] | - - - ### badger:glide_telemetry_tracking Defines the settings used when tracking telemetry for mounts that are gliding. - - ### badger:granted_actions Defines the actions that are given to another entity that this buff entity is applying to. @@ -2562,9 +2591,6 @@ Defines the actions that are given to another entity that this buff entity is ap |:-----------:|:-----------:|:-----------:|:-----------:| | List| actions| | List of actions. | - - - ### badger:has_saddle Granted as a buff to indicated when an entity is seeking out mounts or riders @@ -2575,9 +2601,6 @@ Granted as a buff to indicated when an entity is seeking out mounts or riders | Decimal| mount_range| 1.0| The minimum distance that an entity with a Saddle buff must be before activating a mount action | | Decimal| search_range| 10.0| The maximum distance that an entity with a Saddle buff will search for a mount or rider | - - - ### badger:health Amount of Max health for entity @@ -2586,9 +2609,6 @@ Amount of Max health for entity |:-----------:|:-----------:|:-----------:|:-----------:| | Decimal| max_health| | How much health this entity has. Entity dies or is destroyed when health reaches zero. | - - - ### badger:health_regeneration The amount of health that regenerates per second @@ -2600,9 +2620,6 @@ The amount of health that regenerates per second | Decimal| regen_cooldown_seconds| | The cooldown between each health regeneration | | Boolean| regen_while_suspended| | Whether or not the entity regens health while suspended | - - - ### badger:heartbeat An entity with this component will despawn after the timer runs out. The timer is reset by specific (hard coded) interactions related to combat and control. @@ -2611,9 +2628,6 @@ An entity with this component will despawn after the timer runs out. The timer i |:-----------:|:-----------:|:-----------:|:-----------:| | Decimal| min_expire_time| | How much time in seconds before this entity expires if not interacting. | - - - ### badger:hit_effect Defines a hit effect @@ -2623,19 +2637,23 @@ Defines a hit effect | String| on_hit_target_trigger| | The name of the trigger event to send on the target being hit when this hit effect is applied. | | String| trigger| | The name of the trigger event to send on the entity applying the hit effect when this hit effect is applied. | - - - ### badger:hud_message_proximity A list of Hud messages. Each are triggered when player is in proximity -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| List| messages| | List of different hud messages.

cooldown_seconds

The cooldown between sending the hud message.

filter

Tags to define what type of entity can trigger the hud message.

alliance_rule_filter

The alliance rule used to determine what type of entity should trigger the hud message

exclude

The tags to be excluded from when filtering

include

The tags to be included in when filtering

hud_message_args

A list of arguments used in the hud message.

hud_message_id

The string ID of the HUD message.

range

The range an entity needs to be in to trigger the HudMessage

| - - +| **Type** | **Name** | **Description** | +|------------|----------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------| +| **List** | **messages** | A collection of different HUD messages. | +| | cooldown_seconds | The cooldown period (in seconds) between sending the HUD message. | +| | filter | Tags used to define which type of entity can trigger the HUD message. | +| | alliance_rule_filter | The alliance rule used to determine which type of entity should trigger the HUD message. | +| | exclude | Tags that are excluded from filtering when determining which entities can trigger the HUD message. | +| | include | Tags that are included when filtering for entities that can trigger the HUD message. | +| | hud_message_args | A list of arguments that will be used in the HUD message. | +| | hud_message_id | The string ID associated with the HUD message. | +| | range | The effective range within which an entity must be to trigger the HUD message. | +--- ### badger:hurtbox @@ -2647,9 +2665,6 @@ Adding this description to an entity will indicate it is a hurtbox child entity. | Boolean| no_tickets| | Decides whether or not this entity opts out of inheriting parent's tickets. If set to true this hurtbox will provide no action/attack tickets. | | Boolean| target_assigner_redirect_to_default| | When true, this will redirect target assigner targeting to the default hurtbox of the parent. | - - - ### badger:hurtbox_tags Designer prescribed tags that will be transferred to any hurtboxes this entity may have. @@ -2658,9 +2673,6 @@ Designer prescribed tags that will be transferred to any hurtboxes this entity m |:-----------:|:-----------:|:-----------:|:-----------:| | Array| tags| | The tags to add to this entity's hurtboxes. | - - - ### badger:influence_map_ai Denotes this entity as an influence map AI. It will create and manag influence maps. @@ -2673,9 +2685,6 @@ Denotes this entity as an influence map AI. It will create and manag influence m | String| query_name| | Query Name for any units assigned to this AI | | Boolean| sensing_when_idle| | Boolean on whether this AI should be tracking sensor information even when idle (no units/entities currently following this AI). Default set to NOT sense when idle. | - - - ### badger:influencer_coordinator Defines this entity as a coordinator of one or more (child) influencer entities. A coordinator can be an influencer itself. @@ -2691,19 +2700,29 @@ Defines this entity as a coordinator of one or more (child) influencer entities. | String| max_followers_resource| | The name of the resource corresponding to the maximum number of entities that can be influenced at once. Unlimited if unspecified. If max_follower_count is also specified it will use the smaller of the two. | | Decimal| trigger_formation_update_radius| | When the player stops the formation will not update until the player leaves the radius positioned at the players last stationary position | - - - ### badger:interactable Defines the entity's ability to be interacted with by other entities, and the interactions that can be performed on it. -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| Array| interactions| | Entries defining what interactions can be performed on the entity.

alliance_rule_filter

Alliance rule that filters which teams can interact with this interactable. Typically this will be set to 'friendly'

camera

Camera mode to switch to when interacting with this entity. Intended to be used with 'badger:aimable'

default_disabled

When true, this entity CANNOT be interacted with by default, until something else enables it.

delay

Delay, in seconds, before the interact UI appears after highlighting the interactable.

exclude_tags

Tags that the *interactor* must NOT have in order to interact with this interactable.

exclusive_interactor

When true, only one interactor can interact with this entity at a time.

include_tags

Tags that the *interactor* must have in order to interact with this interactable.

input_layout_override

Input layout to use when highlighting this interactable, setting the buttons and UI needed for the interaction.

input_layout_under_construction

Same purpose as 'input_layout_override', but applies during the construction phase of a buildable entity.

interaction_priority

Defines which interactions take precedence over others, when several are in range. Zero is the default, with higher values taking priority.

name

Name of the interaction.

only_restrict_angle_while_luring

When true, the angle restriction defined by 'restricted_interact_angle' will only apply if the interactor is luring mobs. This can be used to lessen input conflicts.

range

Interactor must be within this distance for the interaction to appear.

restricted_interact_angle

When set, players must aim their cameras at the target, within this many degrees, to interact with it. When not set, players can interact without aiming at the target.

| - - - +| **Type** | **Name** | **Description** | +|----------------|---------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **Array** | **interactions** | Entries defining what interactions can be performed on the entity. | +| | **alliance_rule_filter** | Alliance rule that filters which teams can interact with this entity; typically set to "friendly." | +| | **camera** | Camera mode to switch to when interacting with this entity; intended for use with "badger:aimable." | +| | **default_disabled** | When true, this entity cannot be interacted with by default until another condition enables it. | +| | **delay** | Delay, in seconds, before the interact UI appears after highlighting the interactable. | +| | **exclude_tags** | Tags that the _interactor_ must not have in order to interact with this entity. | +| | **exclusive_interactor** | When true, only one interactor can interact with this entity at a time. | +| | **include_tags** | Tags that the _interactor_ must have in order to interact with this entity. | +| | **input_layout_override** | Input layout to use when highlighting this interactable, setting the buttons and UI needed for the interaction. | +| | **input_layout_under_construction** | Same purpose as `input_layout_override`, but applies during the construction phase of a buildable entity. | +| | **interaction_priority** | Defines which interactions take precedence over others when several are in range; zero is the default, with higher values taking priority. | +| | **name** | Name of the interaction. | +| | **only_restrict_angle_while_luring** | When true, the angle restriction defined by `restricted_interact_angle` will only apply if the interactor is luring mobs; this helps reduce input conflicts. | +| | **range** | The interactor must be within this distance for the interaction to appear. | +| | **restricted_interact_angle** | When set, players must aim their cameras at the target within this many degrees to interact with it; when not set, players can interact without aiming at the target. | + +--- ### badger:interactor @@ -2715,21 +2734,14 @@ Defines the entity's ability to interact with other entities, and filters what e | Array| exclude_tags| | Determines what tags an entity must NOT have for this interactor to interact with it. | | Array| include_tags| | Determines what tags an entity must have for this interactor to interact with it. | - - - ### badger:interacts_with_blocks Defines that this entity can interact with world blocks - - ### badger:invader For entities that will contribute to the invasion. - - ### badger:invasion_defense_value Defines the defensive value of this entity. Used for protecting culture villages. @@ -2739,9 +2751,6 @@ Defines the defensive value of this entity. Used for protecting culture villages | Decimal| defense_multiplier| | Defines this structure's ability to boost all the active defenses of it's village. | | Integer| defense_value| | Defines this structure's ability to actively defend it's village. | - - - ### badger:inventory Defines the inventory for this entity. @@ -2751,9 +2760,6 @@ Defines the inventory for this entity. | Decimal| drop_force| | The force with which the items are dropped. | | Decimal| drop_percentage| | The percentage of the inventory that is dropped upon death. | - - - ### badger:item_collection Defines the rules which regulate which items are able to be collected by players. @@ -2764,9 +2770,6 @@ Defines the rules which regulate which items are able to be collected by players | Boolean| allow_failed_collections| | If true, the item will be collected and dissapear even if it adds no resources to the collector's inventory. | | Decimal| collection_delay| | The time in seconds after dropping before this item can be picked up. | - - - ### badger:jump An entity with this component is capable of jumping @@ -2781,9 +2784,6 @@ An entity with this component is capable of jumping | Array| trigger_event_status_filter| | If one or more status effect specified in this array is active when the entity jumps, trigger the event defined by trigger_event_with_status | | String| trigger_event_with_status| | If one or more status effect specified in trigger_event_status_filter is active when the entity jumps, this event will be triggered | - - - ### badger:knockback Defines the settings applying knockback. @@ -2792,9 +2792,6 @@ Defines the settings applying knockback. |:-----------:|:-----------:|:-----------:|:-----------:| | JSON Object| knockback| | Defines an offset, which defines the center point of falloff calculations. (Optional) | - - - ### badger:knockback_resistance Defines the settings for knock back resistance. @@ -2803,21 +2800,14 @@ Defines the settings for knock back resistance. |:-----------:|:-----------:|:-----------:|:-----------:| | Decimal| affected_scale| | Defines how much a mob is affected by knock back. | - - - ### badger:labelled_offsets A set of labelled positional offsets relative to the entity with this description. Used to define and identify specific points on the entity. - - ### badger:leap_destination Marks the entity as a potential destination for entities to leap to. - - ### badger:leash Prevents the entity from getting too far from its spawn point. @@ -2827,9 +2817,6 @@ Prevents the entity from getting too far from its spawn point. | Decimal| leash_range| | The maximum range that the entity can be from its tether point (spawn point). | | Decimal| return_range| | The range at which the entity will move to once it leaves its leash range. | - - - ### badger:leash_on_stop Prevents the entity from getting too far from where it last stopped. @@ -2840,20 +2827,18 @@ Prevents the entity from getting too far from where it last stopped. | Decimal| return_range| | The range at which the entity will move to once it leaves its leash range. | | Boolean| return_when_not_targeting| | If true, leashed entity will return when it is not targeting. | - - - ### badger:loot Dictates the loot drops to spawn when the entity is destroyed. -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| Array| overrides| | The overridable loot tables this entity supports.

name

The override name to select the loot table.

table

The loot table to use if selected

| -| String| table| | The loot table used to determine the default potential rewards. | - - +| **Type** | **Name** | **Description** | +|----------|-------------|---------------------------------------------------------------------------------------------------| +| **Array**| **overrides**| The overridable loot tables supported by this entity. | +| | name | The name of the override used to select the loot table. | +| | table | The specific loot table to use if selected. | +| **String**| **table** | The loot table that determines the default potential rewards for this entity. | +--- ### badger:loot_collector @@ -2866,28 +2851,26 @@ Enables this entity to collect loot. | Vector [a, b, c]| offset| | The loot collection destination offset. | | Decimal| radius| | The loot collection radius. | - - - ### badger:lost_entity_recall_point Attribute that specify the minimum distance between an entity and a recall structure for the entity to be considered lost -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| String| alliance_rule_filter| | The alliance rule that an entity must match for the recall point to potentially recall this entity | -| Integer| arrival_max_height_difference| | Maximum height difference between an recalled entity's arrival location and the recall point's location. | -| Decimal| arrival_max_radius| | Max radius within which a recalled entity will arrive at. | -| Decimal| arrival_min_radius| | Min radius within which a recalled entity will arrive at. | -| Boolean| disable_influencing_during_channel| | If true, entities being recalled by this recall point will not be influencable during the channel. | -| Boolean| include_in_combat| | If true, the recall point can recall entities that are enaged in combat. | -| Decimal| min_entity_distance_from_hero| | The minimum distance between an entity and a hero (the hero should match the alliance rule) for the entity to be considered lost | -| Decimal| min_recall_radius| | The minimum distance between an entity and this recall point for the entity to be considered lost | -| String| recall_zone_requirement| | Specifies a zone requirement for recall (recalling from structures outside that zone will no longer work). | -| JSON Object| tag_filter| | The tag filter used to determine if an entity could potentially be recalled to this recall point

exclude_tags

Tags that an entity must not have for the recall point to potantially recall this entity

include_tags

Tags that an entity must have for the recall point to potentially recall this entity

| - - - +| **Type** | **Name** | **Description** | +|----------------|------------------------------------|-----------------------------------------------------------------------------------------------------------------------| +| **String** | **alliance_rule_filter** | The alliance rule that an entity must match for the recall point to potentially recall this entity. | +| **Integer** | **arrival_max_height_difference** | Maximum height difference between a recalled entity's arrival location and the recall point's location. | +| **Decimal** | **arrival_max_radius** | Maximum radius within which a recalled entity will arrive. | +| **Decimal** | **arrival_min_radius** | Minimum radius within which a recalled entity will arrive. | +| **Boolean** | **disable_influencing_during_channel** | If true, entities being recalled by this recall point will not be influenced during the channel. | +| **Boolean** | **include_in_combat** | If true, the recall point can recall entities that are engaged in combat. | +| **Decimal** | **min_entity_distance_from_hero** | The minimum distance between an entity and a hero (the hero should match the alliance rule) for the entity to be considered lost. | +| **Decimal** | **min_recall_radius** | The minimum distance between an entity and this recall point for the entity to be considered lost. | +| **String** | **recall_zone_requirement** | Specifies a zone requirement for recall; recalling from structures outside that zone will no longer work. | +| **JSON Object**| **tag_filter** | The tag filter used to determine if an entity could potentially be recalled to this recall point. | +| | **exclude_tags** | Tags that an entity must not have for the recall point to potentially recall this entity. | +| | **include_tags** | Tags that an entity must have for the recall point to potentially recall this entity. | + +--- ### badger:lure @@ -2907,7 +2890,7 @@ Defines how the entity can lure other entities. | Integer| influenced_priority| | The priority threshold assigned to entities influenced by this lure. Determines whether the entities it influences can be overridden by other influencers. | | Decimal| influenced_reprioritization_timer| | The number of seconds this lure need to settle for before reprioritization occurs. | | Integer| influencer_priority| | The priority of this lure's influence. Determines whether it can influence already-influenced entities. | -| Boolean| leash_to_line| | If true, affected mobs will be leashed to a *line* from the owner to the lure, rather than just the single point of the lure. Allows for attack-move behaviour. | +| Boolean| leash_to_line| | If true, affected mobs will be leashed to a _line_ from the owner to the lure, rather than just the single point of the lure. Allows for attack-move behaviour. | | Decimal| lure_range| | The range at which entities can start to be lured. | | Decimal| max_speed_distance| | The distance from the entity's destination at which the maximum speed factor is applied. | | Decimal| max_speed_factor| | The multiplier applied to the speed of the lured units based on the distance from the entity's destination. | @@ -2920,34 +2903,35 @@ Defines how the entity can lure other entities. | Boolean| sticky_assignment| | If true, entities influenced by this lure will remain assigned even when out of range. | | String| visual_alliance_rule_filter| | The alliance rule filter defining whether or not to the visualized influence range can seen by players on a given team. | - - - ### badger:lured Defines settings for when this entity is lured. -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| JSON Object| configurations| | Array of config overrides to use based on the lure's config ID.

arrive_range

When entities enter this range they will be unlured, if the lure is configured to release entities on arrival.

attack_move_range

How far away from the lure that the lured entity is allowed to attack move to targets.

config_id

The config name to match with a lure for this config to be used

leash_range

How far away from the lure that the lured entity is allowed to be before it must return to the lure.

return_range

The range from the lure the lured entity must move to when it's initially lured and whenever it leaves the leash range, before it's allowed to perform attacks again.

| -| JSON Object| default_configuration| | Default settings for when this entity is lured.

arrive_range

When entities enter this range they will be unlured, if the lure is configured to release entities on arrival.

attack_move_range

How far away from the lure that the lured entity is allowed to attack move to targets.

leash_range

How far away from the lure that the lured entity is allowed to be before it must return to the lure.

return_range

The range from the lure the lured entity must move to when it's initially lured and whenever it leaves the leash range, before it's allowed to perform attacks again.

| -| String| resource_requirement| | The optional unlock the influencer requires to lure this entity. | - - - +| **Type** | **Name** | **Description** | +|----------------|------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------| +| **JSON Object**| **configurations** | Array of configuration overrides used based on the lure's configuration ID. | +| | arrive_range | The range within which entities will be unlured if the lure is set to release entities upon arrival. | +| | attack_move_range | The maximum distance from the lure within which the lured entity can attack move to targets. | +| | config_id | The configuration name that matches with a lure for this specific configuration to be applied. | +| | leash_range | The distance from the lure that the lured entity is allowed to be before it must return to the lure. | +| | return_range | The distance from the lure that the lured entity must move to when initially lured or whenever it exits the leash range before attacking again. | +| **JSON Object**| **default_configuration** | Default settings applied when this entity is lured. | +| | arrive_range | The range within which entities will be unlured if the lure is set to release entities upon arrival. | +| | attack_move_range | The maximum distance from the lure within which the lured entity can attack move to targets. | +| | leash_range | The distance from the lure that the lured entity is allowed to be before it must return to the lure. | +| | return_range | The distance from the lure that the lured entity must move to when initially lured or whenever it exits the leash range before attacking again. | +| **String** | **resource_requirement** | The optional unlock required by the influencer to lure this entity. | + +--- ### badger:map3_selectable Map Entity (for World Map 3) icon on the map screen will be selectable by the cursor - - ### badger:map3_solo_play_hidden Map Entity (for World Map 3) will be hidden when in a solo play game - - ### badger:map3_tooltip Entity will have an icon on the map screen @@ -2959,9 +2943,6 @@ Entity will have an icon on the map screen | Boolean| is_persistent| | persistent flag for map tooltip | | String| title| | title for map tooltip | - - - ### badger:map3_tooltip_action Entity will have an icon on the map screen @@ -2970,9 +2951,6 @@ Entity will have an icon on the map screen |:-----------:|:-----------:|:-----------:|:-----------:| | String| action| | id for the action performed on the tooltip | - - - ### badger:map3_tooltip_audio audio for detailed map icon tooltip @@ -2984,9 +2962,6 @@ audio for detailed map icon tooltip | String| event_type| | Audio type for the event. Can be 'Narrative' or 'Music' | | Decimal| selection_time| | [Optional] How long the icon must be selected for the audio event to trigger | - - - ### badger:map3_tooltip_extended text for further detailed map icon tooltip @@ -2997,9 +2972,6 @@ text for further detailed map icon tooltip | String| icon| | additional info icon for map tooltip | | String| priority| | dictate order that extended tooltips appear | - - - ### badger:map_controller Entity will have a map entity on the world map @@ -3009,9 +2981,6 @@ Entity will have a map entity on the world map | List| initial_key_values| | The initial key/values this map controller will have. | | List| initial_team_key_values| | The initial team-specific key/values this map controller will have. | - - - ### badger:map_icon_revealed Entity will have an icon that is visible on the map screen @@ -3020,21 +2989,14 @@ Entity will have an icon that is visible on the map screen |:-----------:|:-----------:|:-----------:|:-----------:| | Boolean| teammates_only| | restrict visibility to team | - - - ### badger:meta_aabb Adding this description to an archetype will indicate to our structure editor it has an editable AABB. - - ### badger:mob_alliance Defines whether or not the village entity is a mob alliance village. - - ### badger:modifier_accuracy_max_range Buffs an entity's stats. @@ -3047,9 +3009,6 @@ Buffs an entity's stats. | Decimal| pre_multiply| | Percentage to multiply the value by before any buff values are applied. | | Boolean| scalable| | More performance costly, but allows this modifier's effect to be scaled up or down. An example would be ramping-down a status effect as it ends. | - - - ### badger:modifier_accuracy_min_range Buffs an entity's stats. @@ -3062,9 +3021,6 @@ Buffs an entity's stats. | Decimal| pre_multiply| | Percentage to multiply the value by before any buff values are applied. | | Boolean| scalable| | More performance costly, but allows this modifier's effect to be scaled up or down. An example would be ramping-down a status effect as it ends. | - - - ### badger:modifier_aimable_range Buffs an entity's stats. @@ -3077,19 +3033,21 @@ Buffs an entity's stats. | Decimal| pre_multiply| | Percentage to multiply the value by before any buff values are applied. | | Boolean| scalable| | More performance costly, but allows this modifier's effect to be scaled up or down. An example would be ramping-down a status effect as it ends. | - - - ### badger:modifier_area_overlays_range Buffs an area overlay's range. -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| Array| modifiers| | List of modifications to make to area overlays.

post_add

Amount to add after all other modifier values.

post_multiply

Percentage to multiply the value by after all pre modifier values are applied.

pre_add

Amount to add after pre multiply values, but before any other modifier values.

pre_multiply

Percentage to multiply the value by before any other modifier values are applied.

shape

The area overlays shape to buff.

type

The area overlays type to buff.

| - - +| **Type** | **Name** | **Description** | +|----------|--------------|---------------------------------------------------------------------------------------------------------| +| **Array**| **modifiers**| List of modifications to apply to area overlays. | +| | post_add | Amount to add after all other modifier values. | +| | post_multiply | Percentage to multiply the value by after all pre-modifier values are applied. | +| | pre_add | Amount to add after pre-multiply values but before any other modifier values. | +| | pre_multiply | Percentage to multiply the value by before any other modifier values are applied. | +| | shape | The shape of the area overlay to buff. | +| | type | The type of the area overlay to buff. | +--- ### badger:modifier_autostep @@ -3103,9 +3061,6 @@ Buffs an entity's stats. | Decimal| pre_multiply| | Percentage to multiply the value by before any buff values are applied. | | Boolean| scalable| | More performance costly, but allows this modifier's effect to be scaled up or down. An example would be ramping-down a status effect as it ends. | - - - ### badger:modifier_block_revert Reverts any changed blocks to the original version @@ -3114,9 +3069,6 @@ Reverts any changed blocks to the original version |:-----------:|:-----------:|:-----------:|:-----------:| | Decimal| duration_percentage| | What percentage of the time this block revert process should take | - - - ### badger:modifier_block_swap Converts any listed blocks to a modified version @@ -3129,9 +3081,6 @@ Converts any listed blocks to a modified version | JSON Object| modifiers| | Key value pairs that describe which keywords should be replaced with other strings in block names | | Boolean| top_to_bottom| | Changes the order of block conversion to top to bottom | - - - ### badger:modifier_build_speed Buffs an entity's stats. @@ -3144,9 +3093,6 @@ Buffs an entity's stats. | Decimal| pre_multiply| | Percentage to multiply the value by before any buff values are applied. | | Boolean| scalable| | More performance costly, but allows this modifier's effect to be scaled up or down. An example would be ramping-down a status effect as it ends. | - - - ### badger:modifier_cooldown Buffs an entity's stats. @@ -3159,9 +3105,6 @@ Buffs an entity's stats. | Decimal| pre_multiply| | Percentage to multiply the value by before any buff values are applied. | | Boolean| scalable| | More performance costly, but allows this modifier's effect to be scaled up or down. An example would be ramping-down a status effect as it ends. | - - - ### badger:modifier_damage Buffs an entity's stats. @@ -3174,9 +3117,6 @@ Buffs an entity's stats. | Decimal| pre_multiply| | Percentage to multiply the value by before any buff values are applied. | | Boolean| scalable| | More performance costly, but allows this modifier's effect to be scaled up or down. An example would be ramping-down a status effect as it ends. | - - - ### badger:modifier_damage_type Buffs an entity's damage types. @@ -3185,9 +3125,6 @@ Buffs an entity's damage types. |:-----------:|:-----------:|:-----------:|:-----------:| | Array| types| | List of the damage types to add. | - - - ### badger:modifier_deconstruction_speed Buffs an entity's stats. @@ -3200,9 +3137,6 @@ Buffs an entity's stats. | Decimal| pre_multiply| | Percentage to multiply the value by before any buff values are applied. | | Boolean| scalable| | More performance costly, but allows this modifier's effect to be scaled up or down. An example would be ramping-down a status effect as it ends. | - - - ### badger:modifier_fall_distance Buffs an entity's stats. @@ -3215,9 +3149,6 @@ Buffs an entity's stats. | Decimal| pre_multiply| | Percentage to multiply the value by before any buff values are applied. | | Boolean| scalable| | More performance costly, but allows this modifier's effect to be scaled up or down. An example would be ramping-down a status effect as it ends. | - - - ### badger:modifier_gravity Buffs an entity's stats. @@ -3230,9 +3161,6 @@ Buffs an entity's stats. | Decimal| pre_multiply| | Percentage to multiply the value by before any buff values are applied. | | Boolean| scalable| | More performance costly, but allows this modifier's effect to be scaled up or down. An example would be ramping-down a status effect as it ends. | - - - ### badger:modifier_health_regen The amount of health that regenerates per second @@ -3244,9 +3172,6 @@ The amount of health that regenerates per second | Decimal| regen_cooldown_seconds| | The cooldown between each health regeneration | | Boolean| regen_while_suspended| | Whether or not the entity regens health while suspended | - - - ### badger:modifier_jump_height Buffs an entity's stats. @@ -3259,9 +3184,6 @@ Buffs an entity's stats. | Decimal| pre_multiply| | Percentage to multiply the value by before any buff values are applied. | | Boolean| scalable| | More performance costly, but allows this modifier's effect to be scaled up or down. An example would be ramping-down a status effect as it ends. | - - - ### badger:modifier_knockback_force Buffs an entity's stats. @@ -3274,9 +3196,6 @@ Buffs an entity's stats. | Decimal| pre_multiply| | Percentage to multiply the value by before any buff values are applied. | | Boolean| scalable| | More performance costly, but allows this modifier's effect to be scaled up or down. An example would be ramping-down a status effect as it ends. | - - - ### badger:modifier_knockback_resistance Buffs an entity's stats. @@ -3289,9 +3208,6 @@ Buffs an entity's stats. | Decimal| pre_multiply| | Percentage to multiply the value by before any buff values are applied. | | Boolean| scalable| | More performance costly, but allows this modifier's effect to be scaled up or down. An example would be ramping-down a status effect as it ends. | - - - ### badger:modifier_max_health Buffs an entity's stats. @@ -3304,9 +3220,6 @@ Buffs an entity's stats. | Decimal| pre_multiply| | Percentage to multiply the value by before any buff values are applied. | | Boolean| scalable| | More performance costly, but allows this modifier's effect to be scaled up or down. An example would be ramping-down a status effect as it ends. | - - - ### badger:modifier_movement_speed Buffs an entity's stats. @@ -3319,9 +3232,6 @@ Buffs an entity's stats. | Decimal| pre_multiply| | Percentage to multiply the value by before any buff values are applied. | | Boolean| scalable| | More performance costly, but allows this modifier's effect to be scaled up or down. An example would be ramping-down a status effect as it ends. | - - - ### badger:modifier_projectile_payload Defines a list of entities to spawn for a projectile. @@ -3330,9 +3240,6 @@ Defines a list of entities to spawn for a projectile. |:-----------:|:-----------:|:-----------:|:-----------:| | List| entity_ids| | The list of entities to spawn. | - - - ### badger:modifier_resistance Buffs an entity's damage resistances. @@ -3341,9 +3248,6 @@ Buffs an entity's damage resistances. |:-----------:|:-----------:|:-----------:|:-----------:| | Array| resistances| | List of the damage resistances to add. | - - - ### badger:modifier_saddle Granted as a buff to indicated when an entity is seeking out mounts or riders @@ -3354,9 +3258,6 @@ Granted as a buff to indicated when an entity is seeking out mounts or riders | Decimal| mount_range| 1.0| The minimum distance that an entity with a Saddle buff must be before activating a mount action | | Decimal| search_range| 10.0| The maximum distance that an entity with a Saddle buff will search for a mount or rider | - - - ### badger:modifier_size Controls the size of this entity @@ -3365,9 +3266,6 @@ Controls the size of this entity |:-----------:|:-----------:|:-----------:|:-----------:| | Decimal| scale| | The scaling factor for the size of this entity | - - - ### badger:modifier_stamina_depletion Buffs an entity's stats. @@ -3380,9 +3278,6 @@ Buffs an entity's stats. | Decimal| pre_multiply| | Percentage to multiply the value by before any buff values are applied. | | Boolean| scalable| | More performance costly, but allows this modifier's effect to be scaled up or down. An example would be ramping-down a status effect as it ends. | - - - ### badger:modifier_stamina_regen Buffs an entity's stats. @@ -3395,9 +3290,6 @@ Buffs an entity's stats. | Decimal| pre_multiply| | Percentage to multiply the value by before any buff values are applied. | | Boolean| scalable| | More performance costly, but allows this modifier's effect to be scaled up or down. An example would be ramping-down a status effect as it ends. | - - - ### badger:modifier_stamina_regen_cooldown Buffs an entity's stats. @@ -3410,9 +3302,6 @@ Buffs an entity's stats. | Decimal| pre_multiply| | Percentage to multiply the value by before any buff values are applied. | | Boolean| scalable| | More performance costly, but allows this modifier's effect to be scaled up or down. An example would be ramping-down a status effect as it ends. | - - - ### badger:modifier_targeting_range Buffs an entity's stats. @@ -3425,9 +3314,6 @@ Buffs an entity's stats. | Decimal| pre_multiply| | Percentage to multiply the value by before any buff values are applied. | | Boolean| scalable| | More performance costly, but allows this modifier's effect to be scaled up or down. An example would be ramping-down a status effect as it ends. | - - - ### badger:modifier_wind_up Buffs an entity's stats. @@ -3440,9 +3326,6 @@ Buffs an entity's stats. | Decimal| pre_multiply| | Percentage to multiply the value by before any buff values are applied. | | Boolean| scalable| | More performance costly, but allows this modifier's effect to be scaled up or down. An example would be ramping-down a status effect as it ends. | - - - ### badger:modifier_zone_size Controls the zone size of this entity @@ -3451,9 +3334,6 @@ Controls the zone size of this entity |:-----------:|:-----------:|:-----------:|:-----------:| | Decimal| scale| | The scaling factor for the zone size of this entity | - - - ### badger:mount Indicates that an entity can be mounted @@ -3465,9 +3345,6 @@ Indicates that an entity can be mounted | Array| include_tags| | The tags required to be on an entity for an effect to trigger. | | String| unlock_requirement| | Name of the unlock resource needed to unlock this as a player mount. If not defined, the mount will not appear as a player mount. | - - - ### badger:move_on_spawn Makes the entity move after spawn @@ -3477,9 +3354,6 @@ Makes the entity move after spawn | Boolean| destroy_on_arrival| | When set to true, the entity will destroy itself after it has travelled to the maximum move distance | | Decimal| movement_distance| | How far forward the entity will travel after spawn | - - - ### badger:movement Behavior modifications for movement @@ -3492,22 +3366,46 @@ Behavior modifications for movement | Decimal| swim_speed| | How fast this entity moves in meters (cubes) per second while touching water. If left undefined, will default to matching move_speed. | | Decimal| turn_rate| | Speed at which the entity will rotate to face a new direction, in degrees per second. | +### badger:movement_speed_camera_effects + +Defines FOV and camera distance effects that scale off of player move speed. +| **Type** | **Name** | **Description** | +|----------------|-------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **JSON Object**| **camera_distance** | Defines effects on the camera follow distance caused by movement speed bonuses. | +| | **effect_strength** | Strength of effect. With a value of 1, adds 1% effect for every 1% of move speed above default. | +| | **enter_easing_function** | Easing function for transitions away from the default. Options include: linear, spring, quad, cubic, quart, quint, sine, expo, circ, bounce, or back. Prefix with in_, out_, or in_out_ (e.g., 'in_out_sine'). | +| | **enter_time** | Duration of the transition when moving away from the default (e.g., 1.0x). | +| | **exit_easing_function** | Easing function for transitions returning to default, with the same options as the enter easing function. | +| | **exit_time** | Duration of the transition when moving towards the default (e.g., 1.0x). | +| | **max_multiplier** | Maximum multiplier value due to lower than standard move speed. Recommended value [>= 1]. | +| | **min_multiplier** | Minimum multiplier value due to lower than standard move speed. Recommended value [0-1]. | +--- -### badger:movement_speed_camera_effects +#### **Field of View Effects** -Defines FOV and camera distance effects that scale off of player move speed. +| **Type** | **Name** | **Description** | +|----------------|-------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **JSON Object**| **field_of_view** | Defines effects on the field of view caused by movement speed bonuses. Effects are a multiplier on the base value. | +| | **effect_strength** | Strength of effect. With a value of 1, adds 1% effect for every 1% of move speed above default. | +| | **enter_easing_function** | Easing function for transitions away from the default. Options include: linear, spring, quad, cubic, quart, quint, sine, expo, circ, bounce, or back. Prefix with in_, out_, or in_out_ (e.g., 'in_out_sine'). | +| | **enter_time** | Duration of the transition when moving away from the default (e.g., 1.0x). | +| | **exit_easing_function** | Easing function for transitions returning to default, with the same options as the enter easing function. | +| | **exit_time** | Duration of the transition when moving towards the default (e.g., 1.0x). | +| | **max_multiplier** | Maximum multiplier value due to lower than standard move speed. Recommended value [>= 1]. | +| | **min_multiplier** | Minimum multiplier value due to lower than standard move speed. Recommended value [0-1]. | -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| JSON Object| camera_distance| | Defines effects on the camera follow distance caused by movement speed bonuses.

effect_strength

Strength of effect. With a value of 1, adds 1% effect for every 1% of move speed above default.

enter_easing_function

Easing function used for transitions away from the default. Options are: linear, spring, quad, cubic, quart, quint, sine, expo, circ, bounce, or back. Most of these need to be prefixed with in_, out_ or in_out_. Ex. 'in_out_sine'

enter_time

Time the transition takes when moving away from the default, i.e. 1.0x

exit_easing_function

Easing function used for transitions returning to default. Options are: linear, spring, quad, cubic, quart, quint, sine, expo, circ, bounce, or back. Most of these need to be prefixed with in_, out_ or in_out_. Ex. 'in_out_sine'

exit_time

Time the transition takes when moving toward the default, i.e. 1.0x

max_multiplier

Maximum multiplier value that can be reached due to lower than standard movespeed. Recommeded value [>=1]

min_multiplier

Minimum multiplier value that can be reached due to lower than standard movespeed. Recommended value [0-1]

| -| JSON Object| field_of_view| | Defines effects on the field of view caused by movement speed bonuses. Effects are a multiplier on the base value.

effect_strength

Strength of effect. With a value of 1, adds 1% effect for every 1% of move speed above default.

enter_easing_function

Easing function used for transitions away from the default. Options are: linear, spring, quad, cubic, quart, quint, sine, expo, circ, bounce, or back. Most of these need to be prefixed with in_, out_ or in_out_. Ex. 'in_out_sine'

enter_time

Time the transition takes when moving away from the default, i.e. 1.0x

exit_easing_function

Easing function used for transitions returning to default. Options are: linear, spring, quad, cubic, quart, quint, sine, expo, circ, bounce, or back. Most of these need to be prefixed with in_, out_ or in_out_. Ex. 'in_out_sine'

exit_time

Time the transition takes when moving toward the default, i.e. 1.0x

max_multiplier

Maximum multiplier value that can be reached due to lower than standard movespeed. Recommeded value [>=1]

min_multiplier

Minimum multiplier value that can be reached due to lower than standard movespeed. Recommended value [0-1]

| -| Decimal| max_fov_degrees| | Extra safeguard parameter to account for variation in FOV due to user settings. FOV will be clamped within this range regardless of multiplier. | -| Decimal| min_fov_degrees| | Extra safeguard parameter to account for variation in FOV due to user settings. FOV will be clamped within this range regardless of multiplier. | +--- +#### **FOV Safeguards** +| **Type** | **Name** | **Description** | +|----------------|-------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **Decimal** | **max_fov_degrees** | Extra safeguard parameter to account for variation in FOV due to user settings. The FOV will be clamped within this range regardless of multiplier. | +| **Decimal** | **min_fov_degrees** | Extra safeguard parameter to account for variation in FOV due to user settings. The FOV will be clamped within this range regardless of multiplier. | +--- ### badger:multistep_buildable @@ -3541,10 +3439,7 @@ Defines the entity as a multi segmented buildable. | String| stepup_name| | (Optional) Name of step-up mid section archetype | | String| style| | How is this multipart laid out 'floating' or 'grounded'? 'floating_follow_terrain' can be used for a connected multistep buildable that attempts to avoid intersecting terrain. | - - - -### badger:music_emitter_states +### badger:music_emitter_states (BP) Defines the current state of this music emitter entity. @@ -3552,9 +3447,6 @@ Defines the current state of this music emitter entity. |:-----------:|:-----------:|:-----------:|:-----------:| | List| badger:music_emitter_states| | A list of the current states this emitter can be in. This must match the resource_pack music_states for badger:music_2d_emitter. | - - - ### badger:navigation Description of how this entity can navigate. @@ -3569,9 +3461,6 @@ Description of how this entity can navigate. | Decimal| max_distance_to_ignore_space_occupancy| | The max distance to ignore crowd avoidance | | Decimal| max_height_to_ignore_space_occupancy| | The max height to ignore crowd avoidance | - - - ### badger:nbt_decorator Defines an NBT to place into the world. @@ -3580,9 +3469,6 @@ Defines an NBT to place into the world. |:-----------:|:-----------:|:-----------:|:-----------:| | String| nbt_file| | Name of the nbt file to place. | - - - ### badger:nbt_parts Defines NBTs to place in a certain location on a structure. @@ -3593,15 +3479,10 @@ Defines NBTs to place in a certain location on a structure. | String| locator| | Name of the locator at which the nbt is to be placed. | | String| nbt_file| | Name of the nbt file to place. | - - - ### badger:near_death_telemetry_tracking Defines the settings used when tracking telemetry for near death experiences. - - ### badger:negate_status Defines a set of status that this status will negate. @@ -3610,9 +3491,6 @@ Defines a set of status that this status will negate. |:-----------:|:-----------:|:-----------:|:-----------:| | Array| negated_status| | List of negated status names (strings). | - - - ### badger:netherrack_spreading Describes how far netherrack and denether spreaders will travel from the source entity. @@ -3622,9 +3500,6 @@ Describes how far netherrack and denether spreaders will travel from the source | Decimal| denether_spreader_distance| | Manhattan distance that denether spreaders will travel from the outer edges of the source entity. | | Decimal| nether_spreader_distance| | Manhattan distance that netherrack spreaders will travel from the outer edges of the source entity. | - - - ### badger:objective_health_bar Causes the entity's health to appear on a dedicated health bar on the player's sceen. @@ -3636,9 +3511,6 @@ Causes the entity's health to appear on a dedicated health bar on the player's s | Boolean| show_at_full_health| | Whether the health bar should always be show neven if it's at 100%. | | String| type| | The type of the health bar. This affects the icon and the text of the healthbar. | - - - ### badger:offline_traits This allows an entity to be turned offline, and determines what components get disabled when it is offline/constructing. @@ -3653,46 +3525,43 @@ This allows an entity to be turned offline, and determines what components get d | Boolean| visualize_constructing| true| When true, constructing structures will be visualized with a yellow box around them. | | Array| visualize_offline| false| When true, offline structures will be visualized with a yellow box around them. | - - - ### badger:omit_blocks_outline This flags a buildable entity to not render with an outline. - - ### badger:omit_team_id This flags a buildable entity to not render with a team ID, which makes it appear like normal terrain. - - ### badger:owned_territory the zone of owned territory created by building this structure -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| Array| override_localization_for_prevent_overlap_tags| | Add overrides for localization strings per tag to display building error messages for the overlapped zone type.

localizationId

The localized error message ID.

tag

The tag to override the error message.

| -| Array| prevent_overlap_tag_set| | The tags that will prevent a entity's ZoC from overlapping | -| Decimal| village_gen_zone_control_score_threshold| | This threshold is subtracted from the zone control score (0.0 to 1.0 value) while scoring buildable options during village generation. | -| Boolean| village_zone| | Whether structures placed in this zone should be become owned by the same village that owns this structure. | -| Integer| zone| | side length in blocks of owned zone area created by building this structure | - - - +| **Category** | **Type** | **Name** | **Description** | +|---------------------------|----------------|---------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------| +| 🏷️ **Localization** | **Array** | **override_localization_for_prevent_overlap_tags**| Overrides for localization strings per tag to show building error messages for overlapped zone types. | +| | | **localizationId** | The localized error message ID. | +| | | **tag** | The tag to override the error message. | +| 🚫 **Overlap Prevention** | **Array** | **prevent_overlap_tag_set** | Tags that prevent an entity's zone of control (ZoC) from overlapping. | +| 📏 **Zone Control Score** | **Decimal** | **village_gen_zone_control_score_threshold** | This threshold is subtracted from the zone control score (0.0 to 1.0) when scoring buildable options during village generation. | +| 🏡 **Ownership** | **Boolean** | **village_zone** | Determines if structures placed in this zone are owned by the same village that owns this structure. | +| 🔲 **Zone Dimensions** | **Integer** | **zone** | Side length in blocks of the owned zone area created by building this structure. | ### badger:persistent_entity_influence_source Provides a list of sources of additive or subtractive PERSISTENT influence for an entity. -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| List| sensors| | List of persistent influence for entity sources.

damage_receiver_filter

Track particular types of entities

alliance_rule_filter

Team Alliance rules for this tracking

exclude_tags

Excule tags for entities

include_tags

Include tags for entities

multiplier

The weight of the heat stamp for this entity will persist at

propagation_decay

The propagation/spread decay of the heat stamp for this entity source

| - - +| **Type** | **Name** | **Description** | +|------------|------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **List** | **sensors** | List of persistent influences for entity sources. | +| | **damage_receiver_filter** | Track particular types of entities. | +| | **alliance_rule_filter** | Team alliance rules for this tracking. | +| | **exclude_tags** | Exclude tags for entities. | +| | **include_tags** | Include tags for entities. | +| | **multiplier** | The weight of the heat stamp for this entity will persist at. | +| | **propagation_decay** | The propagation/spread decay of the heat stamp for this entity source. | +--- ### badger:physics @@ -3706,9 +3575,6 @@ Defines whether the entity has physics properties. | Decimal| water_drag| 0.1| Slows down an object velocity. | | Decimal| water_submerged_ratio| 0.75| How deep a character is submerged when floating in deep water (0.0 means not submerged at all, 0.5 is roughly waist height, 1.0 is completely sumberged). | - - - ### badger:pop_cap_anchor This allows an entity to be used as a frame of reference for heuristic calculations when determining which pop capped entities to cull. Can also define a number of units nearby that will not be culled by the pop cap system. @@ -3720,16 +3586,11 @@ This allows an entity to be used as a frame of reference for heuristic calculati | Positive Integer| min_pop_cap| | The number of units near the anchor that will be exempt from pop cap culling. | | Positive Integer| min_pop_cap_range| | The maximum range for cull exemption. | - - - ### badger:pop_capped Whether or not this entity counts for team popcap. - - -### badger:presentation_event +### badger:presentation_event (_unsure if good_) Defines the triggers this entity can respond to, and the entities to spawn (with optional probabilities for success). @@ -3737,9 +3598,6 @@ Defines the triggers this entity can respond to, and the entities to spawn (with |:-----------:|:-----------:|:-----------:|:-----------:| | String| spawn_entity| | If the handler is a single string, then it's spawning only a single entity with 100% chance of success. | - - - ### badger:preview_snapping Causes a buildable preview to snap to nearby snap-point structures. @@ -3750,9 +3608,6 @@ Causes a buildable preview to snap to nearby snap-point structures. | Decimal| mouse_snap_range| | How far away the structure will snap from using a mouse. | | Decimal| snap_to_top| | When true, snaps the structure to the tops of other structures rather than the bottom. | - - - ### badger:projectile Defines the entity's projectile properties. @@ -3762,9 +3617,6 @@ Defines the entity's projectile properties. | Decimal| horizontal_speed| | The projectiles speed in meters per second across the terrain. | | Decimal| min_flight_time| | The minimum time in seconds that a projectile should take to reach it's target. This will lower the ground speed in order to make the timing match. | - - - ### badger:projectile_physics Defines the entity's projectile physics properties. @@ -3773,15 +3625,10 @@ Defines the entity's projectile physics properties. |:-----------:|:-----------:|:-----------:|:-----------:| | Decimal| gravity| | The projectile gravity in meters per second squared. | - - - ### badger:pvp_win_condition Flag used to track victory-critical entities. Currently used in PvP to mark the player's main base. - - ### badger:queueing Defines this entity's ability to queue up entities. @@ -3795,9 +3642,6 @@ Defines this entity's ability to queue up entities. | Array| queue_heads| | The labelled positions (relative to this entity) where influenced entities will go and wait. The number of positions determines the number of entities that can simultaneously be at the head of the queue. | | Integer| queue_size| | The number of entities that can queue up. -1 means infinite queue size. | - - - ### badger:quick_direct_aim Defines any parameters used to spawn a quick direct order. @@ -3806,9 +3650,6 @@ Defines any parameters used to spawn a quick direct order. |:-----------:|:-----------:|:-----------:|:-----------:| | Decimal| distance| | Defines the distance ahead of the player to place the destination. | - - - ### badger:ranged_target Defines where on the entity ranged attacks should aim for @@ -3817,26 +3658,18 @@ Defines where on the entity ranged attacks should aim for |:-----------:|:-----------:|:-----------:|:-----------:| | Array| target_positions| | The list of local positions where ranged attacks should land on this entity | - - - ### badger:recall_prevention Tunable timers for entities to be prevent being recalled by other players during actions. | Type| Name| Default Value| Description | |:-----------:|:-----------:|:-----------:|:-----------:| -| Decimal| on_lured_disabled_duration| | Duration in seconds for the mob to be unrecallable after being directed. | - - - +| Decimal| on_lured_disabled_duration| | Duration in seconds for the mob to be unrecallable after being directed. | ### badger:recallable_entity Flag component that marks entity as recallable - - ### badger:refundable Marks this unit as refundable, and gives their priority @@ -3846,9 +3679,6 @@ Marks this unit as refundable, and gives their priority | Integer| priority| | Refund priority. Lower values will be refunded first | | Decimal| refund_multiplier| | How much of the units cost is refunded | - - - ### badger:refunding_spawner A spawner that can be used to refund mobs @@ -3860,10 +3690,7 @@ A spawner that can be used to refund mobs | Array| exclude_tags| | Forbidden tags on entities to refund. | | Array| include_tags| | Required tags on entities to refund. | - - - -### badger:removal_time +### badger:removal_time (possible _Duplicate_) destroys an entity after a given period of time @@ -3873,9 +3700,6 @@ destroys an entity after a given period of time | Boolean| sync_presentation_event| | Whether or not the event should be synced over the server, or if it should be local only | | Decimal| time| | Amount of time in seconds before the entity is destroyed | - - - ### badger:reports_buildable_state Defines the settings for what state is reported when placing buildables. @@ -3884,15 +3708,10 @@ Defines the settings for what state is reported when placing buildables. |:-----------:|:-----------:|:-----------:|:-----------:| | Decimal| reports_state| | Defines the state to report. | - - - ### badger:reports_hit_reaction Whether or not this entity reports hit reactions for visual feedback. - - ### badger:reset_heartbeat_in_range An entity with this component will prevent other entities in range of it from despawning due to their heartbeat expiring. @@ -3901,19 +3720,16 @@ An entity with this component will prevent other entities in range of it from de |:-----------:|:-----------:|:-----------:|:-----------:| | Decimal| range| | The range that prevents entities from despawning due to heartbeat. | - - - ### badger:resist_status Defines entity's ability to resist being affected by status effects. -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| | JSON Object| | status_effect_name

resistance_persist_time

Defines how long the status effect will be blocked from reactivating after ending. A value of -1 allows the status effect to be refreshed even before the active effect ends.

resisted

Sets whether or not this status effect is resisted completely.

time

Sets how long this status effect lasts for, in seconds.

| - - - +| **Type** | **Name** | **Description** | +|----------------|-----------------------|------------------------------------------------------------------------------------------------------------------------| +| **JSON Object**| **status_effect_name** | Defines the name of the status effect and its associated properties. | +| | resistance_persist_time| Specifies the duration (in seconds) that the status effect is blocked from reactivating after it ends. A value of -1 allows the status effect to be refreshed before the current effect ends. | +| | resisted | Indicates whether this status effect is completely resisted. | +| | time | Sets the duration (in seconds) for how long this status effect will last. | ### badger:resource_cost_multiplier @@ -3924,19 +3740,15 @@ This value scales resource costs for the player it is attached to, including bui | String| building_cost_multiplier| | The multiplier that is applied to all building costs, increasing it or lowering it. Default value 1.0. | | String| spawning_cost_multiplier| | The multiplier that is applied to all mob spawn costs, increasing it or lowering it. Default value 1.0. | - - - ### badger:resource_modifier Modify the Pop Cap for a list of resources -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| Array| modifiers| | Key value pairs that describe which resources we are modifing

amount

The amount to modify the resource cap by.

resource

The name of the resource to modify

| - - - +| **Type** | **Name** | **Description** | +|----------|-------------|---------------------------------------------------------------------------------| +| **Array** | **modifiers** | Key-value pairs that describe which resources are being modified. | +| | amount | The amount by which to modify the resource cap. | +| | resource | The name of the resource to be modified. | ### badger:resource_trader @@ -3946,21 +3758,20 @@ Marks this entity as a place to exchange resources for other resources. |:-----------:|:-----------:|:-----------:|:-----------:| | String| successful_resource_trade_trigger| | The trigger event to send when a successful resource trade is made using the resource trader | - - - ### badger:respawn_point Makes this entity act as a respawn point for players. -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| String| alliance_rule| | Alliance rule tag name. | -| String| player_respawned_trigger| | The trigger event to send when a player respawns at a respawn point | -| JSON Object| spawn_blocking| | Settings to control what blocks a spawn point

blocking_alliance_rule

The Alliance rule tag name for checking respawn blocking.

blocking_radius

The radius around the respawn point to check for entities potentially blocking respawning

tag_filter

The tag filter used to determine if an entity should block a respawn point

exclude_tags

Array of tags to exlucde for entities blocking respawn points

include_tags

Array of tags required for entities blocking respawn points

| - - - +| **Type** | **Name** | **Description** | +|----------------|----------------------------|-------------------------------------------------------------------------------------------------------------| +| **String** | **alliance_rule** | The tag name that defines the alliance rule. | +| **String** | **player_respawned_trigger**| The event trigger to send when a player respawns at a respawn point. | +| **JSON Object**| **spawn_blocking** | Settings that control what blocks a respawn point. | +| | blocking_alliance_rule | The alliance rule tag name used to check for respawn blocking. | +| | blocking_radius | The radius around the respawn point used to check for entities that may block respawning. | +| | tag_filter | The tag filter used to determine whether an entity should block a respawn point. | +| | exclude_tags | An array of tags to exclude from entities that block respawn points. | +| | include_tags | An array of tags that must be present for entities to block respawn points. | ### badger:rewards @@ -3970,9 +3781,6 @@ states what rewards will be granted when this entity is created. |:-----------:|:-----------:|:-----------:|:-----------:| | Array| reward| | The items that will be awarded to player when entity is created. | - - - ### badger:rider Marks an entity as one that can ride on mounts. @@ -3982,27 +3790,18 @@ Marks an entity as one that can ride on mounts. | Array| exclude_tags| | The tags required to NOT be on an entity for an effect to trigger. | | Array| include_tags| | The tags required to be on an entity for an effect to trigger. | - - - ### badger:scriptable_buildable_spawner Denotes whether or not this entity can have its spawner settings overwritten by scripts. - - ### badger:server_block_source_removal Remove the BlockSourceComponent because this entity doesn't need one. - - ### badger:show_debug_health Show the Debug Health of the entity - - ### badger:spawn_costs In cases where it could cost to use this entity this will be cost. @@ -4012,15 +3811,10 @@ In cases where it could cost to use this entity this will be cost. | Array| costs| | The items that will be deducted from the player when this entity is spawned. | | Array| tickets| | The ticket type that will be deducted from the player or team when this entity is spawned. | - - - ### badger:spawn_tracking Dictates whether this entity has its spawning tracked. - - ### badger:spawner_add_loot_override Units spawned from this spawner will utilize an override loot table. @@ -4029,9 +3823,6 @@ Units spawned from this spawner will utilize an override loot table. |:-----------:|:-----------:|:-----------:|:-----------:| | List| name| | The override type name (NOT a loot table ID). This should resolve to a loot table on the entity. | - - - ### badger:spawner_add_tags Tags added on top of entities existing tags spawned by this spawner. @@ -4040,23 +3831,32 @@ Tags added on top of entities existing tags spawned by this spawner. |:-----------:|:-----------:|:-----------:|:-----------:| | Array| tags| | Additional tags to be added to the spawned entity. | - - - ### badger:spawner_rules Defines the rules for when or where to spawn entities. -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| JSON Object| block_type_rule| | Defines optional block type spawner rule.

valid_types

Defines a list of valid block types names to spawn entities on.

| -| JSON Object| bsharp_rule| | Defines optional bSharp global variable spawner rule.

value

Defines the value of the global variable that causes the spawner to stop spawning.

variable

Defines name of the bSharp global variable.

| -| JSON Object| distance_rule| | Defines optional distance spawner rule.

distance_data

Defines optional entity distance rule.

alliance_rule

Defines the alliance rule of an entity that can prevent spawning.

max_distance

Defines the distance that entities have to be within before the spawner can start spawning.

min_distance

Defines the distance that entities cannot be within before the spawner can start spawning.

tag_filter

filter object

exclude_tags

list of exclude tags

include_tags

list of include tags

village_bounds_distance_data

Defines optional village bounds distance spawner rule.

destruction_spawn_delay

Defines the duration of time waited after the destruction of a village in range before applying the isDestroyed rule.

horde_names

Defines the hordes to check. Do not define to check all villages of any horde.

is_destroyed

Defines if this rule only applies to destroyed villages. Do not define to check both alive and destroyed villages.

max_distance

Defines the padding from village bounds the spawner can start spawning.

min_distance

Defines the padding from village bounds the spawner cannot be in.

village_distance_data

Defines optional village distance spawner rule.

destruction_spawn_delay

Defines the duration of time waited after the destruction of a village in range before applying the isDestroyed rule.

horde_names

Defines the hordes to check. Do not define to check all villages of any horde.

is_destroyed

Defines if this rule only applies to destroyed villages. Do not define to check both alive and destroyed villages.

max_distance

Defines the distance that any village has to be within before the spawner can start spawning.

min_distance

Defines the distance that a village cannot be within before the spawner can start spawning.

| -| Boolean| spawn_if_village_occupied| | Defines optional flag for whether this spawner should spawn when a village is occupied or not. Omitting this option allows spawning regardless of the occupation state. | -| JSON Object| time_of_day_rule| | Defines optional time of day spawner rule.

times

Defines the times of day that this spawner is allowed to spawn during.

| - - - +| **Type** | **Name** | **Description** | +|----------------|----------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **JSON Object** | **block_type_rule** | Defines an optional block type spawner rule. | +| | **valid_types** _(Array)_ | List of valid block type names that the spawner can use for spawning entities. | +| **JSON Object** | **bsharp_rule** | Defines an optional `bSharp` global variable spawner rule. | +| | **value** _(Number)_ | Value of the global variable that causes the spawner to stop spawning. | +| | **variable** _(String)_ | Name of the `bSharp` global variable used in this rule. | +| **JSON Object** | **distance_rule** | Defines an optional distance spawner rule. | +| | **distance_data** _(Object)_ | Specifies the optional entity distance rule. | +| | **alliance_rule** _(String)_ | Defines an entity's alliance rule, determining whether the spawner should prevent spawning based on the entity’s alliance. | +| | **max_distance** _(Number)_ | Maximum distance that entities have to be within for the spawner to start spawning. | +| | **min_distance** _(Number)_ | Minimum distance that entities cannot be within for the spawner to start spawning. | +| | **tag_filter** _(Object)_ | Filter object defining conditions based on tags. | +| | **exclude_tags** _(Array)_ | List of tags that must be excluded from the spawning process. | +| | **include_tags** _(Array)_ | List of tags that must be included for spawning to occur. | +| | **village_bounds_distance_data** _(Object)_ | Specifies village bounds distance-based rules for spawning. | +| | **destruction_spawn_delay** _(Number)_ | Duration of time (in seconds) waited after the destruction of a village before applying the "isDestroyed" rule. | +| | **horde_names** _(Array)_ | Defines the hordes to check. If not defined, all villages of any horde are checked. | +| | **is_destroyed** _(Boolean)_ | Determines whether this rule applies only to destroyed villages. If not defined, the rule checks both alive and destroyed villages. | +| **Boolean** | **spawn_if_village_occupied** | Specifies whether this spawner should spawn when a village is occupied. Omitting this option allows spawning regardless of the occupation state. | +| **JSON Object** | **time_of_day_rule** | Defines an optional time-of-day-based spawner rule. | +| | **times** _(Array)_ | Defines the specific times of day during which the spawner is allowed to spawn entities. | ### badger:sprint @@ -4070,9 +3870,6 @@ Defines the settings required for an entity to sprint. | String| sprint_negate_status| | The name of the status effect to apply to negate the sprinting effect. | | String| sprint_status| | The name of the status effect to apply when sprinting. | - - - ### badger:stamina Defines the settings required for stamina depletion. @@ -4088,9 +3885,6 @@ Defines the settings required for stamina depletion. | Decimal| regen_rate| | Defines the rate at which stamina will regenerate (per tick). | | Decimal| stamina_replenish_audio_threshold| | Stamina must drop below this value in order for the stamina replenished audio event to trigger when it refills. | - - - ### badger:state_reporting Defines the settings for game state reporting. @@ -4101,26 +3895,21 @@ Defines the settings for game state reporting. | Decimal| states| | Defines the list of states that can be reported. | | Decimal| tag| | Defines the tag for this state. | - - - ### badger:static_entity Controls if this entity should only be partitioned on demand. - - ### badger:status Defines this entity as a status effect prototype. -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| String| applied_name| | The name given to this status effect. | -| JSON Object| default_resistance| | Sets the default resistance parameters, which are used if the affected entity does not have a resistance defined for this status effect (see badger:resist_status).

resistance_persist_time

Defines how long this status effect will be blocked from reactivating after ending. A value of -1 allows the status effect to be refreshed even before the active effect ends.

resisted

Sets whether or not this status effect is resisted completely by default.

time

Sets the default time this status effect lasts for.

| - - - +| **Type** | **Name** | **Description** | +|----------------|---------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **String** | **applied_name** | The name assigned to this status effect. | +| **JSON Object**| **default_resistance** | Sets the default resistance parameters, used if the entity does not have a specific resistance for this status effect (refer to `badger:resist_status`). | +| | resistance_persist_time | Duration (in seconds) for which the status effect is blocked from reactivating after it ends. A value of `-1` allows the effect to refresh before ending. | +| | resisted | Determines if this status effect is completely resisted by default. | +| | time | Specifies the default duration (in seconds) for which this status effect lasts. | ### badger:status_effect_ramp_off @@ -4130,26 +3919,20 @@ Causes a gradual reduction of numerical effects, leading up to the expiry of the |:-----------:|:-----------:|:-----------:|:-----------:| | Decimal| transition_duration| | Time, in seconds, over which the status effect will ramp down (before the standard end time). | - - - ### badger:status_effect_telemetry_tracking Defines the settings used when tracking telemetry for certain status effects. -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| Array| track| | List of status effect names to track.

status_effect_applied_name

Applied name of the status effect to track.

telemetry_id

Name of the telemetry event.

| - - - +| **Type** | **Name** | **Description** | +|----------|-----------------------------------|-------------------------------------------------------------------------------------------------------| +| Array | **track** | List of status effect names to track. | +| | **status_effect_applied_name** | The name of the status effect that has been applied and is being tracked. | +| | **telemetry_id** | The name of the telemetry event associated with the tracking of the status effect. | ### badger:sub_objective_health_bar Causes the entity to display sub-objective information on the dedicated objective health bar on the player's screen. - - ### badger:suppress_target_action suppresses target actions for a period of time. @@ -4159,15 +3942,10 @@ suppresses target actions for a period of time. | Decimal| max_time| | max amount of time in seconds to suppress target actions for. | | Decimal| min_time| | (optional) min amount of time in seconds to suppress target actions for. If specified, a random value between min and max will be chosen. | - - - ### badger:swaps_mounts Indicates that this entity allows an interactor to swap their mount. - - ### badger:swaps_team Defines this entity as a status effect that causes its host to temporary switch teams. @@ -4177,23 +3955,19 @@ Defines this entity as a status effect that causes its host to temporary switch | Boolean| swap_to_inflictor| | If true, swaps the host to the inflicting entity's team. | | String| team| | The name of the team to specifically swap to (when not swapping to the inflicting entity's team). | - - - ### badger:tag_modifier_source Modifies the tags of entities within a certain radius, for as long as they are in that radius -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| String| alliance_rule_filter| | Alliance rule filter to determine who to apply tags to | -| Decimal| radius| | Range to apply tag modifications to | -| JSON Object| tag_filter| | Tag filter to determine who to apply tags to

exclude_tags

Exclude tags for filter

include_tags

Include tags for filter

| -| Array| tags_to_add| | Tags to add | -| Array| tags_to_remove| | Tags to remove | - - - +| **Type** | **Name** | **Description** | +|----------------|------------------------------|----------------------------------------------------------------------------| +| **String** | **alliance_rule_filter** | Alliance rule filter to determine who to apply tags to. | +| **Decimal** | **radius** | Range to apply tag modifications to. | +| **JSON Object**| **tag_filter** | Tag filter to determine who to apply tags to. | +| | exclude_tags | Tags to exclude from the filter. | +| | include_tags | Tags to include in the filter. | +| **Array** | **tags_to_add** | Tags to add. | +| **Array** | **tags_to_remove** | Tags to remove. | ### badger:tags @@ -4203,15 +3977,10 @@ Designer prescribed tags that can be used to filter or discern this entity from |:-----------:|:-----------:|:-----------:|:-----------:| | Array| tags| | Add as many different tags to allow to filter this entity by having or not having certain tasks. | - - - ### badger:take_block_space This description means this entity takes the space of a block and should be removed if a new block want the space - - ### badger:target_actions Defines the actions that get carried out when a target is selected by a targeting priority enabling these actions. @@ -4220,28 +3989,26 @@ Defines the actions that get carried out when a target is selected by a targetin |:-----------:|:-----------:|:-----------:|:-----------:| | List| actions| | List of actions. | - - - ### badger:target_assigner Defines this entity as a target assigner which pushes priority targets to influenced entities. -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| String| alliance_rule_filter| | Alliance rule to filter target by. | -| Boolean| despawn_on_target_lost| | When true, the entire order will end when the target is destroyed, cancelling movement. | -| Decimal| drop_target_range| | How far a selected target needs to be from the assigner before it is dropped. | -| Decimal| find_target_range| | How far will the assigner will search for a target to select/assign. | -| Boolean| force_move| | If this command is a force move command, will adjust enemy highlighting to match the action. | -| Decimal| force_target_range| | Within this range, mobs will go directly to attack the target, ignoring any secondary targets that are closer. | -| Boolean| parent_self_to_target| | When true, the target assigner entity will parent itself to the targeted entity. | -| JSON Object| pre_redirect_target_filter| | Early phase alliance and tag filter BEFORE redirection. Redirector hurtboxes that get found in this phase will redirect you to target the default hurtbox, which will get further filtered by the main tag filter. Don't change this without coder approval.

exclude_tags

Array of tags to exclude (any of) when filtering targets.

include_tags

Array of tags to require (all of) when filtering targets.

| -| Boolean| single_target| | When true, the target assigner will stop searching for targets after its first selected target is destroyed. | -| JSON Object| target_filter| | Alliance and tag filter used by this assigner to filter targets.

exclude_tags

Array of tags to exclude (any of) when filtering targets.

include_tags

Array of tags to require (all of) when filtering targets.

| - - - +| **Type** | **Name** | **Description** | +|----------------|----------------------------------|---------------------------------------------------------------------------------------------------------------------------------------| +| **String** | **alliance_rule_filter** | Alliance rule used to filter the target by. | +| **Boolean** | **despawn_on_target_lost** | When true, the entire order ends when the target is destroyed, cancelling movement. | +| **Decimal** | **drop_target_range** | The distance a selected target must be from the assigner before it is dropped. | +| **Decimal** | **find_target_range** | The distance the assigner will search for a target to select or assign. | +| **Boolean** | **force_move** | If true, this command is a force move command, adjusting enemy highlighting to match the action. | +| **Decimal** | **force_target_range** | Within this range, mobs will directly attack the target, ignoring any secondary targets that are closer. | +| **Boolean** | **parent_self_to_target** | When true, the target assigner entity will parent itself to the targeted entity. | +| **JSON Object**| **pre_redirect_target_filter** | Early phase alliance and tag filter before redirection. Redirector hurtboxes found in this phase will redirect to target the default hurtbox, which will be further filtered by the main tag filter. Changes require coder approval. | +| | exclude_tags | Array of tags to exclude (any of) when filtering targets. | +| | include_tags | Array of tags to require (all of) when filtering targets. | +| **Boolean** | **single_target** | When true, the target assigner will stop searching for targets after its first selected target is destroyed. | +| **JSON Object**| **target_filter** | Alliance and tag filter used by this assigner to filter targets. | +| | exclude_tags | Array of tags to exclude (any of) when filtering targets. | +| | include_tags | Array of tags to require (all of) when filtering targets. | ### badger:targeting @@ -4252,9 +4019,6 @@ Defines the entity's targeting behaviour. Used to drive what the entity can targ | Array| targeting_priorities| | Entries defining what the entity can target at a specified range. Entries are in order of high-to-low priority. | | Boolean| update_targeting_every_tick| | When true, the entity checks for targets constantly, instead of a couple of times per second. Doing so is more costly for performance and should be avoided outside of special cases. | - - - ### badger:telemetry_category Settings used when reporting telemetry info. @@ -4263,9 +4027,6 @@ Settings used when reporting telemetry info. |:-----------:|:-----------:|:-----------:|:-----------:| | String| category_name| | Defines the category name used when reporting telemetry. | - - - ### badger:telemetry_game_zone Determines if a village will trigger game zone telemetry and additional information regarding it. @@ -4276,9 +4037,6 @@ Determines if a village will trigger game zone telemetry and additional informat | Integer| alt_id| | An alternate game zone ID to use if the main id isn't sufficient. | | Integer| id| | The game zone ID/index to use when entering the area. | - - - ### badger:telemetry_lure_direct Determines if a village will trigger game zone telemetry and additional information regarding it. @@ -4288,9 +4046,6 @@ Determines if a village will trigger game zone telemetry and additional informat | Boolean| is_advanced| | for directors specifically, is it a simple or targeted director? | | String| order_type| | Is this a lure or director? | - - - ### badger:telemetry_track_banner_order Determines if a mob should be tracked when given a banner order for telemetry purposes. @@ -4299,9 +4054,6 @@ Determines if a mob should be tracked when given a banner order for telemetry pu |:-----------:|:-----------:|:-----------:|:-----------:| | Boolean| enabled| | Is this entity being tracked for banner order | - - - ### badger:text_markup_icon_name Defines the name of the icon to be used in HUD error messages. @@ -4310,9 +4062,6 @@ Defines the name of the icon to be used in HUD error messages. |:-----------:|:-----------:|:-----------:|:-----------:| | String| name| | Full name of icon. | - - - ### badger:ticket_cap_modifier Modify the cap for a list of tickets @@ -4323,9 +4072,6 @@ Modify the cap for a list of tickets | String| ticket| | The name of the ticket cap to modifying | | Array| ticket_modifiers| | Key value pairs that describe which ticket cap we are modifying | - - - ### badger:track_damage Dictates whether this entity will track damage it receives or delivers. @@ -4335,21 +4081,14 @@ Dictates whether this entity will track damage it receives or delivers. | Boolean| dealt| | Whether the village should track the damage it deals. | | Boolean| taken| | Whether the village should track the damage it takes. | - - - ### badger:track_influenced_group_position Flags a lure or director to track the centroid of its group of influenced entities. - - ### badger:tracks_health_change Enables tracking of client-side changes in health. Useful for interrupting certain player actions. - - ### badger:trigger_criteria Flag Attribute that indicates this entity is used as a trigger section. @@ -4358,9 +4097,6 @@ Flag Attribute that indicates this entity is used as a trigger section. |:-----------:|:-----------:|:-----------:|:-----------:| | List| filters| | List of filter include and exclude tags | - - - ### badger:unit_direct_tags Tags that are used to filter entities for advanced direct groups. @@ -4369,19 +4105,16 @@ Tags that are used to filter entities for advanced direct groups. |:-----------:|:-----------:|:-----------:|:-----------:| | Array| tags| | Tags to add to this entity for advanced direct groupings. | - - - ### badger:unlockable_buffs When applied to an entity, buffs itself under certain unlock conditions. -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| Array| buffs| | The list of unlockable buffs used by this entity.

buff_id

The buff to be applied to this entity.

has_unlock

If true, this buff will only be active when this resource is acquired. If false, this buff will only be active if this resource is not acquired.

resource

The name of a resource used to enable or disable this buff.

| - - - +| **Type** | **Name** | **Description** | +|----------|----------|------------------| +| Array | **buffs** | The list of unlockable buffs used by this entity. | +| | buff_id | The specific buff to be applied to this entity. | +| | has_unlock | If true, this buff is active only when the specified resource is acquired. If false, the buff is active only when the resource is not acquired. | +| | resource | The name of the resource used to enable or disable this buff. | ### badger:village @@ -4392,9 +4125,6 @@ Some general attributes that describe a village. | Integer| generation_priority| | Villages with a higher generation priority will be planned and built first. If no priority is provided, 0 is the default. | | String| name| | Identifies the type of village. | - - - ### badger:village_bounds_trigger_volume_size Defines the size of the village bounds trigger volume. This is also the size which village trigger volumes are relative to. @@ -4403,9 +4133,6 @@ Defines the size of the village bounds trigger volume. This is also the size whi |:-----------:|:-----------:|:-----------:|:-----------:| | Decimal| padding| | The distance in blocks to expand the trigger volume beyond the village bounds. | - - - ### badger:village_bridge Determines how villages build bridges. @@ -4419,9 +4146,6 @@ Determines how villages build bridges. | Decimal| bridge_vertical_distance_max| | The largest Y difference allowed between the start and end of the bridge. | | Decimal| diagonal_bridge_degree_tolerance| | The number of degrees a bridge can deviate from right angles before being considered diagonal. | - - - ### badger:village_building_path Determines how villages build paths from buildings. @@ -4449,9 +4173,6 @@ Determines how villages build paths from buildings. | Decimal| path_width| | The width of the path in meters. | | Decimal| prevent_buildable_placement| | Setting this to false will allow buildable to be placed on top of paths. | - - - ### badger:village_building_placement Settings for placing buildings inside of village zones. @@ -4464,9 +4185,6 @@ Settings for placing buildings inside of village zones. | Decimal| placement_jitter_max| | The maximum distance that the placement will can be offset from a village zone face site. This value will be clamped if it's large enough to push the placement outside of a zone. | | Decimal| placement_jitter_min| | The minimum distance that the placement will can be offset from a village zone face site. This value will be clamped if it's large enough to push the placement outside of a zone. | - - - ### badger:village_construction Determines which buildings will be placed during village generation. @@ -4475,9 +4193,6 @@ Determines which buildings will be placed during village generation. |:-----------:|:-----------:|:-----------:|:-----------:| | String| start_logic| | The deck logic to run on startup | - - - ### badger:village_district_path Determines how villages build paths from districts. @@ -4505,15 +4220,10 @@ Determines how villages build paths from districts. | Decimal| path_width| | The width of the path in meters. | | Decimal| prevent_buildable_placement| | Setting this to false will allow buildable to be placed on top of paths. | - - - ### badger:village_do_not_clear_on_slot_overlap If this attribute is present, then if any village will generate on the same slot, then this village will not be despawned. - - ### badger:village_hanging_decoration_placement Settings for placing hanging decorations between village zones. @@ -4523,9 +4233,6 @@ Settings for placing hanging decorations between village zones. | Decimal| minimum_edge_width| | The minimum shared edge width between two zone considered for placement. | | Decimal| minimum_height_delta| | The minimum height difference between two zone considered for placement. | - - - ### badger:village_heart A structure that must remain for the village to continue existing. @@ -4534,19 +4241,16 @@ A structure that must remain for the village to continue existing. |:-----------:|:-----------:|:-----------:|:-----------:| | | badger:village_heart| | | - - - ### badger:village_heart_destruction Customized destruction behaviour when all Village Hearts are destroyed in a village. -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| | List| | groups

Decimal

delay

Decimal

interval

Boolean

disable_vfx

| - - - +| **Type** | **Name** | **Description** | +|----------------|--------------------|---------------------------------------------------------------------------------------------------------| +| **List** | **groups** | A list containing various group configurations. | +| | **delay** (Decimal) | The delay before the group effect starts. | +| | **interval** (Decimal)| The interval between successive group effects. | +| | **disable_vfx** (Boolean)| A flag that determines whether visual effects should be disabled for this group. | ### badger:village_heart_disabled_actions @@ -4556,9 +4260,6 @@ Actions that will occur to village structures when the village heart is disabled |:-----------:|:-----------:|:-----------:|:-----------:| | String| village_structures_action| | The action that will occur to the structures of the village | - - - ### badger:village_height_change Influences the village height changes. @@ -4567,9 +4268,6 @@ Influences the village height changes. |:-----------:|:-----------:|:-----------:|:-----------:| | Decimal| clamp_size| | The number of blocks above a height change that are not changed to air. | - - - ### badger:village_influence This gives an entity an influence with which it can apply to a portion of the map. This influence can be used for things such as placing buildings in areas of high or low influence. @@ -4578,9 +4276,6 @@ This gives an entity an influence with which it can apply to a portion of the ma |:-----------:|:-----------:|:-----------:|:-----------:| | Decimal| amount| | The amount of influence exerted by this entity. | - - - ### badger:village_moat Determines how villages build paths from districts. @@ -4590,9 +4285,6 @@ Determines how villages build paths from districts. | Decimal| edge_noise_amplitude| | The noise amplitude determines the maximum distance that moat zone edges can shifted inward. | | Decimal| edge_noise_scale_factor| | A smaller scale factor will produce a more gradual change along the moat zone edges. | - - - ### badger:village_wall Determines which buildings will be placed during village generation. @@ -4601,9 +4293,6 @@ Determines which buildings will be placed during village generation. |:-----------:|:-----------:|:-----------:|:-----------:| | Decimal| wall_offset| | How far to move the walls away from their zone edges. | - - - ### badger:village_weathering Determines how villages apply weathering effects to terraformed zone edges. @@ -4623,9 +4312,6 @@ Determines how villages apply weathering effects to terraformed zone edges. | Decimal| wave_noise_scale| | The magnitude of noise used to soften the wave function. | | Decimal| wave_period_scale| | A smaller scale factor will reduce the frequency of the weathering wave for a smoother effect. | - - - ### badger:village_zone Influences the villages topology. @@ -4641,9 +4327,6 @@ Influences the villages topology. | Decimal| zone_jitter_min| | The maximum amount that a village zone will be offset in world units. | | Decimal| zone_spacing| | The default distance between village zones before jitter is applied. | - - - ### badger:village_zone_scoring Describes how village zones are prioritized during building placement. @@ -4664,9 +4347,6 @@ Describes how village zones are prioritized during building placement. | Decimal| far_from_weight| | The weight applied to the score provided to zones nearby the far from position. | | Decimal| random_weight| | The weight applied to the random score (between 0 and 1) provided to zones. | - - - ### badger:wander Dictates entity's idle behaviour. @@ -4676,9 +4356,6 @@ Dictates entity's idle behaviour. | Decimal| wander_frequency| | How many times per second on average this entity will idle wander, instead of remaining still. | | Decimal| wander_radius| | How far will this entity wander around a fixed point. | - - - ### badger:waypoint_marker Entity will have a waypoint marker on the HUD @@ -4695,26 +4372,22 @@ Entity will have a waypoint marker on the HUD | Boolean| use_faction_name| | If true, the waypoint's text will be the name of its faction. | | Vector [a, b, c]| world_position_offset| | Waypoint marker world position offset. | - - - ### badger:waypoint_marker_visibility Entity will have a waypoint marker on the HUD -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| Integer| compass_level| | Determines which compass level a non-team icon is shown in (-1 => onscreen and bottom, 0 => bottom, 1 => top) | -| String| compass_max_range| | Maximum range value to be shown on compass (short, medium, long) | -| Array| filter_tagsets| | Array of paired include and exclude tag arrays for choosing when this icon can appear.

exclude_tags

Array of tags to exclude (any of) when filtering compass icons.

include_tags

Array of tags to require (any of) when filtering compass icons.

| -| Boolean| hide_from_non_alliance| | Determines if waypoint should be hidden from opponents | -| Decimal| waypoint_max_range| | Maximum range value | -| Decimal| waypoint_max_range_alliance| | Maximum range value for opponent waypoint | -| Decimal| waypoint_min_range| | Minimum range value | -| Decimal| waypoint_min_range_alliance| | Minimum range value for opponent waypoint | - - - +| **Type** | **Name** | **Description** | +|----------------|-----------------------------------|-------------------------------------------------------------------------------------------------------------------| +| **Integer** | **compass_level** | Determines the compass level where a non-team icon is displayed. Values: -1 (onscreen and bottom), 0 (bottom), 1 (top). | +| **String** | **compass_max_range** | Maximum range value to be displayed on the compass (options: short, medium, long). | +| **Array** | **filter_tagsets** | Array of paired include and exclude tag arrays for determining when this icon can appear. | +| | **exclude_tags** | Array of tags to exclude (any of) when filtering compass icons. | +| | **include_tags** | Array of tags to require (any of) when filtering compass icons. | +| **Boolean** | **hide_from_non_alliance** | Determines if the waypoint should be hidden from opponents. | +| **Decimal** | **waypoint_max_range** | Maximum range value for the waypoint. | +| **Decimal** | **waypoint_max_range_alliance** | Maximum range value for opponent waypoints. | +| **Decimal** | **waypoint_min_range** | Minimum range value for the waypoint. | +| **Decimal** | **waypoint_min_range_alliance** | Minimum range value for opponent waypoints. | ### badger:world_collision @@ -4725,9 +4398,6 @@ Defines the entity's world collision properties. | Decimal| auto_step| | The maximum height of an object that an entity can automatically step on while walking. | | Decimal| interpolation_speed| | The speed at which the auto speed will interpolate. | - - - ### badger:world_request World request information associated with a particular entity archetype. @@ -4736,9 +4406,6 @@ World request information associated with a particular entity archetype. |:-----------:|:-----------:|:-----------:|:-----------:| | String| world_request_type| | Determines the priority of the world requests dispatched. | - - - ### badger:world_single_spawn Used to place a single unique entity during world gen, that won't get double placed when saveloading/reloading chunks @@ -4747,9 +4414,6 @@ Used to place a single unique entity during world gen, that won't get double pla |:-----------:|:-----------:|:-----------:|:-----------:| | String| entity| | The name of the entity to spawn | - - - ### badger:zone_type Specifies the type of zone that this buildable provides. @@ -4759,22 +4423,20 @@ Specifies the type of zone that this buildable provides. | Boolean| non_blocking| | When true, this zone will be used for 'must be in zone' checks but not 'must NOT be in zone' checks. Useful for not blocking placement of enemy structures. | | String| zone_type| | This is the type of zone that this buildable provides. Ex. Utopia, Village, etc. | - - - ### badger:zone_type_requirement Defines the different types of zones of control which allows this building to be constructed/online. -| Type| Name| Default Value| Description | -|:-----------:|:-----------:|:-----------:|:-----------:| -| Array| exclude_tags| | the zones types that can not be overlapped for this placement. | -| Array| include_tags| | the different types of zones of control which allows this building to be constructed/online. | -| JSON Object| invalid_zone_block_conversion| | Block conversion data for when the structure is no longer in the required zone.

duration_percentage

Percentage of build time it takes to perform block conversion.

modifiers

List of block conversion modifiers.

reversal_duration_percentage

Percentage of build time it takes to reverse block conversion.

top_to_bottom

If true, block conversion happens from top to bottom, rather than bottom to top.

| -| Boolean| set_offline_when_no_zone| | If set to true, this structure will be set offline instead of being destroyed if it's no longer in the required zone at any point. | - - - +| **Type** | **Name** | **Description** | +|----------------|------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **Array** | **exclude_tags** | The zone types that cannot overlap for this placement. | +| **Array** | **include_tags** | The different types of zones of control that allow this building to be constructed or come online. | +| **JSON Object**| **invalid_zone_block_conversion** | Block conversion data for when the structure is no longer in the required zone. | +| | duration_percentage | The percentage of build time required to perform block conversion. | +| | modifiers | A list of block conversion modifiers. | +| | reversal_duration_percentage | The percentage of build time required to reverse block conversion. | +| | top_to_bottom | If true, block conversion occurs from top to bottom, rather than bottom to top. | +| **Boolean** | **set_offline_when_no_zone** | If set to true, this structure will be set offline instead of being destroyed if it is no longer in the required zone at any point. | ### badger:zone_visualization @@ -4785,9 +4447,6 @@ Specifies which types of zones are displayed when previewing the building. | String| group| | The zone group name (one of the zone groups from the zone group service) | | String| zone_alliance_rule| | The alliance rule that specifies which zone(s) should be displayed | - - - ### capped_spawner If this entity spawns entities, it will be bound by the cap of the type specified here. @@ -4797,11 +4456,3 @@ If this entity spawns entities, it will be bound by the cap of the type specifie | String| cap_type| | The cap type that entities shot or spawned by this spawner contribute towards. | | Integer| individual_cap| | If the total cap type is not reached, how many entities can any one instance of this spawner spawn individually. | | Array| toggled_actions| | List of action names on this entity that are disabled when either the cap type limit or the individual limit are reached. | - - - - -## identifier - -The identifier is used to register the entity with the server. The matching identifier in the Entity Behavior JSON in the Resource Pack is what gives the entity its appearance. - diff --git a/EventTriggers.md b/EventTriggers.md index ad48b53..4a2e4f4 100644 --- a/EventTriggers.md +++ b/EventTriggers.md @@ -1,31 +1,36 @@ # Minecraft Legends Event Triggers + Event Triggers give entities life by allowing them to react to changes in gameplay state. Things like animations, audio, particles are driven through event triggers. ## Animation + Set the animation state on the entity which has the `badger:presentation_event` component. -Example:  -``` +Example: + +```json "range_ability_a": { "animation": "range_ability_a" } ``` ## Audio + Play a sound effect at the position of the entity which has the `badger:presentation_event` component. We can specify music to play by setting `is_music` to `true`. Music can also have a type (`"combat","cinematic","exploration","proximity"`). The reason for the type is that we can set audio parameters on music as well. Each type can have it's own set of parameters, but be careful and make sure to reset your music parameters per type when you want to use it. Example:   -``` +```json "on_construction_start": { "audio": "BAE_STRUC_Generic_BuildSequence" } ``` For music: -``` + +```json "on_piglin_combat_start": {     "audio": {         "event": "BAE_MUS_Piglin_Combat", @@ -36,13 +41,14 @@ For music: ``` ## External Audio + Lists of Audio Presentation Events can be defined in separate files and then used in any entity by adding the `external_audio_events` type. External Presentation Event lists are defined in files by using the `badger:external_audio_presentation_events` component. Here is an example of the `on_hero_lured` presentation event being defined in a new JSON file inside the `badger:mob_skeleton` list (NOTE: The list name does not need to match the entity it will be used on): -``` +```json { "badger:external_audio_presentation_events" : { "badger:mob_skeleton": { @@ -59,7 +65,7 @@ External lists can then be referenced in an entity's `badger:presentation_events Here is an example of the `badger:mob_skeleton` list being imported into the `badger:mob_skeleton` entity's presentation events: -``` +```json "badger:presentation_event": { "external_audio_events": { "external_event_list": "badger:mob_skeleton" @@ -71,22 +77,26 @@ Here is an example of the `badger:mob_skeleton` list being imported into the `ba ``` ## Entity + Spawn a new entity on the client or server. The new entity's position and team is copied from the entity which has the `badger:presentation_event` component. You can also spawn multiple entities with an array: `"entity": ["badger:mob_zombie", "badger:piglin_runt", "badger:mob_wolf"]` Example: -``` + +```json "on_world_hit": { "entity": "badger:pres_entity_test" } ``` ## Particles + Play a particle effect on the entity which has the `badger:presentation_event` component. Example: -``` + +```json "on_initialized": { "particles": { "effect": "fx_trail", @@ -99,9 +109,9 @@ Example: "particles": "fx_impact" ``` -If you want to call more then one effect on a presentation event use this syntax: +If you want to call more then one effect on a presentation event use this syntax: -``` +```json "on_construction_end": { "particles": [ { @@ -117,17 +127,19 @@ If you want to call more then one effect on a presentation event use this synta ``` ## Script + Calls a script on the entity which has the  `badger:presentation_event` component. Example: -``` + +```json "event_scripts": { "melee_attack_a": "variable.attack_used = 1;", "melee_attack_b": "variable.attack_used = 2;" } ``` -``` +```json "badger:presentation_event": { "on_melee_attack_a": { "script": "melee_attack_a" @@ -135,11 +147,12 @@ Example: ``` ## Outline + Set the outline color on the entity which has the `badger:presentation_event` component. Example: -``` +```json "on_lured": { "outline": { "color": 4, // an index into the outline colors array defined in PostFX.dragonfx (0 = None, 1 = Teammate, 2 = Enemy, 3 = Directed, 4 = Lured) @@ -149,6 +162,7 @@ Example: ``` ## List of Triggers + This is a list of all of the current triggers in the game. | Name | Description | diff --git a/GeologyService.md b/GeologyService.md index 184aa87..5b5b7f4 100644 --- a/GeologyService.md +++ b/GeologyService.md @@ -1,71 +1,78 @@ # Minecraft Legends Geology Service -![](images/geology_service/image01.png) +![Geology](images/geology_service/image01.png) ## What is the Geology Service? -The Geology Service is a system that lets us place special “geology” textures in the world. It allows us to generate terrain features that we could not easily achieve with our standard procedural terrain generation. + +The Geology Service is a system that lets us place special “geology” textures in the world. It allows us to generate terrain features that we could not easily achieve with our standard procedural terrain generation. ## How does it work? + It works by _recursively sub-scattering_ (see fig. 1) textures of varying size categories throughout a particular biome. There are a large number of control settings (discussed below) that the user can adjust to achieve their design goals. ### Recursive sub-scattering -![](images/geology_service/image02.gif) +![Recursive Sub-Scattering](images/geology_service/image02.gif) -Figure 1: Recursive sub-scatter method, starting with a large texture placement. Each size places one or more smaller-sized features, and small features have a chance of placing another small feature. +Figure 1: Recursive sub-scatter method, starting with a `large` texture placement. Each size places one or more smaller-sized features, and `small` features have a chance of placing another `small` feature. Let’s get into more detail about how this works, using fig. 1 as an example. #### Size categories + The Geology Service currently supports four different size categories: `huge`, `large`, `medium`, and `small`. Each size comes with its own settings that control: + * The likelihood of picking this size as the “first placement” * The relative height range this size is allowed to fall within * The number of smaller features this size attempts to scatter nearby * The distance away from this feature that sub-scattered features will be placed #### First placement -First of all, we have to work out the details for that first placement. We have a few things to consider. -1. **What size should we start with?** We randomly choose a size based on the [`size]_rate` settings. These rates are treated as _weights_, meaning that we add all the weights together to get a _total weight_, and the probability of selecting each size is that size’s weight divided by the total weight. For example: +First of all, we have to work out the details for that first placement. We have a few things to consider. -![](images/geology_service/image03.png) +* **What size should we start with?** We randomly choose a size based on the [`size]_rate` settings. These rates are treated as _weights_, meaning that we add all the weights together to get a _total weight_, and the probability of selecting each size is that size’s weight divided by the total weight. For example: -In this case, the _total weight _is 10 + 25 + 50 + 60 = 145. Therefore, there’s a 10 ÷ 145 ≅ 7% chance of choosing a huge texture, a 25 ÷ 145 ≅ 17% chance of a large texture, etc. +![Probabilities](images/geology_service/image03.png) -2. **Where should it go in the world?** The first placement can only successfully be placed in the biome specified by `place_on_biome`. We randomly select any location in the world that satisfies this constraint. +In this case, the _total weight_is 10 + 25 + 50 + 60 = 145. Therefore, there’s a 10 ÷ 145 ≅ 7% chance of choosing a huge texture, a 25 ÷ 145 ≅ 17% chance of a large texture, etc. -![](images/geology_service/image04.png) +* **Where should it go in the world?** The first placement can only successfully be placed in the biome specified by `place_on_biome`. We randomly select any location in the world that satisfies this constraint. -3. **How tall should it be?** We randomly select a height scaling factor in the range specified by `size_relative_height`. In our example from fig. 1 where we chose a `large` texture, we would choose a scaling factor between 0.2 and 0.6. See relative height for more details. +![place_on_biome](images/geology_service/image04.png) -![](images/geology_service/image05.png) +* **How tall should it be?** We randomly select a height scaling factor in the range specified by `size_relative_height`. In our example from fig. 1 where we chose a `large` texture, we would choose a scaling factor between 0.2 and 0.6. See relative height for more details. -4. **Which texture should it use?** Textures are randomly selected from each size category. In this particular case, there is only one `large` texture to choose from, so we know we’ll be using `tex_stamp_hoodoo_large_01`. +![Relative height](images/geology_service/image05.png) -![](images/geology_service/image06.png) +* **Which texture should it use?** Textures are randomly selected from each size category. In this particular case, there is only one `large` texture to choose from, so we know we’ll be using `tex_stamp_hoodoo_large_01`. + +![Stamp textures](images/geology_service/image06.png) Once we’ve chosen these parameters for the first placement, we move onto the sub-scatter. #### Sub-scatter + Now we have some considerations for sub-scattering. -1. **How many smaller features will we attempt to place nearby?** Each placement size specifies a range of smaller placements to place. +* **How many smaller features will we attempt to place nearby?** Each placement size specifies a range of smaller placements to place. -![](images/geology_service/image07.png) +![Scattering](images/geology_service/image07.png) Our first placement was a `large` placement. Therefore, it will automatically attempt to scatter between 1 and 3 `medium` placements nearby. (In fig. 1, we can see that our large feature scattered 2 `medium`s.) -2. **How far away should those smaller features be from this one?** There is a displacement range setting for each size. +* **How far away should those smaller features be from this one?** There is a displacement range setting for each size. -![](images/geology_service/image08.png) +![Displacement Range](images/geology_service/image08.png) We started with a `large` feature, so now we’re placing `medium` features. According to the data above (`medium_displacement_range`), each one will be randomly placed between 0 and 25 blocks away, in a circular radius. #### Recursion -Now, the trick is this: **each placement repeats this entire process**. That means -* `huge` features place `large` ones, -* `large` features place `medium` ones, +Now, the trick is this: **each placement repeats this entire process**. That means + +* `huge` features place `large` ones, +* `large` features place `medium` ones, * `medium` features place `small` ones, * `small` features may place other `small` ones (subject to `small_scatters_small_chance`) @@ -73,174 +80,197 @@ The logic for each placement starts from here (i.e. we ignore steps 1 and 2 of t This recursive process leads to interesting clusters of features (like the clusters seen in fig. 1), where the intersection of multiple texture stamps can create very complex geological shapes. -![](images/geology_service/image09.png) +![Geological Complexity](images/geology_service/image09.png) ### Textures - - - - - - - - - - - - - -
- - - -
Figure 2: Biome channel - Figure 3: Blend channel - Figure 4: Height channel - Figure 5: Combined channels -
- -Figures 2-6 pertain to the texture `falloff_textures/hoodoos/tex_stamp_med_02`. + +| **Biome Channel** | **Blend Channel** | **Height Channel** | **Combined Channels** | +|----------------------------------------------|----------------------------------------------|-----------------------------------------------|------------------------------------------------| +| ![Biome Channel](images/geology_service/image10.png) | ![Blend Channel](images/geology_service/image11.png) | ![Height Channel](images/geology_service/image12.png) | ![Combined Channels](images/geology_service/image13.png) | +| **Figure 2:** Biome Channel | **Figure 3:** Blend Channel | **Figure 4:** Height Channel | **Figure 5:** Combined Channels | + +Figures 2-5 pertain to the texture `falloff_textures/hoodoos/tex_stamp_med_02`. The textures that get placed by the Geology Service aren’t 100% literal translations of the original textures – that is, they are modified by a few factors. #### Biome height -Each pixel of a texture will correspond to a biome (fig. 2) and a height (fig. 4, taking values 0-255, re-mapped to a range specified by the biome’s `height_params` attribute). _Please note that this data lives in each biome’s data _(`behavior_packs/badger/biomes/`). -![](images/geology_service/image14.png) +Each pixel of a texture will correspond to a biome (fig. 2) and a height (fig. 4, taking values 0-255, re-mapped to a range specified by the biome’s `height_params` attribute). _Please note that this data lives in each biome’s data_(`behavior_packs/badger/biomes/`). -The light green part of figure 2 corresponds to the `drylands_hoodoos_small` biome (as specified in the `biome_map` of fig. 6). That biome’s `height_params` attribute specifies that the 0-255 height values from the height channel should instead correspond to heights from 30-80. That is, a 0-valued pixel in that biome represents an in-game height of 30, while a 255-valued pixel represents an in-game height of 80. +![Biome Height](images/geology_service/image14.png) +The light green part of figure 2 corresponds to the `drylands_hoodoos_small` biome (as specified in the `biome_map` of fig. 6). That biome’s `height_params` attribute specifies that the 0-255 height values from the height channel should instead correspond to heights from 30-80. That is, a 0-valued pixel in that biome represents an in-game height of 30, while a 255-valued pixel represents an in-game height of 80. #### Relative height -Each placement gets randomly assigned a relative height. This has the effect of **narrowing** the biome’s height ranges for that particular feature by the specified amount. For example, we can see here that a `large` feature ends up with a relative height between 0.2 and 0.6. Let’s say we randomly choose the value 0.5. That means instead of a biome height range being re-mapped from 30-80 (width = 80 - 30 = 50), this placement will have those heights re-mapped to the range 30-55 (because the new width = 0.5 * 50 = 25, which is our new width – the lower height remains constant). +Each placement gets randomly assigned a relative height. This has the effect of **narrowing** the biome’s height ranges for that particular feature by the specified amount. For example, we can see here that a `large` feature ends up with a relative height between 0.2 and 0.6. Let’s say we randomly choose the value 0.5. That means instead of a biome height range being re-mapped from 30-80 (width = 80 - 30 = 50), this placement will have those heights re-mapped to the range 30-55 (because the new width = 0.5 * 50 = 25, which is our new width – the lower height remains constant). -![](images/geology_service/image15.png) +![Relative Height](images/geology_service/image15.png) -Figure 6: tex_stamp_hoodoo_med_02.json +Figure 6: `tex_stamp_hoodoo_med_02.json` #### Blend + The blend channel (fig. 3) works the same way in the Geology Service as it does in other placement textures. The 0-255 values are remapped to 0-1, where 0 means “use the existing world height here, 100%”, 1 means “use the (remapped) texture height here, 100%, and 0.5 means “blend the existing world height and the remapped texture height here, 50%-50%”. #### Biome + There is a somewhat complex logic behind determining which biome gets placed at each pixel. Geology types have prioritized “placement biomes”, meaning that textures can place any of these biomes, but higher-priority biomes (ones earlier in the list) will _overwrite_ lower-priority biomes **if the in-game (calculated) elevation at the point associated with the higher-priority biome is higher than the previous in-game elevation.** (There is an optional setting, `biome_always_takes_priority`, that causes this system to ignore the elevation check and will _always_ switch to the higher-priority biome when given a chance.) -![](images/geology_service/image16.png) +![Placement Biome Names](images/geology_service/image16.png) In this example, when textures are overlapping, + * `mountain_summit` can overwrite `peaks`, `mid_hills`, and `foothills` * `mountain_peaks` can overwrite `mid_hills` and `foothills` * `mountain_mid_hills` can overwrite `foothills` #### Height + The height that appears in-game is the _maximum_ of the given texture height and the previous in-game height – that is, **a geology texture can never reduce the terrain height**. ## Other features + ### Minimum group spacing + It is often desirable to enforce some minimum spacing between first placements so that there is likely to be some “empty space” between geology groups. This optional setting, measured in blocks, allows us to enforce that minimum spacing, meaning that if a first placement would otherwise succeed, but it is too close to another first placement, it will instead fail. ### Corner biome checks + It can be disruptive if a geology texture spills over into another biome. This can happen because, by default, we only check to ensure that the center of a geology placement is in the correct biome. These settings allow us to also perform checks on the corners of a proposed geology placement, allowing us to fail a placement that would spill out of the intended biome group. #### Tag check + The biome test at each corner succeeds if the biome located at that position in-game has the tag specified by `biome_tag`. For example, **all** of the mountain biomes have the `mountain` tag, so if a mountain texture would have its corner place in **any** of the mountain biomes, that test would succeed. #### Minimum corners to pass + Sometimes we might want to allow a geology placement to succeed if some or most of its corners would end up in an appropriate biome. In this case, we can specify the minimum number of corners for the placement to succeed. ### Rare texture + Sometimes, we may wish to place a single instance of a special texture in the world. If we provide `optional_rare_texture_name`, that texture will appear exactly once in the world. If this initial placement succeeds, it is treated as a first placement and will sub-scatter smaller features as usual. #### Size category -It is recommended that the optional rare texture is the only texture in its `[size]` category – if it isn’t, the Geology Service will randomly select from among all_ _of the textures in the same size category as the rare feature (and an assert will be thrown). Note that if the `optional_rare_texture_name` does not appear in **any** of the `[size]` categories, an assert will be thrown. + +It is recommended that the optional rare texture is the only texture in its `[size]` category – if it isn’t, the Geology Service will randomly select from among all__of the textures in the same size category as the rare feature (and an assert will be thrown). Note that if the `optional_rare_texture_name` does not appear in **any** of the `[size]` categories, an assert will be thrown. #### Placement restrictions + The rare texture will only successfully place in an area where the entire texture footprint lies upon the specified place-upon biome. The Geology Service will attempt to find a location that satisfies this restriction `max_attempts_rare_placement` times, after which the placement will fail and the system will move on to regular group placements. ### SDF shape locators + The Geology Service can interface with the SDF Shape Service, allowing us to create even more complex terrain. Jungle mountains use this technology extensively. Adding new geology types that combine with SDF shapes requires code support, so if this interests you, please reach out to a world engineer to discuss your ideas. ## Adding new geology types -Each `json` file within `data/behavior_packs/badger/gamelayer/server/world_gen/geology/` describes a unique geology type. To add a new geology type to the game, you can duplicate one of the existing `json` files, then modify the data within as needed. -You will likely want to create new textures that your new geology type will reference. The textures live in sub-folders of `data/behavior_packs/badger/falloff_textures/`. For example: +Each `json` file within `data/behavior_packs/badger/gamelayer/server/world_gen/geology/` describes a unique geology type. To add a new geology type to the game, you can duplicate one of the existing `json` files, then modify the data within as needed. +You will likely want to create new textures that your new geology type will reference. The textures live in sub-folders of `data/behavior_packs/badger/falloff_textures/`. For example: ## Data + ### settings + The main body, where the general settings are found. If a default value is specified, the setting is not required. #### enabled (bool) + Determines whether this geology type will appear in the world. #### allow_village_overlap (bool – default is false) + Determines whether other world gen placements are allowed to overlap with this geology type. This could lead to strange interactions so it is recommended to leave it set to `false` unless you test thoroughly with overlapping placements. #### biome_always_takes_priority (bool – default is false) + See Biome for explanation. #### attempts_per_square_kilometre (int) + Determines the number of group placements to attempt to place. Larger numbers mean more geology placements. #### placement_biome_names (list[string]) + Determines the priority of biomes that will appear in this geology type’s textures. Earlier in the list means higher priority. See Biome. #### place_on_biome (string) + The biome that this geology type may place upon. #### place_on_biome_parent (string) + The “parent” biome name that this geology type may place upon (e.g. if `place_on_biome` is `drylands_enable_hoodoos`, the `place_on_biome_parent` should be `drylands`). #### biome_tag (string) + A valid biome tag. See Corner biome checks. #### min_texture_corners_in_correct_biome (int [0, 4] – default is 0) + The minimum number of corners that must appear within the appropriate biome. See Corner biome checks. #### min_distance_between_groups (int – default is 0) + A minimum distance in blocks that groups’ first placements must respect, relative to every other first placement. See Minimum group spacing. #### max_attempts_to_find_group_pos (int – default is 1) + For each placement group, how many times to attempt to find a position that satisfies the `min_distance_between_groups`. #### max_failures (int – default is ∞) + During geology group placement, if we encounter this many failures due to violating group spacing or corner biome checks, we quit feature placement early. #### max_group_size (int – default is "no max size") + Cause recursive sub-scattering to stop early if we reach a particular group size. #### [size]_displacement_range (IntRange [min, max]) + A recursively-scattered feature of size `[size]` will be placed between `[min]` and `[max]` blocks away from its parent. #### [size]_scatters_[smaller-size] (IntRange [min, max]) + A feature of size `[size]` will place between `[min]` and `[max]` placements of size `[smaller-size]`. #### small_scatters_small_chance (float) + The probability that any small placement will sub-scatter another small placement. Note that things can get a little out of hand if this number is sufficiently large. #### [size]_rate (int) + The relative weight for size `[size]`. See “what size should we start with?” #### [size]_relative_height (FloatRange [min, max]) + The relative height range for size `[size]`. Each placement will randomly select a value between `[min]` and `[max]`. See Relative height. ### texture_registry + This attribute holds a small number of texture-specific settings, as well as lists of all textures that may be used for this geology type. If a default value is specified, the setting is not required. #### texture_key (string) + The name of this geology type, e.g. “hoodoos” or “jungle_mountains”. _Used for debug/logging text only._ #### optional_rare_texture_name (string – default is "" [empty string]) + The name of a texture that should appear only once in the world. The name must match one of the textures listed in a size category below, and that texture should be the only texture in its size category. See Rare texture. #### max_attempts_rare_placement (int – default is 1) + The number of times we will attempt to find an appropriate location for the given rare texture. #### [size] (list[string]) + Lists of textures of size `[size]`. Every texture in a given category should be the same _actual size_ for corner biome checks to work properly. #### [size]_texture_size (int) + The pixel dimensions of the textures for the given category `[size]`. These sizes must be accurate for corner biome checks to work properly. Note: it is assumed that all textures used are square. ## Notes + `[size]` is one of { `huge`, `large`, `medium`, `small` }. diff --git a/LICENSE b/LICENSE index 3e3bcc1..1dfc2aa 100644 --- a/LICENSE +++ b/LICENSE @@ -1,3 +1,29 @@ +# License(s) + +MIT License + +Copyright (c) 2024 Legends Modding + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice in its full swag shall +be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +----------- + MIT License Copyright (c) 2023 Mojang diff --git a/README.md b/README.md index 9de7b79..a9eff08 100644 --- a/README.md +++ b/README.md @@ -1,30 +1,67 @@ + # Minecraft Legends Documentation -This repository houses the documentation for Minecraft Legends. It will help you understand how the data is laid out and how to make your own mods for the game. -Watch this space as we're planning on releasing more documentation in the future. For now, you can check out the entry below which describes all of the behaviours available to entities in the game. +![Minecraft Legends Logo](images/minecraftlegends_logo.jpg) + +Welcome to the official Minecraft Legends documentation repository! Here, you'll find everything you need to understand the game's data structure and create your own mods. Whether you're a seasoned modder or just getting started, this documentation is designed to provide clear guidance. + +We’re constantly expanding our documentation, so stay tuned for updates. Currently, you can explore the various behaviors that define entities in Minecraft Legends. + +## Table of Contents + +1. [Entities](#entities) + - [Event Triggers](#event-triggers) +2. [Blockbench Plugin](#blockbench-plugin) +3. [World Generation](#world-generation) + - [Village Generation](#village-generation) + - [Geology Service](#geology-service) +4. [Barrier Blocks](#barrier-blocks) +5. [BSharp Scripting](#bsharp-scripting) +6. [Wolverine](#wolverine) +7. [Contributing](CONTRIBUTING.md) + +## 📖 Overview ## Entities -From Piglins invading the overworld to allays gathering resources, all of the Minecraft Legends gameplay comes from entities. You can think of them as things that have behavior and may or may not have a visual representation. They are defined in JSON files and split across Behavior packs and Resource packs. -More documentation can be found on the [entities page](Entities.md). +In Minecraft Legends, gameplay revolves around entities — from Piglins attacking the overworld to allays gathering resources. Entities can be thought of as objects with behavior, whether or not they have a visual representation. These entities are configured using JSON files, which are divided between **Behavior Packs** (defining logic) and **Resource Packs** (defining visuals and assets). + +For a detailed explanation of entities, check out the [Entities Documentation](Entities.md). + +## Event Triggers -### Event Triggers -[Event Triggers](EventTriggers.md) give entities life by allowing them to react to changes in gameplay state. Things like animations, audio, particles are driven through event triggers. +[Event Triggers](EventTriggers.md) breathe life into entities by enabling them to react to gameplay events. Whether it's triggering animations, playing audio, or spawning particles, event triggers are responsible for all of these in-game interactions. -## Blockbench -[Blockbench](https://www.blockbench.net/) is a free tool used to create models and animations for Minecraft. We have created a new Minecraft Legends plugin for this tool that will be able to export these models and animations as JSON files for use in Minecraft Legends Resource Packs! Referencing these models and animations in Entity JSON definitions (Behavior Pack and Resource Pack) as well as animation and render controllers (Resource Pack only) allows users to easily create new visuals for their own custom enemies and allies. For information on how to use the new Minecraft Legends plugin, see our documentation [here](BlockBench.md) +## Blockbench Plugin + +[Blockbench](https://www.blockbench.net/) is a free, powerful tool for creating models and animations for Minecraft. We’ve developed a specialized Minecraft Legends plugin for Blockbench that allows seamless export of models and animations into JSON format for use in Minecraft Legends Resource Packs. To learn more about using this plugin and how to integrate models into the game, visit our [Blockbench Documentation](BlockBench.md). ## World Generation -All of the [biomes](Biomes.md) and interesting things in the world use locations determined by the [World Placement](WorldPlacement.md) system. It is the core of the procedural world generation system in Minecraft Legends and is the starting place for creating the whole world. These rules drive the placement of [blocks](Blocks.md) in the voxel world. + +Minecraft Legends’ world is procedurally generated, making every adventure unique. The [World Placement](WorldPlacement.md) system is at the heart of this process, controlling how biomes and features are distributed. This system determines the placement of [blocks](Blocks.md) across the voxel-based world. ### Village Generation -Villages and Bases are key components to the campaign mode in Minecraft Legends. These locations are procedurally generated using the deck system which draws actions cards to create the final set of structures. This system is described on the [village generation page](VillageGeneration.md). + +Villages and enemy bases play crucial roles in Minecraft Legends’ campaign mode. They are procedurally generated using the deck system, which leverages a card-drawing mechanism to create a dynamic set of structures. Learn more on the [Village Generation](VillageGeneration.md) page. ### Geology Service -[The Geology Service](GeologyService.md) is a system that lets us place special “geology” textures in the world. It allows us to generate terrain features that we could not easily achieve with our standard procedural terrain generation. + +The [Geology Service](GeologyService.md) lets us add special geology textures and features into the game world. This system enables terrain generation that goes beyond standard voxel terrain and adds distinct features. ## Barrier Blocks -Structures in Minecraft Legends can use special variations of [barrier blocks](BarrierBlocks.md) to control how entities collide with them. -## BSharp -The bulk of the heavy lifting in the campaign mode is accomplished through our scripting language called BSharp. It is built on JavaScript and can do quite a lot of powerful things in the game. Check out the [BSharp Reference Sheet](BSharpReferenceSheet.md) for more information. +Special types of [barrier blocks](BarrierBlocks.md) are used to create collision systems for various structures in Minecraft Legends, helping to control entity movement and interactions. + +## BSharp Scripting + +Our custom scripting language, **BSharp**, built on JavaScript, handles the bulk of campaign mode logic. BSharp provides modders with powerful tools for scripting in-game mechanics. For details, see the [BSharp Reference Sheet](BSharpReferenceSheet.md). + +## Wolverine + +**NOTE**: The Wolverine tool itself has yet to be released, but for those curious they may access the documentation in the meanwhile. + +[Wolverine](Wolverine.md) is a versatile structure conversion tool for converting structures between Minecraft (Bedrock and Java) and Minecraft Lengeds. Taking `.nbt`, `.mcstructure`, or `.schematic` files made in Minecraft as input, this tool will create Minecraft Legends formatted structures to be used by creators in making their own Packs! + +--- + +We hope you find this documentation helpful and encourage you to explore the additional resources listed throughout. Stay tuned for further updates, and don’t hesitate to contribute! diff --git a/VillageGeneration.md b/VillageGeneration.md index 51ebc7a..5e8f6b4 100644 --- a/VillageGeneration.md +++ b/VillageGeneration.md @@ -1,10 +1,12 @@ # Minecraft Legends Village Generation -## Village Planning -### Order of Operations -Village planning is done in the following sequence of steps. +## Village Planning -![](images/village_generation/image01.png) +### Order of Operations + +Village planning is done in the following sequence of steps: + +**Generate Map** ⟶ **Sample Terrain** ⟶ **Districts & Zones** ⟶ **Plan Walls** ⟶ **Plan Paths** ⟶ **Finalize Wall Plan** ⟶ **Plan Buildings** These steps often correspond to different kinds of cards. When a village deck is processed, the village generator will handle particular kinds of cards during different steps. For instance, all the District and Zone cards are handled during the Districts & Zones phase. This is true regardless of where those cards exist in the deck. @@ -12,1515 +14,1696 @@ Cards of the same type will be handled in the order that they’re pulled off th To increase readability of B# scripts, it is best practice to organize B# scripts so that village generation decks are assembled in this order even though the village generator will automatically enforce an order regardless. -## Village Features -### Districts -All villages are composed of one or more districts. Each district is a collection of zones, but when a new district is placed, it will just exist as a position with a district name until zones are added to it. When a village is first created, a main district will be automatically created at the village’s starting position. Every zone that gets added to the village, will belong to a particular district. - -#### District Cards -To create a new district, add a card from the district_cards library to the deck. Multiply that card with some placement preference cards to influence where the new district should go relative to the main district. -After creating a new district, to add zones, buildables, walls, moats, etc to the district, multiply the card for the new request with the district card. If no district card is multiplied, the main district will be used as the default. - -Card Library Name - -**district_cards** - -Settings - -**district** - -The unique name that identifies the district. When zones are added to a district, the district name will be added to their zone tag set. Every zone that belongs to the district will have the district name as part of their tag set. +## Village Features -Example +### Districts -![](images/village_generation/image02.png) -![](images/village_generation/image03.png) - -### Zones -The zones that belong to the village districts organize the area inside the village and they provide the space to place village features like buildables. To add zones to a village district, there are two types of cards available, zones_cards and layer_of_zones_cards. +All villages are composed of one or more districts. Each district is a collection of zones, but when a new district is placed, it will just exist as a position with a district name until zones are added to it. When a village is first created, a main district will be automatically created at the village’s starting position. Every zone that gets added to the village, will belong to a particular district. -#### Zone Cards -These cards will add one or more zones to a village. The first zone added will use any placement preferences multiplied with the zone card to find the best zone (the zone with the highest score). If the number of zones requested is greater than one, we’ll continue trying to add zones that are adjacent to the first zone added until we’ve either run out of connected zones that aren’t already part of the village, or we’ve added the requested number of zones. +--- -Card Library Name +#### District Cards -**zones_cards** +* **Card Library Name**: `district_cards` -Settings +To create a new district, add a card from the district_cards library to the deck. Multiply that card with some placement preference cards to influence where the new district should go relative to the main district. +After creating a new district, to add zones, buildables, walls, moats, etc to the district, multiply the card for the new request with the district card. If no district card is multiplied, the main district will be used as the default. -**number_of_zones** +**Settings**: -The number of zones that should be added to the village. +* **`district`**: The unique name that identifies the district. When zones are added to a district, the district name will be added to their zone tag set. Every zone that belongs to the district will have the district name as part of their tag set. -Example +**Example**: -![](images/village_generation/image04.png) +```json +// JSON + { + "district_cards": [ + { + "cost": 0, + "tags": ["example_district_card"], + "district": "example_district" + } + ] + } +``` -![](images/village_generation/image05.png) +```jsx +// B# + // Request a new district. + const farDistrict = DistrictCard("example_district_card") -Note + // Add zones to the far district and then wrap them in walls. + const farDistrictDeck = DECK_Empty() + DECK_PutOnBottomOf(WallsCard("addWallWithGatesAndTower", 1), farDistrictDeck) + DECK_PutOnBottomOf(LayerOfZonesCard("addLayerOfZones", 2), farDistrictDeck) + DECK_PutOnBottomOf(ZonesCard("addThreeZones", 2), farDistrictDeck) + DECK_MultiplyBySingle(farDistrictDeck, farDistrict) -* Zones are always added to a district. If no explicit district is specified, the main district is used by default. -* Placement preferences can be used to specify where zones should be added to the village. -* If **number_of_zones** is greater than 1, after the first zone is added, the zones neighboring that zones will be added until the amount requested has been added. -* Only zones that aren’t already part of the existing village will be considered. -* **zone_tag_cards** can be combined with **zones_cards** to reserve zones for particular features like paths, structures, etc. + // Place the new district far away from the main district. + const placeFarFromVillageCenter = PlacementPreferenceCard("placeFarFromVillageCenter") + DECK_MultiplyBySingle(farDistrict, placeFarFromVillageCenter) + DECK_PutOnBottomOf(farDistrict, baseDeck) + // Add the requests for the new district to the base deck. + DECK_PutOnBottomOf(farDistrictDeck, baseDeck) -#### Layer of Zones Cards -When this card is handled, it will add all the zones that border the existing village district that this card is being applied to. If no district card is specified, the default main district will be used. + OUTPUT_SetNamedDeck("instantBuildDeck" + villageID, baseDeck) +``` -Card Library Name +--- -**layer_of_zones_cards** +### Zones -Settings +The zones that belong to the village districts organize the area inside the village and they provide the space to place village features like buildables. To add zones to a village district, there are two types of cards available, `zones_cards` and `layer_of_zones_cards`. -None +--- -Example +#### Zone Cards -![](images/village_generation/image06.png) +* **Card Library Name**: `zones_cards` -![](images/village_generation/image07.png) - -Note +These cards will add one or more zones to a village. The first zone added will use any placement preferences multiplied with the zone card to find the best zone (the zone with the highest score). If the number of zones requested is greater than one, we’ll continue trying to add zones that are adjacent to the first zone added until we’ve either run out of connected zones that aren’t already part of the village, or we’ve added the requested number of zones. -* Layers of zones are always added to a district. If no explicit district is specified, the main district is used by default. -* The outer layer of zones around all the district zones that aren’t part of the village yet will be added to the district. -* **zone_tag_cards** can be combined with **layer_of_zones_cards** to reserve zones for particular features like paths, structures, etc. -* If your layers of zones get weird zones that stick out from them, look into the **minimum_loz_connection_width** setting. -(Found in the village_zone component. ie. in piglin_obstacle_large.json under **badger:village_zone**) -Layers of zones by default try to avoid having tight pinch points in the ring it creates, and tries to add zones to pad out thin sections. It can cause issues specifically with hex based zones. +**Settings**: + +* **`number_of_zones`**: The number of zones that should be added to the village. + +**Example**: + +```json +// JSON + // ZONES + { + "zones_cards": [ + { + "cost": 0, + "tags": ["add24Zones"], + "number_of_zones": 24 + }, + { + "cost": 0, + "tags": ["add18Zones"], + "number_of_zones": 18 + } + ] + } +``` + +```jsx +// B# + // INITIAL ZONES + const initialSmallZonesPartOne = ZonesCard("addZone", 5); + DECK MultiplyBySingle(initialSmallZonesPartOne, ZoneHeightChangeCard("4DownRelativeToCentre")); +``` + +* _Notes_: + * Zones are always added to a district. If no explicit district is specified, the main district is used by default. + * Placement preferences can be used to specify where zones should be added to the village. + * If `number_of_zones` is greater than 1, after the first zone is added, the zones neighboring that zones will be added until the amount requested has been added. + * Only zones that aren’t already part of the existing village will be considered. + * `zone_tag_cards` can be combined with `zones_cards` to reserve zones for particular features like paths, structures, etc. + +--- + +#### Layer of Zones Cards + +* **Card Library Name**: `layer_of_zones_cards` -![](images/village_generation/image08.png) +When this card is handled, it will add all the zones that border the existing village district that this card is being applied to. If no district card is specified, the default main district will be used. -![](images/village_generation/image09.png) +**Example**: + +```json +// JSON + { + "layer_of_zones_cards": [ + { + "cost": 0, + "tags": ["addLayerOfZones"] + } + ] + } +``` + +```jsx +// B# +const ring1Zones = LayerOfZonesCard( + "addLayerOfZones", + _GetLayerOfZoneSize(villageId, 1) +); +DECK_MultiplyByMultipleRules(ring1Zones, [ + ZoneTagCard("attackRing1"), + ZoneHeightChangeCard("3DownRelativeToCentre"), +]); +``` + +* _Notes_: + * Layers of zones are always added to a district. If no explicit district is specified, the main district is used by default. + * The outer layer of zones around all the district zones that aren’t part of the village yet will be added to the district. + * `zone_tag_cards` can be combined with `layer_of_zones_cards` to reserve zones for particular features like paths, structures, etc. + * If your layers of zones get weird zones that stick out from them, look into the `minimum_loz_connection_width` setting. (Found in the village_zone component. e.g `badger:village_zone` within `piglin_obstacle_large.json`) + * Layers of zones by default try to avoid having tight pinch points in the ring it creates, and tries to add zones to pad out thin sections. It can cause issues specifically with hex based zones. + +![Example Visual](images/village_generation/image08.png) + +```jsx +// B# + const northZone = ZonesCard("addZone", 1); + DECK_MultiplyByMultipleRules(northZone, [ + ZoneHeightChangeCard("20Height"), + PlacementPreferenceCard("placeInDirectionNorthWithWedgeBrush"), + ]); + + const southZone = ZonesCard("addZone", 1); + DECK_MultiplyByMultipleRules(southZone, [ + ZoneHeightChangeCard("SHeight"), + PlacementPreferenceCard("placeInDirectionSouthWithWedgeBrush"), + ]); + + const eastZone = ZonesCard("addZone", 1); + DECK_MultiplyByMultipleRules(eastZone, [ + ZoneHeightChangeCard("10Height"), + PlacementPreferenceCard("placeInDirectionEastWithWedgeBrush"), + ]); + + const westZone = ZonesCard("addZone", 1); + DECK_MultiplyByMultipleRules(westZone, [ + ZoneHeightChangeCard("15Height"), + PlacementPreferenceCard("placeInDirectionWestWithWedgeBrush"), + ]); +``` _In this example, four raised zones are added to the north, south, east, and west using directional placement preference cards._ -#### Zone Tag Cards -When zones are added to a village district, they can be given one or more tags so that they can be identified later with a card from the zone_filter_cards library. Multiply a card from the zones_cards library or the layer_of_zones_cards library with a card from the zone_tag_cards library to add that tag to the zone tag set. - -Library Card Name - -**zone_tag_cards** +--- -Settings +#### Zone Tag Cards -**zone_tag** +* **Card Library Name**: `zone_tag_cards` -The name of the tag that should be added to the tag set of the zone(s) that it’s applied to. +When zones are added to a village district, they can be given one or more tags so that they can be identified later with a card from the `zone_filter_cards` library. Multiply a card from the `zones_cards` library or the `layer_of_zones_cards` library with a card from the `zone_tag_cards` library to add that tag to the zone tag set. -#### Zone Filter Cards -When a village feature needs to be placed in zones that have been given a specific zone tag (see zone_tag_cards), a card from the zone_filter_cards library with a zone_filter that matches the zone tag should be multiplied with the village feature card. For example, if a group of zones have been multiplied with a zone tag card with a zone_tag of “tower town”, multiplying a card from the buildable_cards library with a zone_filter_cards card that has a zone_filter of “tower town” (and exclude set to false) will limit the zones that the buildable can place in to the “tower town” zones. +**Settings**: -Card Library Name +* **`zone_tag`**: The name of the tag that should be added to the tag set of the zone(s) that it's applied to. -**zone_filter_cards** +--- +#### Zone Filter Cards -Settings +**Card Library Name**: `zone_filter_cards` -**zone_filter** +When a village feature needs to be placed in zones that have been given a specific zone tag (see `zone_tag_cards`), a card from the `zone_filter_cards` library with a `zone_filter` that matches the zone tag should be multiplied with the village feature card. For example, if a group of zones have been multiplied with a zone tag card with a `zone_tag` of `tower_town`, multiplying a card from the `buildable_cards` library with a `zone_filter_cards` card that has a `zone_filter` of `tower_town` (and exclude set to false) will limit the zones that the buildable can place in to the `tower_town` zones. -The zone tag name to filter zones by. +**Settings**: +* **`zone_filter`**: The zone tag name to filter zones by. -**exclude** +* **`exclude`**: Specifies where the `zone_filter` zone tag name should be used to exclude or include zones. This can be true or false. -Specifies where the zone_filter zone tag name should be used to exclude or include zones. This can be true or false. +--- -#### Zone Height Change Cards +#### Zone Height Change Cards -When multiplied with cards from the zones_cards and layer_of_zones_cards libraries, the zones added to the village will raise or lower the height of the terrain inside the zone depending on the settings specified on the zone height change card. +**Card Library Name**: `zone_height_change_cards` -Card Library Name -**zone_height_change_cards** +When multiplied with cards from the `zones_cards` and `layer_of_zones_cards` libraries, the zones added to the village will raise or lower the height of the terrain inside the zone depending on the settings specified on the zone height change card. -Settings +**Settings**: -**zone_height_change** +* **`zone_height_change`**: The distance in blocks that the terrain inside this zone will be raised or lowered. This value can be positive or negative. -The distance in blocks that the terrain inside this zone will be raised or lowered. This value can be positive or negative. +* **`biome`**: The name of the biome that this zone should be changed to. This is optional. -**biome** +* **`zone_height_control`**: This specifies how the zone_height_change should be applied. The options are: -The name of the biome that this zone should be changed to. This is optional. + * **`height_control_centered`**: Relative to the original zone height of the first zone that was added to the village. + * **`height_control_averaged`**: Relative to the village average zone height of all the zones in the entire village map. This includes zones that haven’t been added to the village. + * **`height_control_lowest`**: Relative to the lowest zone in the group of zones being added with this particular request. + * **`height_control_none`**: Relative to the original zone height of the zone being raised or lowered. -**zone_height_control** +--- -This specifies how the zone_height_change should be applied. The options are: +#### Moats and Pools -* “height_control_centered” - Relative to the original zone height of the first zone that was added to the village. -* “height_control_averaged” - Relative to the village average zone height of all the zones in the entire village map. This includes zones that haven’t been added to the village. -* “height_control_lowest” - Relative to the lowest zone in the group of zones being added with this particular request. -* “height_control_none” - Relative to the original zone height of the zone being raised or lowered. - -#### Moats and Pools Moat cards can be used to either create a moat that encircles a village district or a bunch of individual lava pools. -#### Moat Cards -Card Library Name - -**moat_cards** - -Settings +#### Moat Cards -**biome** +**Card Library Name**: `moat_cards` -The name of the biome that will exist inside of the moat zones that get added when this card is played. The particular types of blocks that will exist inside of these moat zones will be determined by the biome. +**Settings**: -**width_in_blocks** +* **`biome`**: The name of the biome that will exist inside of the moat zones that get added when this card is played. The particular types of blocks that will exist inside of these moat zones will be determined by the biome. -How wide the moat should be in blocks. The moat will claim as many zones as it needs to meet the requested block width and then the edges of the moat will be displaced inward to reduce the width of the moat if the zone additions resulted in a width that's larger than the requested width. +* **`width_in_blocks`**: How wide the moat should be in blocks. The moat will claim as many zones as it needs to meet the requested block width and then the edges of the moat will be displaced inward to reduce the width of the moat if the zone additions resulted in a width that's larger than the requested width. There are a number of other village generation settings that affect the zone sizes (grid shape, zone jitter) and the moat edges (edge noise) so this new setting will need to be tuned with those others in mind. +* **`distance_in_zones`**: The distance in zones from the district that the moat will be placed around. -**filling_depth** +* **`filling_depth`**: [**DEPRECATED**] The **`biome`** now determines what blocks go where inside the moat zone. -[not used] The **biome** now determines what blocks go where inside the moat zone. +**Example**: +```json +// JSON + { + "moat_cards": [ + { + "cost": 0, + "tags": ["DBBMoat"], + "biome": "lava moat", + "width_in_blocks": 10, + "filling_depth": 5, + "distance_in_zones": 1 + } + ] + } +``` -**distance_in_zones** +* _Notes_: + * If `distance_in_zones` is 0, a moat will not be placed. Instead, all the zones that have been tagged (using `zone_tag_cards`) with a `lava_option` tag will be turned into a pool. + * If `distance_in_zones` is greater than 0, an external moat will be placed around the district specified. If no district has been explicitly specified using one of the `district_cards`, the main district will be used by default. + * Use `zone_height_change_cards` to control the height of the moat zones. -The distance in zones from the district that the moat will be placed around. +--- -Example +### Walls -![](images/village_generation/image10.png) +**Card Library Name**: `wall_cards` -Note -* If distance_in_zones is 0, a moat will not be placed. Instead, all the zones that have been tagged (using zone_tag_cards) with a **“lava_option”** tag will be turned into a pool. -* If distance_in_zones is greater than 0, an external moat will be placed around the district specified. If no district has been explicitly specified using one of the **district_cards**, the main district will be used by default. -* Use **zone_height_change_cards** to control the height of the moat zones. - - -### Walls Wall cards can be used to place walls along the edges of village zones. -#### Wall Cards -To place walls, first multiply all the zone cards that you want to place walls around with a zone tag card. Then multiply a wall card with a zone tag filter card with the same zone_tag_filter tag. +#### Wall Cards + +To place walls, first multiply all the zone cards that you want to place walls around with a zone tag card. Then multiply a wall card with a zone tag filter card with the same `zone_tag_filter` tag. -(Optional) If you want wall fragments / gaps in the wall, you can multiply the wall card with a placement preference card(s) and a threshold card. This will score the zones that the wall would be placed around and if a zone score is less than the threshold, that zone won’t get a wall. +* (Optional): If you want wall fragments / gaps in the wall, you can multiply the wall card with a placement preference card(s) and a threshold card. This will score the zones that the wall would be placed around and if a zone score is less than the threshold, that zone won’t get a wall. The best way to create a gate or entrance in a set of walls is to request a path that connects the zones inside the walls (using the same zone tag) to some zones that are outside of the walls. The wall that the path crosses will be replaced with a gate. +* _Note_: When terrain weathering is applied, walls can slip off the side of weathered edges. To avoid this, there is a `wall_offset` setting in the `badger:village_wall` component. This offset will move walls away from the edge. If it’s tuned greater than the maximum terrain weathering amount, that should ensure walls don’t slip. -Note -* When terrain weathering is applied, walls can slip off the side of weathered edges. To avoid this, there is a wall_offset setting in the badger:village_wall component. This offset will move walls away from the edge. If it’s tuned greater than the maximum terrain weathering amount, that should ensure walls don’t slip. +```json +// JSON + { + "badger_village_wall": { + "wall_offset": 3.0 + } + } +``` -![](images/village_generation/image11.png) +**Settings**: -Card Library Name -**wall_cards** +* `wall_buildable`: The name of the buildable to place for the wall. -Settings +* `path_entrance`: The name of a buildable. If a path crosses this wall, the wall segment that’s crossed will be removed and replaced with this entrance buildable. Usually this is a gate buildable. -**wall_buildable** +* `embedded_buildables`: A list of buildable names. When the wall is placed, each one of them will be placed at random locations along the wall if there’s room. It’s not recommended to use these for entrances. It’s better to use path cards so that gates will be placed in locations that can connect with the path. -The name of the buildable to place for the wall. +--- -**path_entrance** +### Paths -The name of a buildable. If a path crosses this wall, the wall segment that’s crossed will be removed and replaced with this entrance buildable. Usually this is a gate buildable. +Path cards are used to place paths that connect village zones. To connect a buildable to a path, see the `build_from_district_path` and `connect_to_path` placement preference cards. -**embedded_buildables** +#### Path Cards -A list of buildable names. When the wall is placed, each one of them will be placed at random locations along the wall if there’s room. It’s not recommended to use these for entrances. It’s better to use path cards so that gates will be placed in locations that can connect with the path. +**Card Library Name**: `path_cards` -### Paths -Path cards are used to place paths that connect village zones. To connect a buildable to a path, see the build_from_district_path and connect_to_path placement preference cards. +`path_cards` need to be set up in a particular way before they’re added to the deck so that they’re handled correctly later when the deck is processed. For this reason, there is a special `B#` helper method to request a path that will connect two village zones, `CreatePathRequestOnBottomOf`. -#### Path Cards -path_cards need to be set up in a particular way before they’re added to the deck so that they’re handled correctly later when the deck is processed. For this reason, there is a special B# helper method to request a path that will connect two village zones, CreatePathRequestOnBottomOf. +```jsx +// B# -![](images/village_generation/image12.png) + const southPathStartRules = [PlacementPreferenceCard("closeToDistrictStart")]; + const southPathEndRules = [ + ZoneFilterCard("southPathZone"), + PlacementPreferenceCard("closeToDistrictStart"), + PlacementPreferenceCard("placeInDirectionSouthWithRectangleBrush"), + ]; + CreatePathRequestOnBottomOf( + "defend_district_path", + southPathStartRules, + southPathEndRules, + baseDeck + ); +``` -The first parameter takes a tag identifier for the path card that will be used. In this case “defend_district_path”. The second and third parameters take arrays of rule cards that will be used to identify the best start and end zone for the path. The final parameter takes the deck which this new path request will be put on the bottom of. +The first parameter takes a tag identifier for the path card that will be used. In this case `defend_district_path`. The second and third parameters take arrays of rule cards that will be used to identify the best start and end zone for the path. The final parameter takes the deck which this new path request will be put on the bottom of. The rule cards function in the same way as when they’re multiplied with zone, district, or buildable request cards. Zones will first be filtered and any placement preferences will be used to score the remaining zones so that we can find the best / highest scoring zone. This is done for the path start and path end. -There is also another special B# helper function if you want a path that connects a village zone to the closest path to that zone, CreatePathFromZoneRequestOnBottomOf. +There is also another special B# helper function if you want a path that connects a village zone to the closest path to that zone, `CreatePathFromZoneRequestOnBottomOf`. -![](images/village_generation/image13.png) +```jsx +// B# + const northwestPathStartRules = [ + ZoneFilterCard("outsideBaseZone"), + PlacementPreferenceCard(PLACEMENT_CLOSE_TO_VILLAGE_START), + PlacementPreferenceCard("placeInDirectionNorthWestWithRectangleBrush"), + ]; -The first parameter takes a tag identifier for the path card that will be used. In this case “defend_district_path”. The second parameter takes an array of rule cards that will be used to identify the best zone for the path to start in. Since the path will connect to the closest existing path, there’s no need for the additional array of rule cards that the CreatePathRequestOnBottomOf method takes. The final parameter takes the deck which this new path request will be put on the bottom of. + CreatePathFromZoneRequestOnBottomOf( + "attack_district_path", + northwestPathStartRules, + baseDeck + ); +``` -Note -* Bridges will be placed when the path connects two zones with a body of water or when the path connects two zones that have a large enough height change. -* Gates will be placed when the path crosses a wall. -* Bridges failing to place can cause paths to fail too. Adding a **force_building_placement_cards** card on either set of path rules passed into the CreatePathRequestOnBottomOf call will place the path without bridges if it would fail otherwise. This is currently used by defend bases to ensure gates appear even if bridges won’t. +The first parameter takes a tag identifier for the path card that will be used. In this case `defend_district_path`. The second parameter takes an array of rule cards that will be used to identify the best zone for the path to start in. Since the path will connect to the closest existing path, there’s no need for the additional array of rule cards that the `CreatePathRequestOnBottomOf` method takes. The final parameter takes the deck which this new path request will be put on the bottom of. -Card Library Name +* _Notes_: + * Bridges will be placed when the path connects two zones with a body of water or when the path connects two zones that have a large enough height change. + * Gates will be placed when the path crosses a wall. + * Bridges failing to place can cause paths to fail too. Adding a `force_building_placement_cards` card on either set of path rules passed into the CreatePathRequestOnBottomOf call will place the path without bridges if it would fail otherwise. This is currently used by defend bases to ensure gates appear even if bridges won’t. -**path_cards** +**Settings**: -Settings +* `is_district_path`: If this is set to true, the path created with this request will use the path settings defined in the `village_district_path` component on the village entity. Otherwise the settings in the `village_building_path` will be used. An assert will be triggered if the component needed doesn't exist. -**is_district_path** +**Example**: -If this is set to true, the path created with this request will use the path settings defined in the village_district_path component on the village entity. Otherwise the settings in the village_building_path will be used. An assert will be triggered if the component needed doesn't exist. +```json +// JSON + { + "path_cards": [ + { + "cost": 0, + "tags": ["village_district_path"], + "is_district_path": true + }, + { + "cost": 0, + "tags": ["village_building_path"], + "is_district_path": true + } + ] + } +``` -Example +![Old Dev Village](images/village_generation/image14.png) +![Old Dev Path](images/village_generation/image15.png) -![](images/village_generation/image14.png) +--- -![](images/village_generation/image15.png) +### Terrain Weathering -![](images/village_generation/image16.png) +**Card Library Name**: `terrain_weathering_cards` -### Terrain Weathering Without terrain weathering, zone height changes will result in a lot of straight and perfectly smooth cliffs. Village weathering cards help rough them up a bit. The effect is a combination of a sawtooth wave layered with gradients and a lot of noise. -#### Terrain Weathering Cards -Adding this card to a village generation deck will apply terrain weathering to all the edges of zones that have been raised or lowered with height change or moat cards. The terrain weathering card doesn’t have any settings. See the badger:village_weathering component for the terrain weathering settings. +#### Terrain Weathering Cards -Card Library Name +Adding this card to a village generation deck will apply terrain weathering to all the edges of zones that have been raised or lowered with height change or moat cards. The terrain weathering card doesn’t have any settings. See the `badger:village_weathering` component for the terrain weathering settings. -**terrain_weathering_cards** +**Example**: -Settings +![Terrain Weathering](images/village_generation/image17.png) +![Terrain Weathering 2](images/village_generation/image18.png) -None +--- -Example +### Buildables -![](images/village_generation/image17.png) - -![](images/village_generation/image18.png) - -### Buildables Buildables (aka structures or buildings) are requested using buildable cards. -#### Buildable Cards -Cards from the buildable_cards library are often multiplied with district, placement preference, and zone filter cards to control where they get placed in the village. - -Note -* It’s best practice to add the largest, most important buildable cards to the deck first. Buildables will be placed in the order that the cards are pulled from the deck. If smaller non-critical structures are placed first, they might space out and take up the room needed to place the larger structures. -* Buildable cards are the only kind of village feature card that can be handled after a village is done in generating for the first time. For example, when piglin bases respond to player attacks in campaign or when they rebuild in PvP. +#### Buildable Cards -Card Library Name +**Card Library Name**: `buildable_cards` -**buildable_cards** +Cards from the `buildable_cards` library are often multiplied with district, placement preference, and zone filter cards to control where they get placed in the village. -Settings +* _Notes_: + * It’s best practice to add the largest, most important buildable cards to the deck first. Buildables will be placed in the order that the cards are pulled from the deck. If smaller non-critical structures are placed first, they might space out and take up the room needed to place the larger structures. + * Buildable cards are the only kind of village feature card that can be handled after a village is done in generating for the first time. For example, when piglin bases respond to player attacks in campaign or when they rebuild in PvP. -**buildable** +**Settings**: +* `buildable`: The identifier of the buildable. -## Placement Preference Cards -In general, placement preference cards should be multiplied with other cards like district, path, wall, zone, and buildable cards to change how those cards get handled. - -Card Library Name +--- -**placement_preference_cards** +## Placement Preference Cards -### Circle Sine Wave -This placement preference will use the angle between the zone positions and the district start position to sample from a sine wave. The result from that sine wave is shifted so that the placement preference will by default add a score between 0 and 1 to the zone being scored. +**Card Library Name**: `placement_preference_cards` -Name - -**circle_sine_wave** +In general, placement preference cards should be multiplied with other cards like district, path, wall, zone, and buildable cards to change how those cards get handled. -Settings +--- -**amplitude** +### Circle Sine Wave -By default, the circle_sine_wave placement preference will add a score between 0 and 1. This score will be multiplied with the amplitude. As a result, the amplitude can be used to increase or decrease the effect that this placement preference has on the final score. +**Card Name**: `circle_sine_wave` -**frequency** +This placement preference will use the angle between the zone positions and the district start position to sample from a sine wave. The result from that sine wave is shifted so that the placement preference will by default add a score between `0` and `1` to the zone being scored. -The frequency determines the number of times the sine wave oscillates between 0 and 1 over the 0 to 360 degree range. +**Settings**: -Example +* **`amplitude`**: By default, the `circle_sine_wave` placement preference will add a score between 0 and 1. This score will be multiplied with the amplitude. As a result, the amplitude can be used to increase or decrease the effect that this placement preference has on the final score. -![](images/village_generation/image19.png) +* **`frequency`**: The frequency determines the number of times the sine wave oscillates between 0 and 1 over the 0 to 360 degree range. -![](images/village_generation/image20.png) +**Example**: -When combined with a wall request card and a threshold card, circle_sine_wave can be used to create fragmented walls. The yellow lines are how I like to visualize the sine wave as it affects the scores of the zones. +```json +//JSON + { + "cost": 0, + "tags": ["example_circle_sine_wave"], + "placement_preference": "circle sine wave", + "amplitude": 0.45, + "frequency": 5.0 + } +``` -### Close to Buildable -Zones will be scored higher if they're close to the buildable specified. +![Circle Sine Wave Example](images/village_generation/image20.png) -Name +_When combined with a wall request card and a threshold card, `circle_sine_wave` can be used to create fragmented walls. The yellow lines in the example image above are an easy way to visualize the sine wave as it affects the scores of the zones._ -**close_to_buildable** +--- -Settings +### Close to Buildable -**buildable** +**Card Name**: `close_to_buildable` -The tag for the buildable to place close to. This should match one of the tags in the “tags” list in the badger:tags component for that buildable entity. +This placement preference will score zones higher if they are close to the specified buildable area. -Example +**Settings**: -![](images/village_generation/image26.png) +**`buildable`**: The tag for the buildable to place close to. This should match one of the tags in the `tags` list in the `badger:tags` component for the buildable entity being used. -![](images/village_generation/image22.png) +**Example**: -In this example, the towers are requested close to the buildable with the “pigGate” tag. +```json +// JSON + { + "cost": 0, + "tags": ["example_close_to_pig_tower"], + "placement_preference": "close_to_buildable", + "buildable": "pigTower" + } +``` -### Close to District Center -This placement preference will score zones higher if they’re closer to the barycenter of all the district zones. The closest zone(s) will be given a score of 1, the farthest zone(s) a score of 0, and all the other district zones will be given a score in between 0 and 1 depending on how far they are from the center. +![Close to Buildable Example](images/village_generation/image22.png) -Note -* The district center will update each time a new zone is added to the district. That means the center will be continuously changing until all the zones have been added. Using the close_to_district_center before all the zones have been added may have some surprising results. +_In this example, the towers are requested close to the buildable with the `pigGate` tag._ -Name +--- -**close_to_district_center** +### Close to District Center -Settings +**Card Name**: `close_to_district_center` -None +This placement preference will score zones higher if they're closer to the center point of all the district zones. The closest zone(s) will receive a score of 1, the farthest zone(s) will receive a score of 0, and all other district zones will receive a score in between 0 and 1 based on their distance from the center point. -Example +* _Note_: The district center will update each time a new zone is added to the district. That means the center will be continuously changing until all the zones have been added. Using the `close_to_district_center` before all the zones have been added may have some surprising results. -![](images/village_generation/image23.png) +**Example**: -![](images/village_generation/image24.png) +```json +// JSON + { + "cost": 0, + "tags": ["example_close_to_district_center"], + "placement_preference": "close to district center" + } +``` -This example base has a main district in the center, a separate district on the left that's lower than the main district, and a separate district on the right that’s higher than the main district. All the zones in the district on the left were added with the close_to_district_start placement preference. All the zones in the district on the right were added with the close_to_district_center placement preference. Likewise, the tower in the district on the left was requested with the close_to_district_start placement preference and the tower in the district on the right was requested with the close_to_district_center placement preference. +![close_to_district_center Example](images/village_generation/image24.png) +_This example base has a main district in the center, a separate district on the left that's lower than the main district, and a separate district on the right that’s higher than the main district. All the zones in the district on the left were added with the `close_to_district_start` placement preference. All the zones in the district on the right were added with the `close_to_district_center` placement preference. Likewise, the tower in the district on the left was requested with the `close_to_district_start` placement preference and the tower in the district on the right was requested with the `close_to_district_center` placement preference._ -### -Close to District Start +--- -The close_to_district_start placement preference will score zones higher if they’re closer to the zone that was added first to the district. The zone that was added first will contain the starting position and will be given a score of 1. The farthest zone(s) from the starting position will be given a score of 0 and all the zones in between will be given a score between 0 and 1 depending on how far they are from the start. +### Close to District Start -Name +**Card Name**: `close_to_district_start` -**close_to_district_start** +The `close_to_district_start` placement preference will score zones higher if they’re closer to the zone that was added first to the district. The zone that was added first will contain the starting position and will be given a score of 1. The farthest zone(s) from the starting position will be given a score of 0 and all the zones in between will be given a score between 0 and 1 depending on how far they are from the start. -Settings +**Example**: -None +```json +// JSON + { + "cost": 0, + "tags": ["example_close_to_district_start"], + "placement_preference": "close_to_district_start" + } +``` -Example +--- -![](images/village_generation/image25.png) +### Close to Influence -### Close to Influence -This placement preference will score zones higher if they’re close to a particular unit that has the “badger:village_influence” component. This can be used to place buildables near attacking enemy mobs or friendly mobs during gameplay. +**Card Name**: `close_to_influence` -Name +This placement preference will score zones higher if they’re close to a particular unit that has the `badger:village_influence` component. This can be used to place buildables near attacking enemy mobs or friendly mobs during gameplay. -**close_to_influence** +**Settings**: -Settings +**`alliance_rule_filter`**: Indicates what units should influence this placement preference. Possible values include “enemy”, “friendly”, and “any_team”. -**alliance_rule_filter** +--- -Indicates what units should influence this placement preference. Possible values include “enemy”, “friendly”, and “any_team”. +### Close to Village Start -Close to Village Start +**Card Name**: `close_to_village_start` The placement preference is the same as the close_to_district_start placement preference. It exists because it was added before it was possible to have multiple districts in a village. -Name - -**close_to_village_start** - -Settings - -None +* _Miclee Note_: + * I have been using `close_to_village_start` a lot in the past, is it really the same? I need to test. +--- -### Close to Walls -Score zones higher based on the number of walls bordering them. +### Close to Walls -Note -* The close_to_buildable placement preference can be used for the same purpose if a wall tag is specified for the “buildable” setting. This close_to_wall placement preference will only score zones higher if the zones actually have walls bordering them whereas the close_to_buildable placement preference will also score nearby zones higher even if they don’t have walls actually bordering them. +**Card Name**: `close_to_walls` -Name +This placement preference scores zones higher based on the number of walls bordering them. -**close_to_walls** +* _Note_: The `close_to_buildable` placement preference can be used for the same purpose if a wall tag is specified for the `buildable` setting. This `close_to_wall` placement preference will only score zones higher if the zones actually have walls bordering them whereas the `close_to_buildable` placement preference will also score nearby zones higher even if they don’t have walls actually bordering them. -Settings +--- -None +### Close to Water -### Close to Water -Zones will be scored higher if they're close to a zone containing water. +**Card Name**: `close_to_water` -Name +This placement preference scores zones higher when they are in proximity to a zone containing water. -**close_to_water** +**Example**: -Settings +```json +// JSON + { + "cost": 0, + "tags": ["example_close_to_water"], + "placement_preference": "close_to_water" + } +``` -None - -Example - -![](images/village_generation/image26.png) - -![](images/village_generation/image27.png) +![Close to Water Example](images/village_generation/image27.png) In this example, the nether spreaders were requested outside the village and close to water. +--- -### Connect to Path -This placement preference card can be multiplied with a buildable request card. Buildable request cards that have the “connect_to_path” placement preference will try to generate a path from the position of the buildable to the nearest path. +### Connect to Path +**Card Name**: `connect_to_path` -Note -* Since the buildable is placed and then the path is created, it’s common for the path to not be able to find or connect to an existing path because of the buildables placement. For instance, if the buildable is placed such that it’s facing another buildable, it’s likely the path won’t have enough space to place. -* The “build_from_district_path” placement preference is generally a better method for connecting buildables to paths. +This placement preference card can be multiplied with a buildable request card. Buildable request cards that have the `connect_to_path` placement preference will try to generate a path from the position of the buildable to the nearest path. -Name +* _Notes_: + * Since the buildable is placed and then the path is created, it’s common for the path to not be able to find or connect to an existing path because of the buildables placement. For instance, if the buildable is placed such that it’s facing another buildable, it’s likely the path won’t have enough space to place. + * The `build_from_district_path` placement preference is generally a better method for connecting buildables to paths. -**connect_to_path** +**Example**: -Settings -None +```json +//JSON + { + "cost": 0, + "tags": ["connectToPath"], + "placement_preference": "connect_to_path" + } +``` -Example +--- -![](images/village_generation/image28.png) - -### Clear Resources In Zone -This placement preference can be multiplied with a zone request card. Zone request cards with this placement preference will remove all the world features that overlap the zone(s) that get added to the village when the zone request card is handled. +### Clear Resources In Zone -Note -* It’s not necessary to use this card to clear world features for buildables. World features will be removed if they overlap buildables regardless. +**Card Name**: `clear_resources_in_zone` -Name +This placement preference can be multiplied with a zone request card. Zone request cards with this placement preference will remove all the world features that overlap the zone(s) that get added to the village when the zone request card is handled. -**clear_resources_in_zone** +* _Note_: It is **not** necessary to use this card to clear world features for buildables. World features will be removed if they overlap buildables regardless by default. -Settings +--- -None +### Disable Spacing -### Disable Spacing -There is a default spacing behavior that tries to distribute structures so that they don’t bunch up too much when they have a lot of room to place in. That spacing behavior is turned off for a particular buildable request if the “disable_spacing” placement preference is multiplied with that buildable request. +There is a default spacing behavior that tries to distribute structures so that they don’t bunch up too much when they have a lot of room to place in. That spacing behavior is turned off for a particular buildable request if the `disable_spacing` placement preference is multiplied with that buildable request. -Name +**Card Name**: `disable_spacing` -**disable_spacing** +--- -Settings +### Distance From District Start -None +**Card Name**: `distance_from_district_start` -### Distance From District Start This placement preference will score zones higher if the distance between the zone site and the district start is close to a specified distance. This placement preference can be multiplied with district, buildable, and path requests. -Note -* This preference will be most reliable in low jitter bases. This is especially true if you are using smaller distances and tight tolerances with this preference. - - -Name +* _Note_: This preference will be most reliable in low jitter bases. This is especially true if you are using smaller distances and tight tolerances with this preference. -**distance_from_district_start** +**Settings**: +* **`distance_from_district_start`**: The distance (range or single value) in blocks from the district starting position that the placement should ideally be placed. -Settings +* **`distance_to_zero_score`**: The distance from the `distance_from_district_start` until the score added to zones by this placement preference is reduced to 0. For the example card below, with placement preference will add 1 to the zones that are between 80-90 blocks from the district start. At 70-80 and 90-100 blocks the score added will be a value between 0 and 1 depending on how far it is from 80 and 90 blocks away. -**distance_from_district_start** +**Example**: -The distance (range or single value) in blocks from the district starting position that the placement should ideally be placed. +```json +// JSON + { + "unique_card_id": "example_distance_district_start", + "cost": 0, + "tags": ["example_distance_district_start"], + "placement_preference": "distance_from_district_start", + "distance_from_district_start": [80, 90], + "distance_to_zero_score": [10, 10] + } +``` -**distance_to_zero_score** +```jsx +// B# + // North District + const districtNorth = DistrictCard("district1"); + DECK_MultiplyByMultipleRules(districtNorth, [ + PlacementPreferenceCard("example_distance_from_district_start"), + PlacementPreferenceCard("placeInDirectionNorthwithRectangleBrush"), + PlacementPreferenceCard("withScoreThresholdSmall") + ]); + DECK_PutOnBottomOf(districtNorth, baseDeck); +``` -The distance from the **distance_from_district_start** until the score added to zones by this placement preference is reduced to 0. For the example card below, with placement preference will add 1 to the zones that are between 80-90 blocks from the district start. At 70-80 and 90-100 blocks the score added will be a value between 0 and 1 depending on how far it is from 80 and 90 blocks away. +_In this example the placement preference is being used to place a district a specific distance from the village start/center._ -Example +![distance_from_district_start Visual](images/village_generation/image31.png) -![](images/village_generation/image29.png) +--- -![](images/village_generation/image30.png) +### Elevation Range -Sorry, you’ll likely need to zoom in 200% to see this one. In this example the placement preference is being used to place a district a specific distance from the village start/center. (This was used to make the screenshot below.) +**Card Name**: `elevation_range` -![](images/village_generation/image31.png) - -### Elevation Range This placement preference will score zones higher if the normalized height at the zone site is close to the specified target height. -Note -* If you aren't using a score threshold, zones that fall outside the range can still be used once good zones are exhausted, so be careful. - -Name +* _Note_: + * If you aren't using a score threshold, zones that fall outside the range can still be used once good zones are exhausted, so be careful. -**elevation_range** +**Settings**: -Settings +* **`elevation_target`**: This can be a value between 0 and 1. If a zone has a normalized height of 1, that zone is the highest zone in the village. -**elevation_target** +* **`elevation_max`**: This can be a value between 0 and 1. It’s the upper limit for zone heights. If a zone has a normalized height that’s higher, this placement preference won’t add any score. -This can be a value between 0 and 1. If a zone has a normalized height of 1, that zone is the highest zone in the village. +* **`elevation_min`**: This can be a value between 0 and 1. It’s the lower limit for zone heights. If a zone has a normalized height that’s lower, this placement preference won’t add any score. -**elevation_max** +**Example**: -This can be a value between 0 and 1. It’s the upper limit for zone heights. If a zone has a normalized height that’s higher, this placement preference won’t add any score. +```json +// JSON + { + "cost": 0, + "tags": ["elevationTargetMax"], + "placement_preference": "elevation_range", + "elevation_target": 1.0 + }, + { + "cost": 0, + "tags": ["elevationRangeLow"], + "placement_preference": "elevation_range", + "elevation_target": 0.1, + "elevation_max": 0.4, + "elevation_min": 0.0 + } +``` -**elevation_min** -This can be a value between 0 and 1. It’s the lower limit for zone heights. If a zone has a normalized height that’s lower, this placement preference won’t add any score. +![elevation_range Visual](images/village_generation/image33.png) -Example +--- -![](images/village_generation/image32.png) +### Facing Buildable -![](images/village_generation/image33.png) +**Card Name**: `facing_buildable` -### Facing Buildable This placement preference can be multiplied with buildable request cards. Buildable request cards with this placement preference will try to place with an orientation that faces the nearest specified buildable if one exists. -Note -* Buildables can only face cardinal directions due to their blocky nature. If the buildable to face is north west of the buildable being placed, the placed buildable should face north or west. -* Without an orientation placement preference, buildables will choose their facing direction randomly. +* _Notes_: + * Buildables can only face cardinal directions due to their blocky nature. If the buildable to face is north west of the buildable being placed, the placed buildable should face north or west. + * Without an orientation placement preference, buildables will choose their facing direction randomly. -Name +**Settings**: -**facing_buildable** +* **buildable** The tag for the buildable to face towards. For example, if we wanted to create a `facing_buildable` card that makes buildables face the nearest fountain, we would set this setting to `fountain` because the fountain buildable has the `fountain` tag in its `badger:tags` component `tags` list. -Settings +**Example**: -**buildable** +![facing_buildable Example](images/village_generation/image34.png) -The tag for the buildable to face towards. For example, if we wanted to create a facing_buildable card that makes buildables face the nearest fountain, we would set this setting to “fountain” because the fountain buildable has the “fountain” tag in its badger:tags component “tags” list. +_All these buildings have a `facing_buildable` placement preference with fountain specified as the building to face._ -Example +--- -![](images/village_generation/image34.png) +### Facing Influence -All these buildings have a facing_buildable placement preference with fountain specified as the building to face. +**Card Name**: `facing_influence` -### Facing Influence -This placement preference can be multiplied with buildable request cards. Buildable request cards with this placement preference will try to place with an orientation that faces the nearest source of influence that passes the specified alliance rule filter. Sources of influence will have the “badger:village_influence” component. This can be used to place buildables that face towards attacking enemy mobs or friendly mobs during gameplay. +This placement preference can be multiplied with buildable request cards. Buildable request cards with this placement preference will try to place with an orientation that faces the nearest source of influence that passes the specified alliance rule filter. Sources of influence will have the `badger:village_influence` component. This can be used to place buildables that face towards attacking enemy mobs or friendly mobs during gameplay. -Name +**Settings**: -**facing_influence** +* **`alliance_rule_filter`**: Indicates what units should influence this placement preference. Possible values include `enemy`, `friendly`, and `any_team`. -Settings +--- -**alliance_rule_filter** +### Facing Water -Indicates what units should influence this placement preference. Possible values include “enemy”, “friendly”, and “any_team”. +**Card Name**: `facing_water` -### Facing Water This placement preference can be multiplied with buildable request cards. Buildable request cards with this placement preference will try to place with an orientation that faces the nearest body of water if one exists. -Note -* Buildables can only face cardinal directions due to their blocky nature. If the body of water to face is north west of the buildable being placed, the placed buildable should face north or west. -* Without an orientation placement preference, buildables will choose their facing direction randomly. - -Name +* _Notes_: + * Buildables can only face cardinal directions due to their blocky nature. If the body of water to face is north west of the buildable being placed, the placed buildable should face north or west. + * Without an orientation placement preference, buildables will choose their facing direction randomly. -**facing_water** +**Example**: -Settings +![facing_water Example](images/village_generation/image35.png) -None +_All of these buildings have the `facing_water` placement preference._ -Example +--- -![](images/village_generation/image35.png) +### Facing Cardinal Direction -All these buildings have the facing_water placement preference. +**Card Name**: `facing_cardinal_direction` -### Facing Cardinal Direction -This placement preference card can be multiplied with a buildable request card. Buildable request cards that have the “facing_cardinal_direction” placement preference will be rotated to face the specified cardinal direction. +This placement preference card can be multiplied with a buildable request card. Buildable request cards that have the `facing_cardinal_direction` placement preference will be rotated to face the specified cardinal direction. -Name +**Settings**: -**facing_cardinal_direction** +* **`cardinal_direction`**: The cardinal direction that the buildable should face. The options are north, south, east, or west. -Settings +**Example**: -**cardinal_direction** +```json +// JSON + { + "cost": 0, + "tags": ["facingNorth"], + "placement_preference": "facing_cardinal_direction", + "cardinal_direction": "north" + } +``` -The cardinal direction that the buildable should face. The options are north, south, east, or west. +```jsx +// B# + DECK_MultiplyBySingle(WoF, PlacementPreferenceCard("facingNorth")) +``` -Example +--- -![](images/village_generation/image36.png) +### Far From Buildable -![](images/village_generation/image37.png) +**Card Name**: `far_from_buildable` -### Far From Buildable -The far_from_buildable placement preference is the inverse of the close_to_buildable placement preference. +The `far_from_buildable` placement preference is the inverse of the `close_to_buildable` placement preference. -Name +**Settings**: -**far_from_buildable** +* **`buildable`**: The tag for the buildable to place close to. This should match one of the tags in the `tags` list in the `badger:tags` component for the buildable entity desired. -Settings +**Example**: -**buildable** +![far_from_buildable Example](images/village_generation/image38.png) -The tag for the buildable to place close to. This should match one of the tags in the “tags” list in the badger:tags component for that buildable entity. +_The barracks in this example were requested far from buildables with the tag `pigTower`._ -Example +--- -![](images/village_generation/image38.png) +### Far From District Center -The barracks in this example were requested far from buildables with the tag “pigTower”. +**Card Name**: `far_from_district_center` -### Far From District Center -The far_from_district_center placement preference is the inverse of the close_to_district_center placement preference. +The `far_from_district_center` placement preference is the inverse of the `close_to_district_center` placement preference. -Name +**Example**: -**far_from_district_center** +```json +// JSON + { + "cost": 0, + "tags": ["example_far_from_district_center"], + "placement_preference": "far_from_district_center" + } +``` -Settings +--- -None +### Far From District Start -Example +**Card Name**: `far_from_district_start` -![](images/village_generation/image39.png) +The `far_from_district_start` placement preference is the inverse of the `close_to_district_start` placement preference. -### Far From District Start -The far_from_district_start placement preference is the inverse of the close_to_district_start placement preference. +**Example**: -Name +```json +// JSON + { + "cost": 0, + "tags": ["example_far_from_district_start"], + "placement_preference": "far_from_district_start" + } +``` -**far_from_district_start** +--- -Settings +### Far From Influence -None +**Card Name**: `far_from_influence` -Example +The `far_from_influence` placement preference is the inverse of the `close_to_influence` placement preference. -![](images/village_generation/image40.png) +**Settings**: -### Far From Influence -The far_from_influence placement preference is the inverse of the close_to_influence placement preference. +* **`alliance_rule_filter`**: Indicates what units should influence this placement preference. Possible values include `enemy`, `friendly`, and `any_team`. -Name +--- -**far_from_influence** +### Far From Water -Settings +**Card Name**: `far_from_water` -**alliance_rule_filter** +The `far_from_water` placement preference is the inverse of the `close_to_water` placement preference. -Indicates what units should influence this placement preference. Possible values include “enemy”, “friendly”, and “any_team”. +--- -### Far From Water -The far_from_water placement preference is the inverse of the close_to_water placement preference. +### Far From Village Start -Name +**Card Name**: `far_from_village_start` -**far_from_water** +The placement preference is the same as the `far_from_district_start` placement preference. It exists because it was added before it was possible to have multiple districts in a village. -Settings +--- -None +### Noise -### Far From Village Start -The placement preference is the same as the “far_from_district_start” placement preference. It exists because it was added before it was possible to have multiple districts in a village. +**Card Name**: `noise` -Name - -**far_from_village_start** - -Settings - -None - -### Noise The noise placement preference will sample a 2D noise map at village zone positions and add the result to the zone scores. -Name - -**noise** +**Settings**: -Settings +* **`amplitude`**: By default, the `noise` placement preference will add a score between 0 and 1. This score will be multiplied with the amplitude. As a result, the `amplitude` can be used to increase or decrease the effect that this placement preference has on the final score. -**amplitude** +* **`scale`**: A lower value will result in a noise map with more gradual changes. A higher value will have the opposite effect. -By default, the noise placement preference will add a score between 0 and 1. This score will be multiplied with the amplitude. As a result, the amplitude can be used to increase or decrease the effect that this placement preference has on the final score. +**Example**: -**scale** +```json +{ + "cost": 0, + "tags": [ "example_noise" ], + "placement_preference": "noise", + "amplitude": 0.45, + "scale": 0.02 +} +``` -A lower value will result in a noise map with more gradual changes. A higher value will have the opposite effect. +![noise placement_preference](images/village_generation/image42.png) -Example +_When combined with a wall request card and a threshold card, noise can be used to create fragmented walls._ -![](images/village_generation/image41.png) +--- -![](images/village_generation/image42.png) +### Build From District Path -When combined with a wall request card and a threshold card, noise can be used to create fragmented walls. +**Card Name**: `build_from_district_path` -### Build From District Path -This placement preference card can be multiplied with a buildable request card. Buildable request cards that have the “build_from_district_path” placement preference will place buildables that are connected to a specified district path. This guarantees that the placed buildable is connected to a path and not facing the side of another buildable. +This placement preference card can be multiplied with a buildable request card. Buildable request cards that have the `build_from_district_path` placement preference will place buildables that are connected to a specified district path. This guarantees that the placed buildable is connected to a path and not facing the side of another buildable. -Note -* In village.json, there is a setting for the maximum distance allowed from the starting path zone. This is to keep the buildable from running too far away, but tags and filters will usually kick in first. - -![](images/village_generation/image43.png) - -* In the village definition json (eg villager_village_001.json) the district paths need to "prevent buildable placement". If this is turned off, paths will start cutting through buildables and removing the bottom layers of blocks. - -![](images/village_generation/image44.png) +* _Notes_: + * In `village.json`, there is a setting for the maximum distance allowed from the starting path zone. This is to keep the buildable from running too far away, but tags and filters will usually kick in first. -* The card is just a placement preference, and is multiplied like usual. The main things to watch out for are that you have a valid district path to connect to, and that your tag filters/tags all agree on that. + ```json + { + "village_building": { + "build_from_path_max_range_in_blocks": 100 + } + } + ``` -Name + * In the village definition json (eg `villager_village_001.json`) the district paths need to "prevent buildable placement". If this is turned off, paths will start cutting through buildables and removing the bottom layers of blocks. -**build_from_district_path** + ```json + { + "prevent_buildable_placement": true + } + ``` -Settings + * The card is just a placement preference, and is multiplied like usual. The main things to watch out for are that you have a valid district path to connect to, and that your tag filters/tags all agree on that. -None +**Example**: -Example +```json +// JSON: + { + "cost": 0, + "tags": [ "example_build_from_district_path" ], + "placement_preference": "build_from_district_path" + } +``` -![](images/village_generation/image45.png) +```jsx +//B# + // North Houses + DECK_MultiplyByMultipleRules(comboVillageDeckNorth, [ + PlacementPreferenceCard("example_build_from_district_path"), + DistrictCard("district1"), + ]); + DECK_PutOnBottomOf(comboVillageDeckNorth, villageDeck); -![](images/village_generation/image46.png) +``` -![](images/village_generation/image47.png) +![build_from_district_path example](images/village_generation/image47.png) -### Across Path +--- -This placement preference card can be multiplied with a buildable request card. Buildable request cards that have the “across_path” placement preference will place buildables on the path. +### Across Path +**Card Name**: `across_path` -Note -* This placement preference lets buildables place on top of paths. Usually our collision checks prevent that. -* Make sure you have a path requested. +This placement preference card can be multiplied with a buildable request card. Buildable request cards that have the `across_path` placement preference will place buildables on the path. -Name +* _Notes_: + * This placement preference lets buildables place on top of paths. Usually our collision checks prevent that. + * Make sure you have a path requested. -**across_path** +**Example**: -Settings +```json +// JSON + { + "cost": 0, + "tags": [ "example_across_path" ], + "placement_preference": "across_path" + } +``` -None +![Arches use across_path](images/village_generation/image49.png) -Example +_The arches use the `across_path` placement preference._ -![](images/village_generation/image48.png) +### Along Path -![](images/village_generation/image49.png) +**Card Name**: `along_path` -The arches use the across_path placement preference. +This placement preference card can be multiplied with a buildable request card. Buildable request cards that have the `along_path` placement preference will place buildables next to a path. -### Along Path -This placement preference card can be multiplied with a buildable request card. Buildable request cards that have the “along_path” placement preference will place buildables next to a path. +* _Notes_: + * This placement preference lets buildables place closer to paths than our collision checks would usually allow. + * Make sure you have a path requested. -Note -* This placement preference lets buildables place closer to paths than our collision checks would usually allow. -* Make sure you have a path requested. +**Settings**: -Name +* **`offset_from_path`**: The distance from the path in blocks that the buildable should place. -**along_path** +**Example**: -Settings +```json +// JSON + { + "cost": 0, + "tags": [ "example_along_path" ], + "placement_preference": "along_path" + } +``` -**offset_from_path** +![Benches use along_path](images/village_generation/image49.png) -The distance from the path in blocks that the buildable should place. +_The benches use the `along_path` placement preference._ -Example +--- -![](images/village_generation/image48.png) +### Ignore Zone Filter For Overlapping Zones -![](images/village_generation/image49.png) +**Card Name**: `ignore_zone_filter_for_overlapping_zones_card` -The benches use the along_path placement preference. - -### Ignore Zone Filter For Overlapping Zones This placement preference can be multiplied with buildable request cards. By default, when we’re checking if a buildable request with a zone filter card can be placed in a zone, if that buildable overlaps a neighboring zone that doesn’t pass the filter, the buildable won’t be placed in that location. -Note -* If the structures are failing to place, but the village looks like it has a lot of open space where they intuitively should be placed, this placement preference might help. -* The placed buildable center will still be inside a zone that passes the filter. It’s just the overlapping zones that might not pass the filter. - -Name - -**ignore_zone_filter_for_overlapping_zones_card** +* _Notes_: + * If the structures are failing to place, but the village looks like it has a lot of open space where they intuitively should be placed, this placement preference might help. + * The placed buildable center will still be inside a zone that passes the filter. It’s just the overlapping zones that might not pass the filter. -Settings +--- -None +### In Direction Of Influence -### In Direction Of Influence -This placement preference can be multiplied with buildable request cards. Buildable request cards with this placement preference will try to place in the direction of a source of influence that passes the specified alliance rule filter. Sources of influence will have the “badger:village_influence” component. This is similar to the wedge_brush placement preference except the direction is going to be towards the source of influence. This can be used to place buildables in the direction of an enemy attack. +**Card Name**: `in_direction_of_influence` -Name +This placement preference can be multiplied with buildable request cards. Buildable request cards with this placement preference will try to place in the direction of a source of influence that passes the specified alliance rule filter. Sources of influence will have the `badger:village_influence` component. This is similar to the `wedge_brush` placement preference except the direction is going to be towards the source of influence. This can be used to place buildables in the direction of an enemy attack. -**in_direction_of_influence** +**Settings**: -Settings +* **`alliance_rule_filter`**: Indicates what units should influence this placement preference. Possible values include `enemy`, `friendly`, and `any_team`. -**alliance_rule_filter** +* **`wedge_angle`**: The angle between the two sides of the wedge. This determines how wide the wedge area is. See the wedge_brush placement preference for an example. -Indicates what units should influence this placement preference. Possible values include “enemy”, “friendly”, and “any_team”. +--- -**wedge_angle** +### Random -The angle between the two sides of the wedge. This determines how wide the wedge area is. See the wedge_brush placement preference for an example. +**Card Name**: `random` -### Random The random placement preference will sample a random value between 0 and 1 and add the result to the zone scores. -Name +--- -**random** +### Rectangle Brush -Settings +**Card Name**: `rectangle_brush` -None - -### Rectangle Brush Zones contained inside the rectangle brush will be scored higher the closer the zone is to the middle of the rectangle. The score added is between 0 and 1. -Note -* The rectangle has an infinite length. Use this placement preference with the distance_from_district_start to limit the distance. -* Multiply this placement preference with a district card to specify the starting position of the rectangle. -* Don’t make the width smaller than the village zone_spacing or it might be possible for no zone sites to exist inside the area. - -Name +* _Notes_ + * The rectangle has an infinite length. Use this placement preference with the distance_from_district_start to limit the distance. + * Multiply this placement preference with a district card to specify the starting position of the rectangle. + * Don’t make the width smaller than the village zone_spacing or it might be possible for no zone sites to exist inside the area. -**rectangle_brush** +**Settings**: -Settings +* **`direction_angle`**: The direction that the rectangular area will extend towards. -**direction_angle** +* **`rectangle_width`**: The width of the rectangular area. -The direction that the rectangular area will extend towards. +**Example**: -**rectangle_width** +```json +// JSON + { + "cost": 0, + "tags": ["placeInDirectionWestWithRectangleBrush"], + "placement_preference": "rectangle_brush", + "direction_angle": 180.0, + "rectangle_width": 60.0 + } +``` -The width of the rectangular area. +![rectangle_brush](images/village_generation/image53.png) -Example +--- -![](images/village_generation/image52.png) +### Score Threshold -![](images/village_generation/image53.png) +**Card Name**: `score_threshold` -### Score Threshold Zones with a score less than the threshold specified on this placement preference will not be considered for the buildable, district, path, or wall being requested. If no zone exists that passes the threshold, the request will be canceled. -Note -* Only use this placement preference if it’s ok for the request to fail. - -Name +* _Note_: + * Only use this placement preference if it’s ok for the request to fail. -**score_threshold** +**Settings**: -Settings +**`threshold`**: Only zones that have a score that is higher than this threshold value will be considered. -**threshold** +**Example**: -Only zones that have a score that is higher than this threshold value will be considered. +```json +// JSON + { + "cost": 0, + "tags": ["withScoreThresholdSmall"], + "placement_preference": "score_threshold", + "threshold": 0.3 + } +``` -Example +--- -![](images/village_generation/image54.png) +### Wedge Brush -### Wedge Brush -Zones contained inside the wedge brush will be scored higher if the direction aligns with the requested direction. The score added is between 0 and 1. +**Card Name**: **`wedge_brush`** -Note -* The wedge has an infinite length. Use this placement preference with the distance_from_district_start to limit the distance. -* Multiply this placement preference with a district card to specify the starting position of the wedge. -* Don’t make the wedge_angle so small that the distance between the wedge sides might be smaller than the village zone_spacing or it might be possible for no zone sites to exist inside the area. +Zones contained inside the wedge brush will be scored higher if the direction aligns with the requested direction. The score added is between 0 and 1. -Name +* _Notes_: + * The wedge has an infinite length. Use this placement preference with the distance_from_district_start to limit the distance. + * Multiply this placement preference with a district card to specify the starting position of the wedge. + * Don’t make the wedge_angle so small that the distance between the wedge sides might be smaller than the village zone_spacing or it might be possible for no zone sites to exist inside the area. -**wedge_brush** +**Settings**: -Settings +**`direction_angle`**: The direction that the triangular area will extend towards. -**direction_angle** +**`wedge_angle`**: The angle between the two sides of the wedge. This determines how wide the wedge area is. -The direction that the triangular area will extend towards. +**Example**: -**wedge_angle** +```json +// JSON + { + "cost": 0, + "tags": ["placeInDirectionEastWithWedgeBrush"], + "placement_preference": "wedge_brush", + "direction_angle": 0.0, + "wedge_angle": 45.0 + } +``` -The angle between the two sides of the wedge. This determines how wide the wedge area is. +![wedge_brush](images/village_generation/image56.png) -Example +--- -![](images/village_generation/image55.png) +### Facing Invasion Target -![](images/village_generation/image56.png) +**Card Name**: **`facing_invasion_target`** -### Facing Invasion Target -This placement preference card can be multiplied with a buildable request card. Buildable request cards that have the “facing_invasion_target” placement preference will be rotated to face the village being invaded. +This placement preference card can be multiplied with a buildable request card. Buildable request cards that have the `facing_invasion_target` placement preference will be rotated to face the village being invaded. -Note -* This placement preference can only be used in villages that are participating in an invasion. (they need the InvasionAttack_OwnedComponent) +* _Note_: + * This placement preference can only be used in villages that are participating in an invasion. (they need the `InvasionAttack_OwnedComponent`) -Name +--- -**facing_invasion_target** +## Other Cards -Settings +### Force Building Placement Cards -None +**Card Library Name**: `force_building_placement_cards` -## Other Cards -### Force Building Placement Cards Building request cards that have been multiplied with a force building placement card will ignore these constraints: * Buildables can’t place in water -* Buildables with a zone filter card cannot place such that they overlap zones that don’t pass the filter (see **ignore_zone_filter_for_overlapping_zones_card**) -* Buildables can’t overlap paths if the path has **prevent_buildable_placement** set to true - -When creating a path request with the CreatePathRequestOnBottomOf helper, if a force building placement card is added to either set of path rules, gates will still be placed along the path where the path crosses walls even if bridges fail to place. By default, if bridges fail to place, that will cause the entire path to fail which results in no gates. - -Card Library Name - -**force_building_placement_cards** - -Settings - -None - -Example - -![](images/village_generation/image57.png) - -### -Heart Cards +* Buildables with a zone filter card cannot place such that they overlap zones that don’t pass the filter (see `ignore_zone_filter_for_overlapping_zones_card`) +* Buildables can’t overlap paths if the path has `prevent_buildable_placement` set to true + +When creating a path request with the `CreatePathRequestOnBottomOf` helper, if a force building placement card is added to either set of path rules, gates will still be placed along the path where the path crosses walls even if bridges fail to place. By default, if bridges fail to place, that will cause the entire path to fail which results in no gates. + +**Example**: + +```jsx +// B# + // determine portal size + if (IsSmall(baseSize)) { + portal = BuildableCard("addPortalSmall"); + DECK_MultiplyBySingle(portal, ZoneHeightChangeCard("4Height")); + DECK_MultiplyBySingle(portal, ForceBuildingPlacementCard("forcePlacement")); + } else if (IsMedium(baseSize)) { + portal = BuildableCard("addPortalMedium"); + DECK_MultiplyBySingle(portal, ZoneHeightChangeCard("9Height")); + DECK_MultiplyBySingle(portal, ForceBuildingPlacementCard("forcePlacement")); + } else if (IsLarge(baseSize)) { + portal = BuildableCard("addPortalLarge"); + DECK_MultiplyBySingle(portal, ZoneHeightChangeCard("16Height")); + DECK_MultiplyBySingle(portal, ForceBuildingPlacementCard("forcePlacement")); + } +``` + +### Heart Cards + +**Card Library Name**: `heart_cards` Multiplying a buildable card with a heart card will make that structure a village heart. If all the village hearts get destroyed, that will destroy the village. -Library Card Name +### Appearance Override Cards -**heart_cards** +**Card Library Name**: `appearance_override_cards` -Settings - -None - -### Appearance Override Cards Multiplying a buildable card with an appearance override card will override the visuals of the buildable. Multiplying a path card with an appearance override card will override the visuals of any bridge buildables placed by the path. -Library Card Name -**appearance_override_cards** - -Settings -**horde** - -The horde visuals that should be applied. - -Example +**Settings**: -![](images/village_generation/image58.png) +* **`horde`**: The horde visuals that should be applied. -The bridge belongs to the DBB horde, but the appearance is overridden with the Obstacle horde visuals. +**Example**: -### Hanging Decoration Cards -[not used] Could be used to decorate the sides of zones that have been raised or lowered. +![appearance_override_cards](images/village_generation/image58.png) -Library Card Name +_The bridge belongs to the `DBB` horde, but the appearance is overridden with the `obstacle` horde visuals._ -**hanging_decoration_cards** +### Hanging Decoration Cards [Not used, may still function] -Settings +**Card Library Name**: `hanging_decoration_cards` -**hanging_decoration** +Could be used to decorate the sides of zones that have been raised or lowered. -[not used] The name of the block type to place on the side of the raised zone. +**Settings**: -Example +* **`hanging_decoration`**: The name of the block type to place on the side of the raised zone. -![](images/village_generation/image59.png) +### Tag Cards -Note that we don’t have flowing liquid anymore so these lava falls won’t work anymore. +**Card Library Name**: `tag_cards` -### Tag Cards Multiplying a tag card with a buildable card will add the specified tag to the buildable when it’s placed in the world. This tag card can also be multiplied with wall cards to add the tag to the wall and gate buildables when they’re placed. -Card Library Name +**Settings**: -**tag_cards** +* **`tag`**: The name of the tag to add to the buildable tag set when the buildable is placed. -Settings +### Entity Clearing Cards -**tag** +**Card Library Name**: `entity_clearing_cards` -The name of the tag to add to the buildable tag set when the buildable is placed. - -### Entity Clearing Cards The entity clearing card will remove entities that have the right tags. Only entities inside the village bounding rectangle will be considered. -Card Library Name - -**entity_clearing_cards** - -Settings +**Settings**: -**entity_include_tag_set** +* **`entity_include_tag_set`**: Entities with these tags will be removed. -Entities with these tags will be removed. +* **`entity_exclude_tag_set`**: Entities with these tags won’t be removed. -**entity_exclude_tag_set** +```json +//JSON + { + "entity_clearing_cards": [ + { + "cost": 0, + "tags": ["debugEntityClearing"], + "entity_include_tag_set": ["animal"], + "entity_exclude_tag_set": [] + } + ] + } +``` -Entities with these tags won’t be removed. +```jsx +// B# + const baseDeck = DECK_Empty(); + DECK_PutOnBottomOf(EntityClearingCard("debugEntityClearing"), baseDeck); +``` -![](images/village_generation/image60.png) +## Village Components -![](images/village_generation/image61.png) - -## Village Components Village components contain settings that often affect all the village features and placement preferences for a particular type of village. +### Village Zone -### Village Zone -Settings that will determine the amount of zones in the village map and the size and shape of each zone. - -Component Name - -**Badger:village_zone** - -Settings - -**zone_jitter_min** - -The maximum amount that a village zone will be offset in meters. - -**zone_jitter_max** +**Component Name**: `badger:village_zone` -The maximum amount that a village zone will be offset in meters. +The `badger:village_zone` component contains settings that will determine the amount of zones in the village map and the size and shape of each zone. -**is_zone_jitter_bell_curve_enabled** +--- -The generation of jitter values between the min and max will have a probability distribution that approximates a normal distribution. +**Settings**: -**zone_spacing** +* **`zone_jitter_min`**: The maximum amount that a village zone will be offset in meters. -The default distance between village zones before jitter is applied. +* **`zone_jitter_max`**: The maximum amount that a village zone will be offset in meters. -**expansion_distance** +* **`is_zone_jitter_bell_curve_enabled`**: The generation of jitter values between the min and max will have a probability distribution that approximates a normal distribution. -The maximum distance that villages can expand from the central starting position. +* **`zone_spacing`**: The default distance between village zones before jitter is applied. -**water_search_resolution** +* **`expansion_distance`**: The maximum distance that villages can expand from the central starting position. -The distance between each check for water while scanning the expansion area for bodies of water. +* **`water_search_resolution`**: The distance between each check for water while scanning the expansion area for bodies of water. -**is_hexagonal_grid_enabled** +* **`is_hexagonal_grid_enabled`**: If false, the village map will be grid with square zones. If true, the village map will be a hexagonal grid with hexagon zones. -If false, the village map will be grid with square zones. If true, the village map will be a hexagonal grid with hexagon zones. +* **`minimum_loz_connection_width`**: The minimum edge width between zones in a layer request before padding is added. -**minimum_loz_connection_width** +--- -The minimum edge width between zones in a layer request before padding is added. +### Village Wall -### Village Wall -Settings for how walls get placed when the wall cards are handled. +**Component Name**: `badger:village_wall` -Component Name +The `badger:village_wall` component contains settings for how walls get placed when the wall cards are handled. -**Badger:village_wall** +**Settings**: -Settings +* **`wall_offset`**: How far in meters to move the walls inward and away from the zone edges that they place along by default. -**wall_offset** +--- -How far in meters to move the walls inward and away from the zone edges that they place along by default. +### Village Height Change -Village Height Change +**Component Name**: `badger:village_height_change` -Influences the terrain changes that are applied when the village height change cards are handled. +The `badger:village_height_change` component influences the terrain changes that are applied when the village height change cards are handled. -Component Name +**Settings**: -badger:village_height_change +* **`clamp_size`**: The number of blocks above a height change that are not changed to air. -Settings +--- -**clamp_size** +### Village Bridge -The number of blocks above a height change that are not changed to air. +**Component Name**: `badger:village_bridge` -### Village Bridge +The `badger:village_bridge` component determines how bridges are built when the village path cards are handled. -Determines how bridges are built when the village path cards are handled. +**Settings**: -Component Name +* **`diagonal_bridge_degree_tolerance`**: The number of degrees a bridge can deviate from right angles before being considered diagonal. -**badger:village_bridge** +* **`bridge_horizontal_distance_min`**: The smallest XZ difference allowed between the start and end of the bridge. -Settings +* **`bridge_horizontal_distance_max`**: The largest XZ difference allowed between the start and end of the bridge. -**diagonal_bridge_degree_tolerance** +* **`bridge_vertical_distance_max`**: The largest Y difference allowed between the start and end of the bridge. -The number of degrees a bridge can deviate from right angles before being considered diagonal. +* **`bridge_cost_per_meter`**: Used to compare the cost of the bridge to the cost of a path without a bridge (paths have a fixed cost of 1 per meter). If the cost is low, there’s a greater risk of getting bridges placed in weird places. -**bridge_horizontal_distance_min** +* **`bridge_id`**: The entity identifier for the bridge that should be placed. -The smallest XZ difference allowed between the start and end of the bridge. +--- -**bridge_horizontal_distance_max** +### Village Hanging Decoration Placement [not used, may still work] -The largest XZ difference allowed between the start and end of the bridge. +**Component Name**: `badger:village_hanging_decoration_placement` -**bridge_vertical_distance_max** + The `badger:village_hanging_decoration_placement` contains settings for placing hanging decorations between village zones when the hanging decoration cards are handled. -The largest Y difference allowed between the start and end of the bridge. +**Settings**: -**bridge_cost_per_meter** +* **`minimum_edge_width`**: The minimum shared edge width between two zones considered for placement. -Used to compare the cost of the bridge to the cost of a path without a bridge (paths have a fixed cost of 1 per meter). If the cost is low, there’s a greater risk of getting bridges placed in weird places. +* **`minimum_height_delta`**: The minimum height difference between two zone considered for placement. -**bridge_id** +--- -The entity identifier for the bridge that should be placed. +### Building Placement -### Village Hanging Decoration Placement -[not used] Settings for placing hanging decorations between village zones when the hanging decoration cards are handled. +**Component Name**: `badger:village_building_placement` -Component Name +The `badger:village_building_placement` contains settings for placing buildables inside of village zones. -**badger:village_hanging_decoration_placement** +**Settings**: -Settings +* **`max_placement_attempts_with_jitter`**: The maximum number of times that a placement will try placing with jitter, per village zone. -**minimum_edge_width** +* **`is_placement_jitter_bell_curve`**: The generation of jitter values between the min and max will have a probability distribution that approximates a normal distribution. -The minimum shared edge width between two zones considered for placement. +* **`placement_jitter_min`**: The minimum distance that the placement can be offset from a village zone face site. This value will be clamped if it's large enough to push the placement outside of a zone. -**minimum_height_delta** +* **`placement_jitter_max`**: The maximum distance that the placement can be offset from a village zone face site. This value will be clamped if it's large enough to push the placement outside of a zone. -The minimum height difference between two zone considered for placement. +* **`minimum_distance_between_buildings`**: Buildings cannot be placed closer than this distance. -### Building Placement -Settings for placing buildables inside of village zones. +--- -Component Name +### Zone Scoring -**badger:village_building_placement** +**Component Name**: `badger:village_zone_scoring` -Settings +The `badger:village_zone_scoring` component houses settings that will adjust the weights and easing functions of different placement preferences. -**max_placement_attempts_with_jitter** +**Settings**: -The maximum number of times that a placement will try placing with jitter, per village zone. +* The easing function for each placement preference will be `linear` by default. + * As an example, if the `far_from_district_start` placement preference is used, the farthest zone from the district start position will be assigned a score of 1 and the closest zone will be assigned a score of 0. With the easing set to `linear`, the zone halfway between the two will receive a score of 0.5. + * If instead set the easing function to `ease_in_cubic`, the score assigned will be much lower since the easing is more gradual before quickly ramping up (see [https://easings.net/](https://easings.net/) for options and examples). -**is_placement_jitter_bell_curve** +* The weight for each placement preference is `1.0` by default. + * Placement preferences usually each add a score between 0 and 1 to a zone being scored. The weight will be multiplied with that initial score. + * As an example, if the random placement preference and the close to district start placement preference is used, but we wanted the random placement preference to have less influence on the zones prioritized for placement, we could give the `random_weight` a lower value than the `close_to_weight`. -The generation of jitter values between the min and max will have a probability distribution that approximates a normal distribution. +**Example**: -**placement_jitter_min** +```json +//JSON + { + "badger:village_zone_scoring": { + // Easing Function + "close_to_easing": "linear", + "far_from_easing": "linear", + "direction_easing": "linear", + "close_to_wall_easing": "linear", + "spacing_easing": "linear", + "elevation_easing": "linear", + "distance_from_easing": "linear", + // Weights + "close_to_weight": 1.0, + "far_from_weight": 1.0, + "direction_weight": 1.0, + "close_to_wall_weight": 1.5, + "random_weight": 0.7, + "elevation_weight": 1.0, + "distance_from_weight": 1.0, + } + } -The minimum distance that the placement can be offset from a village zone face site. This value will be clamped if it's large enough to push the placement outside of a zone. +``` -**placement_jitter_max** +--- -The maximum distance that the placement can be offset from a village zone face site. This value will be clamped if it's large enough to push the placement outside of a zone. +### Weathering -**minimum_distance_between_buildings** - -Buildings cannot be placed closer than this distance. - -### Zone Scoring -Settings that will adjust the weights and easing functions of different placement preferences. - -Component Name - -**badger:village_zone_scoring** - -Settings - -The easing function for each placement preference will be linear by default. As an example, if the far_from_district_start placement preference is used, the farthest zone from the district start position will be assigned a score of 1 and the closest zone will be assigned a score of 0. With the easing set to “linear”, the zone halfway between the two will receive a score of 0.5. If instead set the easing function to “ease_in_cubic”, the score assigned will be much lower since the easing is more gradual before quickly ramping up (see [https://easings.net/](https://easings.net/) for options and examples). - -The weight for each placement preference is 1.0 by default. Placement preferences usually each add a score between 0 and 1 to a zone being scored. The weight will be multiplied with that initial score. As an example, if the random placement preference and the close to district start placement preference is used, but we wanted the random placement preference to have less influence on the zones prioritized for placement, we could give the random_weight a lower value than the close_to_weight. - -Example - -![](images/village_generation/image62.png) - -### Weathering This component contains all the terrain weathering settings. This component can be given to any of the village archetypes. -Component Name - -badger:village_weathering - -Settings - -**is_overhanging_edge** - -Determines if the weathering effect will taper up or down. - -**position_noise_scale** - -Lower values will apply smoother xz jitter to weathering effects. - -**wave_max_depth** - -The maximum distance in blocks, before noise, that the weathering wave can remove blocks from an edge. - -**wave_min_depth** - -The minimum distance in blocks, before noise, that the weathering wave can remove blocks from an edge. - -**wave_frequency_scale** - -A smaller scale factor will reduce the frequency of the weathering wave for a smoother effect. - -**wave_noise_scale** - -The magnitude of noise used to break up the wave function. - -**gradient_passes** settings: - -The system supports multiple gradient passes, which determine how many blocks to remove and what height. - -**gradient_depths** - -A list of how many blocks deep into the terrain should be removed. These are expected to be in descending order. Each of these values corresponds to a value in the `gradient_weight_heights` list. - -**gradient_weight_heights** - -A list of heights for each gradient depth to be applied. These values should be in descending order for non-overhanging edges, and ascending order for overhanging edges. 1.0 means the top of the edge and 0.0 means the bottom. In the example, at a height of 0.8 and above, the terrain should be removed at a depth of 3.0. At a height of 0.6 and above, the terrain should be removed at a depth of 2.5. - -**gradient_2d_noise_scale** - -The magnitude of vertical noise applied to the gradient pass. Lower value noise will look more continuous. Higher will look more random. - -**gradient_3d_noise_scale** - -The magnitude of horizontal noise applied to the gradient pass. - -**gradient_affected_by_wave** - -Sets whether or not the particular gradient pass should be affected by the sawtooth wave. If they are affected, the gradient is applied only in spots where the sawtooth wave would remove blocks. If they are not, the gradient is applied consistently over the whole edge. Using a combination allows for some interesting weathering effects. - -Example - -![](images/village_generation/image63.png) - -### Path (Building and District) -These components contain all the village path settings. - -Component Name(s) - -**badger:village_building_path** and **badger:village_district_path** - -Settings - -**path_blocks** +**Component Name**: `badger:village_weathering` -A list of block names and their relative weights to be placed for the central portion of the path. Changing the weight influences which block is randomly selected. +**Settings**: -**edge_block** +* **`is_overhanging_edge`**: Determines if the weathering effect will taper up or down. -A list of block names and their relative weights to be placed along the outer edges of the path. +* **`position_noise_scale`**: Lower values will apply smoother xz jitter to weathering effects. +* **`wave_max_depth`**: The maximum distance in blocks, before noise, that the weathering wave can remove blocks from an edge. -**edge_decoration_blocks** +* **`wave_min_depth`**: The minimum distance in blocks, before noise, that the weathering wave can remove blocks from an edge. -A list of block names and their relative weights to be placed on top of the path edge blocks. +* **`wave_frequency_scale`**: A smaller scale factor will reduce the frequency of the weathering wave for a smoother effect. -**inner_blocks** +* **`wave_noise_scale`**: The magnitude of noise used to break up the wave function. -path_blocks, edge_blocks, and edge_decoration_blocks can all be divided into inner and outer sections, as shown in the example for edge_decoration_blocks. This allows the inner and outer portions of the path and path edge to have different blocks with different weights. inner_blocks is a list of block names and their relative weights for the inner portion of the path or path edge. +* **`gradient_passes`**: The system supports multiple gradient passes, which determine how many blocks to remove and what height. -**outer_blocks** + * **`gradient_depths`**: A list of how many blocks deep into the terrain should be removed. These are expected to be in descending order. Each of these values corresponds to a value in the `gradient_weight_heights` list. -A list of block names and their relative weights for the outer portion of the path or path edge + * **`gradient_weight_heights`**: A list of heights for each gradient depth to be applied. These values should be in descending order for non-overhanging edges, and ascending order for overhanging edges. 1.0 means the top of the edge and 0.0 means the bottom. In the example, at a height of 0.8 and above, the terrain should be removed at a depth of 3.0. At a height of 0.6 and above, the terrain should be removed at a depth of 2.5. -**path_width** + * **`gradient_2d_noise_scale`**: The magnitude of vertical noise applied to the gradient pass. Lower value noise will look more continuous. Higher will look more random. -The number of meters across the main portion of the path should be. + * **`gradient_3d_noise_scale`**: The magnitude of horizontal noise applied to the gradient pass. -**edge_width** -The number of meters across the edge on either side of the main path should be. + * **`gradient_affected_by_wave`**: Sets whether or not the particular gradient pass should be affected by the sawtooth wave. If they are affected, the gradient is applied only in spots where the sawtooth wave would remove blocks. If they are not, the gradient is applied consistently over the whole edge. Using a combination allows for some interesting weathering effects. -**path_noise_scale_factor** -A small scale factor will produce more gradual changes in a building path's weathering. +**Example**: -**path_deco_noise_scale_factor** +```json +// JSON + { + "badger:village_weathering": { + "is_overhanging_edge": false, + "position_noise_scale": 0.6, + "wave_depth_max": 3, + "wave_depth_min": 0.2, + "wave_period_scale": 0.4, + "wave_noise_scale": 0.6, + "gradient_passes": [ + { + "gradient_depths": [3.0, 2.5, 2.0, 0.8], + "gradient_weight_heights": [0.8, 0.6, 0.3, 0.1], + "gradient_2d_noise_scale": 2.8, + "gradient_3d_noise_scale": 1.0, + "gradient_affected_by_wave": true + }, + { + "gradient_depths": [1.2, 1.0, 0.5], + "gradient_weight_heights": [0.7, 0.3, 0.2], + "gradient_2d_noise_scale": 1.8, + "gradient_3d_noise_scale": 1.0, + "gradient_affected_by_wave": false + } + ] + } + } +``` -A smaller scale factor will cause path edge decorations to alternate less frequently. +--- -**path_block_noise_scale_factor** +### Path (Building and District) -A smaller scale factor will cause path blocks to alternate less frequently. +**Component Name(s)**: `badger:village_building_path` and `badger:village_district_path` -**path_edge_block_noise_scale_factor** +These components contain all the village path settings for building paths and district paths respectively. -A smaller scale factor will cause path edge blocks to alternate less frequently. +**Settings**: -**path_noise_amplitude** -The noise amplitude affects the severity of a building path’s weathering. This affects both the edge and main path, but is capped by the path width + edge width + edge noise amplitude. - -**edge_noise_amplitude** - -How far noise can extend past the building path’s edge in meters. - -**diagonal_path_degree_tolerance** - -The number of degrees a building path can deviate from right angles before being considered diagonal. - -**prevent_buildable_placement** - -Setting this to false will allow buildables to place so that they overlap paths. - -**can_place_under_buildables** - -Setting this to false will force paths to generate around buildables instead of underneath them. - -**can_resuse_existing_paths** - -Setting this to true will encourage paths to reuse existing paths and bridges. If a path step is reused, it won’t add any additional cost to the path being planned. If this is false, it’s possible for a path to overlap another, but the cost of the path will still be added to the path being planned as normal. If this is false, paths won’t be able to reuse existing bridges. - -**height_change_needs_bridge** - -If the height change between zones is equal to or larger than this value, a bridge must be placed to connect the two zones. - -**outer_edge_threshold** - -Sets the proportion of the inner and outer path. A lower setting means a larger outer edge and a higher setting means a larger inner edge. - -Example - -![](images/village_generation/image64.png) +* **`path_blocks`**: A list of block names and their relative weights to be placed for the central portion of the path. Changing the weight influences which block is randomly selected. +* **`edge_block`**: A list of block names and their relative weights to be placed along the outer edges of the path. +* **`edge_decoration_blocks`**: A list of block names and their relative weights to be placed on top of the path edge blocks. + +* **`inner_blocks`** and **`outer_blocks`**: `path_blocks`, `edge_blocks`, and `edge_decoration_blocks` can all be divided into `inner` and `outer` sections, as shown in the example for `edge_decoration_blocks`. This allows the inner and outer portions of the path and path edge to have different blocks with different weights. + + * **`inner_blocks`**: A list of block names and their relative weights for the inner portion of the path or path edge. + + * **`outer_blocks`**: A list of block names and their relative weights for the outer portion of the path or path edge + +* **`path_width`** The number of meters across the main portion of the path should be. + +* **`edge_width`**: The number of meters across the edge on either side of the main path should be. + +* **`path_noise_scale_factor`**: A small scale factor will produce more gradual changes in a building path's weathering. + +* **`path_deco_noise_scale_factor`**: A smaller scale factor will cause path edge decorations to alternate less frequently. + +* **`path_block_noise_scale_factor`**: A smaller scale factor will cause path blocks to alternate less frequently. + +* **`path_edge_block_noise_scale_factor`**: A smaller scale factor will cause path edge blocks to alternate less frequently. + +* **`path_noise_amplitude`**: The noise amplitude affects the severity of a building path’s weathering. This affects both the edge and main path, but is capped by the path width + edge width + edge noise amplitude. + +* **`edge_noise_amplitude`**: How far noise can extend past the building path’s edge in meters. + +* **`diagonal_path_degree_tolerance`**: The number of degrees a building path can deviate from right angles before being considered diagonal. + +* **`prevent_buildable_placement`**: Setting this to false will allow buildables to place so that they overlap paths. + +* **`can_place_under_buildables`**: Setting this to false will force paths to generate around buildables instead of underneath them. + +* **`can_resuse_existing_paths`**: Setting this to true will encourage paths to reuse existing paths and bridges. If a path step is reused, it won’t add any additional cost to the path being planned. If this is false, it’s possible for a path to overlap another, but the cost of the path will still be added to the path being planned as normal. If this is false, paths won’t be able to reuse existing bridges. + +* **`height_change_needs_bridge`**: If the height change between zones is equal to or larger than this value, a bridge must be placed to connect the two zones. + +* **`outer_edge_threshold`**: Sets the proportion of the inner and outer path. A lower setting means a larger outer edge and a higher setting means a larger inner edge. + +**Example**: + +```json +// JSON + { + "badger:village_building_path": { + "path_blocks": [ + ["block_path_mud_04", 2], + ["block_mud_var04", 1] + ], + "edge_blocks": [ + ["block_path_mud_path", 3], + ["block_mud_path", 2], + ["grass", 1] + ], + "edge_decoration_blocks": [ + { + "inner_blocks": [ + ["block_deco_fol_moss_01", 2], + ["block_deco_zombie_mushroom_small", 1], + ["block_deco_fol_wofgrass_01", 2], + ["block_deco_fol_wofgrass_02", 2], + ["block_deco_fol_wofgrass_03", 2], + ["air", 6] + ], + "outer_blocks": [ + ["block_deco_fol_moss_01", 2], + ["block_deco_zombie_mushroom_small", 1], + ["block_deco_fol_wofgrass_01", 2], + ["block_deco_fol_wofgrass_02", 2], + ["block_deco_fol_wofgrass_03", 2], + ["block_deco_grass_clump_02", 1], + ["block_deco_grass_clump_03", 1], + ["air", 6] + ] + } + ], + "path_width": 2.0, + "edge_width": 2.0, + "path_noise_scale_factor": 3.0, + "path_deco_noise_scale_factor": 3.0, + "path_block_noise_scale_factor": 3.0, + "path_edge_block_noise_scale_factor": 5.0, + "diagonal_path_degree_tolerance": 45, + "prevent_buildable_placement": false, + "path_noise_amplitude": 1.0, + "edge_noise_amplitude": 1.0, + "can_place_bridge_for_height_changes": false, + "height_change_needs_bridge": 8.0, + "outer_edge_threshold": 0.5 + } + } +``` + +--- + +## Village Service Parsed Data + +**File Location**: `data/behavior_packs/badger/gamelayer/server/village/villages.json` -## Village Service Parsed Data The village service parsed data contains global settings that often affect all villages. -File Location - -gamelayer/server/village/villages.json - -Map Settings - -**terrain_sampling_fill_step_distance** - -When we sample the terrain data before planning the village, I don’t think we can sample the entire area at once (it used to cause a crash at least) so we do it in pieces that have a width and height equal to this step distance. +### Map Settings -**block_query_step_distance** +* **`terrain_sampling_fill_step_distance`**: When we sample the terrain data before planning the village, I don’t think we can sample the entire area at once (it used to cause a crash at least) so we do it in pieces that have a width and height equal to this step distance. -This distance defines the resolution that we query the terrain for water and then markup zones with water inside them. Water detection should become more precise if this is a smaller value, but it’s also more expensive. +* **`block_query_step_distance`**: This distance defines the resolution that we query the terrain for water and then markup zones with water inside them. Water detection should become more precise if this is a smaller value, but it’s also more expensive. -Building Settings +### Building Settings -**approximate_block_budget_per_tick** +* **`approximate_block_budget_per_tick`**: [not used], _Miclee note_: may be worth looking into. -[not used] +* **`build_from_path_max_range_in_blocks**`**: When the `build_from_district_path` placement preference is used, zones won’t be considered if their distance to the starting path zone exceeds this max distance. -**build_from_path_max_range_in_blocks** - -When the build_from_district_path placement preference is used, zones won’t be considered if their distance to the starting path zone exceeds this max distance. - -Navigation Map Settings +### Navigation Map Settings The village navigation system hasn’t been used in a long time. -**crossable_edge_minimum_length** - -[not used] - -**path_padding_width** - -[not used] - -**path_destination_arrival_distance** - -[not used] - -Influence Map Settings - -**planning_influence_map_settings** - -These settings affect the close_to_buildable, far_from_buildable, close_to_water, far_from_water, facing_buildable, and facing_water placement preferences. - -**alliance_influence_map_settings** +* **`crossable_edge_minimum_length`**: [not used] -These settings affect the close_to_influence, far_from_influence, facing_influence, and in_direction_of_influence placement preferences. +* **`path_padding_width`**: [not used] -**decay** +* **`path_destination_arrival_distance**`**: [not used] -How much influence is lost as it spreads. +### Influence Map Settings -**resolution** +* **`planning_influence_map_settings`**: These settings affect the `close_to_buildable`, `far_from_buildable`, `close_to_water`, `far_from_water`, `facing_buildable`, and `facing_water` placement preferences. -The dimensions of the grid that influence will spread through. +* **`alliance_influence_map_settings`**: These settings affect the `close_to_influence`, `far_from_influence`, `facing_influence`, and `in_direction_of_influence` placement preferences. -**initial_influence** +* **`decay`**: How much influence is lost as it spreads. -The initial amount of influence before it decays. +* **`resolution`**: The dimensions of the grid that influence will spread through. -Placement Preference Settings +* **`initial_influence`**: The initial amount of influence before it decays. -**buildable_tag_for_spacing** +### Placement Preference Settings -By default, every buildable request will be given a far_from_buildable** **placement preference with this tag to help ensure buildables space themselves out; However, if the buildable request has the disable_spacing placement preference, this tag won’t be used. +* **`buildable_tag_for_spacing`**: By default, every buildable request will be given a `far_from_buildable` placement preference with this tag to help ensure buildables space themselves out; However, if the buildable request has the `disable_spacing` placement preference, this tag won’t be used. -Heart Destruction Settings +### Heart Destruction Settings -**world_request_type** +* **`world_request_type`**: When a village has been destroyed (e.g. portal destroyed), this world request type is used to load the world. It will determine the priority of the world request. -When a village has been destroyed (e.g. portal destroyed), this world request type is used to load the world. It will determine the priority of the world request. +* **`tag_for_village_heart_destruction_opt_out`**: [not used] -**tag_for_village_heart_destruction_opt_out** +### Wall Settings -[not used] +* **`max_number_of_gate_placement_attempts`**: If a gate collides with another structure (usually a bridge/staircase) we’ll move the gate position 1 meter in the direction of the path entering the wall and then the gate will try to place again. This is the max number of attempts before the gate will fail to place. -Wall Settings +* **`minimum_segment_length`**: When a structure is being embedded in a wall, we’ll extend the wall if the original wall isn’t long enough. We’ll skip walls that are less than this length when we’re creating the extended wall. -**max_number_of_gate_placement_attempts** +* **`remove_wall_on_placement_failure`**: Specifies if a gap in the village walls should be left when we fail to embed a structure in the walls. -If a gate collides with another structure (usually a bridge/staircase) we’ll move the gate position 1 meter in the direction of the path entering the wall and then the gate will try to place again. This is the max number of attempts before the gate will fail to place. +### Moat Settings -**minimum_segment_length** - -When a structure is being embedded in a wall, we’ll extend the wall if the original wall isn’t long enough. We’ll skip walls that are less than this length when we’re creating the extended wall. - -**remove_wall_on_placement_failure** - -Specifies if a gap in the village walls should be left when we fail to embed a structure in the walls. - -Moat Settings - -**noise_levels** - -This controls how many levels of detail the moat noise is going to have. At each level, the frequency of noise is doubled and the amplitude is halved. This setting will affect all villages that have the new badger:village_moat component. It’s probably not worth having too many levels because the finer details are going to be lost when converting to block space. Also something to note is that because the end result is normalized to a value between 0 and 1, more levels of noise will have kind of a smoothing effect, mellowing out some of the interesting outliers when all the levels are averaged. +* **`noise_levels`**: This controls how many levels of detail the moat noise is going to have. At each level, the frequency of noise is doubled and the amplitude is halved. This setting will affect all villages that have the new `badger:village_moat` component. It’s probably not worth having too many levels because the finer details are going to be lost when converting to block space. Also something to note is that because the end result is normalized to a value between 0 and 1, more levels of noise will have kind of a smoothing effect, mellowing out some of the interesting outliers when all the levels are averaged. ### Performance Settings -#### building_time_budget_in_ms -The village building system will handle pending placements until this budget is reached or passed. +* **`building_time_budget_in_ms`**: The village building system will handle pending placements until this budget is reached or passed. -**planning_time_budget_in_ms** +* **`planning_time_budget_in_ms`**: The village planning system will handle village generation requests until this budget is reached or passed. -The village planning system will handle village generation requests until this budget is reached or passed. +## Entity Removal Service Parsed Data -## Entity Removal Service Parsed Data Specifies what entities should be removed inside the village bounding area and inside the world reload areas. -File Location - -data\behavior_packs\badger\services\entity_removal.json - -Settings - -**include_any** - -Entities with these tags should be removed. +File Location: `data/behavior_packs/badger/services/entity_removal.json` -**exclude_any** +**Settings**: -Entities with these tags won’t be removed. +* **`include_any`**: Entities with these tags should be removed. +* **`exclude_any`**: Entities with these tags won’t be removed. -Examples +**Examples**: -Before (floating chests) +* Before (floating chests) -![](images/village_generation/image65.png) +![Before (floating chests)](images/village_generation/image65.png) -After (no floating chests) +* After (no floating chests) -![](images/village_generation/image66.png) +![After (no floating chests)](images/village_generation/image66.png) diff --git a/Wolverine.md b/Wolverine.md new file mode 100644 index 0000000..0749c97 --- /dev/null +++ b/Wolverine.md @@ -0,0 +1,221 @@ +# Wolverine: Structure Converter + +Structure files allow creators to save pre-constructed sections of blocks for reuse. Building larger structures inside of Minecraft Legends is as convenient as Minecraft (Bedrock and Java), with their mature creative workflows. To improve the structure creation process, the Wolverine tool was created. + +Wolverine allows creators to convert Minecraft: Bedrock (.mcstructure) files, Minecraft: Java (.nbt) structure files, and community (.schematic) files to the Minecraft Legends (.mcstructure) structure format. This enables creators to use familiar tools to create new content, as well as importing previously created content into Minecraft Legends. + +To use this tool effectively, we recommend being familiar with data blocks as a concept and the specific properties contained within the data blocks in both Minecraft and Minecraft Legends. + +In this article we will cover: + +* How to install Wolverine + +* Wolverine overview + +* Wolverine interface and process overview + +* Structure conversion example + +* Using Wolverine from the command prompt + +```md +Important! +This tool currently supports .mcstructure, .nbt, and .schematic file types, but not .schem files. +When designating a source file to convert, please make sure to confirm you're using a support file type! +``` + +## Running Wolverine + +To install and run Wolverine please do the following: + +1. Download the tool from the following link: [Insert Link here] +2. Then extract the tool to the desired location. +3. Run the WolverineUI.exe in the extracted folder or from a command prompt. For more information on command prompt usage see the “Command Prompt” section below.) + +### Input File + +Before you can use Wolverine, you must first create an input file. For more information on how to create a Bedrock structure file read the [Introduction to structure blocks](https://learn.microsoft.com/en-us/minecraft/creator/documents/introductiontostructureblocks). Exporting .nbt structure files from structure blocks in Minecraft: Java is similar. There is no official documentation on how to export .schematic files from Minecraft: Java, but there are multiple guides available by searching for “how to export a Minecraft java schematic” in the search engine of your choice. + +## Interface + +The easiest way to interact with Wolverine is through the UI. The Wolverine UI has 4 sections. The following is an overview of the interface and what each section of the UI does: + +### Input Section + +This section is where you select your input .mcstructure, .nbt, or .schematic file. Select the [Select File] button, navigate to an appropriate input file, and then select it. + +![fig 1](images/wolverine/image01.png) + +### Resource Pack Section + +This section is where you define the library of Minecraft Legend blocks that you are able convert to. By default, you have access to all the Minecraft Legends blocks in the “Known Blocks” area. + +![fig 2](images/wolverine/image02.png) + +This is a large list. To make it easier to look for specific blocks, you can type a keyword into the input field and select the `Filter Knowns` button to only view blocks that contain the specified keyword. + +If you have created custom Minecraft Legends blocks you can add them by selecting the `Add Resource Packs` button, navigating to the appropriate resource pack, and then selecting it. Resource Packs define custom blocks in a blocks folder. + +![fig 3](images/wolverine/image03.png) + +This adds the custom blocks to the list of valid block conversion targets. + +## Block Conversion Section + +This section is where you define the block conversions. The two columns on the left side of the arrow define which block in the input structure to target for conversion. The two columns on the right of the arrow define which block to place in the output structure in place of the input block. + +![fig 4](images/wolverine/image04.png) + +### Adding Block conversions + +* To add blocks to the conversion, press the green `+` button at the top left of the section. This creates a new row with empty input fields where you can define the input and output blocks and the specific properties. + +* To copy an existing block conversion, press the green `+` button at the left end of that row to create a new row with the same values. + +* To add all the unknown blocks within the input structure to the list, press the `Add Unknown Blocks` button at the top of the section. + +### Removing Block conversions + +* To remove a row, press the red `x` at the right end of the row. + +* To clear all conversions, press the `Clear Replacements` button at the top of the section. + +### Saving/loading conversion lists + +* To save a list of conversions, press the `Export Replacements` button at the top of the section. + +* To load a list of conversions, press the `Load Replacements` button at the top of the section. + +### Setting up for conversion + +There are a small number of blocks supported in both Minecraft and Minecraft Legends: water, stone, grass, bedrock, dirt, and air. These blocks will be automatically converted. All other blocks, if left without a block replacement, will become air. To find out which blocks in the input structure will be converted to air, press the `Add Unknown Inputs` button, and new block replacement rows will be added for each block. + +To help create your block replacements, you can use the “Known Blocks” from the Resource Pack section. Selecting one of these blocks will set the destination block name of the selected row of the block replacement list. + +![fig 5](images/wolverine/image05.png) + +For more specific input block selection, specify a block property, as a `key:value` pair in the block property field. This block property acts as a filter on the input block – only blocks that match the block property will follow the current block replacement rule. Only a single property is supported. Examples include `stone_type:cobblestone` and `pillar_axis:x`. The output block can also have a single block property specified, which adds that property to the output block. + +## Convert Section + +Press the `Convert` button to initiate conversion using the listed replacement pairs and resource packs given. The conversion process will take several seconds depending upon the size of the input file, then display a dialog when done. The log shows the most recent conversion’s output messages, recording the successful structure file generation or providing any warnings or errors from the conversion. If any blocks were missed, the user will be prompted with the option to add those unknown blocks to the replacement list for subsequent conversions. + +![fig 6](images/wolverine/image06.png) + +## Minecraft: Bedrock to Minecraft Legends workflow example + +In this section we’ll look at an example conversion. + +### Bedrock Export + +The example structure was constructed in Minecraft Bedrock using the information from the [Introduction to structure blocks](https://learn.microsoft.com/en-us/minecraft/creator/documents/introductiontostructureblocks) article. The structure was made from 3 different blocks: `minecraft:wood`, `minecraft:stone`, `minecraft:grass` and then exported to a file called tiny_house.mcstructure. + +![fig 7](images/wolverine/image07.png) + +![fig 8](images/wolverine/image08.png) + +Open the Wolverine UI application and then press the `Select File` button and navigate to the location of the exported .mcstructure. + +![fig 9](images/wolverine/image09.png) + +The following sections demonstrate a “Simple Conversion” and a “Custom Conversion”. + +## Simple Conversion + +Wolverine includes some automatic conversions such as minecraft:grass and minecraft:stone that automatically gets converted to badger blocks. Since two of the blocks in our example fall into this category, all that is required for a simple conversion is to add a replacement rule for minecraft:wood. Let’s convert to a block that is as close to the original as possible: + + `grass` -> `grass` + + `stone` -> `stone` + + `wood` -> `badger:plank_dark_oak_fine`. + + to get the desired result do the following steps: + +1. Select the `Add Unknown Blocks` button. This will add the minecraft:wood block to the conversion + + ![fig 10](images/wolverine/image10.png) +2. Select inside of the “Output Block Name” field in the block section. Then In the filter window type oak and select the `badger:block_planks_dark_oak_fine` block to add it to the name field enabling the conversion of wood -> dark oak planks fine. + ![fig 11](images/wolverine/image11.png) +3. Press the `Convert` button and choose a location. If you select the structures folder of your Myth’s Behavior Pack, Minecraft Legends will be able to import it when that Behavior Pack is active. + +## Custom Conversion + +To change automatic conversions, you must know the source blocks identifier and add them manually. In this instance I want to change the conversion to become closer to a Greek temple rather than a simple stone and wood construction. to get the desired results do the following: + +1. Press the `Add Unknown Blocks` button. This will add the `minecraft:wood` block to the conversion. +![fig 12](images/wolverine/image14.png) + +2. Then add your additional blocks by pressing the `+` until you have the number of blocks that the structure contains (in this case 2 more blocks) and add then in my case do the following conversions: + + `minecraft:grass` -> `badger:block_alabaster` + + `minecraft:stone` -> `badger:block_alabaster_stone_column` + + `minecraft:wood` -> `badger:block_alabaster_carved` + +![fig 13](images/wolverine/image12.png) +3. Press the `Convert` button and choose a location to save your output structure. + +## Using Properties in Conversions + +Notice that the wood blocks in the input file had various orientations but were converted to uniform blocks in the output. Conversions can be more precise by specifying block properties. In the following example, the pillar_axis property is specified in the input block property, so that the input blocks are converted based on orientation. + +![fig 14](images/wolverine/image13.png) + +## Command prompt + +The Wolverine conversion tool is packaged with two executables you can use to convert structures: + +* WolverineUI.exe: The user interface described above. + +* StructureConverter.exe: The command-line interface. + +StructureConverter.exe is intended for incorporation into a batch conversion process, allowing you to automate the conversion of many structures. The options JSON parameter contains fields that correspond to the Wolverine elements described above. + +If you run StructureConverter.exe without any arguments, you will be given some info on the available options and how to format the command. The following is an example of converting one schematic file named hss_hubstructureCarpet.schematic and replacing some of its blocks with blocks from Minecraft Legends: + +```md +StructureConverter.exe "hss_hubstructureCarpet.schematic" "{ + ""output"":""badger"", + ""replace"" : [ + { + ""to_replace"" : { + ""block"" : ""minecraft:planks"" + }, + ""replace_with"" : { + ""block"" : ""badger:block_planks_dark_oak"" + } + }, + { + ""to_replace"" : { + ""block"" : ""minecraft:stone"" + }, + ""replace_with"" : { + ""block"" : ""badger:block_planks_dark_oak_fine"" + } + }, + { + ""to_replace"" : { + ""block"" : ""minecraft:log"" + }, + ""replace_with"" : { + ""block"" : ""badger:block_log_dark_oak"" + } + } + ], + ""badger"": { + ""unknown_blocks"": [ + ""print"", + { + ""replace_with"" : { + ""block"" : ""minecraft:air"" + } + } + ], + ""resource_packs"": [ + ""D:\\resource_packs\\MyCustomBlocks"" + ] + } +}" output.mcstructure +``` diff --git a/WorldPlacement.md b/WorldPlacement.md index 60d898e..1eed445 100644 --- a/WorldPlacement.md +++ b/WorldPlacement.md @@ -1,22 +1,24 @@ # Minecraft Legends World Placements -![](images/world_placement/image01.gif) +![Figure 1](images/world_placement/image01.gif) **Figure 1:** A typical world generation process. ## What are world placements? + World placements are things that we want to appear in the world – biomes, POIs, bases, villages, etc. Each one has certain rules that determine where they should be placed on the map, and these rules can reference other specific placements or classes of placements. These placements are the fundamental drivers of Minecraft Legends' world generation system, and they completely define the layout of each world. World placement data lives in `behavior_packs/x/gamelayer/world_placements/`, where `x` generally refers to a game mode, and the data may be broken up into different files to improve readability. For example, our campaign data is currently split into ten files. - ## How do they work? + ### Low-resolution biome grid + During this phase of world generation, our world map is represented by a grid whose cells are 8✕8 chunks in area (128✕128 blocks). Each pixel in fig. 1 is one of these cells. From now on, we will refer to these cells as **_pixels_**. Some placements “bring” biome pixels along with them. For example, this placement will reserve 9 pixels of `frostlands` biome at the start, and eventually attempts to spread out to 40 pixels. -``` +```json "biome": { "biome": "frostlands", "total_pixels": 40, @@ -25,12 +27,13 @@ Some placements “bring” biome pixels along with them. For example, this plac }, ``` -Many placements do _not _bring biome pixels with them, but any placement that uses `distance` rules is allowed to try! +Many placements do _not_bring biome pixels with them, but any placement that uses `distance` rules is allowed to try! ### Types of placements + We can introduce an arbitrary number of placement types with the `placement_type` attribute. Placements are grouped together with other placements that share their placement type. In the placement rules, we can query the distance to some non-particular element of any of these sets, which is useful for ensuring that we never place too close or too far away from something. For example, in the campaign mode, we have a `"village"` `placement_type` group, and we can use that to write a rule that requests that a placement is placed within [x, y] chunks of a village. (We _could_ choose a particular village, but in this case, we just want it to be near _some_ village.) -``` +```json { "distance": { "chunk_distance_from_parent": 25, @@ -42,13 +45,16 @@ We can introduce an arbitrary number of placement types with the `placement_type ``` ### Placement rules + The positioning of each placement is determined by its placement rules. #### Types of placement rules + ##### game_start + This rule is currently exclusively used to establish a “`center`” placement that subsequent placements may place relative to. It automatically assigns the placement with this rule to the (0, 0) position (the center of the world grid). If this rule is assigned to a placement, it is a good idea to ensure it is placed first (via `world_definition.js`, which is outside the scope of this document). It is also not able to be combined with any other placement rules (since it automatically determines the placement position). -``` +```json { // [placement details here] "placement_rules": [ @@ -60,9 +66,10 @@ This rule is currently exclusively used to establish a “`center`” placement ``` ##### distance + This rule does most of the heavy lifting. Most placements employ one or more `distance` rules. An example from the campaign “`extreme_hills_1`” biome placement is shown below. -``` +```json "placement_rules": [ { "distance": { @@ -98,19 +105,21 @@ This rule does most of the heavy lifting. Most placements employ one or more `di ] ``` -Each rule has a `weight`, a `tag_parent`, and a `chunk_distance_from_parent`. Essentially, “I want to be `[chunk_distance_from_parent]` chunks from `[tag_parent]` placement (or placement type), and this desire is `[weight]` important”. +Each rule has a `weight`, a `tag_parent`, and a `chunk_distance_from_parent`. Essentially, “I want to be `[chunk_distance_from_parent]` chunks from `[tag_parent]` placement (or placement type), and this desire is `[weight]` important”. Each individual distance rule is scored for each available placement candidate, and then the candidate receives a total score based on the individual scores’ weighted average. The position with the highest overall score wins. In the event that multiple position options share the same high score, one is chosen at random. See Scoring distance rules for more details, as well as a detailed explanation of `mandatory_threshold` and `distance_to_zero_score`. Within the winning grid position, the precise placement location is offset by a random amount, controlled by a placement’s optional `jitter` parameter. ###### chunk_distance_from_parent + This is how far we want our placement to place away from the parent placement or placement category, in chunks (16-block units). We can either provide two integers, interpreted as a minimum and maximum; or one integer, interpreted as a minimum with ∞ as the maximum. Note that providing two identical integers will cause the range to be interpreted as the latter case, with ∞ max distance – the exception to this rule is `[0, 0]`. ###### one_of + Distance scores can also nest recursively into themselves using the `one_of[]` attribute. `one_of` rules are scored by assessing all the constituent rules and yielding the maximum among them. They are particularly useful in scenarios where you want something to place near one of several specific placements, and it doesn’t matter which one. In the following example, a placement has two `distance` rules, the second of which is itself made up of two more `distance` rules. The placement will attempt to place within 24 chunks of either `brokenlands_1` or `brokenlands_2.` -``` +```json "placement_rules": [ { "distance": { @@ -145,10 +154,11 @@ Distance scores can also nest recursively into themselves using the `one_of[]` a ] ``` -##### precise_distance -Sometimes, we need something to reliably place relative to another placement with a higher level of precision than what is possible with the normal `distance` rule (8✕8 chunks). In this case, we can use a precise distance rule. A placement may only have one precise distance rule, and precise distance rules cannot be used in conjunction with any other types of placement rules. **Note that biome pixels cannot be placed with precise_distance rules. +##### `precise_distance` -``` +Sometimes, we need something to reliably place relative to another placement with a higher level of precision than what is possible with the normal `distance` rule (8✕8 chunks). In this case, we can use a precise distance rule. A placement may only have one precise distance rule, and precise distance rules cannot be used in conjunction with any other types of placement rules. _Note that biome pixels cannot be placed with `precise_distance` rules._ + +```json "placement_rules": [ { "precise_distance": { @@ -164,41 +174,36 @@ Sometimes, we need something to reliably place relative to another placement wit ] ``` -Each rule has a `tag_parent`, a `chunk_distance_from_parent`, and may optionally have a `jitter_angle` attribute. The placement will place exactly within the range of `chunk_distance_from_parent` distance away from the placement specified by `tag_parent`. **Note that unlike in the regular distance rule, the tag_parent in the precise_distance rule must be a specific placement, not a placement_type. +Each rule has a `tag_parent`, a `chunk_distance_from_parent`, and may optionally have a `jitter_angle` attribute. The placement will place exactly within the range of `chunk_distance_from_parent` distance away from the placement specified by `tag_parent`. _Note that unlike in the regular distance rule, the `tag_parent` in the `precise_distance` rule **must** be a specific placement, not a `placement_type`._ If the placement specifies multiple `initial_villages`, they will all be spread around the parent placement, with random radii (as above, within the range given by `chunk_distance_from_parent`) and perfectly even angular spacing from one another (fig. 2). If the precise distance rule specifies a `jitter_angle`, the angular spacing of each placement is randomized within +/- `jitter_angle` radians (fig. 3). +![Figure 2](images/world_placement/drawing01.png) +![Figure 3](images/world_placement/drawing02.png) + +**Figure 2:** A precise distance placement with three `initial_villages` and `jitter_angle == 0`. Each placement (**C**) has equal angular spacing (120° in this case) and respects the desired distance to their parent (**P**). + +**Figure 3:** A precise distance placement with three `initial_villages` and `jitter_angle != 0`. The placements (**C**) still respect the distance to their parent (**P**), but the angles are somewhat randomized (exaggerated slightly for effect). + +##### `saturate` - - - - - - - - - -
- -
Figure 2: A precise distance placement with three initial_villages and jitter_angle == 0. Each placement (C) has equal angular spacing (120°, in this case) and respects the desired distance to their parent (P). - Figure 3: A precise distance placement with three initial_villages and jitter_angle != 0. The placements (C) still respect the distance to their parent (P), but the angles are somewhat randomized (exaggerated slightly for effect). -
- -##### saturate The saturate rule is used to place many copies of a placement all over the world. This rule has just one optional parameter: `density_per_8x8_chunk_pixel`. This many copies of the placement in question are placed within each non-ocean pixel in the biome grid (with jitter, again, subject to the placement’s optional jitter parameter). Currently, the saturate rule is used to place `slot_invasion` throughout the world, which can be used to dynamically place piglin bases during gameplay via the invasion system. -The saturate placement rule is intended to be used with a particular slot-type placement. Only one placement may use the saturate rule. (If multiple placements use the saturate rule, only the one parsed last will actually be placed.) The saturate rule also may not be used in conjunction with any other placement rules. +The saturate placement rule is intended to be used with a particular slot-type placement. Only one placement may use the saturate rule. (If multiple placements use the saturate rule, only the one parsed last will actually be placed.) The saturate rule also may not be used in conjunction with any other placement rules. + +##### `explicit` -##### explicit The explicit rule is used to place a particular placement at an exact position in the world (`block_x`, `block_z`). It is not currently used by any campaign placement, but it may be useful for debugging purposes. The explicit rule may not be combined with any other rules. #### Scoring distance rules -When we are placing something that uses distance rules, we test every possible location (that is, each available pixel in the biome grid) and pick the one that nets us the best weighted score. + +When we are placing something that uses distance rules, we test every possible location (that is, each available pixel in the biome grid) and pick the one that nets us the best weighted score. ##### Single rules + We will illustrate the following example: -``` +```json "distance": { "chunk_distance_from_parent": [ 80, @@ -214,34 +219,37 @@ We will illustrate the following example: Here, we are asking to place something between 80 and 120 chunks from the center placement (which is located in the center of the biome grid). See fig. 4. -![](images/world_placement/drawing03.png) +![Figure 4](images/world_placement/drawing03.png) -**Figure 4:** Visualizing the aforementioned placement rule, with a range of [80, 120] to the center placement (C). Any pixels in the green section are awarded a score of 1.0, and pixels outside of this section receive a score of 0.0. +**Figure 4:** Visualizing the aforementioned placement rule, with a range of [80, 120] to the center placement (**C**). Any pixels in the green section are awarded a score of 1.0, and pixels outside of this section receive a score of 0.0. -##### distance_to_zero_score -The above example employs the optional `distance_to_zero_score` parameter. This allows us to award non-zero scores to placements that are outside of the `chunk_distance_from_parent` range by up to `distance_to_zero_score` chunks. There is a linear falloff behavior where pixels closer to the `chunk_distance_from_parent` range receive scores closer to 1.0, and the scores approach 0.0 as the distance from the core range approaches `distance_to_zero_range` (fig. 5). +##### `distance_to_zero_score` + +The above example employs the optional `distance_to_zero_score` parameter. This allows us to award non-zero scores to placements that are outside of the `chunk_distance_from_parent` range by up to `distance_to_zero_score` chunks. There is a linear falloff behavior where pixels closer to the `chunk_distance_from_parent` range receive scores closer to 1.0, and the scores approach 0.0 as the distance from the core range approaches `distance_to_zero_range` (fig. 5). If `distance_to_zero_score` is provided as an array of two integers, the first is interpreted as the “inner” distance value and the second is the “outer” – this is helpful for situations where we can be more lenient in either the “too close” or the “too far” direction. Conversely, if only one integer is provided, it is interpreted as both the inner and outer distance. -![](images/world_placement/drawing04.png) +![Figure 5](images/world_placement/drawing04.png) + +**Figure 5:** Visualizing the aforementioned placement rule but with the addition of a `distance_to_zero_range` of 20. Any pixels in the green section are awarded a score of 1.0, pixels in the yellow section receive a score between 0.0 and 1.0 (closer to green means higher score), and pixels in white sections receive a score of 0.0. -**Figure 5:** Visualizing the aforementioned placement rule but with the addition of a distance_to_zero_range of 20. Any pixels in the green section are awarded a score of 1.0, pixels in the yellow section receive a score between 0.0 and 1.0 (closer to green means higher score), and pixels in white sections receive a score of 0.0. +##### `mandatory_threshold` -##### mandatory_threshold If a placement rule scores below its given mandatory threshold for a given candidate location, the total weighted score will be zero for that candidate location. Thus, `manditory_threshold` is useful for situations where you want to ensure one or more particular rules are respected. A low threshold (e.g. 0.1) means we have more leniency in the `distance_to_zero_score` sense, while a high threshold (e.g. 1.0) means we have no leniency. Be cautious when assigning `manditory_threshold` to multiple distance rules on one placement, because that may significantly decrease the probability of finding a successful candidate location. ##### Rule weights + Each distance rule has a `weight` attribute indicating its relative importance. That is, if a particular distance rule is very important compared to another one, it is a good idea to assign a large weight to the more important one and a small weight to the less important one. -We calculate a total weight wt by summing the individual weights wi: +We calculate a total weight 𝑤ₜ by summing the individual weights 𝑤ᵢ: -![](images/world_placement/drawing05.png) +![Figure 6](images/world_placement/drawing05.png) -The final score sf for a potential placement location is given by the sum of each individual score si multiplied by its weight wi, all divided by the total weight wt: +The final score 𝑠ₓ for a potential placement location is given by the sum of each individual score 𝑠ᵢ multiplied by its weight 𝑤ᵢ, all divided by the total weight 𝑤ₜ: -![](images/world_placement/drawing06.png) +![Figure 7](images/world_placement/drawing06.png) For example, if for a given potential placement location: @@ -250,9 +258,10 @@ For example, if for a given potential placement location: Its final score will be: -![](images/world_placement/drawing07.png) +![Figure 8](images/world_placement/drawing07.png) ### Placement order + Since many placements explicitly reference other placements via distance rules, it is important that the order of placement is logically consistent. The order is determined by `world_definition.js`, which is outside the scope of this document. Typically, the order goes something like: 1. `center` places in the center of the map, every time; @@ -261,12 +270,14 @@ Since many placements explicitly reference other placements via distance rules, 4. Villages/POIs/bases in whatever order you like ## Placement options + We can do all of the following (note that we can combine these options quite freely): ### Place villages/bases/slots + One of the common use cases for placements is placing villages, bases, or slots. There is a lot that happens behind the scenes on the B# side, and I’m not going to get into too much detail on that. -``` +```json { "unique_card_id": "badger_first_village_culture_required", "map_data": "badger:villager_culture_001", @@ -283,30 +294,38 @@ One of the common use cases for placements is placing villages, bases, or slots. ``` #### map_data and village_data + This is referenced by B# for the campaign. #### placement_name + The name that this system will use internally to reference the location that is chosen for this placement. See `distance` rule. #### placement_type + See Types of placements. This must be one of the types listed there. #### initial_villages + This is where we define how many of this placement to place, and what this placement’s invasion value should be. ##### [size] + We can specify any number of “sizes”, each one with its own `count` and `invasion` settings. `[size]` can be any `string`. B# can query these size names internally. ###### count + The number of copies of this placement we should place in the world. ###### invasion + This is referenced by B# for the campaign. ### Place textures + A placement may place a texture in the world. -``` +```json "textures": [ { "enabled": true, @@ -322,12 +341,14 @@ A placement may place a texture in the world. ``` #### textures + Here we list as many textures as we may want to use. Textures can be swapped dynamically during gameplay. ### Place biome pixels -Any placement can ask to reserve a certain number of biome pixels, both up-front and after biome expansion. -``` +Any placement can ask to reserve a certain number of biome pixels, both up-front and after biome expansion. + +```json "biome": { "biome": "generic", "total_pixels": 20, @@ -337,46 +358,58 @@ Any placement can ask to reserve a certain number of biome pixels, both up-front ``` #### biome (string) + The name of a biome to place. Note that one option here is “`generic`”, which means that undifferentiated land pixels will be placed to ensure that there is land associated with the placement, and the undifferentiated pixels will be replaced with a sensible specific biome in a later step. See Generic biome fill. #### starting_pixels (int) + The number of pixels this placement should initially reserve. Note that this number will usually not be _exactly_ the number of starting pixels, because we convert this number to a circle whose area matches the number as closely as possible. For example, in fig. 5, we see the results of the Well of Fate (light green) and forest 1 (dark green) placements after reserving their starting pixels. Forest 1 requests 25 starting pixels, but the nearest-sized “circle” we can achieve is 21. #### total_pixels (int) + The number of pixels this placement should eventually grow to. See Biome expansion. -![](images/world_placement/image02.png) +![Figure 9](images/world_placement/image02.png) Figure 5: Two placements reserving biome pixels before the expansion phase. #### spread_priority (int) -This placement’s biome pixel spread priority. 0 priority gets to spread out first, followed by 1, 2, etc. + +This placement’s biome pixel spread priority. 0 priority gets to spread out first, followed by 1, 2, etc. ### Spawn entities + B# can spawn entities through world placements. We currently use this system to spawn the “world center locator” entity. -``` +```json "spawn_entity": "badger:world_center_locator" ``` #### spawn_entity (string) + The name of an entity to spawn at the location where this placement is placed. This should match the name of an identifier in the entities folder (`behavior_packs/badger/entities/`). ### Miscellaneous + #### jitter (float in range [0.0, 1.0]) + Determines the amount of random variance the placement’s position may have within its 8✕8 chunk pixel. 0.0 means that the placement will always be placed exactly in the middle of the pixel, while 1.0 means the placement can appear anywhere within the pixel. #### add_to_poi_graph (bool) + Determines whether the placement factors into the POI mesh, a system that we can use to place world features along imaginary lines between nearby world placements. #### allow_rivers_nearby (bool) + Determines whether the placement should have rivers nearby. ## Everything’s placed – what’s next? + ### Biome expansion + Once we run the placement algorithm and resolve all the placement locations, we have something that looks like this: -![](images/world_placement/image03.png) +![Figure 10](images/world_placement/image03.png) Each placement with a non-zero `starting_pixel` count has reserved those pixels on the biome grid. Now we begin expanding each of these placements until they either @@ -385,17 +418,20 @@ Each placement with a non-zero `starting_pixel` count has reserved those pixels This expansion process happens in rounds, with each placement claiming one pixel per round. -![](images/world_placement/image04.gif) +![Figure 11](images/world_placement/image04.gif) ### Island detection + Now we check to see if there are any islands (land biome pixels that are completely surrounded by ocean). If there are, we throw away the results of our world generation up to this point and start over with a different seed. This island detection step can be bypassed with a game rule (`"allowislands"`) if your game mode should allow islands. ### Interior ocean fill + Now we run an algorithm that detects any “interior ocean” (clusters of ocean pixels that are fully enclosed by land pixels) and another algorithm that fills those interior ocean pixels in with any neighboring biome type. -![](images/world_placement/image05.gif) +![Figure 12](images/world_placement/image05.gif) ### Generic biome fill + Now we detect any generic biome pixels (shown here in purple) and replace them with neighboring land pixels. If there are no adjacent land pixels, world generation will fail and restart with a different seed. -![](images/world_placement/image06.gif) +![Figure 13](images/world_placement/image06.gif) diff --git a/images/minecraftlegends_logo.jpg b/images/minecraftlegends_logo.jpg new file mode 100644 index 0000000..9ee0138 Binary files /dev/null and b/images/minecraftlegends_logo.jpg differ diff --git a/images/wolverine/image01.png b/images/wolverine/image01.png new file mode 100644 index 0000000..234db41 Binary files /dev/null and b/images/wolverine/image01.png differ diff --git a/images/wolverine/image02.png b/images/wolverine/image02.png new file mode 100644 index 0000000..ff439b8 Binary files /dev/null and b/images/wolverine/image02.png differ diff --git a/images/wolverine/image03.png b/images/wolverine/image03.png new file mode 100644 index 0000000..7d8f82d Binary files /dev/null and b/images/wolverine/image03.png differ diff --git a/images/wolverine/image04.png b/images/wolverine/image04.png new file mode 100644 index 0000000..2598b5a Binary files /dev/null and b/images/wolverine/image04.png differ diff --git a/images/wolverine/image05.png b/images/wolverine/image05.png new file mode 100644 index 0000000..ff439b8 Binary files /dev/null and b/images/wolverine/image05.png differ diff --git a/images/wolverine/image06.png b/images/wolverine/image06.png new file mode 100644 index 0000000..096853e Binary files /dev/null and b/images/wolverine/image06.png differ diff --git a/images/wolverine/image07.png b/images/wolverine/image07.png new file mode 100644 index 0000000..4f0f4cb Binary files /dev/null and b/images/wolverine/image07.png differ diff --git a/images/wolverine/image08.png b/images/wolverine/image08.png new file mode 100644 index 0000000..551787f Binary files /dev/null and b/images/wolverine/image08.png differ diff --git a/images/wolverine/image09.png b/images/wolverine/image09.png new file mode 100644 index 0000000..6497d84 Binary files /dev/null and b/images/wolverine/image09.png differ diff --git a/images/wolverine/image10.png b/images/wolverine/image10.png new file mode 100644 index 0000000..3778023 Binary files /dev/null and b/images/wolverine/image10.png differ diff --git a/images/wolverine/image11.png b/images/wolverine/image11.png new file mode 100644 index 0000000..48c2628 Binary files /dev/null and b/images/wolverine/image11.png differ diff --git a/images/wolverine/image12.png b/images/wolverine/image12.png new file mode 100644 index 0000000..743a5c4 Binary files /dev/null and b/images/wolverine/image12.png differ diff --git a/images/wolverine/image13.png b/images/wolverine/image13.png new file mode 100644 index 0000000..72348e6 Binary files /dev/null and b/images/wolverine/image13.png differ diff --git a/images/wolverine/image14.png b/images/wolverine/image14.png new file mode 100644 index 0000000..8ca49a3 Binary files /dev/null and b/images/wolverine/image14.png differ