diff --git a/docs/Configuring-the-mod.mdx b/docs/Configuring-the-mod.mdx index a3c253ea..05d57c11 100644 --- a/docs/Configuring-the-mod.mdx +++ b/docs/Configuring-the-mod.mdx @@ -9,7 +9,8 @@ Infinite Dimensions supports infinite configuration possibilities. The randomizer used for generating dimensions calls for configs almost constantly, whenever it needs to select a random block, mob, fluid, feature, biome, etc. By changing the configs, you can fine-tune the probability of selecting each block (mob, fluid etc.), as well as add your own options to the mix, including ones from other mods. ## Core config options -The file `/config/infinity/infinity.json` is the master file for configuring gamerules and root chances of generation. These settings can also be configured via Mod Menu on Fabric and the Mods menu on NeoForge. This page will walk you through them. +The file `/config/infinity/infinity.json` is the master file for configuring gamerules and root chances of generation. +These settings can also be configured via Mod Menu on Fabric and the Mods menu on NeoForge. This page will walk you through them. ### Gamerules * `safeMode` - setting this to true will disable all block entities from being used in generation of future dimensions. Useful for heavily modded instances. @@ -70,37 +71,51 @@ The *root chances* control how likely it is for the dimension to possess a certa * `triangular_spread`: usually structure positions have uniformly distributed offsets from the points on a large grid; this toggle makes these offsets more likely to be smaller. ## Weighed lists -Most config files you can edit come in the form of *weighed lists*. A weighed list is a pool of options for the generator to choose between, where each option is assigned a number called weight. The larger the weight is, the more likely it is for the generator to pick this option. The weight of 0.0 causes the option to be skipped entirely. +Most config files you can edit come in the form of *weighed lists*. +A weighed list is a pool of options for the generator to choose between, where each option is assigned a number called weight. +The larger the weight is, the more likely it is for the generator to pick this option. The weight of 0.0 causes the option to be skipped entirely. -Most types of weighed lists are generated by the game automatically during the process of [Cosmic Invocation](https://moddedmc.org/en/mod/infinite-dimensions/docs/Invocation) on first world load. +Most types of weighed lists (the ones in the `/config/infinity/modular` subfolder) are generated by the game automatically during the process of +[Cosmic Invocation](https://moddedmc.org/en/mod/infinite-dimensions/docs/Invocation). +Editing them directly is not recommended: instead, any desired changes to these configs can be achieved by means of passing +[amendments](https://moddedmc.org/en/mod/infinite-dimensions/docs/Invocation#Amendments). -### Reading and editing weighed lists -In any weighed list you can safely change all weights, add and remove entries. Just make sure to format your entries uniformly with the rest of the file, and if you're adding content from other mods, don't forget about the mod's namespace in the key (i.e. it should be "key": `"create:andesite_casing"`, not "key": `"andesite_casing"`). +Still, the information on their formatting will be provided below for advanced users: -Most of the time adding entries shouldn't be necessary though, as the invocation that produced you these files already listed every possible entry under your game configuration. - -## Usage of weighed lists and other configuration files -### Modular -This section lists all content that you can freely add entries from other mods to - and for most of it, the mod already does so automatically when performing the Cosmic Invocation. As such, it has subfolders for every mod it finds usable content in. - -#### Blocks -The Blocks category introduces one weighed list for all blocks in the game, but you may notice that some blocks have additional data assigned to them. This data is used to transform this master list into five - all of which have different purposes and exclude some blocks not fit for these purposes based on these additional properties. +### Blocks +There is only one weighed list for all blocks in the game, but you may notice that some blocks have additional data assigned to them. +This data is used to transform this master list into five - all of which have different purposes and exclude some blocks not fit +for these purposes based on these additional properties. The properties are: -* **`full`** - blocks that are, or at least appear to be, full cubes: stone, dirt, and sand are _full_, while slabs and doors aren't. If not present, set to false. -* **`float`** - blocks that can exist suspended in the air. Stone, dirt and slabs are _float_, while sand and doors aren't. If not present, set to true for full blocks and false for others. -* **`top`** - blocks that can exist atop of a full block. Sand and doors are _top_, while saplings aren't (they need specifically dirt). If not present, set to true for _full_ and/or _float_ blocks and false for others. -* **`laggy`** is assigned to all blocks that have a block entity - since these frequently cause FPS and/or TPS lag, or stop rendering past a certain point, when present in really large amounts (say, ten thousand in render distance). Chests and hoppers are _laggy_ - chests use block entity models, hoppers require processing on each tick. You can assign the _laggy_ property manually if you find any other cases where the default values create lag which i haven't accounted for. If not present, set to false. +* **`full`** - blocks that are, or at least appear to be, full cubes: stone, dirt, and sand are _full_, while slabs and doors aren't. +If not present, set to false. +* **`float`** - blocks that can exist suspended in the air. Stone, dirt and slabs are _float_, while sand and doors aren't. +If not present, set to true for full blocks and false for others. +* **`top`** - blocks that can exist atop of a full block. Sand and doors are _top_, while saplings aren't (they need specifically dirt). +If not present, set to true for _full_ and/or _float_ blocks and false for others. +* **`laggy`** is assigned to all blocks that have a block entity - since these frequently cause FPS and/or TPS lag, +or stop rendering past a certain point, when present in really large amounts (say, ten thousand in render distance). +Chests and hoppers are _laggy_ - chests use block entity models, hoppers require processing on each tick. +You can assign the _laggy_ property manually if you find any other cases where the default values create lag which i haven't accounted for. +If not present, set to false. + +The values of these properties can be overwritten with `set_field`-result-type amendments. Here's how the properties are used on compilation: -* Two lists are created - from all _float_ blocks and all _full_ blocks - that are used for creating most features (rocks, ores, floating islands, floors of dungeons etc). +* Two lists are created - from all _float_ blocks and all _full_ blocks - that are used for creating most features +(rocks, ores, floating islands, floors of dungeons etc). * Blocks that are _top_ and not _laggy_ are used for covering the top layer of the world. -* Blocks that are _full_, _float_ and not _laggy_ are used for the bulk of world generation, for everything that can appear in tens of thousands and more: the "stone" of the dimension, tree caps, icebergs and other large features. +* Blocks that are _full_, _float_ and not _laggy_ are used for the bulk of world generation, for everything that can appear +in tens of thousands and more: the "stone" of the dimension, tree caps, icebergs and other large features. Of course, some of these lists intersect or even fully include others. -#### Fluids -The list of fluids can also be found under the Blocks category. Though adding a fluid with a single line like `"key: "minecraft:water"` is supported, some mods actually add fluids that use different names for the block (that's the name you can autocomplete from /setblock) and the fluid (that's the one you can see on the F3 screen under "Targeted fluid"). For this reason the entries are formatted like this: +### Fluids +The list of fluids can also be found under the Blocks category. +Though adding a fluid with a single line like `"key: "minecraft:water"` is supported, +some mods actually add fluids that use different names for the block (that's the name you can autocomplete from /setblock) +and the fluid (that's the one you can see on the F3 screen under "Targeted fluid"). For this reason the entries are formatted like this: ```json "key": { "Name": "milk:milk_fluid_block", @@ -109,40 +124,7 @@ The list of fluids can also be found under the Blocks category. Though adding a ``` where Name is the block name. -#### Features -**Features** are things like trees, ore veins, underwater clay disks, flower patches, monster rooms etc. Infinite Dimensions can generate its own randomized features, but it can also use predefined features drawn from configs. - -These come split into several categories across two folders: `/modular/.../features` and `/modular/.../vegetation`. These categories are here because Minecraft itself splits features into categories to place them in the world in a predefined order. So the generator needs to know which feature belongs to which category. - -Unlike other weighed lists, non-vegetation and some vegetation features are selected with a different algorithm: the generator can select any amount of features from each category, with the chance of each to be selected equal to its weight in the list and the chances being independent. (Values above 1.0 are treated as 1.0). - -This does not apply to flowers, grass and seagrass: the generator picks one entry from each list under default weighed list rules to populate the biome. Same goes with trees: the generator picks 1-6 tree types, which, if it decides to use a predefined tree and not randomize a new one, are drawn from `.../vegetation/trees.json` under default weighed list rules. - -#### Extra -**Color presets:** currently, these are only used to generate shapes (big floating cubes, spheres etc.). If a shape is decided to be coloured (infinity.json > rootChances > features_rules > colourful_shapes root chance), the colouring rules for it are generated based on a selection of blocks drawn randomly from `blockpresets/color_presets.json`. - -**Mobs:** the list of all mobs tagged with their spawn groups. In Minecraft, different groups of mobs are spawned by different algorithms -and share different mob caps; the generator needs to know which mobs to spawn in which category, and that's what the tags are for. -Don't be afraid about mobs that don't use the mob cap (i.e. shulkers) being in here, there are additional measures to control their population taken already. - -**Structures:** here is where the structure data is stored. - -#### Lists -**Rotatable blocks:** when checking if a block can be rotated for infinity.json > rootChances > features_rules > rotate_blocks, the mod consults this list. - -#### Surface rules -Rules for coloring the surface of every single biome with blocks - grass and dirt for plains, sand and sandstone for deserts, etc. - -#### Misc -You can find all sorts of other configurable option pools here, including: -* biomes, -* sounds, music and particles for biome ambience, -* carvers (caves and ravines), -* items (currently only used for "item" type particle), -* etc. - ### Hardcoded -These are weighed lists you can change weights in, but you cannot add new entries to, either because processing all possible results of them is hardcoded within Infinite Dimensions (i.e. with shape types) or within Minecraft itself (i.e. with trunk placers). - -### Easter -This is where the game stores data for easter egg dimensions! You can freely remove and add new files to here. The format for them is largely the same as vanilla's for custom noise settings, with the file name being the easter dimension's name. There is an additional optional field in the format - `easter-type` - for if you also want to specify the dimension type (as a reference to a dimension type file that you can put in a regular datapack). \ No newline at end of file +The weighed lists located in `config/infinity/hardcoded`. These lists you can change weights in, but you cannot add new entries to, +either because processing all possible results of them is hardcoded within Infinite Dimensions (i.e. with shape types) +or within Minecraft itself (i.e. with trunk placers). \ No newline at end of file diff --git a/docs/Invocation.mdx b/docs/Invocation.mdx index 2a39ba9c..4e272e53 100644 --- a/docs/Invocation.mdx +++ b/docs/Invocation.mdx @@ -21,6 +21,7 @@ Currently, the config files and therefore types of modded content which the invo * status effects, * block tags, * structures plus some of their additional data, +* tree features, * biomes, * (in limited capacity) surface rules for biomes. @@ -48,8 +49,8 @@ if it detects that the version of those configs (set in the invocation lock) is do a backup of them before updating the mod! ## Amendments -Amendments are a system of automatically changing values in config files without changing them one-by-one. A more proper integration (for editing them -in GUI) will be explored later, but so far it is possible to do them by editing files. +Amendments are a system of automatically changing values in config files without changing them one-by-one. They can be edited in the last tab +of the mod's configuration menu (requires ModMenu and ClothConfig). Amendments are stored in `config/infinity/amendments.json` and only can affect modular configs. To change the list of active amendments, one must edit the amendments.json file _making sure to increase up the amendment_version statistic at the top_, then fully close and restart the game. @@ -72,7 +73,7 @@ If the mod of the set ID is not loaded, the amendment is skipped. additional fields are `field_name` and `field` allowing you to add any field to the data amended content has; * `"erase"` - skip the entry entirely, effectively the same as setting its weight to 0. -Let's break down the default list of ten amendments the mod comes with. Most of them are fixes for various mod compatibility issues: +Let's break down the first ten amendments from the default list the mod comes with. Most of them are fixes for various mod compatibility issues: ``` { "area": "fluids",