Unlocking recipes via quest/town bonus. need help


#1

Hi all, im currrently working on custom shrines and legendary weapons for my nordlings, but i cant figure out how to tell the game to manually unlock them decently. my main testing elf @Cirdain reports that i keep causing

release-893 (x64)[M] ...r/controllers/encounters/unlock_recipe_encounter.lua:51: attempt to index local 'job_info' (a nil value) stack traceback: [C]: ? ...r/controllers/encounters/unlock_recipe_encounter.lua:51: in function '_unlock_recipes' ...r/controllers/encounters/unlock_recipe_encounter.lua:19: in function 'start' ...ervices/server/game_master/controllers/encounter.lua:128: in function 'start' ...arth/services/server/game_master/controllers/arc.lua:407: in function '_start_encounter' ...arth/services/server/game_master/controllers/arc.lua:383: in function '_trigger_edge' ...arth/services/server/game_master/controllers/arc.lua:315: in function '_trigger_out_edge' ...arth/services/server/game_master/controllers/arc.lua:289: in function 'trigger_next_encounter' ...ter/controllers/encounters/dialog_tree_encounter.lua:168: in function '_finish_encounter' ...ter/controllers/encounters/dialog_tree_encounter.lua:148: in function <...ter/controllers/encounters/dialog_tree_encounter.lua:129>

ive made a modified town bonus to unlock my legendary weapon


and i suspect somethings is wrong there but i dont know what.

@max99x can you shine some light on manual unlocking via quests and or my error?


#2

I haven’t executed your code (the error seems to be that the game doesn’t recognize your custom job in that script for some reason?) but here there’s a problem here:

['nordlingmod:jobs:blacksmith'] = {
      'legendary_hammer',
	  'legendary_hammer_head',
	  'legendary_hammer_haft',
   },

you shouldn’t use aliases of your items here. If you look at the other entries of the default stonehearth jobs, these are keys of recipes from the corresponding recipes.json, preceded by the recipe category plus a colon.

Not sure if that will fix the error but it may help. :thinking:


#3

The example view of the file was an old version, I already tried pointing back to the original class location (just like rayas does it) and added legendary: in front of those three parts I added :confused: kinda wondering if that’s correct or something else is the issue.
currently it says:

['stonehearth:jobs:blacksmith'] = {
	  'legendary:legendary_hammer',
	  'legendary:legendary_hammer_head',
	  'legendary:legendary_hammer_haft',
      'building_parts:fence_gate_iron',
      'decoration:valor_brazier_large',
      'decoration:wall_hanging_plaque',
      'decoration:valor_war_horn',
},