Troubleshooting

Echo:NPC is a complicated bit of software, and although I have done my best to provide convenient error messaging, sometimes it just doesn’t work. Here are my tips and tricks for fixing a broken entity:

Debugging tricks

First, you should always read the console. The console prints important warning/error into the screen. Read them, and try to understand! This is the first line of defense when something isn’t working!

Second, you should know about the debug mode. Run Echo:NPC with -d to get extra error messaging when Echo:NPC fails. This is like ./echo_npc.exe my_template.json -d.

Tip:

As Echo runs, it will print out state information onto the screen. When it fails, it will print the failure, and close. By noting when and where the error occurred, you can help find what state or sub-state it was failing at.

Common mistakes

Wrong output location

By default, entities will export with the here output_type. This means that entity/animation_controller files won’t automatically be added into the pack: you will need to drag them into the pack yourself. If you expect your files to go directly into the pack, make sure the output_type is set to either world or dev (depending on where your pack is stored), and not here.

Wrong Manigest ID

Another common version of this error is using the wrong manifest ID -for example accidentally selecting the manifest from the resource pack instead. Double check that the files are appearing! You can do this by opening the behavior pack itself, and verifying the files.

Duplicate entities

When Echo:NPC runs, it creates two new files: one animation controller, and one entity. When you run Echo:NPC again, it will override these files with fresh copies. These files are based off of the template filename. If you have a lion.json, you will create a lion.entity.json and a lion.animation_controller.json. If you rename lion.json to something like my_lion.json and run Echo again, it won’t replace the old files: it will create a new set of files. Now you will have lion.entity.json and my_lion.entity.json. If these two entity files have the same identifier, you might find some weird behaviors. You should always clean up old exported versions if you decide to rename templates.

No default state

There is actually a warning for this, so hopefully this won’t bite you, but its possible. If you don’t set a default state, the entity will use default state None which means “Don’t add any spawn event to the entity”. Entities with a None default state work just fine, but they don’t work automatically. You will need to summon them with an event, or they won’t have any interactions.

You can summon an entity with an event like: /summon sirlich:entity ~ ~ ~ echo:my_state_name

Misspelling

Echo:NPC will ignore json keys which are misspelled. This means if you meant to type transitions, but accidentally typed transittions, no warning will be generated. Instead Echo:NPC will quietly notice that transitions wasn’t supplied, and set the default transition for all sub-states. If Echo:NPC is printing no errors, but behaving oddly, check to make sure you spelled everything correctly. If you are watching output carefully, you will probably be able to spot the wrong transition type being used!

Really debugging

If everything else fails, the best way to debug Echo:NPC is by looking at the exported files. This can be done by navigating into the pack where the files are generated, and opening both the entity and the animation controller file.

Start by searching for the spawn event, which the entity will run when it is summoned. Then, track down through the files, going from Event, to Component Group, etc. When you reach a component group that contains a skin_id, you can follow the trail inside the animation controller file to see what commands/events are run.