Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Workorder limit?  (Read 935 times)

Showbiz

  • Bay Watcher
    • View Profile
Workorder limit?
« on: February 19, 2016, 07:09:26 am »

Whats the reason for the workorder limitation? Of course you can make more items than that by making another workorder, but isn't it a unnecessary circumstance?
Logged
Pardon for my mistakes
english isn't my native language

malvado

  • Bay Watcher
    • View Profile
Re: Workorder limit?
« Reply #1 on: February 19, 2016, 09:48:19 am »

I guess you mean the 30 items restrictions?
I feel the same way , specifically when you are making clothing for over 200 dwarves...
Logged

Chief10

  • Bay Watcher
  • since 31
    • View Profile
Re: Workorder limit?
« Reply #2 on: February 24, 2016, 12:12:19 am »

I don't actually know, but I'm fairly certain it has something to do with efficiently allocating memory to that task.
For example, perhaps it would require using extra bits/bytes to store a number larger than 32 (2^5), and Toady didn't want to implement that in his code, or else it would just be another drag on FPS. And perhaps he chose to round down to 30, because 32 would feel even more arbitrary.

I'm sure someone with more programming knowledge than I could give you a better explanation.
Logged

Solra Bizna

  • Escaped Lunatic
    • View Profile
Re: Workorder limit?
« Reply #3 on: February 24, 2016, 01:42:23 am »

DFHack has a plugin which removes that limit, with no visible negative effect. I think the limit made more sense in a much earlier version, and has been left in because Toady hasn't touched that code recently. A recent devlog mentioned he was working on code in that area... maybe it'll go away soon?
Logged

Starver

  • Bay Watcher
    • View Profile
Re: Workorder limit?
« Reply #4 on: February 25, 2016, 07:51:30 am »

Not that I think this was (or still is) the case, but the theoretically "five bits for 32 options, minus two for rounding" could be explained by that being 0..31, with zero not being useful and "31" perhaps being reserved for the "Repeat" functionality.  (Maybe zero could have been/was reserved for Repeat, unless that clashed with the "while (number--) do job"-style low-level functionality, but 30 is a better round-down top limit than 31, anyway.)

30 is a funny limit, though.  It proximity to a power-of-two looks stronger than its selection as a simple-multiple-of-a-power-of-ten.  I actually like to work in 25s, a lot of the time (exactly four to each full hundred, if I'm dealing with triple-figure requirements), but I'm not too fussed at using anything to override the imposed limit...
Logged