Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Tool wear - DFHack modding question  (Read 609 times)

Reelya

  • Bay Watcher
    • View Profile
Tool wear - DFHack modding question
« on: November 28, 2014, 12:23:55 am »

I thought of making a "stone age" dwarf mod, and would like stone digging tools that wear out and have to be replaced. I know this needs DFHack but I haven't really played around enough to know what's needed.

The setup I was thinking about, would be a loop that checks the item type and material for all wielded items, and also whether the dwarf was engaged in a mining-related task. If it detects a stone pickaxe and suitable job, then it would "tick" down the quality/condition. Ideally, it also keeps track of the last task that this had been done for with the current dwarf, so that the game only does the condition reduction once per dwarf job.

Can someone give me some pointers on how I'd go about building this?
« Last Edit: November 28, 2014, 12:26:00 am by Reelya »
Logged

samanato

  • Bay Watcher
  • @ Gardevoirite
    • View Profile
Re: Tool wear - DFHack modding question
« Reply #1 on: November 28, 2014, 12:29:16 am »

ptw
Logged