So, I finish an animation using Blender, and exported the .json as usual.
My problem is that this animation is not for a new mob, it is for hearthlings.
For new mobs, they usually have their own animation folder that you point to from their skeleton file. And you can simple keep adding stuff at their folders.
But hearthling skeleton file points to their usual animation and effects folder. How am I going to add something there? If it was a json list, I could simple do a mixinto adding a new entry pointing to my animation.
Should I use an overwrite to create the file? Like:
"overrides": {
"stonehearth/data/rigs/entities/humans/animations/fishing.json": "file(data/rigs/entities/humans/animations/fishing.json)"
}
Edit:
I think that is the way to go, as seen here:
Edit2:
Didn’t work. I have exactly this at my overrides:
"stonehearth/data/rigs/entities/humans/animations/female/fishing_start.json":"file(data/rigs/entities/humans/animations/female/fishing_start.json)",
"stonehearth/data/rigs/entities/humans/animations/male/fishing_start.json":"file(data/rigs/entities/humans/animations/male/fishing_start.json)",
"stonehearth/data/rigs/entities/humans/effects/fishing_start.json":"file(data/rigs/entities/humans/effects/fishing_start.json)",
And when calling:
:execute('stonehearth:run_effect', { effect = "fishing_start" })
It throws an error about invalid file path. This:
Summary
2017-11-03 17:27:37.158969 | server | 0 | lua.code | -- Script Error (native) Begin -------------------------------
2017-11-03 17:27:37.158969 | server | 0 | lua.code | c++ exception: invalid file path '/stonehearth/data/rigs/entities/humans/effects/fishing_start.json'.
2017-11-03 17:27:37.158969 | server | 0 | lua.code | stack traceback:
2017-11-03 17:27:37.158969 | server | 0 | lua.code | [C]: in function 'load_json'
2017-11-03 17:27:37.158969 | server | 0 | lua.code | radiant/modules/resources.lua:33: in function 'load_json'
2017-11-03 17:27:37.158969 | server | 0 | lua.code | radiant/modules/effects/effect_manager.lua:72: in function 'get_effect_json'
2017-11-03 17:27:37.158969 | server | 0 | lua.code | radiant/modules/effects/effect_tracks.lua:36: in function '__init'
2017-11-03 17:27:37.158969 | server | 0 | lua.code | radiant/modules/common.lua:20: in function 'EffectTracks'
2017-11-03 17:27:37.158969 | server | 0 | lua.code | radiant/modules/effects/effect_manager.lua:156: in function '_add_effect'
2017-11-03 17:27:37.158969 | server | 0 | lua.code | radiant/modules/effects/effect_manager.lua:137: in function 'start_exact_effect'
2017-11-03 17:27:37.158969 | server | 0 | lua.code | radiant/modules/effects/effect_manager.lua:124: in function 'start_effect'
2017-11-03 17:27:37.158969 | server | 0 | lua.code | radiant/modules/effects.lua:13: in function 'run_effect'
2017-11-03 17:27:37.158969 | server | 0 | lua.code | stonehearth/ai/actions/run_effect_action.lua:67: in function <stonehearth/ai/actions/run_effect_action.lua:46>
2017-11-03 17:27:37.158969 | server | 0 | lua.code | [C]: ?
2017-11-03 17:27:37.158969 | server | 0 | lua.code | ...
2017-11-03 17:27:37.159470 | server | 0 | lua.code | [C]: in function 'run'
2017-11-03 17:27:37.159470 | server | 0 | lua.code | stonehearth/components/ai/ai_component.lua:607: in function <stonehearth/components/ai/ai_component.lua:591>
2017-11-03 17:27:37.159470 | server | 0 | lua.code | [C]: in function 'xpcall'
2017-11-03 17:27:37.159470 | server | 0 | lua.code | radiant/modules/common.lua:265: in function 'xpcall'
2017-11-03 17:27:37.159470 | server | 0 | lua.code | stonehearth/components/ai/ai_component.lua:591: in function '_thread_main'
2017-11-03 17:27:37.159470 | server | 0 | lua.code | stonehearth/services/server/threads/thread.lua:273: in function <stonehearth/services/server/threads/thread.lua:270>
2017-11-03 17:27:37.159470 | server | 0 | lua.code | [C]: in function 'xpcall'
2017-11-03 17:27:37.159470 | server | 0 | lua.code | radiant/modules/common.lua:265: in function 'xpcall'
2017-11-03 17:27:37.159470 | server | 0 | lua.code | stonehearth/services/server/threads/thread.lua:270: in function 'f'
2017-11-03 17:27:37.159470 | server | 0 | lua.code | radiant/lib/env.lua:15: in function <radiant/lib/env.lua:14>
2017-11-03 17:27:37.159470 | server | 0 | lua.code | -- Lua Error End -------------------------------
2017-11-03 17:27:37.159970 | server | 0 | lua.code | -- Script Error (lua) Begin -------------------------------
2017-11-03 17:27:37.159970 | server | 0 | lua.code | @radiant/modules/effects/effect_manager.lua:76: [(5040 Micah Dorril) fishing_start]: could not find animation named /stonehearth/data/rigs/entities/humans/effects/fishing_start.json
2017-11-03 17:27:37.159970 | server | 0 | lua.code | stack traceback:
2017-11-03 17:27:37.159970 | server | 0 | lua.code | radiant/modules/common.lua:245: in function 'report_traceback'
2017-11-03 17:27:37.159970 | server | 0 | lua.code | radiant/modules/common.lua:492: in function 'verify'
2017-11-03 17:27:37.159970 | server | 0 | lua.code | radiant/modules/effects/effect_manager.lua:76: in function 'get_effect_json'
2017-11-03 17:27:37.159970 | server | 0 | lua.code | radiant/modules/effects/effect_tracks.lua:36: in function '__init'
2017-11-03 17:27:37.159970 | server | 0 | lua.code | radiant/modules/common.lua:20: in function 'EffectTracks'
2017-11-03 17:27:37.159970 | server | 0 | lua.code | radiant/modules/effects/effect_manager.lua:156: in function '_add_effect'
2017-11-03 17:27:37.159970 | server | 0 | lua.code | radiant/modules/effects/effect_manager.lua:137: in function 'start_exact_effect'
2017-11-03 17:27:37.159970 | server | 0 | lua.code | radiant/modules/effects/effect_manager.lua:124: in function 'start_effect'
2017-11-03 17:27:37.159970 | server | 0 | lua.code | radiant/modules/effects.lua:13: in function 'run_effect'
2017-11-03 17:27:37.159970 | server | 0 | lua.code | stonehearth/ai/actions/run_effect_action.lua:67: in function <stonehearth/ai/actions/run_effect_action.lua:46>
2017-11-03 17:27:37.159970 | server | 0 | lua.code | [C]: ?
2017-11-03 17:27:37.159970 | server | 0 | lua.code | ...
2017-11-03 17:27:37.159970 | server | 0 | lua.code | [C]: in function 'run'
2017-11-03 17:27:37.159970 | server | 0 | lua.code | stonehearth/components/ai/ai_component.lua:607: in function <stonehearth/components/ai/ai_component.lua:591>
2017-11-03 17:27:37.159970 | server | 0 | lua.code | [C]: in function 'xpcall'
2017-11-03 17:27:37.159970 | server | 0 | lua.code | radiant/modules/common.lua:265: in function 'xpcall'
2017-11-03 17:27:37.159970 | server | 0 | lua.code | stonehearth/components/ai/ai_component.lua:591: in function '_thread_main'
2017-11-03 17:27:37.159970 | server | 0 | lua.code | stonehearth/services/server/threads/thread.lua:273: in function <stonehearth/services/server/threads/thread.lua:270>
2017-11-03 17:27:37.159970 | server | 0 | lua.code | [C]: in function 'xpcall'
2017-11-03 17:27:37.159970 | server | 0 | lua.code | radiant/modules/common.lua:265: in function 'xpcall'
2017-11-03 17:27:37.159970 | server | 0 | lua.code | stonehearth/services/server/threads/thread.lua:270: in function 'f'
2017-11-03 17:27:37.160470 | server | 0 | lua.code | radiant/lib/env.lua:15: in function <radiant/lib/env.lua:14>
2017-11-03 17:27:37.160470 | server | 0 | lua.code | -- Lua Error End -------------------------------
2017-11-03 17:27:37.160470 | server | 1 | lua.code | generating traceback...
2017-11-03 17:27:37.160470 | server | 0 | lua.code | -- Script Error (lua) Begin -------------------------------
2017-11-03 17:27:37.160470 | server | 0 | lua.code | radiant/modules/effects/effect_tracks.lua:40: attempt to index local 'effect' (a nil value)
2017-11-03 17:27:37.160470 | server | 0 | lua.code | stack traceback:
2017-11-03 17:27:37.160470 | server | 0 | lua.code | radiant/modules/effects/effect_tracks.lua:40: in function '__init'
2017-11-03 17:27:37.160470 | server | 0 | lua.code | radiant/modules/common.lua:20: in function 'EffectTracks'
2017-11-03 17:27:37.160970 | server | 0 | lua.code | radiant/modules/effects/effect_manager.lua:156: in function '_add_effect'
2017-11-03 17:27:37.160970 | server | 0 | lua.code | radiant/modules/effects/effect_manager.lua:137: in function 'start_exact_effect'
2017-11-03 17:27:37.160970 | server | 0 | lua.code | radiant/modules/effects/effect_manager.lua:124: in function 'start_effect'
2017-11-03 17:27:37.160970 | server | 0 | lua.code | radiant/modules/effects.lua:13: in function 'run_effect'
2017-11-03 17:27:37.160970 | server | 0 | lua.code | stonehearth/ai/actions/run_effect_action.lua:67: in function <stonehearth/ai/actions/run_effect_action.lua:46>
2017-11-03 17:27:37.160970 | server | 0 | lua.code | [C]: ?
2017-11-03 17:27:37.160970 | server | 0 | lua.code | [C]: ?
2017-11-03 17:27:37.160970 | server | 0 | lua.code | [C]: ?
2017-11-03 17:27:37.160970 | server | 0 | lua.code | [C]: ?
2017-11-03 17:27:37.160970 | server | 0 | lua.code | ...
2017-11-03 17:27:37.160970 | server | 0 | lua.code | [C]: in function 'run'
2017-11-03 17:27:37.160970 | server | 0 | lua.code | stonehearth/components/ai/ai_component.lua:607: in function <stonehearth/components/ai/ai_component.lua:591>
2017-11-03 17:27:37.160970 | server | 0 | lua.code | [C]: in function 'xpcall'
2017-11-03 17:27:37.160970 | server | 0 | lua.code | radiant/modules/common.lua:265: in function 'xpcall'
2017-11-03 17:27:37.160970 | server | 0 | lua.code | stonehearth/components/ai/ai_component.lua:591: in function '_thread_main'
2017-11-03 17:27:37.160970 | server | 0 | lua.code | stonehearth/services/server/threads/thread.lua:273: in function <stonehearth/services/server/threads/thread.lua:270>
2017-11-03 17:27:37.160970 | server | 0 | lua.code | [C]: in function 'xpcall'
2017-11-03 17:27:37.160970 | server | 0 | lua.code | radiant/modules/common.lua:265: in function 'xpcall'
2017-11-03 17:27:37.160970 | server | 0 | lua.code | stonehearth/services/server/threads/thread.lua:270: in function 'f'
2017-11-03 17:27:37.160970 | server | 0 | lua.code | radiant/lib/env.lua:15: in function <radiant/lib/env.lua:14>
2017-11-03 17:27:37.160970 | server | 0 | lua.code | -- Lua Error End -------------------------------
Full stonehearth.log file here:
stonehearth.log (126.6 KB)