Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: A bit on random injuries and general healthcare  (Read 1337 times)

Jorn Stones

  • Bay Watcher
    • View Profile
A bit on random injuries and general healthcare
« on: July 25, 2014, 01:07:24 am »

Just a little bit of thought on healthcare, while we have health, most dwarves dont actually really care...
Such as your military being victorious in battle, you lifting the alert and putting the squads back to inactive, and the squads walk back to the fort and nobody cares about picking up poor unconcious Urist, instead preferring to let him sleep in the mud until Urist Mcminer deep underground suddenly hears that his dear friend Urist McRecruit is outside, and goes get him. By the time he arrives, Urist McRecruit has died from bleeding.

So yes, the first thing has to do with the job priorities of healtcare-related jobs, which is quite low, and with how urgent it is in most cases, it needs to not only be a high priority, but also a job that can be 'overridden' by another dwarf.

-If a dwarf has the recover wounded job, but another dwarf with 'no job' is at least 15 tiles closer to the wounded dwarf, the dwarf with no job is set to recover the wounded, while the other dwarf reverts to having no job instead.

In a similar way, dwarves often neglect those in hospital, doctors would rather continue making trinkets then diagnose a patient, if a job for it is created at all, and even with all professions turned off would rather continue hauling items, meaning that if you want dwarves to be really taken care off, you have to turn off all labors. But even then, the doctors often end up just idling with 'no job'

It's a big annoyance, healthcare needs priority, the jobs need higher priority, but unlike with recover wounded, it doesn't have to be overridden by another dwarf.


Foreign aid:
So that merchant caravan of the humans, mountainhome, or elves was attacked, and now their wounded are crippled. Instead of letting them walk off the map with all their wounds, allow the option to be there for these wounded to be treated at your fine hospital. Now I know what you all think, "Why would I want to give aid to those dirty rotten Elves?"  Well, that is because in fact we are torturing them. We drag them inside over our finely engraved stone, put them in a wooden bed, made from wood cut down by dwarves. Attach wooden splints to their arms and legs, made from wood cut down by dwarves, and to top it off, we make them hold a pair of wooden crutches, again made from wood cut down by dwarves, to walk out of the mountainhome and back to their beloved trees (unless they hang themselves by a piece of hemp rope the moment they get outside)
When it comes to other dwarves and humans of course, we do get some advantage from having them remain alive, and the doctors will actually have something to do. In case of multiple wounded, the dwarves living in the mountainhome get priority of course.
This healthcare will of course put you in favor of whatever civilization. "Xx civ was grateful for aiding one(or two or three or ten) of theirs and given you an XX discount for the trade of this year. In addition of course, that civ thinking good about you somewhat reduces the chance of war and invasions. And, in case of a dwarf, they may even opt to become one of your citizens. If you dont want to give them aid, I'm sure a setting can be made for it 'Refuse healthcare to Elves/foreign civilizations/all civilizations/nobody', or you can lock the door of their hospital room.(they should suffer from hunger/thirst as long as they are your guests)


And then the last thing that always bothers me, the lack of injuries.
Most injuries are sustained in battle, or nowadays, dwarves falling out of trees. My fort has been injury free for three years now. My doctors are bored, and now all legendary clothiers, weavers, leatherworkers, and even miners.
I'd like to see some kind of random injuries happening to dwarves while they do their day to day business. Low chance of course, no 'major' injuries like chopped off hands/broken spines/crushed skulls. A higher chance of it happening to dabbling dwarves then skilled ones.
Things like a miner getting a lump of rock on is foot, and ending up with a broken foot. A bone carver accidentally piercing his hand with whatever tool he uses. A child running through the halls, tripping, and breaking his nose on the Masterfully engraved image of Urist the dwarf in microcline. The war-dog in training bit his trainer, and now has a bleeding hand. The carpenter almost sawed off one of his fingers, but the mason next door smashed his open, while the Smith two doors further managed to hit his arm with a hammer and fracture the bone. The fresh recruit tapped a little bit too hard with his weapon (and actually emphatises the need for training weapons with that)
Whatever the reason, minor injuries can keep your doctors from going rusty, and actually increases the need to set up a proper healthcare service

I'm pretty sure some of these things have been suggested before, but I hope to have at least added some new suggestions.
Logged

MrWiggles

  • Bay Watcher
  • Doubt Everything
    • View Profile
Re: A bit on random injuries and general healthcare
« Reply #1 on: July 25, 2014, 01:24:08 am »

I dont think its actually technically feasible to give out job assignments by distance relative to the job.  It'd be a pretty expensive computational check. Even just Recover Patience Job to have that special check. It'd probably be a rapidly repeating flood style check, until it found a dorf, then found a dorf with the proper labors turned on. But that'd only alert a dorf by their absolute distance from the job, NOT from their pathing distance to the job. Its entirely possible, and probably more common than not to have a dorf be absolutely closer to an injured dorf, but be significantly further away, travel distance wise. And though that wasn't stipulated, I think thats what you actually want. The Dorf with the shortest travel distance to do the recovery job. And so that would be running path finding code mcjigger on every valid dorf, and that would still probably be too computationally heavy to make it worthwhile.

As for the second questions. So while, there could defiantly be rebalancing of labors and job properties, largely Doctor dorfs handle their job correctly. What most players are failing to take into account, are the Dorfs personalities traits. Dorfs with poor empathy, and or poor work ethic make terrible doctors. And generally, for almost every other dorf job, there too many doing anyone job to notice any of the slackers, or their job while important doesn't at any time become so important that players are baby sitting it.

So this leads to a compounding issue, with much smaller number of dorfs being watched a lot more, which gives the impression that that the Doctor labors are broken, when probably more often than not, you just have shitty doctors.
Logged
Doesn't like running from bears = clearly isn't an Eastern European
I'm Making a Mush! Navitas: City Limits ~ Inspired by Dresden Files and SCP.
http://www.bay12forums.com/smf/index.php?topic=113699.msg3470055#msg3470055
http://www.tf2items.com/id/MisterWigggles666#

Jorn Stones

  • Bay Watcher
    • View Profile
Re: A bit on random injuries and general healthcare
« Reply #2 on: July 25, 2014, 01:52:36 am »

I hadn't taken their personalities into account, I'll have to see if I still experience the same with a doctor that has the proper personality, although I've seen this priority issue occur all the time, I've not exactly looked at a dwarf refusing to do a job due to personality, which could explain why the jobs aren't being created.


You are also right about the path finding code, which could cause a big fps dip. I'm sure it could be optimized one way or another, but if it would make a too big hit, it might be better without.
Logged

GavJ

  • Bay Watcher
    • View Profile
Re: A bit on random injuries and general healthcare
« Reply #3 on: July 25, 2014, 02:13:33 am »

Quote
t'd probably be a rapidly repeating flood style check, until it found a dorf, then found a dorf with the proper labors turned on. But that'd only alert a dorf by their absolute distance from the job, NOT from their pathing distance to the job
Mer?

First of all, there's no reason to restart a flood fill just to look for the next dwarf. Continue on from where you left off only. Secondly, if you're doing a flood fill, that will give you the path. That's the only reason to be doing a flood fill. If you don't care about path, then you don't need to do any algorithm, you simply immediately calculate euclidean or city block distances from already known dwarf locations to the job. It's not like the game doesn't know where dwarves are... Finally, recovery of wounded dwarves is not something that happens very often at all, so it is acceptable for the game to spend even several times more resources on pathing it than it does on something like stone hauling.

edit: also I'm fairly sure it already does this anyway. EVEN for rock hauling and mining and such. Since generally when I designate mining and then do it again a second later, it's always that same nearby miner that spins around and goes back and does the next bit again, never the super-far-away miner (unless the first one went on break etc)
« Last Edit: July 25, 2014, 02:18:51 am by GavJ »
Logged
Cauliflower Labs – Geologically realistic world generator devblog

Dwarf fortress in 50 words: You start with seven alcoholic, manic-depressive dwarves. You build a fortress in the wilderness where EVERYTHING tries to kill you, including your own dwarves. Usually, your chief imports are immigrants, beer, and optimism. Your chief exports are misery, limestone violins, forest fires, elf tallow soap, and carved kitten bone.

Jorn Stones

  • Bay Watcher
    • View Profile
Re: A bit on random injuries and general healthcare
« Reply #4 on: July 25, 2014, 02:48:04 am »

yes, if the first miner hasn't picked up a new job yet, he gets it. but if another miner just a second later is done with the block next to the one you just designated, instead of him taking over the job the job stays with the far away dwarf, but this isn't really much of an issue, as its not something critical like dwarfs dieing.
Logged

GavJ

  • Bay Watcher
    • View Profile
Re: A bit on random injuries and general healthcare
« Reply #5 on: July 25, 2014, 03:08:20 am »

Wait what? You want them to recalc the distance every single tick all the way up to when the guy is recovered, no matter what, even after somebody has taken the job who was nearest at the time?

Sorry, I misunderstood. That seems entirely unnecessary at any cost, much less what would end up being a 500x or so calculation increase... And if your injured dwarf is SO INJURED that the extra 3 tiles or whatever of walking is going to do him in, then he wasn't going to make it anyway. This does not sound worth it.
Logged
Cauliflower Labs – Geologically realistic world generator devblog

Dwarf fortress in 50 words: You start with seven alcoholic, manic-depressive dwarves. You build a fortress in the wilderness where EVERYTHING tries to kill you, including your own dwarves. Usually, your chief imports are immigrants, beer, and optimism. Your chief exports are misery, limestone violins, forest fires, elf tallow soap, and carved kitten bone.

Jorn Stones

  • Bay Watcher
    • View Profile
Re: A bit on random injuries and general healthcare
« Reply #6 on: July 25, 2014, 03:59:09 am »

Oh no, I want them to recalc it and give the recover wounded job to a closer dwarf whenever the game decides to hand it to whomever was the closest at the time and with no job, which in most cases is someone deep within the fortress and a total of 200-300 squares away, and only recalculate it at the times that a new dwarf becomes available and has no job. Even without calculating the actual path, after assigning 1-2 new dwarves at it, 9/10 dwarves would be ineligible right away due to their straight line distance already being longer then the pathing distance of the dwarf that was picked to replace the previous one, which is information that the game should know at the time or be able to determine without using many resources.
Otherwise, the game could only start the recalc thing if the dwarf with said job is still 50-100 or more tiles away.

I've had plenty of times happen where a dwarf would die on the ground after a few minutes of laying there because of the immense travel another dwarf had to do, while another dwarf with no job right next to the wounded one could have easily carried him to hospital in time, had he been given the job instead of the dwarf that still had to travel 300 or so tiles
Logged

MrWiggles

  • Bay Watcher
  • Doubt Everything
    • View Profile
Re: A bit on random injuries and general healthcare
« Reply #7 on: July 25, 2014, 12:29:03 pm »


edit: also I'm fairly sure it already does this anyway. EVEN for rock hauling and mining and such. Since generally when I designate mining and then do it again a second later, it's always that same nearby miner that spins around and goes back and does the next bit again, never the super-far-away miner (unless the first one went on break etc)
It doesn't. The Miner gets issued tile to mine out, based whatever tile is minable from the upper left corner and lowest z level. There no path calculation, as there isn't any slow down for just designation large swath of area.
« Last Edit: July 25, 2014, 01:20:38 pm by MrWiggles »
Logged
Doesn't like running from bears = clearly isn't an Eastern European
I'm Making a Mush! Navitas: City Limits ~ Inspired by Dresden Files and SCP.
http://www.bay12forums.com/smf/index.php?topic=113699.msg3470055#msg3470055
http://www.tf2items.com/id/MisterWigggles666#

Jorn Stones

  • Bay Watcher
    • View Profile
Re: A bit on random injuries and general healthcare
« Reply #8 on: July 25, 2014, 01:13:09 pm »

what he means to say is that its always the closest miner with no job that gets to mine the spot when you designate only 1 single square. with large designated areas its irrelevant though
Logged

MrWiggles

  • Bay Watcher
  • Doubt Everything
    • View Profile
Re: A bit on random injuries and general healthcare
« Reply #9 on: July 25, 2014, 01:21:45 pm »

what he means to say is that its always the closest miner with no job that gets to mine the spot when you designate only 1 single square. with large designated areas its irrelevant though
That's an illusion.
Logged
Doesn't like running from bears = clearly isn't an Eastern European
I'm Making a Mush! Navitas: City Limits ~ Inspired by Dresden Files and SCP.
http://www.bay12forums.com/smf/index.php?topic=113699.msg3470055#msg3470055
http://www.tf2items.com/id/MisterWigggles666#

GavJ

  • Bay Watcher
    • View Profile
Re: A bit on random injuries and general healthcare
« Reply #10 on: July 27, 2014, 11:21:56 am »

That's an illusion.

Uhh what?  It's not an "illusion," it happens 100% of the time, like 25 times in a row until he eventually goes to get a drink or something and another miner is the only one available.

It seems like you might be saying it's based on something other than the typical pathing algorithm (if so, it wasn't very clear, can you please rephrase? I don't know what "based whatever tile is minable from the upper left corner and lowest z level" means in terms of matching up miners and tiles).

But even if that's so, it's still true and non-illusory that the closest miner will repeatedly, reliably mine the next tile if you redesignate again while he's in the same room or similarly nearby.
Logged
Cauliflower Labs – Geologically realistic world generator devblog

Dwarf fortress in 50 words: You start with seven alcoholic, manic-depressive dwarves. You build a fortress in the wilderness where EVERYTHING tries to kill you, including your own dwarves. Usually, your chief imports are immigrants, beer, and optimism. Your chief exports are misery, limestone violins, forest fires, elf tallow soap, and carved kitten bone.