Implementation Block Picker

Josharias

Conjurer of Grimoires
Contributor
World
SpecOps
Name: Block Picker
Summary: Allows players to get blocks to build with without relocating them from elsewhere with an infinite inventory.
Current Goal: Multiplayer
Curator: Josharias
Location: https://github.com/Terasology/BlockPicker
Compatibility: Singleplayer, Multiplayer
Screenshots: On github
BlockPickerWithFiltering.PNG


Recent Changes:
Improved filtering (2014-11-11)
Sorting, filtering, and scrolling. Oh my! (2014-10-16)

2014-11-11
  • made search case insensitive
  • include categories in search filter
2014-10-16
  • Toggle the window on keypress
  • Sort items in a consistent way (by block uri)
  • Fix scroll area size
  • Add filtering by typed in text

Todo:
  • Multiplayer compatibility
  • Overhaul layout to be more intuitive
Need ideas on how UI interaction could work for:
  • Get blocks in various shapes
  • Better categorization
  • Filtering
 
Last edited by a moderator:

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
I know we already talked about tabs and you weren't a big fan ... :D

That's still the best I can come up with when it comes to "major" groups like shapes vs actual pickable blocks though (and then maybe liquids in another, maybe creature spawners in yet another). Maybe a smart drop-down for categories of blocks that could double as a search box for filtering / saved searches somehow?
 

Skaldarnar

Development Lead
Contributor
Art
World
SpecOps
Great work @Josharias, and +1 for tabs :D

What do you think about a two-fold editor with (1) for general selection and (2) for detailed specification of the block/item.
(1) can be categorized (e.g. using tabs) into some sub-panels, maybe general/free blocks <-> fixed-form blocks <-> items. Free blocks are all types of blocks that can be retrieved in any shape (e.g. grass, stone, ...), fixed-form blocks are only available as-they-are (e.g. the quern from WaS), and the items section is self explanatory.
(2) can be used for further specification of the block/item. For instance, free-form blocks' shape can be adjusted, a fixed-form chest block can be filled with blocks and items, and item properties can be adjusted. (Not sure how much customization is needed in general, but for block shapes this seems to be a good solution). By default this section could be hidden/folded.

block-picker.png

A textual search box is useful to find some specific block/item. With the Block Picker open, typing some key could immediately start the search (I think it would be nice if the whole Block Picker could be used without mouse). Similarly a field for the amount of blocks the player will retrieve can be added to the interface (again, typing any number can trigger the amount box to be overwritten).
 

synopia

Member
Contributor
Architecture
GUI
Nice work! I definitivly need this for mob spawning. I think Skaldarnars idea with two fold editor will fit perfectly. First choose the spawner type (orespawn mobs, engine mobs, L&S mobs), then the actual mob to spawn.
 

Hobby_boy

New Member
Would it be possible to have the blocks and items being displayed in a certain order, like NEI and TMI for minecraft displayed the blocks in order of block id/item id?
Also, there should be scrolling support, so a user can use the scroll wheel to display another line of blocks/items. If search is implemented, could the Tab key (by default) be used to bring up the search box for finding a block?
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Feature request: Make it so 'b' toggles the GUI, not just open it. ESC should still (also) close :)
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Nice! Me likey. More ideas:
  • Case insensitive searches ("coal" doesn't find "Coal")
  • Ability to drop held blocks (currently in the floating transfer slot) back into the BP interface to get rid of them
 

Skaldarnar

Development Lead
Contributor
Art
World
SpecOps
The search filter is now case-insensitive and also takes the block categories into account (searching for "rock" also include "Hardstone" from the "rock2" category in the results).

For the other remaining tasks and issues I've created a milestone 1.0.0 on GitHub. @Josharias please review the issues and add/remove details and requirements. Also updated the changelog in the initial post real quick ;)
 

Marcin Sciesinski

Code ALL the Ages!
Contributor
World
Architecture
1. BlockPicker should not just scan for all blocks/items - instead it should allow easy registering of blocks/items. One of the options might be "scan all in module X". Which could be used for Core? This could be either done via code, or creating a "flag prefab" (similar to recipes) with specific Component that is recognized by BlockPicker, which specifies what should be scanned/added.
2. BlockPicker might be using the permissions now that we have it? So, only players with specific permissions might be using it.
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Here's a likely relevant bug issue: https://github.com/MovingBlocks/Terasology/issues/1316

Probably we can harden BlockPicker to discard invalid blocks somehow. Maybe we can load them in a more basic way when just for show, simply ignoring the prefab definition entirely? That could also avoid the funny situation of TtA torches expiring in the BlockPicker :)
 
Top