Isle of Berk Variant Loader

Isle of Berk Variant Loader

Mod

Support for data-driven dragon variants for Isle of Berk mod

Client and server DecorationLibrary Mobs

4,345 downloads
5 followers
Created8 months ago
Updated23 days ago

Follow Save
Host your Minecraft server on BisectHosting - get 25% off your first month with code MODRINTH.

Description

Adds ability to add new variants with condition support or configure existing ones for Isle of Berk dragons via resource and data packs and change textures, animations or models via nametags. Also adds support adds ability to add glowing layer to the texture. Mod also supports usage of Russian alphabet for entity names, more about it you can read on mod's page. Note: using this mod to add own variants already considers that user is familiar with making resource and data packs (no matter the complexity).

Changes to original mod

This addon changes how some stuff in original mod works gameplay wise:

  • Variant inheritance works for all dragons (can be configured or turned off completely by setting assign_egg_variant_on_breeding and assign_egg_variant_on_placed to false in config)
  • All eggs now can hold variant as NBT that will determine variant of the dragon that will be hatched

Example Packs

Example data pack

Example resource packs

Adding custom variant spawns/editing existing via datapack

If you wish to overwrite default variants spawns, you'll need to edit main file in isleofberk namespace. Else just declare spawns under different namespace. You can look up example of variant declaration in example data pack. Full path to the file would look something like this: "data/*your_namespace*/dragon_variants/*dragon_id*.json", where dragon_id is dragon's in game id. I.e. for Night Fury it'ld be night_fury.

Variant declaration supports some conditions:

  • weight - declares a chance of certain variant appearing naturally (not via breeding). Higher the weight, higher the chances (formula for a chance looks like something like this: variantWeight / totalWeightOfAllVariantsThatCanApppearOnThisSpot)
  • breeding_weight - declares a chanse of a variant being applied via breeding. Higher the weight, higher the chances (formula for a chance looks like something like this: variantWeight / totalWeightOfAllVariantsThatCanBeObtainedViaBreeding). If not specified, value defaults to one declared in weight field (optional)
  • banned_biomes - declares biomes in which variant cannot appear under any circumstances. Basically a biome blacklist. Supports declaration via tags (optional) and biome IDs (optional)
  • allowed_biomes - declares biomes where certain variant only can appear. Works like a whitelist. If not presented, variant will spawn in any biome it can. Supports declaration via tags (optional) and biome IDs (optional)
  • altitude - defines on which range of world height variant can spawn. If not stated, variant will spawn on any world height. Supports declaration of minimum (optional) and maximum (optional) height

Mandatory fields for each variant:

  • name - name of the variant. Texture file name must correspond to the variant name in order to work correctly
  • weight - weight must be defined in order to variant to spawn

Adding variant assets (textures, models, animations) to resource pack

To add texture to your variant, you'll need to: 1. Make sure that it corresponds to your variant name 2. Make sure you wrote the file name in lower case 3. Make sure you added it under isleofberk namespace for the right dragon

All assets (new models, animations, saddle textures) must be added under isleofberk namespace in order to be recognised. In addition, model and animation files must be put in a folder that corresponds with dragon's id. Full path to the model: "assets/isleofberk/geo/dragons/*dragon_id*/*model_name*.json". Full pack to the animation file: "assets/isleofberk/animations/dragons/*dragon_id*/*animation_name*.json". Saddle texture should go in the same folder where all other textures for specific dragon are stored. Just make sure you named it something else but "equioment.png" to not replace default saddle texture by accident. Note: due some inconsistencies in original mod's code, for Monstrous Nightmare path to the variant texture will be "assets/isleofberk/textures/dragons/nightmare/*variant_name*.png". Within data packs, continue to use monstrous_nightmare instead.

Since version 2.1.0 you alternatively can specify full path to asset file. However, animation files still must go to animations folder, model files - to geo folder and textures to textures folder in order to be recognized by the game.

Model redirects

Model redirects is a tool that allows you to replace models, animations and saddle textures per variant. Example declaration can be found in example resource pack. Note: to avoid any conflicts with other packs that utilise Variant Loader, model redirects must be added under your own namespace rather than isleofberk one. Full path to model redirect file: "assets/*your_namespace*/model_redirects/*dragon_id*.json". Rule for the Monstrous Nightmare is still applied.

Supported fields:

  • name - Name of the variant (mandatory)
  • model - File name of the model file (optional)
  • animation - File name of the animation file (optional)
  • saddle - File name of texture file for the saddle (optional)
  • nametag_accessible - Boolean toggle to allow this variant to be applied via nametag. If not specified, defaults to true (optional)

Glowing layer

You can add some glowing to your variant. Just name glowing texture same as your variant texture with addition of "_glowing" prefix in the end and put it alongside normal texture. Note: for Deadly Nadder, you need to add separate glowing texture for its membranes in order for them to work correctly ("*variant_name*_membranes_glowing.png" - something like this)

If you downloaded the mod to just have an ability to change texture via nametag, all you need is to add texture that will correspond to your dragon name. Texture file in any case must contain only English alphabet letters in lower case and spaces must be replaced with underscores. No upper case letters allowed, but you can add numbers.

Mod will also attempt to parse names that contain Russian alphabet letters. In order to texture to be applied, file name in this case must be changed according to table below гыг

Translation keys

Since you can see variant assigned to the egg, you can add translation to your variants. Translation keys for each variant look something like this: "tooltip.iobvariantloader.variant.name" You can autogenerate translation keys by turning on autogeneration in client config for Variant Loader.

Config

Mod has client and server config with options that can affect your gameplay experience

Client

  • disable_glowing - Disables glowing layer on textures. Off by default
  • disable_named_variants - Disables variant display via nametag completely, ignoring nametag_accessible field. Off by default
  • generate_translations - Automatically generates translations for all variants for english language based on presented textures for dragons. All generated lines will be printed to log file. Use this only if you're pack developer for making your life easier
  • ignored_by_generator - Prints for textures that have same name as any value in this list will be skipped when translation key generator is used
  • ignored_by_generator_endings - Similar to previous one, but used only when texture ends with listed values

Common

  • inheritance_chance - Defines the chance of dragon inheriting variant of their parents. 1 means variant will always be the same as their parents one
  • assign_egg_variant_on_breeding - Enables variant assignment on breeding. If false, all eggs always will have no variant assigned during breeding
  • assign_egg_variant_on_placed - Enables variant assignment when egg is placed and has empty or invalid variant tag. If false, all eggs always will have no variant assigned when placed

FAQ

  • Q: Is there any video guide on how to use Variant Loader?

  • Q: Do I need to add default textures to resource pack?

    • A: No! This is only adding to the size of the pack and also may cause conflicts with other packs that rely on texture replacement. Such practice has no benefit
  • Q: Does adding variant spawn also makes dragon spawn in specific biome(s)?

    • A: No, mod does not automatically add dragon spawns in specific biomes. Resrticting variant to specific biome only makes variant obtainable in this biome. If dragon can't naturally spawn in specified biome, only way to obtain it would be via hatching/breeding in this biome.
  • Q: Why my added variants of Speed Stingers are not spawning?

    • A: Speed Stinger spawns are tied to structures purely. Either you add them to same biomes where those structures can spawn, add your own structures where they can spawn or try to obtain them via breeding
  • Q: How do I make variant nametag only?

    • A: Just don't add variant spawn via data pack
  • Q: Can I make variant impossible to be applied via nametag?

    • A: Set nametag_accessible in model redirect file to false for your variant
  • Q: Can I make variant obtainable via only hatching(breeding)/only natural spawn?

    • A: If you want variant to only appear via natural spawn, set breeding_weight to 0. If you want it to be obtainable only via breeding, set weight to 0
  • Q: How can I summon specific variant with Variant Loader?

    • A: Use "/summon ~ ~ ~ isleofberk:dragon_id {VariantName:name}" where name is the name of the variant
  • Q: Can I add new animations with Variant Loader?

    • A: No. Animation names and conditions for them are hardcoded for each dragon individually
  • Q: My pack is not working/breaks stuff. What went wrong?

    • A: Most common mistakes are using upper case letters in file names or paths to the files in packs (Minecraft is very sensitive to this) and malforming .json files. To validate syntax in .json files, you can use online servises.
  • Q: How do I make resource/data pack?

    • A: Search engines and YouTube are your best friends. I'm not going to explain this myself, this is out my scope

Troubleshooting

Still have questions? You can either ask on Github or hop on New Berk's Dawn Discord Server and ask questions in the mod thread in the extras channel

External resources



Project members

Nord_Act

Owner


Technical information

License
MIT
Client side
required
Server side
required
Project ID