Power Renderers
Power renderers are client-side definitions that control the visual presentation of a power on an entity. They can replace the entity's model entirely, activate render layers, show trails, hide parts of the player model, and assign animation controllers.
Power renderer files are asset-side content, placed at:
assets/<namespace>/palladium/power_renderers/<id>.json
The file's resource ID must match the ID of the power it belongs to. For example, the power data/mypack/palladium/power/hero.json is paired with the renderer at assets/mypack/palladium/power_renderers/hero.json.
Fields
All fields are optional.
| Field | Type | Default | Description |
|---|---|---|---|
entity_renderer | Entity Renderer | Replaces the entity's model with a custom one. | |
render_layers | Conditional ID Map | [] | Render layer IDs to activate while this power is active. |
trails | Conditional ID Map | [] | Trail IDs to activate while this power is active. |
hidden_model_parts | Map<String, Condition> | {} | Player model parts to hide. Keys are part names, values are conditions controlling when they are hidden. |
animation_controller | Map<Animation Layer, Identifier> | {} | Maps animation layers to animation controller IDs. See Animations. |
Conditional ID Maps
The render_layers and trails fields accept two formats:
Simple list (always active):
"render_layers": [
"mypack:hero_suit",
"mypack:hero_cape"
]
Map with conditions (each entry has its own condition controlling when it is active):
"render_layers": {
"mypack:hero_suit": {
"type": "palladium:ability_enabled",
"ability": "mypack:hero#toggle"
},
"mypack:hero_cape": true
}
Minimal Example
A simple power renderer that activates a render layer and a trail, and assigns an animation controller on the "movement" layer:
{
"render_layers": [
"mypack:hero_suit"
],
"trails": [
"mypack:hero_trail"
],
"animation_controller": {
"movement": "mypack:hero_movement"
}
}
Entity Renderer
The entity_renderer field replaces the entity's default model with a custom 3D model. This is useful for transformation effects, alternate forms, or completely custom character models.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
model_layer | Skin Typed Value | Required. The model layer location to use for the custom model. | |
texture | Texture (Reference) | Required. The texture to apply to the model. | |
first_person | First Person Settings | default arm bones, scale 1 | Controls which bones are shown in first person and their scale. |
item_bones | Item Bones | default arm/head bones | Specifies which bones held items and head items are attached to. |
transition | Transition Settings | Configures animated transitions when the model appears or disappears. | |
conditions | Condition | always true | Condition that must pass for this entity renderer to be active. |
apply_vanilla_movement | Boolean | false | When true, vanilla movement animations (walking, swimming, etc.) are applied to the model. |
bone_mapping | Map<String, String> | {} | Maps bone names in the model to different equivalent vanilla player names. Useful if apply_vanilla_movement is enabled. |
enable_hand_items | Boolean | true | Whether held items are rendered on the custom model. |
enable_head_item | Boolean | true | Whether the head item (e.g. helmet) is rendered on the custom model. |
First Person Settings
Controls how the custom model appears in first-person view.
| Field | Type | Default | Description |
|---|---|---|---|
right_bone | String | "right_arm" | The bone rendered for the right arm in first person. |
left_bone | String | "left_arm" | The bone rendered for the left arm in first person. |
scale | Float | 1.0 | Scale multiplier for the first-person arm model. |
Item Bones
Specifies which bones in the custom model held items and head items are attached to.
| Field | Type | Default | Description |
|---|---|---|---|
right_arm | String | "right_arm" | The bone that right-hand items are attached to. |
left_arm | String | "left_arm" | The bone that left-hand items are attached to. |
head | String | "head" | The bone that head items (helmets, etc.) are attached to. |
Transition Settings
Transitions let you smoothly blend the custom model in and out instead of having it pop in instantly. You can optionally play a one-shot animation during the transition (e.g. a transformation animation).
| Field | Type | Default | Description |
|---|---|---|---|
in_duration | Time | 0 | How long the transition-in takes. Accepts ticks or time strings ("1s", "20t"). |
out_duration | Time | 0 | How long the transition-out takes. |
in_animation | Identifier | Animation to play during the transition in. | |
out_animation | Identifier | Animation to play during the transition out. | |
show_during_transition | Boolean | false | When true, the custom model is visible during the transition (not just after it finishes). |
animation_out_blend | Time | 0 | Blend time for the out-animation. Controls how smoothly the animation fades out. |
Example
{
"entity_renderer": {
"model_layer": "mypack:bulky_player#main",
"texture": "mypack:textures/entity/hulk.png",
"apply_vanilla_movement": true,
"first_person": {
"right_bone": "right_arm",
"left_bone": "left_arm"
},
"transition": {
"in_duration": "3s",
"out_duration": "3s",
"in_animation": "mypack:hulk_transformation_in"
},
"conditions": {
"type": "palladium:ability_enabled",
"ability": "mypack:hulk#transform"
}
},
"render_layers": [
"mypack:hulk_armor"
]
}