Summary:
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>
@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.
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
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?
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.
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. 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.
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.
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.
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)