Page 1 of 1

Complex clientmodding questions.

Posted: Fri Oct 09, 2020 01:02
by PolySaken
I am developing a general Gui replacement (modeled after the ps2 game RTX Red Rock) and I have been running into a few issues.
1. How do I get the inventory of minetest.localplayer? player:get_inventory() doesn't exist for it.
2. how do I get the tiles of a server sent node definition? minetest.get_node_definition() returns everything except tiles it seems.
3. How do I disable the breathbar, hotbar and hotbar selection indicator? the healthbar can be removed with player:hud_remove() but the breath and hotbar won't disappear even if I remove all huds from id -50000 to 50000. the hud_flags system appears to be server-side only, and none of them reside in the minetest.ui table like the minimap does.

( I may not be able to reply quickly as internet access is patchy for me currently.)

Re: Complex clientmodding questions.

Posted: Sat Oct 10, 2020 13:59
by Krock
1. There's yet no such function.
2. Was skipped for being irrelevant. https://github.com/minetest/minetest/co ... 7a314cR725
3. Server-sent HUDs cannot be controlled by the client. In the HUD API PR this was done intentionally, though I don't know why. https://github.com/minetest/minetest/pull/6067

CSM is very barebone for two years now. You'll likely need to implement the functions yourself unless someone else is interested in doing that.

Re: Complex clientmodding questions.

Posted: Sun Oct 11, 2020 20:13
by PolySaken
Bugger. I was hoping since I can get the wielded item that I'd be able to get the rest of the hotbar too.
I guess 'irrelevant' sorta makes sense, since my use case is just about the only one that would require it.
That last one doesn't make much sense, the server should be able to prevent the client from displaying HUDs (i.e. minimap requires tool to view) but it shouldn't be able to force them to display. Are you sure this was intentional?

Re: Complex clientmodding questions.

Posted: Wed Oct 21, 2020 06:59
by cuthbertdoublebarrel
PolySaken wrote:
Sun Oct 11, 2020 20:13
That last one doesn't make much sense, the server should be able to prevent the client from displaying HUDs (i.e. minimap requires tool to view) but it shouldn't be able to force them to display. Are you sure this was intentional?
yes it should be the server only inforcing the restrictions .
ie minimap
you should not be forced to craft an item to display a function.
why dictate how the game is played , what if you want to be spawned with the map without it taking up a slot.
Wuzzy was the one who implemented it .
there is a old thread on .org discussing it which i dug up a while back