Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 [3] 4 5

Author Topic: [Prealpha] Dwarfvet - Working Animal Caretakers  (Read 17096 times)

NCommander

  • Bay Watcher
  • Dwarven Military Master
    • View Profile
    • SoylentNews

Nice!

Your video raised a couple questions for me.

The hospital zone has no beds, and I know you said that if an animal lands in a bed that causes problems for the plugin. But in order to care for dwarves properly, there need to be beds. So, is there a good way to prevent animals from landing on bed squares? It looked like they were heading for the top left of the hospital zone - was that coincidence, or would the bed problem be solved just by leaving a space for animals in the top left of every hospital zone?

As best I can tell, Dwarves only path into beds into a hospital. They won't go if there are none as best I can tell. If they end up resting in a hospital zone (i.e. beating/hammering), then it doesn't matter. When I make the animal hospital logic less stupid, it should handle stuff like beds in the room and make sure animals don't go there

Quote
Secondly, do injured animals get food & water from dwarves with the feed/water patients labor?

Animals never get thirsty. As for food, not automatically. I need to see if a manually created "Give Food" job will do the trick.

Quote
Third, have you tried this with animals that are pets, and does that make a difference?

Works fine for pets as best I can tell.

EDIT: worse case scenario, I can have the plugin look at dwarves, and their flags to send them to non-pet hospitals. I already have the infrastructure in place for this, it would just require a minor modification to track people hospitals. May be worth doing since I can catch things like dwarves stuck in traction benches and autofree them by moving their position one away.
« Last Edit: April 27, 2015, 05:37:30 pm by NCommander »
Logged
Quote from: TheFlame52
Fucking hell man, you aren't just getting the short end of the stick, you're being beaten with it.
Quote from: NRDL
Is your plan really to flush water into hell, and have the CARP marines fight them without threat of flame or disease?  If so, you are awesome, and one of the greatest DF military visionaries I've seen yet ( not that I've seen that many, or any, for that matter )

TheFlame52

  • Bay Watcher
  • Certified geezer & only man to win 0.40.24
    • View Profile

Actually, animals already get fed by dwarves, so you don't need to do that.

Button

  • Bay Watcher
  • Plants Specialist
    • View Profile

Actually, animals already get fed by dwarves, so you don't need to do that.

Unless something changed quite recently, pets are the only aminols that get fed, and only by their owners, and only if the owner isn't busy - it's a very low-priority job.
Logged
I used to work on Modest Mod and Plant Fixes.

Always assume I'm not seriously back

NCommander

  • Bay Watcher
  • Dwarven Military Master
    • View Profile
    • SoylentNews

Update, so I managed to clean up the cleanup code, and things properly deallocate now (the STL sucks, just for the record). Need to handle logic regarding stuff in a hospital so animals don't get placed on top of furniture or such.
Logged
Quote from: TheFlame52
Fucking hell man, you aren't just getting the short end of the stick, you're being beaten with it.
Quote from: NRDL
Is your plan really to flush water into hell, and have the CARP marines fight them without threat of flame or disease?  If so, you are awesome, and one of the greatest DF military visionaries I've seen yet ( not that I've seen that many, or any, for that matter )

PeridexisErrant

  • Bay Watcher
  • Dai stihó, Hrasht.
    • View Profile
Re: !!SCIENCE!! - Working Animal Caretakers! (Now Reproducable On Demand)
« Reply #34 on: April 28, 2015, 06:53:24 pm »

PTW, since FOSS embodies the ideals of the Sunshine Regiment.
Logged
I maintain the DF Starter Pack - over a million downloads and still counting!
 Donations here.

NCommander

  • Bay Watcher
  • Dwarven Military Master
    • View Profile
    • SoylentNews
Re: !!SCIENCE!! - Working Animal Caretakers! (Now Reproducable On Demand)
« Reply #35 on: April 28, 2015, 09:10:43 pm »

PTW, since FOSS embodies the ideals of the Sunshine Regiment.

You sir, get a donut on behalf of General Chaos.

I hit an unfortunate snag. It seems Dwarf Fortress's internal building structures are not properly set on save/reload. Theoretically, all buildings have five attribute, their z level, x1, y1, which denotes the upper left hand corner, and x2, y2 which denotes the lower right hand corner. On save/reload, these values get bugged for activity zones under some circumstances:

The loom and activity zone report as following, but in game, the activity zone
Code: [Select]
Building 47 - "Zone" - type Civzone (30), at x1: 104, x2: 114, y1: 44, y2: 64, z: 168, subtype ActivityZone (9), room
Building 51 - "Loom" - type Workshop (13), at x1: 104, x2: 106, y1: 62, y2: 64, z: 168, subtype Loom (16)

Replacing the zone with the same exact coords gives us this:
Code: [Select]
Building 53 - "Zone" - type Civzone (30), at x1: 104, x2: 114, y1: 44, y2: 61, z: 168, subtype ActivityZone (9), room

Strangely THIS zone survives just fine. I don't know what is causing this bug to occasionally crop up, nor am I sure what I can do to work around it. I can't reliably detect the condition so I can't easily fix it :(. I'll have dwarfvet post a message if it detects this condition, and suggest that you remove and recreate the animal hospital.


Logged
Quote from: TheFlame52
Fucking hell man, you aren't just getting the short end of the stick, you're being beaten with it.
Quote from: NRDL
Is your plan really to flush water into hell, and have the CARP marines fight them without threat of flame or disease?  If so, you are awesome, and one of the greatest DF military visionaries I've seen yet ( not that I've seen that many, or any, for that matter )

NCommander

  • Bay Watcher
  • Dwarven Military Master
    • View Profile
    • SoylentNews

This should be in a state enough that anyone who can compile DFHack is welcome to alpha test it. This is nowhere near done, and just remains proof of concept, but I want more feedback on seeing how animals run through the healthcare system.

https://github.com/NCommander/dfhack-dwarfvet

Usage instructions are simple:
1. Compile my branch of DFHack. I've only tested it on Linux with GCC 4.9, but it SHOULD compile just fine on Mac/Windows. I can get on Windows easily enough to test. I'm not going to post binaries, but others can if they wish. If you want me to fix bugs, a save game MUST be provided; I will ignore bug reports without it unless its really trivial.
2. Type "dwarfvet enable" in the DFHack window to activate it
3. Designate an animal hospital (activity zone with animal training+hospital enabled).
4. Set the Animal Caretaker labor on someone
5. Let your war dogs get injured or something.
6. Report bugs.

Known Limitations/Bugs:
1. Don't resize your hospital. If you need to, deactive it for, and wait for dwarfvet to notice, resize, and reactivate. You may get weird behavior if you do this if you have patients.
2. Dwarfvet currently doesn't look for inaccessible spots or anything. Use a square, empty room for the time being. Cabients/bags SHOULD be ok since they are passable but you might get bit by the stuck bug.
3. Animals request traction; unknown if they can be placed in traction.
4. Animals (potentially) can request crutches
5. The 700 LoC initial implementation has been know to make small children, big children, and MFC programmers explode into flames.
6. If you build a debug version (recommended), provide GDB traceback with your crashes. I got as many as I found and it hasn't crashed on me recently, but if it corrupts your save file or something, well, its a bloody alpha.
7. The plugin is a bit chatty, I haven't removed all the debug messages out of it yet.

To be implemented:
1. Revamp recovery AI to get animals on the fly.
2. Revamp dwarf AI to be more reliable
3. Walk the health history struct, and retroactively grant animal caretaker experience (if anyone wants to use this plugin to train up a doctor, I want everyone in their for to know that their "doctor" learned their trade by cutting up animals and thus is Ranger green instead of noble purple)
Logged
Quote from: TheFlame52
Fucking hell man, you aren't just getting the short end of the stick, you're being beaten with it.
Quote from: NRDL
Is your plan really to flush water into hell, and have the CARP marines fight them without threat of flame or disease?  If so, you are awesome, and one of the greatest DF military visionaries I've seen yet ( not that I've seen that many, or any, for that matter )

TheFlame52

  • Bay Watcher
  • Certified geezer & only man to win 0.40.24
    • View Profile
Re: [Prealpha][Source Available] - Working Animal Caretakers
« Reply #37 on: April 29, 2015, 09:33:55 am »

Thanks! Next time my GCS get their chitin cracked, my two legendary docs can patch them up!

endlessblaze

  • Bay Watcher
  • likes dragons for their fiery breath
    • View Profile
Re: [Prealpha][Source Available] - Working Animal Caretakers
« Reply #38 on: April 29, 2015, 09:45:23 am »

We need to call toady and see if he can streamline, adapt, and implement this into vinnila.

It could help with the bed issues.
Logged
Kids make great meat shields.
I nominate endlessblaze as our chief military executive!

TheFlame52

  • Bay Watcher
  • Certified geezer & only man to win 0.40.24
    • View Profile
Re: [Prealpha][Source Available] - Working Animal Caretakers
« Reply #39 on: April 29, 2015, 10:05:35 am »

Do I just hit download zip? Github has so many buttons.

BoredVirulence

  • Bay Watcher
    • View Profile
Re: [Prealpha][Source Available] - Working Animal Caretakers
« Reply #40 on: April 29, 2015, 10:40:01 am »

Do I just hit download zip? Github has so many buttons.
If you've got git, which I'm doubting

*open terminal*
cd /SOME_APPROPRIATE_DIRECTORY/
git clone https://github.com/NCommander/dfhack-dwarfvet.git


Having not looked at it, you will have to compile dfhack. Thats going to be more difficult, and at least will require downloading dfhack source too, so...
git clone https://github.com/DFHack/dfhack.git

Hope there is a make file in there.
Logged

TheFlame52

  • Bay Watcher
  • Certified geezer & only man to win 0.40.24
    • View Profile
Re: [Prealpha][Source Available] - Working Animal Caretakers
« Reply #41 on: April 29, 2015, 10:50:18 am »

There isn't a way I can just download the plugin? Damn.

Actually I do have Git and I've written several pieces of code for a game called Cataclysm DDA. But they had a bot that did the compiling and all that for them.

BoredVirulence

  • Bay Watcher
    • View Profile
Re: [Prealpha][Source Available] - Working Animal Caretakers
« Reply #42 on: April 29, 2015, 11:13:33 am »

There isn't a way I can just download the plugin? Damn.

Actually I do have Git and I've written several pieces of code for a game called Cataclysm DDA. But they had a bot that did the compiling and all that for them.

I'm not familiar with the dfhack source. Its common for projects to have a make file, and sometimes compiling is just as easy as typing "make"
But there are probably dependencies (I'm not looking at the project) that you would have to acquire. There are typically instructions for compilation in the readme, which should be displayed on the main page for dfhack on github. If anything, take a look, it might not be too difficult.

Edit:
Having only glanced at the Compile.html, it uses cmake. If your using linux, it should be easy, just install its list of dependencies and follow the instructions for cmake. cmake is generally a good thing.
« Last Edit: April 29, 2015, 11:18:38 am by BoredVirulence »
Logged

NCommander

  • Bay Watcher
  • Dwarven Military Master
    • View Profile
    • SoylentNews
Re: [Prealpha][Source Available] - Working Animal Caretakers
« Reply #43 on: April 29, 2015, 02:14:37 pm »

I'm not posting binaries because its still very pre-alpha. I will once I have the internal behaviors set and finalized. This is mostly to make sure that someone else can pick up from where I left off if I get hit by a bus.
Logged
Quote from: TheFlame52
Fucking hell man, you aren't just getting the short end of the stick, you're being beaten with it.
Quote from: NRDL
Is your plan really to flush water into hell, and have the CARP marines fight them without threat of flame or disease?  If so, you are awesome, and one of the greatest DF military visionaries I've seen yet ( not that I've seen that many, or any, for that matter )

NCommander

  • Bay Watcher
  • Dwarven Military Master
    • View Profile
    • SoylentNews
Re: [Prealpha][Source Available] - Working Animal Caretakers
« Reply #44 on: April 29, 2015, 08:55:12 pm »

*sigh*, I changed my mind; I'm going to compile binaries for DFHack, I need people to test this more easier; the overlap detector is basically set. I still need to rewrite the AI though, but I'm struggling to work on this without feedback and need to make sure I don't burn out. I'll update the main post as soon as its ready.
Logged
Quote from: TheFlame52
Fucking hell man, you aren't just getting the short end of the stick, you're being beaten with it.
Quote from: NRDL
Is your plan really to flush water into hell, and have the CARP marines fight them without threat of flame or disease?  If so, you are awesome, and one of the greatest DF military visionaries I've seen yet ( not that I've seen that many, or any, for that matter )
Pages: 1 2 [3] 4 5