Obligation/Timer Tracker 1.1

I’m proud to release my latest UI mod that I’ve been struggling with for a bit and in which I finally got the first core features working. It should be a lot easier going forward to add more tracking of items; the tricky bit will be when I try to hook into trade obligations and goblin demands.

But for now, enjoy being able to see your potions (with their buffs’ durations), use them directly from the HUD, and even set them to be auto-used! You can also drag the frame, and it will save its position in your user settings (it will keep this same position for you regardless of your game, and may have formatting issues if it’s near the right side of the screen).

Non-Steam files (I’ll try to keep them as up to date, but it’s not automatic :wink: ): obligationtracker.zip (18.3 KB)



P.S. - if you’ve made your own consumables that apply a buff to the town using the same script as the base game ones ("stonehearth:consumables:scripts:buff_town"), your consumables should also automatically get tracked here!


Could you please post full in-game screenshot?

Good news, I finally got the saved variables working, so now your timers and auto-use settings will stick with the game through saves/loads! Next stop: trading stall town. And then probably some more UI work to make it look a little nicer.


Greatly improved UI (including a draggable window! though for now it doesn’t remember where you dragged it) and added market stall support.


It’s possible to add tooltips? I’m always forget for what each potion uses :smiley:

1 Like

YES @Fornjotr

1 Like

Thanks for the tag @SnorrLaxZ :wink:

This is so great Paul… :sunny:

Thank you for making this mod! :merry:


What does the timer on the stalls mean?
Also, well done Paul, this is going to be a must-have for me.

Tooltips should be in the latest version that I uploaded last night!

Trading stalls have a cooldown for how often a trader can be summoned, so the timer shows that (and they can also be set to auto-use on cooldown so you maximize how many traders you’re getting and can hopefully get those sunflowers / fox lilies / whatever a bit faster!).

1 Like

Ah right, cool! I don’t use the trading stalls at all :sweat_smile:

On another note, what is it about those resources?

For some reason they dont shown sometimes

I have them on a one second delay so they’re not popping up all the time unless you keep the mouse hovering over. Do they still sometimes not pop up even if you keep hovering for over a second?

Yes and its strange that it can be fixed through pausing

1 Like

Hmm, maybe it’s an issue with the game timer triggering an update to the items (for the purposes of adjusting the cooldown graphics and timers). That happens once a second. I’ll look into that, and try to avoid changing things for items that don’t have active cooldowns (though that wouldn’t help the ones that do).

Should be fixed now, let me know if you see it or any other problems again. I was updating the tooltips too frequently while the game was unpaused, and because they were set to a delay, they would get changed and re-delayed before every showing up. Now they’re only set when the array of consumables (or trading stalls) changes, which is very infrequent (since I’m showing cooldown data overlayed on the main control, I don’t feel the need to include that in the tooltips).

Now I’m working on getting it to work in multiplayer. Currently it’s a server-level service monitoring consumable and trading stall usage and saving timer data and auto-use settings, and that data essentially gets shared between all the players. I think maybe it should be a client-level service so that the saved variables are automatically player-based, but then I have to figure out how to much of my stuff I have to change in order to get that to work.

Edit: I tried to shift it over to a client-based service, and I think I mostly succeeded, except that now the events I’m listening for never trigger (that is, they’re still getting triggered, but my handlers don’t pick them up). Is there something I need to do differently to have a client service listen to events that are triggered by the server?

Catch this one after click on potion


release-870 (x64)[M]
...n/orchestrators/collect_ingredients_orchestrator.lua:53: attempt to index field '_retry_listener' (a nil value)
stack traceback:
	[C]: ?
	...n/orchestrators/collect_ingredients_orchestrator.lua:53: in function 'run'
	stonehearth/services/server/town/town.lua:451: in function 'run_orchestrator'
	...rver/town/orchestrators/craft_items_orchestrator.lua:219: in function '_collect_ingredients'
	...rver/town/orchestrators/craft_items_orchestrator.lua:63: in function 'run'
	stonehearth/services/server/town/town.lua:466: in function <stonehearth/services/server/town/town.lua:465>
	[C]: ?
	[C]: ?


release-870 (x64)[M]
No matching overload found, candidates:
Point3 get_standable_point(lua_State*,Physics&,Point3 const&,int)
Point3 get_standable_point(lua_State*,Physics&,custom [class std::weak_ptr<class radiant::om::Entity>],Point3 const&)
stack traceback:
	[C]: ?
	[C]: in function 'get_standable_point'
	radiant/modules/terrain.lua:78: in function 'place_entity'
	stonehearth/call_handlers/town_call_handler.lua:21: in function <stonehearth/call_handlers/town_call_handler.lua:6>

perhaps this error related to that merchant’s timer not shown sometimes

The second error is something that @max99x has taken care of for the next version, and the first… is there something you’re trying to craft that requires a potion that was used by my mod? I’m guessing that it had been reserved by a crafter for crafting something, and then my mod used it, so the game got confused. I can probably limit the consumables picked up by my tracker so that doesn’t happen (I can’t just use the default useable_item_tracker because that excludes placed items, and we still want to be able to auto-use placed consumables).