DFHack / dfhack

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

Tool for ensuring all squad members can have bolts #3247

Open myk002 opened 1 year ago

myk002 commented 1 year ago

The problem is that DF allocates 250 bolts per squad. For a squad of 10, this means 25 bolts per member. This is "perfect", but it doesn't always work out right. If some members pick up a stack of bolts larger than 25, or if they have additional loose bolts in their inventories, then the last N squad members can't pick up any bolts.

Not sure exactly what the best way to fix this is, but I'm sure we can do something.

Automatically increase the number of bolts associated with the squad? Split stacks in inventories so max stack size is 25 and force them to drop the extras?

silverflyone commented 1 year ago

@myk002 I've put the max stack size for ammo to be 25 in combine. However, if an existing stack size is greater than this, then it uses that as the max. It may be possible to enforce a hard limit for ammo.

The implication is that combine would perform a split stack function; opposite of the intended function. So, an option to control this may be needed; --enforce-stack-max. This could then be applied to all types in the command line.

wdyt?