Hey everyone!
I recently picked up Stonehearth and I’m very much enjoying its cute style and the ability to build anything you want. One thing I found missing was the lack of colours for tapestries, carpets, etc. though, and so I bravely embarked (with google in my hands) on the journey of my first mod.
It is still VERY barebones, just a few extra throw rug colours but the plan is to add dyes, more colours to everything involving cloth, and create a whole slew of paintings and murals. Just to add some colour to the game! I like blue, but come on
I am however now (already) stuck. I have the barebones of the painter class (who will be creating the dyes, coloured thread, and paintings), and the carpenter can make the paint brushes no problem. The class is available in the jobs overview, but when the Hearthling moves in to pick up the item, I get the following error:
release-893 (x64)[M]
c++ exception: Error in CompileScript calling "colourful/jobs/painter/painter.lua": radiant/lib/util.lua:476: bad argument #1 to 'pairs' (table expected, got nil)
stack traceback:
[C]: in function 'create_controller'
radiant/modules/commons.lua:280: in function 'create_controller'
stonehearth/components/job/job_component.lua:320: in function 'promote_to'
...arth/ai/actions/change_job_using_talisman_action.lua:24: in function '_trigger_cb'
radiant/modules/effects/effect_tracks.lua:113: in function <radiant/modules/effects/effect_tracks.lua:108>
[C]: in function 'fire'
radiant/controllers/time_tracker_controller.lua:91: in function <radiant/controllers/time_tracker_controller.lua:91>
[C]: in function 'xpcall'
radiant/modules/commons.lua:67: in function 'xpcall'
radiant/controllers/time_tracker_controller.lua:91: in function 'set_now'
radiant/modules/gamestate.lua:11: in function 'set_now'
radiant/server.lua:65: in function <radiant/server.lua:63>
Something is obviously going wrong with the creation of the Painter class but I cannot tell what. I used the Weaver class as a basis and a filled in painter.lua and painter_description.json exists with only weaver specific information altered to refer to painter focussed information.
What am I missing?
A second problem I’ve been running into is the text labels. All was fine and dandy while I had the descriptions and names inside the objects and recipes themselves, but they’ve decided to hate me now that I’ve made a locales json file. I get the very nice description:
i18n(colourful:jobs.weaver.recipes.throw_rug_red_recipe.description)
instead of:
A bright red throw rug
The manifest does have a mixin for the stonehearth en.json and mine en.json. Filepaths are correct. The stonehearth editor has no problems recognising what the strings should be when I hover over the line in its interface so by now I am rather stumped.
I hope someone can help me I would include my smod file but being a new user I am not yet allowed to upload attachments!