DFHack / dfhack

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

new stocks interface #3150

Open myk002 opened 1 year ago

myk002 commented 1 year ago

similar in feature set to the old stocks screen.

it seems like most of the work has already been done for buildingplan's item selection screen. we could refactor that and build on it for a generic item sorting/filtering dialog that can forbid/unforbid/mark for trade/etc.

silverflyone commented 1 year ago

Initial window. image

myk002 commented 1 year ago

This looks great! I hadn't considered filtering by stockpile as well. That's a great idea! I'd like to see a more specific mock, though, with the actual layout of the filter widgets. We need to make sure the UI isn't too messy and that the options are intuitive.

silverflyone commented 1 year ago

Building planner UX flow for reference. This may need to be updated as appropriate. image Existing stock screen for reference. image

silverflyone commented 1 year ago

@myk002 , @ab9rf, @silverflyone, @TaxiService using this issue for the stocks design discussion for the time being. Is there a preferred place we can share/edit design documents? It would be good for others to update the design as well.

20/4: updates to stories: version. Added results-action flow draft.

silverflyone commented 1 year ago

Role-Epics-Stories

Roles: Player, Developer. Priority/release sets: R1, R2, R3, R4.

P. Player

P.1 As a player, I want to search for items, so that I can view or perform an action on them.

P.1.1 As a player, I want to search items based on commonly used item attributes, so that I can view the results, sort by the attributes, in order to view them or perform an action on them. The list of attributes includes: name, amount, quality, value, wear level. (Specific windows to show item by amount, value, quality, or one configurable window? Item amount, quality existing functionality =R1, value is new. =R2)

P.1.2 As a player, I want to search for items based on location-item related attributes, so I can find them or include them in a list for action that depends on distance or has time limits (such as trade). The list of attributes includes: item distance from current position, item location (z-level). (Nice to have - not part of primary function, but has potential to affect core build. Perhaps done as a Search Mode that affects search/results? Overlap with P1.1, P.1.3, P.1.4, =R4?)

P.1.3 As a Player, I want to search for items based on type, so that I can quickly find the items for my search. (Type is part of existing functionality. =R1 Overlap with stockpile categorisation: P.1.4)

P.1.4 As a Player, I want to search for items based on stockpile related attributes, so that I can organise them, or include them in a list for action. The list of stockpile attributes includes: name, distance, filter, location, in a stockpile, not in a stockpile. (Specific stockpile window for filter, or stockpile name for category; similar to item type. =R2).

P.1.5 As a Player, I want to search for items based on actions that are to be performed on them, so that I can view or change those actions. The list of item action attributes includes: forbidden, melt, dump, hidden. (Action view and change ability. =R3)

P.1.6 As a Player, I want to search for items based on their state, so that I can view/find them, or exclude them from an action that depends on the state. The list of item state attributes includes: locked for action, in dwarf inventory, owned by entity, part of a building, on fire, rotten. (This could be done as part of an options tab, defaulted to the norm. =R3)

P.1.7 As a Player, I want to search for items based on containment related attributes, so that I can organise them, or include them in a list for action. The list of stockpile attributes includes: in a container, not in a container, type of container. (Specific container window for filter. Nice to have. =R5).

P.1.8 As a Player, I want to have the ability to perform a simple search, or an advanced search, so that I don't get confused with too many options. (Twistie expandable show/hide advanced search options. Similar to Building Planner window show/hide DFHack window. This approach can be annoying if there are too many fields, or commonly used fields are hidden. =R2).

P.2 As a Player, once I have performed a search, I want to perform an action on my item(s), so that I can view, find, change them.

P.2.1 As a Player, once I have performed a search, I want to view detailed item information that is not shown in the standard DF windows, so I can make a decision on constructing, using, relocating them items. Item attribute information includes: name, stacks, quantity, value, location, marked for melt/dump/hidden, not in building/inventory. (Item detail window. New. Overlap with GM-Editor. Ability to do next/prev. =R3)

P2.2 As a Player, once I have performed a search, I want to melt/dump/hide an item(s), so that I can keep my fort clean/organised, reduce the amount of time my dwarfs perform movements, ensure the FPS is increased. (Action as part of main search results. How to show many functions? =R2)

P3. As a Player, I want to use the item stock/search window for trade, as this reduces the time it takes to select items for trade. (Treat this as a separate Epic, but dependent on this feature set).

P4. As a Player, I want to use the item stock/search window for other DFHack functions, as I don't like calling scripts. Functions to utilise item stock/search window include: combine items into larger stacks, watching features such as seedwatch, others to be identified and specified. (need a list of DFHack features that could utilise this)

P5. As a Player, I want the ability to save my search results, so that I can re-use them and save time. (more details are needed for this; named search, save in json, date/time?)

D. Developer

D.1 As a Developer, I want the Player experience to be simple and intuitive, so that the Player finds the functionality useful and self explanatory.

D.2 As a Developer, I want the windows and actions to perform in a reasonable timeframe (< 2-5 seconds), so that the Player experience is positive. Context: current DF stock window is slow for 10k items.

D.3 As a Developer, I want the code to be modular and re-useable for other developers, so that it is able to be maintained by others, problems can be fixed and features can be added, in a reasonable timeframe.

D.4 As a Developer, I want to be able to call the item stock/search window as part of a Player UX workflow, so that I don't have to re-code it each time.

D.5 As a Developer, I want to be able to have different versions of the stocks gui over time, so that I can add new or remove features as DF changes. (The implication is that save/load filter criteria needs to store a version, and stocks gui needs to be handle previous versions of searches saved. Is there a versioning standard?)

myk002 commented 1 year ago

P.1.5: other attributes to consider:

Also, @TaxiService is a good collaborator for UX discussions

silverflyone commented 1 year ago

P.1.5: other attributes to consider:

  • wear level
  • owned
  • forbidden

Also, @TaxiService is a good collaborator for UX discussions

Thanks @myk002 . I've updated these and added TaxiService. Shall I move these to GoogleDocs, and share for edit across a group? Just cautious not to introduce another tool if one is already being used.

silverflyone commented 1 year ago

New stocks ux entry-search flow draft. image

New stock results-action flow draft. image

TaxiService commented 1 year ago

cough hello! it'll take a bit for me to get through the discussion/mocks, but at least now i noticed that there's a discussion going on... °-° so hi~

myk002 commented 1 year ago

I've found that just having the discussion here on the GitHub issue works best. External tools might be better in some ways, but here the designs will publicly accessible and be well-associated with the ongoing (and eventually finished) work

silverflyone commented 1 year ago

cough hello! it'll take a bit for me to get through the discussion/mocks, but at least now i noticed that there's a discussion going on... °-° so hi~

hey there @TaxiService, yeah a little bit of design work, dusting off my PO webs. feel free to add/update/critique.

myk002 commented 9 months ago

Discussion of potential use cases: https://discord.com/channels/793331351645323264/807444515194798090/1165119441168760872