Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 [3] 4 5

Author Topic: Plugin to add alternative stocks interface, with an easier to search list  (Read 26400 times)

falconne

  • Bay Watcher
    • View Profile

Bug found! It seems to reveal hidden thiefs/snatchers etc. ie search for Large on the stocks screen and see what pops up ;p

Thanks, I hadn't thought of that. Just uploaded a new version with that fixed; it now ignores items in the inventory of a unit with the Thief or Master Thief profession. Of course this would ignore the items even when the thief is discovered, but I think that's ok for now. If the thief is killed obviously the items would show up.

In fact the plugin should probably ignore any item not carried by a citizen. I will do that in the next version.
Logged
Utility plugins for DFHack, for improving Dwarf Fortress' user interface.

robertheinrich

  • Bay Watcher
    • View Profile

In fact the plugin should probably ignore any item not carried by a citizen. I will do that in the next version.

Up to you to decide, but I think it should show items carried by non-citizens who are inside cages. That would allow to mark their weapon and/or armor for dumping which you usually do if you intend to use captured invaders as training dummies for your military. And maybe the case where you have a goblin snatcher who is carrying a baby in his bag (I'm not sure if dumping the bag would release the baby, I tend to pit and kill thieves and snatchers since they will escape from cages after a while).

Edit: Oh, and maybe add filters to show only weapons / armor / clothing. There are appropriate functions in the item class which you can call for that so it won't be that much work to detect these types.
« Last Edit: April 25, 2013, 08:37:35 am by robertheinrich »
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist

Probably shouldnt show any upright-weapon that is blue and has a glowing floor next to it either.
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

falconne

  • Bay Watcher
    • View Profile

I've just uploaded a new version that filters out items on any uncaged invader (non-citizen). There's now a new flag to mark items on units that are in cages; you can also search for the keyword "caged" to narrow the list down to just these items, so you can easily dump weapons and armour off caged prisoners.

Edit: Oh, and maybe add filters to show only weapons / armor / clothing. There are appropriate functions in the item class which you can call for that so it won't be that much work to detect these types.

It would be easy enough to do so, but I think the screen is currently too complex already. My aim was to make a simpler stocks screen. I think a future version could support categories, but what I might do to keep the screen clean is to allow the right hand panel to be switched to a secondary "category" mode.

Probably shouldnt show any upright-weapon that is blue and has a glowing floor next to it either.

I didn't understand the reference... that might be an area of the game I haven't encountered yet? Unfortunately my experience with actually playing the game is a bit limited :)
Logged
Utility plugins for DFHack, for improving Dwarf Fortress' user interface.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist

Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

falconne

  • Bay Watcher
    • View Profile

Ah I see. Well, the plugin ignores anything on any unrevealed map tile... so I think this wouldn't show up in the list until you actually get there yourself?
Logged
Utility plugins for DFHack, for improving Dwarf Fortress' user interface.

robertheinrich

  • Bay Watcher
    • View Profile

Edit: Oh, and maybe add filters to show only weapons / armor / clothing. There are appropriate functions in the item class which you can call for that so it won't be that much work to detect these types.
It would be easy enough to do so, but I think the screen is currently too complex already. My aim was to make a simpler stocks screen. I think a future version could support categories, but what I might do to keep the screen clean is to allow the right hand panel to be switched to a secondary "category" mode.

Fair enough, especially given the amount of categories. What about sorting the stock list by categories? After all, that's what the vanilla stocks UI does as well. Being able to search for strings already helps a lot to filter out anything which you don't want to see, but some items have a general category like "clothing" and lots of subtypes so it's still a bit tedious to check if you have enough in stock for all your dwarves; that's why I suggested that.
Logged

falconne

  • Bay Watcher
    • View Profile

Fair enough, especially given the amount of categories. What about sorting the stock list by categories? After all, that's what the vanilla stocks UI does as well. Being able to search for strings already helps a lot to filter out anything which you don't want to see, but some items have a general category like "clothing" and lots of subtypes so it's still a bit tedious to check if you have enough in stock for all your dwarves; that's why I suggested that.

Sorting would come for free if I add category filtering support, but until then is there any point to having the main list sorted? You'd never be able to scroll through that anyway, so you'll always have to type in a search, which means it will always be a specific item type listed.

Also, how much use is there in practice for categories? It's probably due to my limited play experience, but I never found a need to see all the "clothes" in the fort, or all the "weapons". To see if you have enough spare clothes you still have to count every type individually... and when I checked for weapons I cared about specific weapons, such as checking for spare crossbows, not all weapons.

One category that I can see a use for is "Crafts", as the only thing you'd want to do with them is mark them for trade.
Logged
Utility plugins for DFHack, for improving Dwarf Fortress' user interface.

COMMOFDOOM

  • Bay Watcher
    • View Profile

Great plugin but i was only drawn in because i misread the title as "alternative socks interface" and was extremely interested.
Logged

ArPharazon

  • Bay Watcher
    • View Profile

Great plugin!

However, for me the suggested keybind didn't seem to work: Just Z works (so I get taken into the stocks screen instead of the status) but variants of Z like shift and ctrl don't seem to do anything. If I use G instead of Z everything is fine.

In any case, I solved the problem by assigning
Code: [Select]
keybinding add Z@overallstatus "stocks show"This way I can press z twice and go straight to the stocks. I'm not very familiar with keybinding, so I'm not sure if there are any nasty side effects, but looks like the context correctly limits it.

Also, is it possible to group together items with identical names, like the, uh, stock stocks screen? So that for instance, when I search for "spawn" it will display "plump helmet spawn x6" and "dimple cup spawn x2"?
Logged

lightrow

  • Bay Watcher
    • View Profile

Great plugin!

However, for me the suggested keybind didn't seem to work: Just Z works (so I get taken into the stocks screen instead of the status) but variants of Z like shift and ctrl don't seem to do anything. If I use G instead of Z everything is fine.

In any case, I solved the problem by assigning
Code: [Select]
keybinding add Z@overallstatus "stocks show"This way I can press z twice and go straight to the stocks. I'm not very familiar with keybinding, so I'm not sure if there are any nasty side effects, but looks like the context correctly limits it.

Also, is it possible to group together items with identical names, like the, uh, stock stocks screen? So that for instance, when I search for "spawn" it will display "plump helmet spawn x6" and "dimple cup spawn x2"?

just installed this plugin, shift-ctrl-z doesn't do anything for me too. Your keybind suggestion works perfectly, thanks!
Logged

falconne

  • Bay Watcher
    • View Profile

Thanks for the keybinding info. I've added a note to the first post.
Logged
Utility plugins for DFHack, for improving Dwarf Fortress' user interface.

Guytht

  • Escaped Lunatic
    • View Profile

I'm having a bit of an issue with the Zoom function. When pressing Shift Z, instead of being zoomed to the item, I'm instead kicked back to the overall status screen. Perhaps I'm doing something wrong?
Logged

falconne

  • Bay Watcher
    • View Profile

Ah that must be happening when you use the new hotkey on the vanilla stocks screen to enter the enhanced stocks screen. I hadn't accounted for the extra level of screens... the previous versions of the plugin only had one level to deal with when directly invoked from a keybinding. I'll fix that in the next update, thanks for letting me know.

In the meantime you'll have to use a keybinding as mentioned in the first post to enter the enhanced screen directly.
Logged
Utility plugins for DFHack, for improving Dwarf Fortress' user interface.

_Ivan_

  • Bay Watcher
    • View Profile

A couple suggestions. Feel free to ignore them.

How about opening the search string with shift-s instead of always open. Enter of course closes/locks in the search until we hit shift-s again. This would free up the shift key and bring binds into line with the rest of DF screens where 'm'elt 'f'orbid 'd'ump have no qualifier.

Oh and how do I mark for melting?

Maybe add '-' to filter out items. Like a search string of "socks -silk" would list all socks excluding silk socks.

Also I can't seem to list only my artifacts. They are listed 5 instead of 6 so they are lumped in with masterworks(5) instead of artifacts(6).

Anyway this is a great plugin and fast. Filters 70k items instantly. Nice job and thanks. :)
Logged
Pages: 1 2 [3] 4 5