Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 6 7 [8] 9 10 ... 32

Author Topic: Dwarf Foreman 0.7.2 - Tool to automatically dispatch jobs to your workers  (Read 113002 times)

devek

  • Bay Watcher
  • [KILL_EVERYTHING]
    • View Profile
Re: Dwarf Foreman 0.5.1 - Tool to automatically dispatch jobs to your workers
« Reply #105 on: September 12, 2010, 02:20:34 pm »

One funny thing reverb, is that when a barrel or bin is first made made, it is inside of a workshop (which is a container) :P

I made an exception for bins/barrels that have 1 "item" and +0x0c is 0. I think that is good enough?

I also made it so you could count just wooden bins by doing type="bin" material="organic"

This will probably be my last bug fix release until I have the manager structure done.. I am making good progress and just need another week or so. I have other stuff going on irl :P
Logged
"Why do people rebuild things that they know are going to be destroyed? Why do people cling to life when they know they can't live forever?"

Reverb

  • Bay Watcher
    • View Profile
Re: Dwarf Foreman 0.5.1 - Tool to automatically dispatch jobs to your workers
« Reply #106 on: September 12, 2010, 02:59:16 pm »

One funny thing reverb, is that when a barrel or bin is first made made, it is inside of a workshop (which is a container) :P

I made an exception for bins/barrels that have 1 "item" and +0x0c is 0. I think that is good enough?

I also made it so you could count just wooden bins by doing type="bin" material="organic"

This will probably be my last bug fix release until I have the manager structure done.. I am making good progress and just need another week or so. I have other stuff going on irl :P

Yeah, I had suspected that but hadn't had the inclination to check that yet. I'll have to check your update out.

I'm screwing around with figuring out what dwarfs are doing when they don't have a job pointer. I found the function for generating the text description on the screen but for this, it requires executing function pointers from the various data structures it looks at. It is probably just as bad as that item description function you found except that some of the branching is hidden by say call eax branches. Thankfully it doesn't have 60+ cases to check. I'm tempted to figure out how to call those functions from my code most likely through a remote thread but I haven't quite figured out the approach I'm gonna take. Any suggestions? I know you contemplated doing this with the text descriptions of items.
Logged

devek

  • Bay Watcher
  • [KILL_EVERYTHING]
    • View Profile
Re: Dwarf Foreman 0.5.1 - Tool to automatically dispatch jobs to your workers
« Reply #107 on: September 12, 2010, 03:39:35 pm »

To run DF's code, you're going to have to inject code, and that is going to set off people's anti-virus programs.

Executing function pointers it the same problem you run into finding out the information about an item's type. If you look at dfhack's dump item code you'll see where it is actually reading the code to figure out what to do. Maybe you can adapt that to what you are doing?
Logged
"Why do people rebuild things that they know are going to be destroyed? Why do people cling to life when they know they can't live forever?"

Reverb

  • Bay Watcher
    • View Profile
Re: Dwarf Foreman 0.5.1 - Tool to automatically dispatch jobs to your workers
« Reply #108 on: September 15, 2010, 05:43:48 pm »

I'm having trouble with plaster. If you get the string for it from your util, it says "Make Plaster Powder" in the job manager. However, I come back a little bit later and it says "Reaction" and my loom will have "Reaction" in it.

Ty for the suggestion about looking at the code. The prior way of reverse engineering the idle dwarfs wasn't working so I went with what DF uses to figure out the idle count in the top corner of the screen. The functions I have had to "call" are very basic and all I need to do is check what is being moved into the accumulator. Anyways, reversing this code sucked big time but I have something that seems to be returning the correct idle numbers :P. I don't think this code is going to survive an update unless I find a way to automate the several offsets I have found :(.
Logged

devek

  • Bay Watcher
  • [KILL_EVERYTHING]
    • View Profile
Re: Dwarf Foreman 0.5.1 - Tool to automatically dispatch jobs to your workers
« Reply #109 on: September 15, 2010, 05:47:02 pm »

Ya, plaster is a custom reaction and custom reactions are implemented totally different. The next version of Foreman probably won't support them at all while I make sure I have the standard reactions right.

The good news is that .13 seems easier to decompile.
Logged
"Why do people rebuild things that they know are going to be destroyed? Why do people cling to life when they know they can't live forever?"

devek

  • Bay Watcher
  • [KILL_EVERYTHING]
    • View Profile
Re: Dwarf Foreman 0.5.1 - Tool to automatically dispatch jobs to your workers
« Reply #110 on: September 16, 2010, 03:44:53 am »

I got my stuff mostly working with .13..

I have also finished my analysis of the job structure and I am ready to implement the code for it.

DO NOT EVEN TRY TO USE CUSTOM JOBS, omg lol.

« Last Edit: September 16, 2010, 04:33:23 am by devek »
Logged
"Why do people rebuild things that they know are going to be destroyed? Why do people cling to life when they know they can't live forever?"

forsaken1111

  • Bay Watcher
    • View Profile
    • TTB Twitch
Re: Dwarf Foreman 0.5.1 - Tool to automatically dispatch jobs to your workers
« Reply #111 on: September 16, 2010, 04:38:06 am »

Would it be possible/feasible/difficult to check dwarf labors when a job is assigned and if no dwarf has the required labor, pick the one with the highest relevant skill and enable it while disabling some/all of his other labors? (probably just hauling, removing all could cause problems I suppose).
Logged

devek

  • Bay Watcher
  • [KILL_EVERYTHING]
    • View Profile
Re: Dwarf Foreman 0.5.1 - Tool to automatically dispatch jobs to your workers
« Reply #112 on: September 16, 2010, 04:46:13 am »

That would be possible with my next project, Dwarf Overlord.

Dwarf Foreman is a simple utility I plan to finish and open source soon.
Logged
"Why do people rebuild things that they know are going to be destroyed? Why do people cling to life when they know they can't live forever?"

forsaken1111

  • Bay Watcher
    • View Profile
    • TTB Twitch
Re: Dwarf Foreman 0.5.1 - Tool to automatically dispatch jobs to your workers
« Reply #113 on: September 16, 2010, 04:47:24 am »

I could see this tying together all of the 3rd party utilities. You embark and run dwarf overlord. It digs out your fortress according to a quickfort diagram, manages production according to dwarf foreman specifications, and controls labor like Dwarf Therapist.

Mmm...
Logged

devek

  • Bay Watcher
  • [KILL_EVERYTHING]
    • View Profile
Re: Dwarf Foreman 0.5.1 - Tool to automatically dispatch jobs to your workers
« Reply #114 on: September 16, 2010, 04:59:12 am »

Well, it will be a pluggable interface with triggers.

When X is true do Y.

Plugins, like a therapist plugin would add variations to X and Y. Other plugins could do things like help you designate/design your fortress. If things go well, you could even embed a visualizer such as stonesense and never have to look at the dwarf fortress screen again. I have big plans man ;)
Logged
"Why do people rebuild things that they know are going to be destroyed? Why do people cling to life when they know they can't live forever?"

devek

  • Bay Watcher
  • [KILL_EVERYTHING]
    • View Profile
Re: Dwarf Foreman 0.5.1 - Tool to automatically dispatch jobs to your workers
« Reply #115 on: September 16, 2010, 09:47:13 pm »

Ok, the next release will fully support custom reactions now.

Just need to find the material and map block vectors for .13 and I can release 0.6, whee. 0.7 will be right after, because I have half of the code done in order to do standard jobs too.

Bad news is, I am about to go on a business trip to Texas, hrm. I will bring my laptop with me and pray I have time.
Logged
"Why do people rebuild things that they know are going to be destroyed? Why do people cling to life when they know they can't live forever?"

devek

  • Bay Watcher
  • [KILL_EVERYTHING]
    • View Profile
Re: Dwarf Foreman 0.6 - Tool to automatically dispatch jobs to your workers
« Reply #116 on: September 18, 2010, 06:29:21 pm »

Made a new release. This one fully supports custom reactions using the raw name for the reaction. Even ones you modded in yourself :D

This version doesn't support .13, and will possibly be the last version to support .12. I'm going to track a lot of new offsets for the next version of Foreman.

Would be nice if someone could test the custom reactions code, I found a crash somewhere in there(when you remove the manager job based off a custom reaction completely) but I never could reproduce it. If you can figure out a way to cause it, you get one free Internet.

Logged
"Why do people rebuild things that they know are going to be destroyed? Why do people cling to life when they know they can't live forever?"

forsaken1111

  • Bay Watcher
    • View Profile
    • TTB Twitch
Re: Dwarf Foreman 0.6 - Tool to automatically dispatch jobs to your workers
« Reply #117 on: September 18, 2010, 06:31:45 pm »

Now that therapist and foreman are updated for .13 I am actually moving to it. Will report any problems I find.
Logged

devek

  • Bay Watcher
  • [KILL_EVERYTHING]
    • View Profile
Re: Dwarf Foreman 0.6 - Tool to automatically dispatch jobs to your workers
« Reply #118 on: September 18, 2010, 06:38:15 pm »

Maybe I wasn't clear, I don't support .13 yet.

The next version will.. I was just dumping my old code before I totally abandoned .12 :P
Logged
"Why do people rebuild things that they know are going to be destroyed? Why do people cling to life when they know they can't live forever?"

forsaken1111

  • Bay Watcher
    • View Profile
    • TTB Twitch
Re: Dwarf Foreman 0.6 - Tool to automatically dispatch jobs to your workers
« Reply #119 on: September 18, 2010, 06:39:59 pm »

Maybe I wasn't clear, I don't support .13 yet.

The next version will.. I was just dumping my old code before I totally abandoned .12 :P
Yeah I misread that, sorry. I was all excited too.  ???
Logged
Pages: 1 ... 6 7 [8] 9 10 ... 32