[Mod] Smart Inventory [smart_inventory]

bell07
Member
 
Posts: 140
Joined: Sun Sep 04, 2016 15:15
GitHub: bell07

[Mod] Smart Inventory [smart_inventory]

by bell07 » Sun Feb 05, 2017 13:10

smart_inventory
A fast Minetest inventory with focus on a many number of items and big screens. The special feature of this inventory is the dynamic classification filters that allow fast searching and browsing trough available items and show relevant informations only to the user.

Image

More informations and screenshots on github: https://github.com/bell07/minetest-smart_inventory/blob/master/README.md

Highlights:
  • dynamic classification system to get faster the relevant items
  • survival: Do not flood the survival-player by items which he cannot yet craft
  • survival: full doc integration (optional, but highly recommended in survival)
  • creative: fast browsing, optimized for very many items
  • creative: show up hidden shaped nodes from "shapes creators" like stairs, slabs, walls, and display them in a separate group
  • player: 3d_armor + skins on 1 page

Dependencies:
  • Required: default
  • Optional: creative, sfinv, 3d_armor, skins, doc_items

Source or download: https://github.com/bell07/minetest-smart_inventory

API: https://github.com/bell07/minetest-smart_inventory/blob/master/API.md

License: LGPL-3
Attachments
screenshot.png
screenshot.png (279.91 KiB) Viewed 6351 times
Last edited by bell07 on Sat Mar 18, 2017 08:08, edited 11 times in total.
 

User avatar
TenPlus1
Member
 
Posts: 1874
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: [mod] Smart Inventory [smart_inventory]

by TenPlus1 » Sun Feb 05, 2017 15:19

Was this mod built from xdecor's crafting guide ?
 

User avatar
Chibi ghost
Member
 
Posts: 161
Joined: Fri Jan 08, 2016 21:17
In-game: Ghost

Re: [mod] Smart Inventory [smart_inventory]

by Chibi ghost » Sun Feb 05, 2017 17:24

interesting looks like a cross between plus and unified I would be interested in this if you get the armour working on it
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: [mod] Smart Inventory [smart_inventory]

by rubenwardy » Sun Feb 05, 2017 18:03

What's wrong with sfinv?
 

User avatar
cHyper
Member
 
Posts: 587
Joined: Fri May 06, 2011 08:49
IRC: cHyper
In-game: cHyper

Re: [mod] Smart Inventory [smart_inventory]

by cHyper » Sun Feb 05, 2017 18:08

rubenwardy wrote:What's wrong with sfinv?


sfinv is great, lets use it. ;-)
 

bell07
Member
 
Posts: 140
Joined: Sun Sep 04, 2016 15:15
GitHub: bell07

Re: [mod] Smart Inventory [smart_inventory]

by bell07 » Sun Feb 05, 2017 19:43

This mod is written from scratch this weekend using the smartfs framework with "native inventory support" I developed last week. sfinv I looked to the code and tried it short. It is a high quality mod, there should be more. The thing only I do not like is the size of the form 8, 8.6. The smart_inventory uses nearly full screen size with 14, 10.
...And the smart_inventory is a chance again for me to play with smartfs ;)
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: [mod] Smart Inventory [smart_inventory]

by rubenwardy » Sun Feb 05, 2017 19:45

The sfinv size can be changed
But I see why you did this :)
Looks good!
 

bell07
Member
 
Posts: 140
Joined: Sun Sep 04, 2016 15:15
GitHub: bell07

Re: [mod] Smart Inventory [smart_inventory]

by bell07 » Wed Feb 08, 2017 23:34

Today I updated the mod. In fact it was a rewrite after the first prototype.
For developers:
- I get the "Pageble items grid" and "Craft recipe preview" as reusable smarfts elements / widgets. (see smartfs-elements.lua file). Maybe both will be a part of smartfs if the required additional functionality is merged. So currently the widgets are compatible to enclosed smartfs version only.

For Users:
- removed the "List" view because the view was not really helpful
- removed the "next buildable" items selection. This will be later a filter in the research view

Additional functionality: A simple group based drop-down filter to get better overview in the "buildable" list. Highly experimental, but very useful in first test.

There is a bug currenty: If I press "Refresh" and the drop-down content is changed, the inventory seems to send the old field values that results in the drop-down does not work as expected. The workaround is to leave the inventory and call it again. I do not have a idea currenty why.

A design question by the way: In case the selected item name is long it break out the "Preview" area. But I have no idea how I can rearrange the elements to get a wider area for the text :/ Any ideas?
 

User avatar
cHyper
Member
 
Posts: 587
Joined: Fri May 06, 2011 08:49
IRC: cHyper
In-game: cHyper

Re: [mod] Smart Inventory [smart_inventory]

by cHyper » Thu Feb 09, 2017 19:35

nice mod. can you implement a search-button and -field?
 

bell07
Member
 
Posts: 140
Joined: Sun Sep 04, 2016 15:15
GitHub: bell07

Re: [mod] Smart Inventory [smart_inventory]

by bell07 » Thu Feb 09, 2017 19:50

The first view is "craftable by items in inventory" only and should be from idea/vision always be clear so no search should be needed. For explanation, the count 154 are items, not grid pages ;). Trough groups filter I get always less then 1 full grid of items. Of course, the groups filter is a prototype currently and needs more optimizations.

The search functionality will be on the "All-Items / docs / guide page" page that I plan to implement. Of course there should be a way to take over a recipe from the guide page to the crafting page.
This evening I am working on 3d_armor and skins page ...
 

User avatar
azekill_DIABLO
Member
 
Posts: 3458
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: [mod] Smart Inventory [smart_inventory]

by azekill_DIABLO » Fri Feb 10, 2017 12:42

i like this! but it needs maybe better textures and a bit bigger ui... but i really love this +1
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
Hi, my username is azekill_DIABLO and i'm an exelent bug-maker(yeah...i know...i have a bad reputation)

azekill_DIABLO said: Mineyoshi+ABJ+Baggins= TOPIC HIJACKED.
My Mods and Stuff | Voxellar | VoxBox on GITHUB | M.I.L.A Monster engine
WEIRD MODDING CONTEST !!!
 

bell07
Member
 
Posts: 140
Joined: Sun Sep 04, 2016 15:15
GitHub: bell07

Re: [mod] Smart Inventory [smart_inventory]

by bell07 » Fri Feb 10, 2017 21:43

Bigger UI, You are right YES, more place! Check out the updated screenie in first post;)

About textures, I am not a graphic artist, therefore I use currently the in minetest or default mod provided graphics at the first. Feel free to help me with graphics and/or element placements. The same for texts and labels, I am a pro in giving things wrong names :/ Any suggestions welcome also.
But it can be hard currently to work on elegance if the functionality is not clearly defined and implemented.

In the current state I disabled the groups selector again because it is not usable for me currenty. So I will implement anything in other way.
 

User avatar
azekill_DIABLO
Member
 
Posts: 3458
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: [mod] Smart Inventory [smart_inventory]

by azekill_DIABLO » Sat Feb 11, 2017 09:42

yes you got it! it's very nice like that! +111111164361
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
Hi, my username is azekill_DIABLO and i'm an exelent bug-maker(yeah...i know...i have a bad reputation)

azekill_DIABLO said: Mineyoshi+ABJ+Baggins= TOPIC HIJACKED.
My Mods and Stuff | Voxellar | VoxBox on GITHUB | M.I.L.A Monster engine
WEIRD MODDING CONTEST !!!
 

User avatar
mahmutelmas06
Member
 
Posts: 355
Joined: Mon Mar 02, 2015 13:10
GitHub: mahmutelmas06
IRC: mahmutelmas06
In-game: masum

Re: [mod] Smart Inventory [smart_inventory]

by mahmutelmas06 » Sat Feb 11, 2017 10:47

It looks so crowded now. Not eye friendly.
But anyway seems going to be nice inventory mode soon. Good job
My Mods:

Beverage
 

bell07
Member
 
Posts: 140
Joined: Sun Sep 04, 2016 15:15
GitHub: bell07

Re: [mod] Smart Inventory [smart_inventory]

by bell07 » Sun Feb 12, 2017 20:37

Update again. Now it should be a little less crowded ;)

The grouping is back. Now it is a table view that swaps with item short-info box.
There is a some "intelligent" grouping implemented that means all items are assigned to multiple groups (item, groups, item types, origin mods, custom groups) and the logic decides which groups needs to be displayed in group list. There is the issue each group needs a "shortdesc". For some groups I added the "user-visible" descriptions. Is there a beter way to get the short descriptions for item groups and installed mods?
Other proposals I can define further groups? More groups leads to beter grouping. I plan to implement the Crafting guide based on this logic.

In the (crafting) screen I plan to implement the next things:
- Planned: Inventory sort/compress button for items in slot >= 9
- Planned: Analysis field (detached 1x1 inv) to get all recipies containing a specific item if the item is moved to the fields
- Planned: Paging of recipes preview if multiple recipes available for the item
- "Do it" Button? Get items from inventory and put the result.

Any other ideas? Note: this page should contain crafting helpers only. Guides and other functionality should be to other pages.
 

bell07
Member
 
Posts: 140
Joined: Sun Sep 04, 2016 15:15
GitHub: bell07

Re: [mod] Smart Inventory [smart_inventory]

by bell07 » Tue Feb 14, 2017 15:21

Next update: The player-page is done. Now there is 3d_armor + skins support. See updated first post.
 

bell07
Member
 
Posts: 140
Joined: Sun Sep 04, 2016 15:15
GitHub: bell07

Re: [mod] Smart Inventory [smart_inventory]

by bell07 » Tue Feb 21, 2017 23:06

Update again: The creative items selection page is done. I was even surprised how fast the searching / browsing trough ~ 3000 installed items work. ;)

Screenshots updated in the first post.

In general the smart_inventory reached a usable state (for me) in survival and creative. In survival I use it somewhat longer time, and will use it in creative too for now.
But for other people probably the mod seems to be a prototype, because of maybe bad screen element placements, missed icons/graphics, missed labels, etc. These are not my strengths so help is required to get the mod smart enough for other people.
 

ShadMOrdre
Member
 
Posts: 51
Joined: Mon Dec 29, 2014 08:07
In-game: shadmordre

Re: [mod] Smart Inventory [smart_inventory]

by ShadMOrdre » Wed Feb 22, 2017 01:08

bell07,

Thought I'd try this. Just, as in last hour, downloaded the git, but, I'm getting the following:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
2017-02-21 17:03:43: ERROR[Main]: ModError: Failed to load and run script from D:\GAMES\minetest_v0415_64\bin\..\mods\smart_inventory\init.lua:
2017-02-21 17:03:43: ERROR[Main]: cannot open D:\GAMES\minetest_v0415_64\bin\..\mods\smart_inventory/ui_tools.lua: No such file or directory
2017-02-21 17:03:43: ERROR[Main]: stack traceback:
2017-02-21 17:03:43: ERROR[Main]:    [C]: in function 'dofile'
2017-02-21 17:03:43: ERROR[Main]:    ...S\minetest_v0415_64\bin\..\mods\smart_inventory\init.lua:131: in main chunk
My other virtual world is an Opensimulator.
 

bell07
Member
 
Posts: 140
Joined: Sun Sep 04, 2016 15:15
GitHub: bell07

Re: [mod] Smart Inventory [smart_inventory]

by bell07 » Wed Feb 22, 2017 05:38

oops, forgotten to add some files from last development to git.
Please try again.
 

ShadMOrdre
Member
 
Posts: 51
Joined: Mon Dec 29, 2014 08:07
In-game: shadmordre

Re: [mod] Smart Inventory [smart_inventory]

by ShadMOrdre » Wed Feb 22, 2017 22:40

bell07,

Is it possible to also have a craft grid in creative?

I'm about to release a mod that depends on this capability, so as not to flood creative inventory with hundreds or even thousands of nodes. My thinking behind this that only the various "materials" type nodes (stone, wood, tree, glass, metal, wool?, and such), tools, machines, and other such usable items should really be the only things displayed.

Here, I'm also thinking that in mods such as Castles+, Columnia, and most annoyingly, all the various implementations of stairs and slabs, flood creative inventory with all the various combinations of materials and a single shape, stairs or slab. Castles and Columnia continue this by providing their various node shapes for a limited vareity of "materials" nodes, (stone, desert stone, sandstone), thus filling inventory unecessarily, IMHO.

My soon to be released mod, lib_node_shapes, simplifies this by providing a shape that can then be applied to any "material" node, without the need for a workbench/crafting bench. The alternative, would be to fill creative inventory with thousands of the various combinations. I have working doors and gates, working furniture, and am working on beds. There are currently 71 shapes to select from, and using my current mod list I have around 125 "materials" type nodes. With the ability to add more shapes rather easily, this would/does explode with thousands of combinations available. To solve this, I simply allow the shapes into inventory, while setting not_in_creative =1 for all the various resulting shaped nodes. My other solution, is to allow users to set which materials apply to which shapes, which will be implemented using the builtin settings mechanism, but is not yet in place.

Sorry for the long explanation, but in summary, I will be using this inventory mod, since Unified is slow and builtin inventory is featureless. I would just like this one simple addition, that the other inv mods do allow.

Also checking out your skins mod mentioned above.

Thanks for awesome work on this.
My other virtual world is an Opensimulator.
 

bell07
Member
 
Posts: 140
Joined: Sun Sep 04, 2016 15:15
GitHub: bell07

Re: [mod] Smart Inventory [smart_inventory]

by bell07 » Thu Feb 23, 2017 08:26

I know the issue you describes. It is the reason for this inventory, to get just "relevant" items visible and hide the "not relevant" items. The mod (try to) do this by dynamic grouping.
My "carpet" mod does add ~ 200 carpets based on installed nodes. But mostly the smart_inventory just group them to "mod:carpet" group. In other groups the carpets are there but not disturbing.

An other mod that is known to add many nodes is "moreblocks". I disabled temporary the "not_in_creative_inventory" and get up to 10161 items from previous 2827 in my inventory.
=> The survival page was not affected by this change because it is recipe-driven and there are no new recipes added. => usable as before.
=> creative page was filled by all the microblocks. Still usable, but nearly each category is messed up. The moreblocks took over the focus of the game :-/
It maybe solvable by adding further categories for "slope type" or something like, to get the inventory the chance to sort them out. But I just disabled it again.

If you decides in your mod to get all items visible in creative, please add custom groups to the nodes definition for beter visibility in smart_inventory.

That was my long explanation. In short: I enabled the crafting page again for creative.

By the way I added new grouping "group:groupname:value". There is a directive: It can not be too much groups existing. The more the beter. An issue with them (But I can live with it) the group names are very technical, but I do not have currently an idea to get all the groups "Noob-friendly".


EDIT: Is there any "base material" attribute on item definition on such generated nodes? I am about to add "exclusive groups" to the inventory that means if the inventory uses this group the items will be hidden in other groups. So it will be nice to have a base_material = "default:pine_wood" (or better groups.base_material = "default:pine_wood") on item definition. I can define the "base_material*" groups exclusive and get all the slabs, stairs, carpets and other further processed things sorted out using it.
Such groups will be usefull for other mods too, if I look to moreblocks, in circular_saw code the name is interpreted each time to get the relation between base material and result material. It will be simpler to use the proposed group.
I thought so such group exists already, but I found only in mesecons_pressureplates an attribute called "pressureplate_basename". Maybe we should unify this by a new custom group?
 

ShadMOrdre
Member
 
Posts: 51
Joined: Mon Dec 29, 2014 08:07
In-game: shadmordre

Re: [mod] Smart Inventory [smart_inventory]

by ShadMOrdre » Thu Feb 23, 2017 23:22

bell07,

In my mod, lib_node_shapes, I use a variety of IF tests, pulling node info straight from minetest.registered_nodes. I test against names, definition items, and use groups mostly to weed out things, as opposed to using groups to include. Groups are too inconsistently defined, at the moment, to be useful for getting this info. Groups really only exist within a node definition, none of which follow any convention, and not all materials are appropriately labeled.

What if you were to trim your inventory lists by mod, or by drawtype, or whether it is a registered node, item, craftitem, or entity. You can still include groups, but rather than try to find all the groups by trolling the installed mods, you could simply build a list of groups from data trolled from the various minetest.registered_ functions.

What I'm thinking is that the first selection list in your formspec would allow a user to define whether to search by mod, drawtype, item_type (node, craft_item, entity), group, and some other params to be determined. The second list would then present all the mods, drawtypes, item_types.... The third list would then show each value. This would greatly empower your inventory, in what info it can provide to users and modders.

BTW....Thanks for adding the craft grid back to the creative inventory.
Two requests:
1. Can we have a trash can on the craft grid page?
2. Instead of using the 3x3 grid icon for the creative inventory, use the front face of the treasure chest, leaving the 3x3 grid icon for craft grid.

Keep up the awesome work!
My other virtual world is an Opensimulator.
 

bell07
Member
 
Posts: 140
Joined: Sun Sep 04, 2016 15:15
GitHub: bell07

Re: [mod] Smart Inventory [smart_inventory]

by bell07 » Fri Feb 24, 2017 00:18

In my mod, lib_node_shapes, I use a variety of IF tests, pulling node info straight from minetest.registered_nodes. I test against names, definition items, and use groups mostly to weed out things, as opposed to using groups to include. Groups are too inconsistently defined, at the moment, to be useful for getting this info. Groups really only exist within a node definition, none of which follow any convention, and not all materials are appropriately labeled.
You are about the checks if an item is relevant for your formation "sub-items"? In this case you are right, the groups are not consistent enough for this. I had the same issue with the carpets. See the filter function https://github.com/bell07/minetest-carpets/blob/master/init.lua#L11
But I am about the result. The "generated items" should at least contains the information about the source material and target type (=formation). I added both to the carpet mod and test it currently on moreblocks. The smart_inventory can use this informations for grouping now, so please test it with your mod too.
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
               def.material = recipeitem
               def.formation = "carpet"

What if you were to trim your inventory lists by mod, or by drawtype, or whether it is a registered node, item, craftitem, or entity. You can still include groups, but rather than try to find all the groups by trolling the installed mods, you could simply build a list of groups from data trolled from the various minetest.registered_ functions.

Currently implemented are the next filters:
group: (item.groups.group)
ingredient: (item in recipe)
type: (item, node, craftitem..)
mod: (mod_origin)
filter: there is a register_filter() implemented. Currently they are "Translucent blocks", "Vessel", drawtype, material and formation (from discussion above) as filter implemented

What I'm thinking is that the first selection list in your formspec would allow a user to define whether to search by mod, drawtype, item_type (node, craft_item, entity), group, and some other params to be determined. The second list would then present all the mods, drawtypes, item_types.... The third list would then show each value. This would greatly empower your inventory, in what info it can provide to users and modders.

Basically that is the idea on creative page with 3x group lists. But without any settings or decisions by user, the dynamic grouping decides depending on data which groups should be displayed.

1. Can we have a trash can on the craft grid page?
That's low-prio for me since the key Q exists. There is risk of confusion with the "Lookup field" till the page is graphically polished.
2. Instead of using the 3x3 grid icon for the creative inventory, use the front face of the treasure chest, leaving the 3x3 grid icon for craft grid.
Done

EDIT: "exclusive" handling commented out because it does not work as expected and create lag. Will try it again the next days

EDIT2: Tried an other way: no generic "exclusive" groups because of performance impact. Just in creative page only special handling for "filter:material" group. Resolve the groups as before without the items in this group. In addition add a additional group ">>> Material outcome" on top level with items only containing the material attribute. For modified moreblocks+carpets it look like:

Image

EDIT3: Renamed the new attributes to more understandable "base_material" and "shape_type". Previous it was "material" and "formation"
Attachments
screenshot_20170224_091305.png
screenshot_20170224_091305.png (252.05 KiB) Viewed 6351 times
 

User avatar
azekill_DIABLO
Member
 
Posts: 3458
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: [mod] Smart Inventory [smart_inventory]

by azekill_DIABLO » Fri Feb 24, 2017 12:17

GJ man!
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
Hi, my username is azekill_DIABLO and i'm an exelent bug-maker(yeah...i know...i have a bad reputation)

azekill_DIABLO said: Mineyoshi+ABJ+Baggins= TOPIC HIJACKED.
My Mods and Stuff | Voxellar | VoxBox on GITHUB | M.I.L.A Monster engine
WEIRD MODDING CONTEST !!!
 

bell07
Member
 
Posts: 140
Joined: Sun Sep 04, 2016 15:15
GitHub: bell07

Re: [mod] Smart Inventory [smart_inventory]

by bell07 » Thu Mar 02, 2017 22:16

Hi!
The "crafting" page seems to be finished for me, I play, ääm test the inventory ;-), already the whole day, and the ideas gone out, all is implemented. oO

A short overview of implemented functionality on crafting page:
Image

Left site
  • "Classic craft" with main inventory, crafting field and crafting result
  • Compress - try to condense stacks in inventory, maybe some stack field will be free by using this function
  • Sweep - Cleanup after work (or if recipe did not work) move all from crafting field back to inventory
  • Trash field - Move item to be trashed - with 1 second delay - your chance to get the item back
Right site - recipe helper
  • lookup item list ("book" field)
    If you move a item to the "book" field you get item-info and recipes for this item, and in addition all craftable items with lookup item in recipe
  • craftable (Read inventory)
    If you press to "Read inventory" button, you get a list of craftable items, buildable by items in inventory. Note - the item count is not used
  • searchfield
    If you type a word, you get all items matched to the word in item text, groups, filters ...

    Note, if Wuzzy's doc-system is installed, the "revealed" feature is active. That means the crafting helper does not reveal all, but allowed only. That means the search get known items only. The lookup+craftable show only items that craftable by already known items only (but even the item self is not known). Site note: I am very excited about the survival gameplay with this feature
  • Item details
    If you select an Item you get basic informations about the item.
    If it is already known in doc system, you get the doc-lookup button to jump into doc-entry
    If recipes exists to craft the item (known only) these will be displayed pagable
  • Groups
    The button groups toggles the item details area with a groups list table. Using the groups list you can additional filter the items list in the result table for better overview

Anything missed?
Any additional ideas?
What is about the other pages? A "creative" (= find and pick items) and player (3d_armor+skins) already implemented, but I use them not so often, the basic functionality exists, like in other inventories. Maybe there is still something importing missing?

Pls. note, the crafting page does have only crafting and inventory helpers that does not affect the gameplay experience. It is not an "Cheat-Cockpit", and not a "Encyclopedia". Maybe that will be the next 2 pages in inventory. If you have other proposal for additional pages, feel free to propose it ;-)

As you feel my english is not enough, so I need help in documentation.
 

bell07
Member
 
Posts: 140
Joined: Sun Sep 04, 2016 15:15
GitHub: bell07

Re: [Mod] Smart Inventory [smart_inventory]

by bell07 » Sat Mar 18, 2017 04:38

I am happy to announce the smart_inventory' first release!

All things I need are implemented, so I am playing the game again, there are a lot of items to be unlocked in my survival world trough doc's reveal system ;-)

Of course I will do adjustments or bugfixes if I find something. As well accept further ideas and remarks.
Because of my bad English please let me know if any texts are wrong.
If you see some classify does not sense or some filter are missed that you need.
 


Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 7 guests

cron