@radiant/modules/effects/effect_tracks.lua:38: [(51029729 Turnip Shooter) fire]: could not find animation named /stonehearth/data/rigs/turret/effects/fire.json

Pre-existing turret from D3023. Upon loading the save in R566, I was presented with the following errors:

c++ exception: invalid file path '/stonehearth/data/rigs/turret/effects/fire.json'.
@radiant/modules/effects/effect_tracks.lua:38: [(51029729 Turnip Shooter) fire]: could not find animation named /stonehearth/data/rigs/turret/effects/fire.json
radiant/modules/effects/effect_tracks.lua:44: attempt to index local 'effect' (a nil value)
2016-07-01 14:07:43.900682 | server |  0 |                         lua.code |    	radiant/modules/common.lua:257: in function 'xpcall'
2016-07-01 14:07:43.900682 | server |  0 |                         lua.code |    	stonehearth/components/ai/ai_component.lua:525: in function '_thread_main'
2016-07-01 14:07:43.900682 | server |  0 |                         lua.code |    	stonehearth/services/server/threads/thread.lua:249: in function <stonehearth/services/server/threads/thread.lua:246>
2016-07-01 14:07:43.900682 | server |  0 |                         lua.code |    	[C]: in function 'xpcall'
2016-07-01 14:07:43.900682 | server |  0 |                         lua.code |    	radiant/modules/common.lua:257: in function 'xpcall'
2016-07-01 14:07:43.900682 | server |  0 |                         lua.code |    	stonehearth/services/server/threads/thread.lua:246: in function 'f'
2016-07-01 14:07:43.900682 | server |  0 |                         lua.code |    	radiant/lib/env.lua:15: in function <radiant/lib/env.lua:14>

save, stonehearth.log (1.5 MB)

1 Like

After @linda’s post here:

I guess the fix is to get rid of the old turrets and shooters.

1 Like

@Relyss: Upon testing this, undeploying the existing turret, destroying the ghost turret, then demoting/re-promoting the engineer does not fix this problem. It does fix the turret placement problem, but this fire.json issue persists, and appears to be preventing the turrets from firing at all. No damage to hostiles, no projectiles visible and no firing animations on the turrets. :frowning:

1 Like

Yeah… That’d match with what I replied to you first. If the files are actually referencing the wrong effects, it means the change didn’t get to the latest build somehow :sweat:

1 Like

Either that, or the above steps as outlined are insufficient to effectively transition a save over to using the new code. For example, perhaps there’s some save compatibility code missing that would convert existing turrets. Or, perhaps all existing turrets, deployed or in storage, need to be removed and recreated anew?

My guess is that all existing turrets from the previous save must be removed and recreated.

How do remove undeployed items from the game? In the engineer’s case, the game doesn’t allow me to place my entire stock of spare turrets.

Try getting them out of crates by changing the filters, so the hearthlings place them into stockpiles.

Then use the Clear tool under the harvest menu to get rid of them.

1 Like

Very unfortunately, the old turrets have a render info (c++) component that still uses the old animation table, causing it to be unable to play the attack/fire animation. We plan to improve the loading for certain c++ components so that they can update their info from the json when it changes, but at the moment I’m afraid the solution is to destroy the old turrets (placed, ghost, iconic) and replace them with new ones.

1 Like

That’s proving hard because there’s no “Defense” filter, so it’s not entirely clear how to get them out of the various crates they’re scattered across so I can kill them. :stuck_out_tongue: could I ‘destroy entity_id all’ or something?

There’s currently not a command for destroying entities across all storages, but I noticed in your town, all the turrets are in the chest behind the engineer workbench. You can teleport that to an open field and then destroy the chest to scatter the contents onto the ground and destroy it that way. Their current stockpile filter is under Construction -> Defenses, so you can also sort them out into a stockpile.

1 Like

Awesome. I’ll give that a go. Thanks, Linda!

Okiedokie, so everything went swimmingly until I tried to place some freshly-made turrets. I first made sure I had none left in the world before crafting more. It now thinks I have 2 of 2 placed already, even after a demotion/re-promotion, and even after a reload. Here’s the save if you want to check it out. R572 x64 + debug tools.

1 Like

Thanks for trying that! I’ll look into it now

1 Like

for_megashub.7z (9.2 MB)

Looks there were two ghost turnip shooters at coordinates 0,0,0. I patched up your save to delete the ghosts and update the engineer’s workbench that had a reference to an older animation table. You should be able to place your turrets now, but if not let me know.

I’ve made a fix to have older entities update their animation tables on load and also prevent trap/turnip ghosts from possibly spawning in bad locations. The fixes will be in the next build.


Whoa. On a weekend too, no less. Such service!! :smile: Thank you, @linda!

Glad you were able to track down a viable compatibility fix.

Confirmed: Looks like those fixes work great for me. Thanks again, Linda!

I decided to place a few more clamp traps around, and received what appears to be a related engine error when the first new trap was activated by a hostile:

release-572 (x64)[M]
c++ exception: invalid file path '/stonehearth/data/rigs/clamp_trap/clamp_trap.json'.
stack traceback:
	[C]: in function 'load_json'
	radiant/modules/resources.lua:33: in function 'load_json'
	radiant/modules/effects/effect_manager.lua:12: in function '__init'
	radiant/modules/common.lua:20: in function 'EffectManager'
	radiant/modules/effects.lua:29: in function 'get_effect_mgr'
	radiant/modules/effects.lua:12: in function 'run_effect'
	stonehearth/ai/actions/run_effect_action.lua:56: in function <stonehearth/ai/actions/run_effect_action.lua:38>
	[C]: ?
	[C]: ?
	[C]: in function 'execute'
	...h/ai/actions/combat/attack_melee_adjacent_action.lua:149: in function <...h/ai/actions/combat/attack_melee_adjacent_action.lua:69>
	[C]: in function 'run'
	stonehearth/components/ai/ai_component.lua:541: in function <stonehearth/components/ai/ai_component.lua:525>
	[C]: in function 'xpcall'
	radiant/modules/common.lua:257: in function 'xpcall'
	stonehearth/components/ai/ai_component.lua:525: in function '_thread_main'
	stonehearth/services/server/threads/thread.lua:249: in function <stonehearth/services/server/threads/thread.lua:246>
	[C]: in function 'xpcall'
	radiant/modules/common.lua:257: in function 'xpcall'
	stonehearth/services/server/threads/thread.lua:246: in function 'f'
	radiant/lib/env.lua:15: in function <radiant/lib/env.lua:14>

Perhaps a similar animation table update fix is possible here as well?

The fix should resolve that issue once it’s up on a future build. You can wait for that or replace your traps with new ones (by crafting or by using debugtools item stamper xD)

1 Like