Exp from cutting down trees or mining?

Has anyone dealt with this at all? There don’t seem to be a lot of custom classes out there. Right now, it doesn’t look like there’s anything I could call to make this happen. Anyone know if there’s a work around or a way of adding this? I know that there are some not-yet-implemented classes like the Miner that will potentially allow for this, but there’s nothing there yet.

I don’t really have the coding experience to kow if it could work but how about trying to link the abilities (which includes mining) to the command exp_rewards (used for recipe - exp - relation) in the description.json ?

What abilities are you talking about? Are you referring to the task groups?

job abilities. The list is in the class_abilities.json in the folder with the same name.

If you have a custom job class, add a listener for the stonehearth:gather_resource event on the hearthling (see shepherd.lua’s _create_listeners function)
Then, check that the harvested target has a material of tree
The arguments passed to the event are: {harvested_target = self._entity, spawned_item = item}

For mining, listen to the “stonehearth:mined_location” on the hearthling, and add exp when the event triggers


Yang, you’re a life saver. Just opened the door for some awesome class customizations! Thank you!