Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Rule-based stockpiles  (Read 813 times)

Sergius

  • Bay Watcher
    • View Profile
Rule-based stockpiles
« on: February 25, 2010, 12:46:38 pm »

I think an interesting change to how stockpiles work is, instead of turning stuff on and off, adding rules.
Normally, what you do now is make a stockpile, turn on "weapons", remove all weapons except for example, warhammer, make sure only "silver" is turned on, and then remove all the qualities except for "standard", if you wanted for example a stockpile that only had standard silver hammers for training.

But what if you also wanted to have the same stockpile accept battle axes and picks of any metal and quality? You'd have to make a second stockpile. Now, this is not such a big deal, but maybe it would be nice to have the option to add several different kinds of items in the same category.

In the proposed system, you "add" a rule, and it goes into some list. For instance, you add a rule that says "category: weapons, items: battle axes and picks, metal: all, quality: all", then add a second rule that says "category: weapons, items: warhammer, metal: silver, quality: standard". The selection screen would be pretty much the same as the current stockpile screen, except that you can't activate multiple categories.

An option to allow mixing items from different rules in the same bins could be helpful too, but that's another matter.

Opinions? In a way, this would be like having overlapping stockpiles.
Logged

profit

  • Bay Watcher
  • Finely Crafted Engravings... Or it didn't happen.
    • View Profile
Re: Rule-based stockpiles
« Reply #1 on: February 25, 2010, 04:19:55 pm »

I can see VERY specific instances this could be used in... However, it would add a lot of complexity to an already complex task.

I can think of a way to implement this in the interface...  But it would be one more Gotcha for new players.. in a game I am sure needs no more.

Logged
Mods and the best utilities for dwarf fortress
Community Mods and utilities thread.

Sergius

  • Bay Watcher
    • View Profile
Re: Rule-based stockpiles
« Reply #2 on: February 25, 2010, 04:43:08 pm »

I can see VERY specific instances this could be used in... However, it would add a lot of complexity to an already complex task.

I can think of a way to implement this in the interface...  But it would be one more Gotcha for new players.. in a game I am sure needs no more.



We could keep the default behaviour that one category = one rule and have them all displayed in the screen, but we could be able to use each category more than once, maybe with a hotkey, and a way for the game to show that such an option is being used.
Logged

darkrider2

  • Bay Watcher
    • View Profile
Re: Rule-based stockpiles
« Reply #3 on: February 25, 2010, 06:19:15 pm »

Well the main reason you can't make a stockpile that accepts everything but only accepts silver warhammers is because the stockpile options only have two tiers.

stockpile type -> type/material/quality


Type and material are both on the same tier so every material selected applies to every type selected.

You could do what you wanted if you were able to change it to something like.

stockpile type -> type -> material -> quality

This has the advantage of you being able to select what materials the stockpile will accept for that type of item. But say if you want to accept only high quality items... you would have to go into each type and material for that type and change the quality... that's thousands of menu's.

So I propose you be able to change the priority in game... so if you wanted to only accept high quality goods and all warhammers must be silver you could change it to...

stockpile type -> type/quality -> material

Notice type and quality are on the same tier.
Logged

lucusLoC

  • Bay Watcher
    • View Profile
Re: Rule-based stockpiles
« Reply #4 on: February 25, 2010, 07:36:20 pm »

you could also set the tier for a condition yourself, so you could define (quality(x)->weapons->silver)+(furniture->[stone->quality(y)]^[metal->quality(z)]) for maximum control.

the question is why would you want to?

i think what we need are stockpile templates, with the ability to apply multiple templates to a single stockpile. you do not need to change the current stockpile menu at all.

when you query a stockpile you would see:

Code: [Select]
--stockpile x--
templates applied:
-stone furniture
-decorated trinkets
-narrow clothing
-masterwork microline flutes
templates excluded:
-masterwork olivine grates
-silver items

each one of these could be entered and edited individually, just like it was a single stockpile. order of operation would be add together all applied first, then subtract all excluded.

perfect control of stockpile contents with our current system, with the added benefit of having stockpile templates (for even better control allow templates to reference templates.)


Logged
Quantum dumps are proof of "memory" being a perfectly normal dimension in DF. ~Gazz

Rafal99

  • Bay Watcher
    • View Profile
Re: Rule-based stockpiles
« Reply #5 on: May 10, 2010, 02:50:53 pm »

I have just noticed that I made a very similar suggestion without ever seeing this thread, until now. Here is my thread if anyone is interested: http://www.bay12forums.com/smf/index.php?topic=51238.msg1094103#msg1094103.
Logged
The spinning Tantrum Spiral strikes The Fortress in the meeting hall!
It explodes in gore!
The Fortress has been struck down.