Dwarf Fortress > DF Suggestions

On Req70 and Req112

(1/1)

Sean Mirrsen:
This has been discussed at various times before, and even my view was probably mentioned, but I'll still post it. Partly to claim the view as mine, partly to actually suggest this course of action.Item stack splitting.The Req112 entry is about "faux" stacks that would stack non-identical items. I am of the opinion that there need not be any "stacks" per se, other than an interface-level pointer to an array of objects. Thus, the actual objects will always be separate - there will be no need to "split" or "reform" stacks, and similar objects will be groupable by any trait, similar to list contraction by specific parameters.
The only other prerequisite to this design is allowing AI creatures to haul multiple items. I see no major flaws in this, except maybe a performance decrease from having to keep track of a lot of objects rather than one.

PTTG??:
While I don't understand the technicalities behind most of what you said, I must agree that 'stacking' is the biggest issue with DF today. We need a comprehensive system to tie all the loose ends of the current setup. For instance, an adventurer should not be able to hold a 'stack' of 100 arrows in one hand. In the same vein, dwarven marksmen should not go into battle as readily with one bolt as with 100.That said, it seems that making dwarves re-stack items or collect many loose items in one trip is a non-trivial task, partially because of the way jobs are created and ordered.

Sowelu:
The performance hit of several thousand piles of coins is not negligible; it can be huge.  True stacking of identical items is important because of this.  Lots of people avoided the economy largely because of this issue.  Also, true stacking of identical items should be painfully easy, once faux stacks are in:  "Here's 10 +wooden arrows+.  Here's 6 *bone arrows*.  Here's 4 more +wooden arrows.  Oh hey, I might as well combine the first and third, by adding their quantities!"The AI of dealing with multiple items is really the hard part, once you get past the trivial cases (like combining coins that just get dumped in a coffer--not much thought there).

Sean Mirrsen:
Oh well. I guess that's what's called optimization.  :)It just bugs me too much for such a simple-seeming easy-to-fix issue.  :p

Draco18s:
quote:Originally posted by Sean Mirrsen:
<STRONG>Oh well. I guess that's what's called optimization.   :)</STRONG>Yes, it is code optimizing, however, one does not do that with creating linked lists instead of adding large large sections of code to deal with using an integer.The "large code" might make the overall process run slower, but due to the absense of the giant linked list (coins come in stacks of 500, that's 500 linked list items[/i]) the overall performace is significantly increased.Besides, the best advantage of linked lists is the ability to move from one node to the next.  As far as I know, DF doesn't need the ability to move from one arrow or coin to the next (and no random access!).  All we need is a pile, we don't--as a player--care what's in the pile until we reach in and pull out a single item (in this respect, I might care what quality my arrows are, but not what kind of wood their made out of).

Navigation

[0] Message Index

Go to full version