Crucible can be used to automatically generate some assets from item configurations to be drop-in ready for deployment to a resource pack!
Crucible can be used to automatically generate some assets from item configurations to be drop-in ready for deployment to a resource pack!
[[_TOC_]]
[[_TOC_]]
# Usage
# Usage
## Generation
## Generation
This can be done via the use of the `/mythicmobs items generate` command
This can be done via the use of the `/mythicmobs items generate` command
The Generation logic will:
The Generation logic will:
- Auto-detect if the path points to a `.json` or `.bbmodel` file.
- Auto-detect if the path points to a `.json` or `.bbmodel` file.
- If it's a bbmodel it will automatically extract the textures, mcmeta, and other relevant data
- If it's a bbmodel it will automatically extract the textures, mcmeta, and other relevant data
- If nether are found, it will check for a `.png` in the textures folder and generate the item as a regular 2d sprite
- If nether are found, it will check for a `.png` in the textures folder and generate the item as a regular 2d sprite
- Generate any necessary atlases
- Generate any necessary atlases
And all of the generated files will be put into the `Generation/` folder inside the `MythicMobs` main directory (`../plugins/MythicMobs/Generation/`).
And all of the generated files will be put into the `Generation/` folder inside the `MythicMobs` main directory (`../plugins/MythicMobs/Generation/`).
The resulting resourcepack will be put in `../plugins/MythicMobs/Generation/resource_pack.zip`.
The resulting resourcepack will be put in `../plugins/MythicMobs/Generation/resource_pack.zip`.
## Merging
## Merging
A resource pack's assets in `MythicMobs/Generation/merge/assets/` will automatically be merged into the generated pack, including any item overrides and atlases.
A resource pack's assets in `MythicMobs/Generation/merge/assets/` will automatically be merged into the generated pack, including any item overrides and atlases.
```
```
MythicMobs
MythicMobs
|-- Generation
|-- Generation
|-- merge
|-- merge
|-- assets (.json or .bbmodel files, can use subfolders to organize)
|-- assets (.json or .bbmodel files, can use subfolders to organize)
|-- minecraft
|-- minecraft
|-- models
|-- models
|-- textures
|-- textures
|-- pack.mcmeta
|-- pack.mcmeta
|-- pack.png
|-- pack.png
```
```
For example, `MythicMobs/Generation/merge/assets/minecraft/textures/item/diamond_sword.png` would override the vanilla diamond sword texture in your Crucible's pack output.\
For example, `MythicMobs/Generation/merge/assets/minecraft/textures/item/diamond_sword.png` would override the vanilla diamond sword texture in your Crucible's pack output.\
Top-level elements, such as `pack.png` and `pack.mcmeta` can also be merged, but still require the asset folder present to activate merging even if it has no asset contents.
Top-level elements, such as `pack.png` and `pack.mcmeta` can also be merged, but still require the asset folder present to activate merging even if it has no asset contents.
# Packs
# Packs
[Packs] can now contain an "Assets" folder with the following layout:
[Packs] can now contain an "Assets" folder with the following layout:
```
```
Pack
Pack
|-- Assets
|-- Assets
|-- models (.json or .bbmodel files, can use subfolders to organize)
|-- models (.json or .bbmodel files, can use subfolders to organize)
|-- textures (textures, can use subfolders to organize)
|-- textures (textures, can use subfolders to organize)
|-- sounds (.ogg sound files, can use subfolders to organize)
|-- sounds (.ogg sound files, can use subfolders to organize)
```
```
The contents of these folders should be similar to an actual resource pack. In the example item [HERE](#items), it would copy the texture file `Assets/textures/item/clubs/putter.png`.
The contents of these folders should be similar to an actual resource pack. In the example item [HERE](#items), it would copy the texture file `Assets/textures/item/clubs/putter.png`.
Items will be generated **using the configured Material and Model numbers**, and will output a warning if duplicates are detected.
Items will be generated **using the configured Material and Model numbers**, and will output a warning if duplicates are detected.
## Sounds
## Sounds
The structure of the sounds folder will be used to generate a sounds.json.
The structure of the sounds folder will be used to generate a sounds.json.
`Assets/sounds/entity/cerberus/growl.ogg` would generate a sound at `entity.cerberus.growl`.
`Assets/sounds/entity/cerberus/growl.ogg` would generate a sound at `entity.cerberus.growl`.
If there are multiple numbered sounds, it will add those all as random options to the same sound e.g. growl1.ogg, growl2.ogg.
If there are multiple numbered sounds, it will add those all as random options to the same sound e.g. growl1.ogg, growl2.ogg.
If the top-level folder in Assets/sounds is a sound category, it will use that as the category.
If the top-level folder in Assets/sounds is a sound category, it will use that as the category.
All assets are generated in the `mythic:` namespace to avoid conflicts, including with custom blocks now (the sound mechanic will automatically detect these sounds so adding it manually isn't necessary)
All assets are generated in the `mythic:` namespace to avoid conflicts, including with custom blocks now (the sound mechanic will automatically detect these sounds so adding it manually isn't necessary)
## Fonts
## Fonts
Configured via the `font-images.yml` file.
Allows you to define custom image that is assigned to a special font characters that can be used in placeholders. Only the bitmap type is supported at this time. Can be found and used inside [packs].
Allows you to define custom image that is assigned to a special font characters that can be used in placeholders. Only the bitmap type is supported at this time. Can be found and used inside [packs].
The file can contain multiple "entries". Each entry looks something like this:
Configured via the `font-images.yml` file.
```yaml
You can create this yml file in the following directory:
The `font-images.yml` file can contain multiple "entries". Each entry looks something like this:
File:unicode/coverscreen/donut
```yaml
Ascent:7
Donut:
Height:15
Type:bitmap
```
Char:"\u6000"
These can be accessed using the placeholder <fontimage.donut> and can be used with the Text projectiles.
File:unicode/coverscreen/donut
Ascent:7
The `Ascent` and `Height` options can be left empty: those values can be automatically calculated by Crucible if not specified.
Height:15
```
The `File` option can use images in the `minecraft:` namespace
> When using the `minecraft:` namespace, Ascent and Height is required. Commonly used sizes are 8 for Ascent, and 9 for Height.
For a crucible pack to read the images, you must include them inside `\plugins\MythicMobs\Packs\<yourPack>\assets\textures\unicode`, and then, from there, you can specify whatever sub-folders you want. For the following example, you would need to have a file donut.png inside the following folder structure:
These can be accessed using the placeholder <fontimage.donut> and can be used with the Text projectiles.
iron_boots:
The `Ascent` and `Height` options can be left empty: those values can be automatically calculated by Crucible if not specified.
File:minecraft:item/iron_boots
Ascent:8
The `File` option can use images in the `minecraft:` namespace
Height:9
> When using the `minecraft:` namespace, Ascent and Height is required. Commonly used sizes are 8 for Ascent, and 9 for Height.
```
```yaml
lightning:
# Item Configurations
File:unicode/lightning
## Basic Item Configuration
iron_boots:
Generation settings are configured on the item in the `Generation` field/section.
File:minecraft:item/iron_boots
Ascent:8
The most basic way of doing this only requires you to set the Generation field like so:
Height:9
```yaml
```
EmeraldSword:
Material:DIAMOND_SWORD
Model:1
# Item Configurations
Generation:item/emerald_sword
```
## Basic Item Configuration
This will do the following:
Generation settings are configured on the item in the `Generation` field/section.
- Check `Pack/Assets/models` for `item/emerald_sword.bbmodel` or `item/emerald_sword.json`
- If neither of those exist, it will check `Pack/Assets/textures` for `item/emerald_sword.png`
The most basic way of doing this only requires you to set the Generation field like so:
```yaml
...so by setting only the Generation field, the generator will auto-detect between the 3 different options for custom items: a .bbmodel model, a .json model, or a regular sprite image.
EmeraldSword:
Material:DIAMOND_SWORD
If the model is a `.bbmodel` file, your work is done! The generator will extract the textures and mcmeta files for you automatically. However, if you are using a `.json` model, the generator will read the textures from the .json file and look for them in the `Pack/Assets/textures` folder (similar to how a resource pack works) and use those.
Model:1
Generation:item/emerald_sword
The Material and CustomModelId of the Mythic item will be used for generating the resource pack.
```
This will do the following:
- Check `Pack/Assets/models` for `item/emerald_sword.bbmodel` or `item/emerald_sword.json`
## Advanced Item Configuration
- If neither of those exist, it will check `Pack/Assets/textures` for `item/emerald_sword.png`
Generation supports other options as well for more advanced usage.
```yaml
...so by setting only the Generation field, the generator will auto-detect between the 3 different options for custom items: a .bbmodel model, a .json model, or a regular sprite image.
EmeraldSword:
Material:DIAMOND_SWORD
If the model is a `.bbmodel` file, your work is done! The generator will extract the textures and mcmeta files for you automatically. However, if you are using a `.json` model, the generator will read the textures from the .json file and look for them in the `Pack/Assets/textures` folder (similar to how a resource pack works) and use those.
Model:1
Generation:
The Material and CustomModelId of the Mythic item will be used for generating the resource pack.
Model:item/emerald_sword# The same as using Generation: [model]
Parent:some/parent
Textures:
## Advanced Item Configuration
-override/texture
Generation supports other options as well for more advanced usage.
HideBones:# A list of bones to hide. Usable with .bbmodel files
```yaml
-some_bone
EmeraldSword:
-some_other_bone
Material:DIAMOND_SWORD
```
Model:1
Generation:
Model:item/emerald_sword# The same as using Generation: [model]
## Specific Item Types Options
Parent:some/parent
Specific item types can have further special options to assign to every specific state they can have a different texture/model.
Textures:
-override/texture
The value is the same as normal - can be a bbmodel or json in the models folder, or a png in the textures folder to generate a sprite.
HideBones:# A list of bones to hide. Usable with .bbmodel files
-some_bone
-`Pulling` - for bows and crossbows
-some_other_bone
- You can specify the pull after the texture: `item/bow/dirtbow_pulling_1 0.5`
```
- If pull values aren't specified, vanilla defaults will be used if 3 entries are supplied. For more or less, it will interpolate more steps to try and to make them fit smoothly
-`Charged` - for crossbows
-`Firework` - for crossbows
## Specific Item Types Options
-`Casting` - for fishing rods
Specific item types can have further special options to assign to every specific state they can have a different texture/model.
-`Blocking` - for shields
The value is the same as normal - can be a bbmodel or json in the models folder, or a png in the textures folder to generate a sprite.
```yaml
DonutBow:
-`Pulling` - for bows and crossbows
Material:BOW
- You can specify the pull after the texture: `item/bow/dirtbow_pulling_1 0.5`
Generation:
- If pull values aren't specified, vanilla defaults will be used if 3 entries are supplied. For more or less, it will interpolate more steps to try and to make them fit smoothly
Model:item/bows/donut_bow
-`Charged` - for crossbows
Pulling:
-`Firework` - for crossbows
-item/bows/donut_bow_pulling_0
-`Casting` - for fishing rods
-item/bows/donut_bow_pulling_1
-`Blocking` - for shields
-item/bows/donut_bow_pulling_2
```
```yaml
DonutBow:
```yaml
Material:BOW
TortoiseShield:
Generation:
Material:SHIELD
Model:item/bows/donut_bow
Generation:
Pulling:
Model:item/shields/tortoise_shield
-item/bows/donut_bow_pulling_0
Blocking:item/shields/tortoise_shield_blocking
-item/bows/donut_bow_pulling_1
```
-item/bows/donut_bow_pulling_2
```
## Transformation Options
```yaml
Allows you to quickly make color variants of items if you're into that sort of thing. Only really works with sprite items, flips and rotations etc don't work with models.
TortoiseShield:
```yaml
Material:SHIELD
TestGenerationSpriteColorize:
Generation:
Material:IRON_SWORD
Model:item/shields/tortoise_shield
Model:106
Blocking:item/shields/tortoise_shield_blocking
Display:'BluePhoenixSword'
```
Generation:
Texture:item/weapons/phoenix_sword
Transform:
## Transformation Options
FlipHorizontal:false
Allows you to quickly make color variants of items if you're into that sort of thing. Only really works with sprite items, flips and rotations etc don't work with models.
FlipVertical:false
```yaml
Rotate:90# In Degrees
TestGenerationSpriteColorize:
Color:'#0000FF'
Material:IRON_SWORD
HueShift:0
Model:106
Saturation:1.5
Display:'BluePhoenixSword'
Brightness:1
Generation:
```
Texture:item/weapons/phoenix_sword
Transform:
# Examples
FlipHorizontal:false
FlipVertical:false
## Furniture
Rotate:90# In Degrees
Color:'#0000FF'
```yml
HueShift:0
TestGeneration5:
Saturation:1.5
Material:LEATHER_BOOTS
Brightness:1
Model:10
```
# ^^^ The CustomModelData ID for the Material to use.
# In this case, the model generated will be
# Examples
# LEATHER_BOOTS with a CustomModelData ID of 10.
Display:'TestGeneration5'
## Furniture
Generation:item/toilet
# ^^^ This denotes the file structure for the item's model to be placed.
```yml
Type:FURNITURE
TestGeneration5:
Furniture:
Material:LEATHER_BOOTS
Type:DISPLAY
Model:10
Material:BRICK
# ^^^ The CustomModelData ID for the Material to use.
Model:11
# In this case, the model generated will be
# Furniture states are also accounted for in the same way.
# LEATHER_BOOTS with a CustomModelData ID of 10.
# For example, item/toilet would be BRICK CMD 11
Display:'TestGeneration5'
Generation:item/toilet
Generation:item/toilet
States:
# ^^^ This denotes the file structure for the item's model to be placed.
UH_OH:
Type:FURNITURE
Model:12
Furniture:
Generation:item/toilet_flushed
Type:DISPLAY
# And this would be BRICK CMD 12
Material:BRICK
```
Model:11
> The Generation fields also work on furniture and furniture states
# Furniture states are also accounted for in the same way.
# For example, item/toilet would be BRICK CMD 11
## Items
Generation:item/toilet
States:
```yml
UH_OH:
GolfPutter:
Model:12
Material:IRON_HOE
Generation:item/toilet_flushed
Model:1
# And this would be BRICK CMD 12
Display:'TGolfClub(Putter)'
```
Generation:
> The Generation fields also work on furniture and furniture states
Model:item/clubs/putter
# The json or bbmodel file named "putter" in the pack
## Items
# if no Model is defined, it will default to an extruded texture (think diamonds)
Textures:
```yml
-item/clubs/putter
GolfPutter:
# Textures is optional, best for if there is more than 1 texture on a model.
Material:IRON_HOE
```
Model:1
Display:'TGolfClub(Putter)'
## Blocks
Generation:
Model:item/clubs/putter
```yml
# The json or bbmodel file named "putter" in the pack
CustomBlock:
# if no Model is defined, it will default to an extruded texture (think diamonds)
Type:MUSHROOM_BLOCK
Textures:
Id:18
-item/clubs/putter
Texture:block/stars1
# Textures is optional, best for if there is more than 1 texture on a model.
# The texture here will default to a generic block with the texture on all sides.
```
```
## Blocks
## Armor Trims
```yml
```yml
CustomBlock:
CopperHelmet:
Type:MUSHROOM_BLOCK
Material:CHAINMAIL_HELMET
Id:18
Model:10
Texture:block/stars1
# ^^^ The CustomModelData ID for the Material to use.
# The texture here will default to a generic block with the texture on all sides.
# In this case, the model generated will be
```
# CHAINMAIL_HELMET with a CustomModelData ID of 10.
Display:"<green>CopperHelmet"
## Armor Trims
Generation:
# vvv Texture is the inventory icon of your armor.
```yml
Texture:item/armor/copper_helmet
CopperHelmet:
# vvv Armor references to the actual armor on the entity.
Material:CHAINMAIL_HELMET
# vvv Regarding the armor texture, it is based on 2 files, which
Model:10
# vvv should be named as the follows (based on copper armor):
# ^^^ The CustomModelData ID for the Material to use.
# vvv copper_layer_1.png # TOP PART
# In this case, the model generated will be
# vvv copper_layer_2.png # BOTTOM PART - (keep in mind, you must use layer_1 and layer_2)
# CHAINMAIL_HELMET with a CustomModelData ID of 10.
Armor:
Display:"<green>CopperHelmet"
Texture:armor/copper
Generation:
Type:TRIMS
# vvv Texture is the inventory icon of your armor.
# ^^^ specify either TRIMS or SHADERS when both are enabled
Texture:item/armor/copper_helmet
```
# vvv Armor references to the actual armor on the entity.
```yml
# vvv Regarding the armor texture, it is based on 2 files, which
CustomArmor:
# vvv should be named as the follows (based on copper armor):
Trims:
# vvv copper_layer_1.png # TOP PART
Enabled:true
# vvv copper_layer_2.png # BOTTOM PART - (keep in mind, you must use layer_1 and layer_2)
GenerateDataPack:true
Armor:
HideBaseArmor:
Texture:armor/copper
-CHAINMAIL
Type:TRIMS
Optifine:
# ^^^ specify either TRIMS or SHADERS when both are enabled
Enabled:false
```
CoreShaders:
```yml
Enabled:true
CustomArmor:
```
Trims:
> config-generation.yml used for this example
Enabled:true
GenerateDataPack:true
HideBaseArmor:
# Configuration Files
-CHAINMAIL
## Self Hosting
Optifine:
When using SelfHost instead of S3 storage you must open the port that you set, and set the AutoSend url to your IP and port, such as `PublicURL: http://12.34.567.890:8080` seen in the below example:
Enabled:false
```yaml
CoreShaders:
Deployment:
Enabled:true
Enabled:true
```
Type:SELFHOST
> config-generation.yml used for this example
SelfHosting:
Port:8080
AutoSend:
# Configuration Files
Enabled:true
## Self Hosting
SendOnUpdate:true# should /mm i generate push the new pack to online players immediately?
When using SelfHost instead of S3 storage you must open the port that you set, and set the AutoSend url to your IP and port, such as `PublicURL: http://12.34.567.890:8080` seen in the below example:
PublicURL:http://12.34.567.890:8080
```yaml
Force:false# If players need to accept the pack to play.
Deployment:
Prompt:"Thisserverrequiresaresourcepacktoplay!"# The message shown when players join
Enabled:true
```
Type:SELFHOST
SelfHosting:
## config-generation.yml
Port:8080
```yaml
AutoSend:
Generation:
Enabled:true
# The namespace to use
SendOnUpdate:true# should /mm i generate push the new pack to online players immediately?
Namespace:mythic
PublicURL:http://12.34.567.890:8080
Force:false# If players need to accept the pack to play.
# If the ModelEngine resourcepack should be automatically merged
Prompt:"Thisserverrequiresaresourcepacktoplay!"# The message shown when players join
MergeModelEngine:true
```
# If the HappyHUD resourcepack should be automatically merged
## config-generation.yml
MergeHappyHUD:true
```yaml
Generation:
# If the pack should be zipped
# The namespace to use
ZipPack:true
Namespace:mythic
# If the ModelEngine resourcepack should be automatically merged
Deployment:
MergeModelEngine:true
# If the auto deployment feature is enabled
# If the HappyHUD resourcepack should be automatically merged
Enabled:false
MergeHappyHUD:true
# The type of the auto deployment. Can be SELFHOST or S3
# If the pack should be zipped
Type:SELFHOST
ZipPack:true
# SELFHOST deployment options
SelfHosting:
Deployment:
# The port to use
# If the auto deployment feature is enabled
Port:8080
Enabled:false
# S3 deployment options
# The type of the auto deployment. Can be SELFHOST or S3
S3:
Type:SELFHOST
Storage:
Key:pack
# SELFHOST deployment options
Bucket:packs
SelfHosting:
Authentication:
Endpoint:''
# The port to use
AccessKey:''
Port:8080
SecretKey:''
# S3 deployment options
# If the resourcepack should be automatically sent to players
S3:
AutoSend:
Storage:
Enabled:false
Key:pack
SendOnUpdate:false
Bucket:packs
PublicURL:https://s3.yourcoolwebsite.com
Authentication:
Force:false# If players need to accept the pack to play.
Endpoint:''
Prompt:"Thisserverrequiresaresourcepacktoplay!"# The message shown when players join
AccessKey:''
SecretKey:''
CustomArmor:
# If the resourcepack should be automatically sent to players
AutoSend:
# What is the default generation method for custom armors. Can be NONE, TRIMS or SHADERS
Enabled:false
DefaultMethod:TRIMS
SendOnUpdate:false
PublicURL:https://s3.yourcoolwebsite.com
# If the related optifine files should be generated
Force:false# If players need to accept the pack to play.
GenerateOptifineFiles:true
Prompt:"Thisserverrequiresaresourcepacktoplay!"# The message shown when players join
# Options for TRIMS
Trims:
CustomArmor:
Enabled:false
GenerateDataPack:true
# What is the default generation method for custom armors. Can be NONE, TRIMS or SHADERS
DefaultMethod:TRIMS
# A list of armor types to hide in order to correctly override them
HideBaseArmor:[]
# If the related optifine files should be generated
GenerateOptifineFiles:true
# Causes any hidden armor types to be auto-converted to a trim that looks like the vanilla armor
ConvertBaseArmor:true
# Options for TRIMS
Trims:
# Options for SHADERS
Enabled:false
Shaders:
GenerateDataPack:true
Enabled:false
Shader:lessfancypants
# A list of armor types to hide in order to correctly override them
```
HideBaseArmor:[]
# Causes any hidden armor types to be auto-converted to a trim that looks like the vanilla armor