Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Idea about hospitals claiming all cloth  (Read 1224 times)

Tovical

  • Bay Watcher
    • View Profile
Idea about hospitals claiming all cloth
« on: June 08, 2013, 09:13:37 am »

I apologize in advance if this issue has already been resolved or worked on somewhere; I've tried searching the bug tracker (and various searches in Google) but I'm afraid when it comes to searches like this I sometimes don't do very well. Also - this is not a bug report, merely a note about the issue and perhaps what could be causing it.

At any rate, I've had a problem where hospitals seem to claim all cloth, preventing Clothiers from making clothing. My searches indicated that others have had this problem, too. I tried one of the workarounds I found - since there seem to be issues with bins in general and one of the suggestions was to set a cloth stockpile with no bins allowed, that is what I did. This works (so far, at any rate), which gave me a thought.

What if hospitals are claiming all cloth (instead of their set limit) because they are claiming individual pieces of cloth from stacks in bins, which is somehow resulting in the entire bin being claimed?
Logged

fricy

  • Bay Watcher
  • [DFHACK:ZEALOT]
    • View Profile
Re: Idea about hospitals claiming all cloth
« Reply #1 on: June 08, 2013, 10:01:36 am »

Use this version if you want to play with the least ammount of bugs.

http://www.bay12forums.com/smf/index.php?topic=126076.0

Tovical

  • Bay Watcher
    • View Profile
Re: Idea about hospitals claiming all cloth
« Reply #2 on: June 08, 2013, 10:47:18 am »

Many thanks :D I was already using LNP, but this version looks like it is much more than what I have now. Definitely going to check this out.
Logged

laularukyrumo

  • Bay Watcher
  • Needs More Socks
    • View Profile
Re: Idea about hospitals claiming all cloth
« Reply #3 on: June 08, 2013, 12:39:15 pm »

I'm also fairly sure we already nailed down the cause of that bug. Namely, when a hospital zone has less cloth than the desired amount, it's supposed to generate one "get cloth" job for each chunk of cloth it's missing. But what happens is that it generates one job, for each missing cloth, for each dwarf. Needless to say, this causes the hospital to overstock like crazy.
Logged
Quote from: Dwarfotaur
Everytime one of my militia has given birth in the Danger Room, it's lead to instant baby smoothies for everyone.

Gotta Catch 'Em All!

Dat Sig Thread

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: Idea about hospitals claiming all cloth
« Reply #4 on: June 08, 2013, 04:18:53 pm »

You're both wrong - the actual reason is described here and is backed by analysis of a disassembly of the relevant code. There's even a binary patch to fix the problem on both Windows and Linux.
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

Garath

  • Bay Watcher
  • Helping to deforest the world
    • View Profile
Re: Idea about hospitals claiming all cloth
« Reply #5 on: June 09, 2013, 02:52:09 am »

Well, I don't understand the specifics, but I'll remember it from now on. Thanks
Logged
Quote from: Urist Imiknorris
Jam a door with its corpse and let all the goblins in. Hey, nobody said it had to be a weapon against your enemies.
Quote from: Frogwarrior
And then everyone melted.

Garun

  • Bay Watcher
    • View Profile
Re: Idea about hospitals claiming all cloth
« Reply #6 on: June 09, 2013, 07:36:36 am »

You're both wrong - the actual reason is described here and is backed by analysis of a disassembly of the relevant code. There's even a binary patch to fix the problem on both Windows and Linux.

How do we find out how to install those binary patches?
Logged

fricy

  • Bay Watcher
  • [DFHACK:ZEALOT]
    • View Profile
Re: Idea about hospitals claiming all cloth
« Reply #7 on: June 09, 2013, 08:10:45 am »

How do we find out how to install those binary patches?

Just download the LNP I linked above, it has all the binary patches, plugins, utilities, etc.

Garun

  • Bay Watcher
    • View Profile
Re: Idea about hospitals claiming all cloth
« Reply #8 on: June 10, 2013, 05:08:06 am »

How do we find out how to install those binary patches?

Just download the LNP I linked above, it has all the binary patches, plugins, utilities, etc.

What if I just want to patch my current game and keep my current world, current texture packs and my preferences edited into my init files all intact instead of dealing with downloading a separate version? Basically, what file do I have to edit to add in the patches, if this is possible?
Logged

Niveras

  • Bay Watcher
    • View Profile
Re: Idea about hospitals claiming all cloth
« Reply #9 on: June 10, 2013, 05:47:27 am »

Likely you can download the LNP and just use the program files (basically anything that's not in the /data or /raw folders), with your previous fort supplying the rest. (A new DF folder, with the update program and your old info, I don't recommend copying the update program into your current DF folder, for backup purposes).

You could probably get away with a lot less than that (like just the .exe itself) but copying everything else just covers more bases.

In theory this should work fine, unless there are some other binary updates included in the LNP that required updates to raws, which seems doubtful but nonetheless possible.

Actually, you should probably just wait for someone who knows more than I do to instruct you in a clean update.
Logged

andrewas

  • Bay Watcher
    • View Profile
Re: Idea about hospitals claiming all cloth
« Reply #10 on: June 10, 2013, 07:19:07 am »

What if I just want to patch my current game and keep my current world, current texture packs and my preferences edited into my init files all intact instead of dealing with downloading a separate version? Basically, what file do I have to edit to add in the patches, if this is possible?

You have to edit Dwarf Ffortress.exe itself.

You could use a HEX editor and apply the patch by hand, but if you don't know the patch format it will be easier to google for a binary patch tool, or use the .exe from the LNP which includes this and some other bugfixes.
Logged

Garun

  • Bay Watcher
    • View Profile
Re: Idea about hospitals claiming all cloth
« Reply #11 on: June 11, 2013, 02:29:06 am »

You think all I need to do is copy the .exe over and nothing else? I wonder why someone hasn't already fixed this and made a widely accessible patched file for the majority to use...
Logged

vanatteveldt

  • Bay Watcher
    • View Profile
Re: Idea about hospitals claiming all cloth
« Reply #12 on: June 11, 2013, 04:57:26 am »

dfhack has a binpatch command which I use since I've not figured out how to really binpatch stuff on linux:

binpatch apply hospital-overstocking

(mind, I've not tested whether this actually works, but it doesn't give an error message :-))
Logged