Complex clientmodding questions.

Post Reply
User avatar
PolySaken
Member
Posts: 641
Joined: Thu Nov 09, 2017 05:18
GitHub: PolySaken-I-Am
In-game: PolySaken
Location: Wānaka, Aotearoa
Contact:

Complex clientmodding questions.

by PolySaken » Post

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.)

User avatar
Krock
Developer
Posts: 4562
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: Complex clientmodding questions.

by Krock » Post

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.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
PolySaken
Member
Posts: 641
Joined: Thu Nov 09, 2017 05:18
GitHub: PolySaken-I-Am
In-game: PolySaken
Location: Wānaka, Aotearoa
Contact:

Re: Complex clientmodding questions.

by PolySaken » Post

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?

cuthbertdoublebarrel
Member
Posts: 190
Joined: Tue Apr 14, 2020 16:03
GitHub: cuthbert

Re: Complex clientmodding questions.

by cuthbertdoublebarrel » Post

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
awaiting minetest hardcore mode .

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest