-
Notifications
You must be signed in to change notification settings - Fork 577
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Grantme all adds "creative" privilege, which turns the game into creative mode #2838
Comments
This is intentional so that server owners can fix up their survival world easily. The |
Yes, an indicator would help, considering most people are unaware of this. But the game's menu should also say "Creative Mode: On" when this is the case. All I had was guessing, so that's not right. It also doesn't correspond to the game's behaviour in the past, so it's an unexpected change that can easily cause confusion. |
The issue here is sort of that
|
Having this documented is a good idea, even if most people never read the docs. But making it easy for players to spot such changes while playing is more important. When there's no indicator and the menu also misleads you, that's something to fix. In singleplayer, when you have the "creative" privilege or you started the game in creative mode, the game should say: In multiplayer, the game should say:
Those should be changed because they should never contradict the real game mode of a player. But as you can only see these if you open the menu, an indicator would help even more. Or maybe take the subtle way of "telling" the players they're in creative mode by hiding the health from the HUD, like Minecraft does. Now the thing is it works better for them because they have health, hunger, armor and XP in the HUD, so it's way easier to notice that compared to not seeing the health bar. Additionally, Minecraft's crafting UI is distinctively different compared to the one in survival, which makes it very easy to tell the difference - as long as you're familiar with how both modes look like, of course. But the difference in Minetest Game is only the added tabs, which don't stand out as much as Minecraft's colored tabs. |
The creative privilege is dumb and breaks the privilege system |
I think it's useful for server admins, but you should be able to easily tell which mode you're in, and the menu should reflect that. |
Blocking the use of the |
TL;DR PS: This is looking more like a minetest engine issue (related to the builtin privs system). /revokeme creative seems to be the only real solution, and the only way to grant However, they both require that the user has the ability to grant/revoke privs -- an average The revoke command might need to be modified to allow a non-privileged user the ability to revoke creative mode. I don't think an indicator alone would be sufficient, because an indicator only informs the user they are in creative mode, but doesn't give them the ability to change it and the admins would have to step-in every time to fix it. Another interesting idea might be to allow certain privs to be granted for a period of time (such as being in creative for a set amount of time, and then it is automatically revoked afterwards). TBH, the simplest solution might be to make all grant everything except for creative (even though the breaks the definition of all) and then creative would have to be granted/revoked explicitly. So to summarize:
According to these files in the minetest engine: cb_creative_mode is controlled via the mainmenu option, and sets the value globally in world.mt (and minetest.conf). It should be noted that in order to use grant and revoke privileges you must hold one of the following privileges basic_privs or privs (and also the basic_privs must be configured to allow this). This is further broken by the fact that a server admin could grant creative to a player, and that the player might be unable to revoke it themselves, relying on an admin to revoke it. Thus, the use-case for changing to creative mode in-game seems really only to facilitate server administration/maintenance, as users of the system are unlikely to be able to grant privs to themselves initially. Even having a pause menu (pressing escape) option to switch between creative/survival mode wouldn't work here (expect in a situation where you want to go from creative to survival -- eg. more privileged to less privileged). I suppose that the revoke command could allow a player to implicitly revoke a privilege for themselves -- that would solve the above scenario (even though it is beyond the stated use-case). |
I don't really understand how this is an engine issue. |
These files (which dealt with "creative mode" setting, and grant/revoke) are in the MT repo (making it a minetest issue).
Sure code could be added to MTG to correct it, but the issue is a fundamental way in which "creative" mode is turned on/off (and having some way of knowing when creative is active). Solving it for MTG only would be a case of treating the symptoms rather than addressing the root issue. The original issue:
This would require a change to the mainmenu lua code in minetest -- making it a minetest issue. However, the way that the mainmenu functions means that this does not fundamentally work -- the creative mode setting is a quasi per-world/global setting and doesn't take into account that the "creative" priv could be granted to individual players. I'd say what the OP really wants is a per-player indicator that is shown in the client's menu (when pressing the escape key). The other stuff I mentioned -- was a possible solution for people to easily turn creative mode off when they don't need it anymore and they didn't have the privs to do that. grant and revoke both require either privs or basic_privs (with the relevant privs added). Eg. the indicator in the menu, showing "creative mode on" could be a button allowing it to be toggled off (again that is the menu accessible by pressing the escape key, not the main menu). |
@kneekoo Grantme all adds "creative" privilege, which turns the game into creative mode Maybe change the title to: |
and /builtin/game/privileges.lua |
Creative is a MTG mod by the way. |
Technically you're right according to how the engine does things right now. But I think "creative" should be a game mode, not simply a privilege. And if the player has the "gamemode" privilege, the game can then be toggled between whatever modes the game supports. This would put the responsibility on game makers to support different game modes, and even how they display it to the players, while the engine would only have to support the "gamemode" privilege itself. |
While this is true, and is basically what minecraft does (creative / survival / spectator, etc) -- it still requires proposing changes to minetest itself and would require an issue to be opened on the minetest repo. As far as just showing an indicator (a ui element) on the inventory formspec would be trivial and could be directly implemented in lua for MTG -- if someone wants to override minetest core builtins to put the indicator on a menu other than the inventory formspec that could be done; However, I wouldn't recommend doing this....I think it would be a bad idea to start overriding core builtins (it could get out-of-hand very quickly). Moreover, it is starting to sound like we have two* separate issues here.
*Implied issue -- players who are granted "creative" priv (by someone else) cannot revoke it themselves (a player should be able to implicitly revoke them, for themselves, even if they don't have the requird privs to revoke: privs, basic_privs). I personally feel like the above (implied revoke) was not done correctly in MT. Vis-a-vis: If someone grants a key for a house to someone, the recipient should be able to revoke (return) the key regardless of whatever privs they have, but they should not be able to grant (pass) the "key" to someone else (discretionary vs mandatory access controls, and least privilege). |
Yes. Although I'd like to be more specific and suggest that this should be directly implemented in lua for the Creative mod.
And that would be the best title for the PR - it deals with the immediate issue
This requires greater discussion and a separate PR I agree |
Note that the engine only implements map-wide creative mode, the |
I created two new issues for each item: #2890 and #11457. I think having a separate place for the first issue makes more sense, considering this conversation got a bit long. I hope that's fine, and this one is probably best closed now. |
I don't know what "creative" is supposed to do, but when I hit Esc to access the game menu, I see "Creative Mode: Off". That's not right, though, because the game still acts like in creative mode, with all the tabs in the crafting interface, and if I harvest my crops I will only get 1 finished product + 1 seed, nothing else. And when I plant the seed back on tilled soil, the seed stays in my inventory and I can fill all the farming spots with it, like in creative mode. And when I chopped wood, the log counter in my inventory remained the same, although the wood looked like being chopped normally, and they are gone.
Once I did
/revokeme creative
, things went back to normal - the counters started working again for the stuff that I harvested and planted.The text was updated successfully, but these errors were encountered: