Custom jobs and delivery_quest_dialog.js

I am trying to add my custom combat class to [mod_folder]\data\gm\campaigns\town_progression\arcs\trigger\town_progression\encounters\hearth_quest_glory.json,

I have already changed it to work for the custom kingdom(not acendancy) and i can do the whole progression w/o my custom job

  • I follow the same format as the current quest_glory.json
  • Added cleric to make sure i was doing it correctly before trying custom job(works fine)

    {
    “type”: “job_level”,
    “uri”: “stonehearth:jobs:cleric”,
    “level”: 3
    },
    {
    “type”: “job_level”,
    “uri”: “box_o_vox:jobs:necromancer”,
    “level”: 3
    }

    and i tried by directly stating the file

    {
    “type”: “job_level”,
    “uri”: “stonehearth:jobs:cleric”,
    “level”: 3
    },
    {
    “type”: “job_level”,
    “uri”: “/box_o_vox/jobs/necromancer/necromancer_description.json”,
    “level”: 3
    }

in both cases i get the same error

2018-04-24 15:38:28.973798 | client | 1 | browser | TypeError: Cannot read property 'description' of undefined 2018-04-24 15:38:28.973798 | client | 1 | browser | at http://radiant/stonehearth/ui/game/bulletin/bulletin_dialog/delivery_quest_dialog/delivery_quest_dialog.js:92:45 2018-04-24 15:38:28.973798 | client | 1 | browser | at Array.forEach (native) 2018-04-24 15:38:28.973798 | client | 1 | browser | at Function.j.each.j.forEach (http://radiant/radiant/js/external/underscore-1.5.2.min.js:5:599) 2018-04-24 15:38:28.973798 | client | 1 | browser | at n._recalculateRequirements (http://radiant/stonehearth/ui/game/bulletin/bulletin_dialog/delivery_quest_dialog/delivery_quest_dialog.js:64:9) 2018-04-24 15:38:28.973798 | client | 1 | browser | at w (http://radiant/stonehearth/ui/root/js/libs/ember-1.8.1.min.js:5:23160) 2018-04-24 15:38:28.973798 | client | 1 | browser | at m (http://radiant/stonehearth/ui/root/js/libs/ember-1.8.1.min.js:4:21008) 2018-04-24 15:38:28.973798 | client | 1 | browser | at b (http://radiant/stonehearth/ui/root/js/libs/ember-1.8.1.min.js:5:13753) 2018-04-24 15:38:28.973798 | client | 1 | browser | at a (http://radiant/stonehearth/ui/root/js/libs/ember-1.8.1.min.js:5:12519) 2018-04-24 15:38:28.973798 | client | 1 | browser | at h (http://radiant/stonehearth/ui/root/js/libs/ember-1.8.1.min.js:5:13415) 2018-04-24 15:38:28.973798 | client | 1 | browser | at a (http://radiant/stonehearth/ui/root/js/libs/ember-1.8.1.min.js:5:12507)

I’m not very good with lua or js/ember/node but i think that the delivery_quest_dialog.js is not getting my description. Is this because its under a different namespace(not stonehearth:jobs:[job_name]). Do i need to write my own delivery quest dialog(i dont know how to mixinto js/ember/node)

I had a quick look and trace through the error message you posted. No, the code in question loads all professions, not just Stonehearth’s. Also, the error isn’t saying your description is undefined; it’s saying that it’s trying to access the property “description” of something undefined. In other words, it’s the whole job it can’t find, not just the description of it. I’d check your custom kingdom’s campaign and quest procession. Possibly somewhere you meant to specify the necromancer, but didn’t?

Thank you for clearing that up. I followed the same way that stonehearth does its town progression, they never specify the jobs until that quest so i thought it just took in aliases/paths. I tried to look up the node chain to see if i missed the jobs being referenced elsewhere but did not find anything. I will try to find where i messed up.

You need to mix your job into stonehearth:jobs:index.

1 Like

Thank you that worked, Does that mean it only references stonehearth:jobs:index? In the population file i reference a custom job:index. should i move the new jobs to the stonehearth:jobs:index and keep the jobs i’m overwriting in the [mod]:jobs:index(and make it “mixin”: “stonehearth:jobs:index”) so i can still reference my new/changed jobs w/o them overwriting the default ones?

I believe even if you use it in your custom population’s job index, you still need to mix any new jobs into the main stonehearth jobs index as that’s what’s the stonehearth job service uses. Though you may be able to disable it by default (not sure what’s a good way to do it off the top of my mind).