Creative mode should default to no damage #3191
Labels
No Label
#P1 CRITICAL
#P2: HIGH
#P3: elevated
#P4 priority: medium
#P6: low
#Review
annoying
API
bug
code quality
combat
commands
compatibility
configurability
contribution inside
controls
core feature
creative mode
delayed for engine release
documentation
duplicate
enhancement
environment
feature request
gameplay
graphics
ground content conflict
GUI/HUD
help wanted
incomplete feature
invalid / won't fix
items
looking for contributor
mapgen
meta
mineclone2+
Minecraft >= 1.13
Minecraft >= 1.17
missing feature
mobile
mobs
mod support
model needed
multiplayer
Needs adoption
needs discussion
needs engine change
needs more information
needs research
nodes
non-mob entities
performance
player
possible close
redstone
release notes
schematics
Skyblock
sounds
Testing / Retest
tools
translation
unconfirmed
mcl5
mcla
Media missing
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: VoxeLibre/VoxeLibre#3191
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Before anything, we can switch from creative to survival with the /gamemode command.
Survival should obviously default to
enable_damage = true
. Creative should be the opposite of that, so players don't have to write commands to stay safe.Technically, we can get away from restarting the client whatever the defaults, considering Minetest accepts changing server settings like this:
However, the game currently ignores that setting if you start the game with
[x] Enable Damage
from the Minetest client - which is why I marked this as a bug.As I argued in #3102, we should keep it simple and only have zero damage in creative. But if the developers want to support all gamemodes with and without damage, at least let's have a proper default and make sure our game obeys changing the
enable_damage
setting, so people don't have to exit the game to toggle it.I did not know settings could be changed while Minetest is running that is why the enable_damage setting is cached.
How is that possible? You can't get minetest to uncheck the enable damage enabled when creative is checked.
The problem with the enable_damage setting is that it can only apply globally and not to specific players. You could have per player enable damge but that would obviously be more complicated than assuming enable damage based on game mode.
But then what will the enable_damge setting mean?
One possiblity is that it could be PvP. If it is disabled players can't harm each other directly. However changing the meaning of the enable_damage setting would potentially break worlds/servers.
BTW /gamemode survival from global creative mode does nothing.
By default, Minetest makes games start in survival mode with damage enabled.
With the above client settings, we can use both these commands:
If it's possible for games to override
Creative mode
andEnable damage
in the client, great. If not, we should not to support them. We can disable both from the Minetest UI, according to this Minetest PR.We would have to add this in
game.conf
:disabled_settings = creative_mode, enable_damage
This is how it looks:
With this in mind, we can also add buttons in the inventory, so players can switch from one mode to another, and maybe even toggle damage. But at least the commands would work anyway.
I think the /gamemode creative should also set enable_damage to false if it can. /gamemode survival should set enable_damage to true. People should only use /set enable_damage if they don't want to use a default.
I think that it should be a command, and should check privs. I mean, it's that way in Minecraft...
I took a better look at it, and Minecraft actually has four player-related damage settings in the game rules:
These should be accessible via the
/gamerule
command, part of the rules I mentioned in #2331.I just tested the latest master and apparently you can't disable the damage at all. Here's what I tried:
/set enable_damage false
from the gameenable_damage
toFalse
from the client Settings/gamemode creative
+/set enable_damage false
enable_damage
set toFalse
from the client Settings, with/gamemode creative
Just go to a pillager outpost with the damage "disabled", and you'll get murdered. They shouldn't even be aggressive in the first place, let alone do damage, so this is another bug on its own.
P.S. When you
/set enable_damage false
, the health bar will be disabled/hidden. But as you will still take damage, and you won't know how low your health is.We will probably need an API, which checks order of precedence or priority. Game command should override both. Then the individual parts of the code can know nothing about the implementation, just call the API and get the single source of truth.
Just check creative mode?
Which one? The client code, or the one you set from the gamemode command? Each code reference will have to have that logic, then you just have duplicated logic in.
There is no difference between checking gamemode and MT creative setting.
5c464f1c1d/mods/HUD/mcl_inventory/init.lua (L192)
/set enable_damage true|false
should have the top priority, as that's explicit from the user.As for the other ways to disable the damage, we could remove the creative and damage options from the client, to check one less thing, and add creative + damage toggles in the inventory UI - more formspec work for @AFCMS. :D
Some recent testing (#3682) reminded me of this issue. We still need our game modes to make sense.
These are the defaults we should have:
The players with the correct privileges would be able to toggle these for themselves, or globally. The last two settings don't exist in Minecraft, probably because they don't want to give the players the option to change the defaults. We could do the same, or not, we can discuss this.
The command would be:
/set <setting> true|false [global]
It would be useful to register a privilege for players who would be entrusted to change their own game mode (usually mods or admin helpers). Changing the global setting should probably be limited to those having the
server
privilege.Minecraft also has
universalAnger
(defaults tofalse
in both modes), which makes angered neutral mobs attack any nearby player, not just the player that angered them. Works best ifforgiveDeadPlayers
is disabled. I only mentioned this to be here, I'm not sure if we really need it, but I can see why some server owners would do it for fun.Now the problem with multiple damage-related settings is that
enable_damage
would no longer be consistent because it's a boolean and we can't set it to "custom" when we have mixed states on the granular settings. So either we disable all damage withenable_damage
, or go custom.A potential advantage of sticking with
enable_damage
is compatibility with mods that care about this setting. But does Minetest treat it per-user or globally?My thoughts are... two weeks ago I probably would have argued against per-user creative mode. Now, I have seen realistic uses for that.
the problems I see with the damage settings based on individual users, is that it would get checked in the mob's do_step() and that would make things laggy-er.
I can see where some people on the server do not want to be in survival - they just want to build cool things. And, for them, having creative mode (individually) makes sense. Personally, I prefer Survival over Creative. I dunno, something about just having everything at my finger tips just takes the fun out of it. And, I feel that it lessens the things that I create. But, others just want to play with cool digital Legos and make artistic builds. And, for replayability and survival of the game, that needs to happen.
My real "ugh" about the additional settings is that Minetest built in their modes, and also the additional performance overhead. And, the way that I see it, it's going to be implemented as a check of a list, and then choosing to do/do not damage/attack the player. And, while this wouldn't be too bad if it was one or two players, it would be an issue if it's a good chunk of players that it has to check for. The other downside I see, is having to go through and implement the settings in a number of places so that the code actually respects the command settings. That's going to make a nightmare PR.
Right now, it just checks for enable_damage and if it's false mobs don't target players. But, this is all part of building one's own creative mode, and related settings. Though, in this, one could create a Spectator Mode, too, as it's going to use the same no-damage per-user settings. So, might as well. And, it would allow for some of the more cool things like screenshots, vids etc.