More user-friendly group names

User avatar
Wuzzy
Member
 
Posts: 2161
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

More user-friendly group names

by Wuzzy » Tue Aug 02, 2016 09:38

Currently, groups are kinda an internal-sort of thing. You can only use their internal name like “stone” or “disable_jump” which works fine for modding but not if you actually want to expose group names to the interface.

Groups are very important for gameplay so it makes sense to expose them in some way.

IMO it should have been a requirement to register groups beforehand right from the start, but I think it is way too late now for such a request.

The actual feature request here is to create a function to assign a “readable” group name to a certain group.

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
minetest.register_real_group_name(internal_name, real_name)


Registers the name “real_name” to the group “internal_name”. Using the function is completely optional, but highly recommended to use.
Examples:

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
minetest.register_real_group_name("stone", "Stones")
minetest.register_real_group_name("leaves", "Leaves and Needles")
minetest.register_real_group_name("tree", "Tree Trunks")
minetest.register_real_group_name("leafdecay", "Decaying Leaves and Needles")
minetest.register_real_group_name("cracky", "Cracky")
minetest.register_real_group_name("oddly_breakable_by_hand", "Hand-Breakable")
minetest.register_real_group_name("not_in_creative_inventory", "Not in Creative Inventory")


Style guide for “exposable” group names: Treat them as proper names, so this means in English the first letter of nouns must be capitalized. Examples: “Leaves and Needles”, “Sand”, “Tree Trunks”, etc. Try to write them in such a way that they can be (hopefully) easily pasted into text. Prefer plural form over singular form (this is a soft requirement), especially for grouping nodes together, to make them more distinguishable from node descriptions. Example sentence: “Stone and Desert Stone belong to the Stones group.”

SECOND FUNCTION:
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
minetest.get_real_group_name(internal_name)

Returns the registered name of the group or nil if it does not exist.

Finally, Minetest should automatically register group names for all special groups such as disable_jump.
Minetest Game should register group names for all groups it introduces, such as cracky.

USE CASES:
- Unified Inventory has a crafting guide which supports group inputs for the crafting recipes. Currently, when you hover them, you get a tooltip with the raw group name in the form of “group:stone”
- doc_minetest_game makes use of group names as well. It currently tries to work around the problem of “raw” group names by manually assigning such “readable” names but this is of course doomed to be inconsistent; so this mod could benefit from the change as well
I'm creating MineClone 2, a Minecraft clone for Minetest.
I made the Help modpack, adding in-game help to Minetest.
 

User avatar
philipbenr
Member
 
Posts: 1665
Joined: Fri Jun 14, 2013 01:56
GitHub: philipbenr
IRC: philipbenr
In-game: WisdomFire or philipbenr

Re: More user-friendly group names

by philipbenr » Tue Aug 02, 2016 21:53

+1

The more intuitively categorized things are, the easier it is to make mods and such.
 

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

Re: More user-friendly group names

by azekill_DIABLO » Wed Aug 31, 2016 13:35

+1

far easier to understand
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
Wuzzy
Member
 
Posts: 2161
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

Re: More user-friendly group names

by Wuzzy » Wed Aug 31, 2016 14:49

I'm creating MineClone 2, a Minecraft clone for Minetest.
I made the Help modpack, adding in-game help to Minetest.
 

User avatar
MineYoshi
Member
 
Posts: 4267
Joined: Wed Jul 08, 2015 13:20
GitHub: MineYosh
IRC: MineYoshi
In-game: Kirby_Retro

Re: More user-friendly group names

by MineYoshi » Wed Aug 31, 2016 21:51

+10 Looks kind of good your idea... It would be nice to have it working :D
People talk about freedom of speech, so i'll say that God exists.
Open your eyes!! See The big unicorn conspiracy.!! :D The government has been lying to us about unicorns!!
"I've learned there are three things you don't discuss with people: religion, politics and the Great Pumpkin" - Linus Van Pelt
I'm the Officially 1st ABJist in the world ( ͡° ͜ʖ ͡°)
 

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

Re: More user-friendly group names

by cHyper » Sat Sep 03, 2016 17:52

+1 nice idea...
 


Return to Minetest Features

Who is online

Users browsing this forum: No registered users and 1 guest

cron