The existance of items in the Stonehearth universe

This topic has been on my mind since the early releases of Stonehearth. I haven’t had time to write, because it takes some explaining. So here goes:

When making a carpenter allowed multiple carpenters, I would often make two. While observing them work I noticed a flaw in the game mechanics. Now, this isn’t a bug report, its a discussion of an issue that will be pertinent to modders and the game developers. The flaw was that Carpenter A would place a log on his bench and Carpenter B would take the log off of Carpenter A’s bench and place it on her own. Carpenter A would return with another log and then craft a two log item only having ONE log. Of course, Carpenter A’s executing code knew it had two logs but it did not know only one remained.

I’ve discussed this with the developers who work for me and one of them came up an elegant solution. You have to be able to remove items (say logs) from the ability of the pathfinder to locate them AND have them locatable to the profession that removed them from the “universe”.

In this specific case we concluded that the workbench should have a queue that holds the logs or other items brought to it. And that when crafting the crafter should check the queue before proceeding to ensure all the items needed are still there, at the moment of beginning to craft. Of course, these items still need to be visible to the “renderer”, except in the case of a workbench that had drawers or such to hide the stashed items.

But wait, you say, if the items have been removed from the “universe” so the pathfinder cannot find them, how could they have been removed from the crafter’s workbench? Warfare. Either the death of the current crafter, causing you to promote another person, or actual damage to the settlement (which might be represented as stolen goods from the work benches or destroyed goods from physical damage). In the case of a new promotion using an existing bench, the new crafter would need to check what he has in “inventory” before collecting goods to craft the first item in his queue. And the second one is obvious, you have to check because anything could have happened while you were away from your bench manning the walls, so to speak (or collecting the next item for the recipe).

This adding items to the workbench to remove them from the general pathfinders purview is a tool any modder would need to ensure collected items remain, relatively, safe until his crafter can process the collected items.

And the current game needs it because crafters steal from each other and craft items with less material than needed. And another point, if the workbench is destroyed but (for some reason) not the goods inside of it, they need to be returned to the “universe”.

6 Likes

Well thought out! :slight_smile: Thanks for the analysis. We do now have a (mostly) global reservation system, but haven’t tested it with 2 carpenters yet.

3 Likes