This appeared when I was about to start a different game in 19 with the kitchen mod and a decoration mod, when choosing citizens.
release-687 (x32)[M]
std::logic_error: 'Error loading “cookmod/ai/actions/drink_on_chair_action.lua”: cookmod/ai/actions/drink_on_chair_action.lua:10: attempt to index field ‘drink’ (a nil value)'
stack traceback:
[C]: ?
[C]: in function 'require_script’
radiant/modules/mods.lua:11: in function 'load_script’
stonehearth/components/ai/ai_component.lua:379: in function '_get_key_and_constructor_for_action’
stonehearth/components/ai/ai_component.lua:260: in function '_add_action_internal’
stonehearth/components/ai/ai_component.lua:205: in function 'add_action’
stonehearth/services/server/ai/ai_injector.lua:50: in function '_inject_actions’
stonehearth/services/server/ai/ai_injector.lua:43: in function '_inject_ai’
stonehearth/services/server/ai/ai_injector.lua:14: in function '__user_init’
radiant/lib/unclasslib.lua:270: in function '__init’
radiant/lib/unclasslib.lua:201: in function 'AiInjector’
stonehearth/services/server/ai/ai_service.lua:160: in function 'inject_ai’
stonehearth/components/ai/ai_component.lua:77: in function <stonehearth/components/ai/ai_component.lua:58>
release-687 (x32)[M]
c++ exception: lua runtime error
stack traceback:
[C]: in function 'create_entity’
radiant/modules/entities.lua:24: in function ‘create_entity’
…th/services/server/population/population_faction.lua:318: in function ‘create_new_citizen’
…vices/server/game_creation/game_creation_service.lua:449: in function ‘_generate_citizen’
…vices/server/game_creation/game_creation_service.lua:135: in function <…vices/server/game_creation/game_creation_service.lua:121>
release-687 (x32)[M]
cookmod/components/hydration/hydration_component.lua:26: attempt to index field ‘drink’ (a nil value)
stack traceback:
[C]: ?
cookmod/components/hydration/hydration_component.lua:26: in function <cookmod/components/hydration/hydration_component.lua:17>
release-687 (x32)[M]
stonehearth/components/ai/ai_component.lua:380: could not load action script at cookmod:actions:drink_on_chair
stack traceback:
[C]: ?
[C]: in function 'assert’
stonehearth/components/ai/ai_component.lua:380: in function '_get_key_and_constructor_for_action’
stonehearth/components/ai/ai_component.lua:260: in function '_add_action_internal’
stonehearth/components/ai/ai_component.lua:205: in function 'add_action’
stonehearth/services/server/ai/ai_injector.lua:50: in function '_inject_actions’
stonehearth/services/server/ai/ai_injector.lua:43: in function '_inject_ai’
stonehearth/services/server/ai/ai_injector.lua:14: in function '__user_init’
radiant/lib/unclasslib.lua:270: in function '__init’
radiant/lib/unclasslib.lua:201: in function 'AiInjector’
stonehearth/services/server/ai/ai_service.lua:160: in function 'inject_ai’
stonehearth/components/ai/ai_component.lua:77: in function <stonehearth/components/ai/ai_component.lua:58>
@Froggy help
release-707 (x32)[M]
c++ exception: invalid file path ‘/settlementdecor/entities/construction/robust_door/robust_door_ghost.json’.
stack traceback:
[C]: in function 'load_json’
radiant/modules/resources.lua:33: in function 'load_json’
stonehearth/lib/build_util.lua:259: in function 'create_entities’
stonehearth/lib/build_util.lua:264: in function 'create_entities’
stonehearth/lib/build_util.lua:269: in function 'create_template_entities’
stonehearth/lib/build_util.lua:568: in function ‘restore_template’
…rth/services/client/build_editor/template_editor.lua:29: in function ‘restore_template’
…rth/services/client/build_editor/template_editor.lua:80: in function ‘go’
…ervices/client/build_editor/build_editor_service.lua:312: in function <…ervices/client/build_editor/build_editor_service.lua:310>
done, thanks do you know what happend here? This has happened after removing the decoration mod
release-707 (x32)[M]
c++ exception: invalid file path ‘/settlementdecor/entities/construction/robust_door/robust_door_ghost.json’.
stack traceback:
[C]: in function 'load_json’
radiant/modules/resources.lua:33: in function 'load_json’
stonehearth/lib/build_util.lua:259: in function 'create_entities’
stonehearth/lib/build_util.lua:264: in function 'create_entities’
stonehearth/lib/build_util.lua:269: in function 'create_template_entities’
stonehearth/lib/build_util.lua:568: in function ‘restore_template’
…rth/services/client/build_editor/template_editor.lua:29: in function ‘restore_template’
…rth/services/client/build_editor/template_editor.lua:80: in function ‘go’
…ervices/client/build_editor/build_editor_service.lua:312: in function <…ervices/client/build_editor/build_editor_service.lua:310>
Oh. Well, that would be why the error is occurring, lol.
You can’t place down or make an item from a mod, and then remove the mod, or else when the game tries to find the data for said item, all it will come up with is something that’s not there.
You either need to re-activate the mod, delete any items from it, then deactivate it, or start a new save without the mod being active.
Either way, can you upload your save here? Go to C:\Program Files (x86)\Steam\steamapps\common\Stonehearth\saved_games and find the most recent. Right-click it, hit “send to .zip” then upload it here if it’s under 10 MB. If it’s over that, you’ll have to upload it to something like Google Drive or dropbox, then share the link.
This shouldn’t happen if berta is using the latest version of the mod. This was an issue after the initial release of A21.
The current hydration_component makes references a mixin at :26 and not an override, so unless you are using along side a mod that is overriding the constants, it should work.
@berta_moreTreinta Can you confirm you still have this issue and that you are on the latest version? If you do it could be a save compatibility issue.
@Froggy I have found the error, one of the constructions I had stored in the template had mod decorative elements that I uninstalled and when trying to place it was error, deleted and solved.