Template Schema
This file contains the schema for Echo:NPC. It will attempt to show all possible features and formats, placed into a single file. This is not the easier way to understand Echo:NPC, but it can be useful for review, or for finding new features. If you are new to Echo:NPC, I suggest starting in the Get Started section.
{
//Header is optional, but HIGHLY recommended
"header": {
"default_state": "main", //Always include a default state
"output_type": "here", //Output type is a very common setting
"manifest_id": "488f3a14-3427-4cc4-9af3-2e95970b3c9d" //Manifest ID is a common setting
//You can add more settings here if you want.
//Find cool settings by browsing settings.json
},
//States definition is required. Each state is its own object within the states list.
"states": [
//The first state
{
//State information
},
//You can include two or more states by adding a new object.
{
"name": "main", //Alls states should have a name
"next": "loop", //Next says what state to move to after the sub-states are used up.
//Text is printed in order, one dialogue option, then the next.
"text": [
"This is the first dialogue option!",
"This is the second dialogue option!",
"Final!"
],
"length": 3, //Length is only needed if you DON'T include a text-list.
//Commands can use numbery arguments to play arbitrary commands at arbitrary states
"commands": {
"1": [
"/teleport @e ~ ~ ~",
"/say Second command runs too!"
]
},
//Components can be added into the entity using numbery arguments.
"components": {
"all": {
"minecraft:scale": {
"value": 2
}
}
},
//Custom components are pulled from component_templates in the settings. Call them with positional arguments.
"custom_components": {
"3": ["scale 2"]
},
//Add your own component groups to states using numbery arguments
"component_groups": {
"1-2": ["my_group"]
},
//Transition types are pulled from the transition_templates
"transitions": {
//You can include multiple transitions in one state
"1": [
"interact", //Interact is clicking
"timer 4" //Timer takes a position argument (4) to decide how long
],
"2": [
"my_custom_transition arg1 arg2 arg3", //Call custom transitions you have written here
"proximity 15 my_event" //Override the event argument in transitions to pick the event to run
]
//Third state isn't set. It will use the default set in "default_transitions". (By default, its interact)
}
},
//Third state.
{
"name": "loop",
"transition": "loop",//A state that transitions to itself forms a loop
//Convenient play sounds
"sounds": {
"all": "random.xp.drop"
}
"text": [
"loop forever!",
"loop",
"looping forever"
]
}
],
//Components at the top level will be inserted directly into the entity. Has good synergy with entity templates
"components": {
"minecraft:scale": {"value": 10}
},
//Custom_components at the top level will be inserted directly into the entity. Has good synergy with entity templates
"custom_components": [
"variant 2"
],
//Randomizers are like bonus events that randomize. Can be called in the 'next' of a state.
"randomizers": {
"my_randomizer": {
"echo:state_1": 1,
"echo:state_2": 3
}
}
//Entity definition can either be an entity_template, or an actual entity: (don't include both, pick one)
"entity": "default sirlich:melon",
"entity": {
//Actual code for a normal Minecraft BP entity.
}
}