DFHack / dfhack

Memory hacking library for Dwarf Fortress and a set of tools that use it
Other
1.88k stars 478 forks source link

prevent manager from dispatching jobs to w-shops where jobs cannot be done due to profile limitations/linked stockpiles #745

Open legolegs opened 9 years ago

legolegs commented 9 years ago

There are two issues to be fixed with proposed plugin:

  1. When player requests via manager to make (for example) 30 swords the jobs will be split across all forges including those which through Profile being assigned to specific dwarfs with weaponsmiting labor disabled. Those jobs will never done nor canceled, forge will be unusable for assigned dwarfs. Manager should skip such workshops.
  2. When player requests 30 bronze helms jobs are split across all forges including ones which linked to a bar/block storage with only steel allowed. Those jobs will get canceled with announcement 'not enough bronze' very soon, then get reassigned, canceled and so on until some other forge not finished them all. Manager should skip such workshops.

I'm intend to take care of it myself since I am programmer, but I never hacked dfhack before and never did revers engineering/decompiling so I will accept any help and good advices.

quietust commented 9 years ago

The manager is internal to DF itself and cannot be hooked by DFHack - the best we could do would be to periodically check all workshops for inappropriate manager-created jobs and then try to transfer them to more adequate buildings (or just cancel them).

legolegs commented 9 years ago

The game marks jobs which were created by manager. Can we move those marks
as well with jobs? Also, where I should look for dfhack api or documentation if any?

expwnent commented 9 years ago

https://dfhack.readthedocs.org/en/stable/

Also try browsing the xml files in df-structures.

PeridexisErrant commented 8 years ago

Is this still a problem in DF 0.43, with the upgraded manager?