Difference between revisions of "List of hardcoded features"

From Minetest Developer Wiki
Jump to navigation Jump to search
m (Add to Misc category)
(rename Minetest to Luanti)
 
(22 intermediate revisions by 2 users not shown)
Line 1: Line 1:
This is a '''list of hardcoded features''' in Minetest. A hardcoded feature is a feature with a certain functionality that behaves always in a certain fixed way that cannot be customized. Minetest in general wants to allow its mods and games to customize pretty much everything, so in the long run, any hardcoded feature should be made customizable. Note not all hardoded features are created equal, some are less annoying than others, while for some features it really doesn't matter that they are hardcoded.
+
This is a '''list of hardcoded features''' in Luanti. A hardcoded feature is a feature with a certain functionality that behaves always in a certain fixed way that cannot be customized. Luanti in general wants to allow its mods and games to customize pretty much everything, so in the long run, any hardcoded feature should be made customizable. Note not all hardoded features are created equal, some are less annoying than others, while for some features it really doesn't matter that they are hardcoded. Also, this list should be more seen as a documentation, not as a feature request to un-hardcode everything in this list.
  
 
== Gameplay ==
 
== Gameplay ==
 
=== Health and damage ===
 
=== Health and damage ===
* '''The fact that you take fall damage at all''' (PR: [https://github.com/minetest/minetest/pull/11080 #11080])
+
* '''The death screen'''
 
* The fall damage calculation formula (issue: [https://github.com/minetest/minetest/pull/10348 #10348])
 
* The fall damage calculation formula (issue: [https://github.com/minetest/minetest/pull/10348 #10348])
** You can use <code>minetest.register_on_player_hpchange</code>, but if you try to remove fall damage completely, players will still experience the “red damage flash” because fall damage is calculated client-wise
 
 
* Nodes that deal direct damage do so always once per second (with <code>damage_per_second</code>); no other time interval is possible
 
* Nodes that deal direct damage do so always once per second (with <code>damage_per_second</code>); no other time interval is possible
* How breath works in general (PR: [https://github.com/minetest/minetest/pull/8042 #8042])
+
* How breath works in general (issue: [https://github.com/minetest/minetest/pull/8042 #8042])
 
* You lose breath or take drowning damage every 2 seconds, and you regain breath every 0.5 seconds
 
* You lose breath or take drowning damage every 2 seconds, and you regain breath every 0.5 seconds
 +
* The amount of time the <code>damage_texture_modifier</code> is applied when an object takes damage is hardcoded
  
 
=== Items ===
 
=== Items ===
Line 17: Line 17:
 
* All items can point (issue: [https://github.com/minetest/minetest/pull/6651 #6651])
 
* All items can point (issue: [https://github.com/minetest/minetest/pull/6651 #6651])
 
** <code>range=0</code> does not work as you can point when you're inside a node
 
** <code>range=0</code> does not work as you can point when you're inside a node
* <code>liquid_viscosity</code> affects ''two'' things: How fast the liquid spreads ''and'' how slow players move through it (PR: [https://github.com/minetest/minetest/pull/10810 #10810])
 
  
 
=== Players ===
 
=== Players ===
* All players can change their camera mode “for free”
+
* All players have '''all camera modes''', always. They can not be disabled or forced (issue: [https://github.com/minetest/minetest/issues/12855 #12855])
  
 
== Graphics ==
 
== Graphics ==
Line 32: Line 31:
 
** This does ''not'' refer to colored lamps, but to the color of light globally. Imagine a game in which the sun is red, tinting the world in red, or a game in which ''all'' lamps emit green light for some reason
 
** This does ''not'' refer to colored lamps, but to the color of light globally. Imagine a game in which the sun is red, tinting the world in red, or a game in which ''all'' lamps emit green light for some reason
 
* The 3D version of an item inventory image (fixed rotation, fixed param2)
 
* The 3D version of an item inventory image (fixed rotation, fixed param2)
** <code>place_param2</code> is coupled to placement, if you only want to change the inventory image, you're out of luck
 
 
** <code>inventory_image</code> only supports 2D images
 
** <code>inventory_image</code> only supports 2D images
 +
* Node digging particles (amount, size, lifetime, etc.)
 +
* Wielded item / hand allows only very limited graphical customization (fixed angle, can't set 3D model explicitly, etc.)
  
 
== HUD ==
 
== HUD ==
* Chat cannot be moved or hidden (by mods)
+
* Chat cannot be moved (by mods)
 
* Status message (for messages like “Fly mode enabled”) cannot be moved or hidden (by mods)
 
* Status message (for messages like “Fly mode enabled”) cannot be moved or hidden (by mods)
  
Line 46: Line 46:
 
** Text shadow
 
** Text shadow
 
** (possibly others)
 
** (possibly others)
 
== Game menu (in main menu) ==
 
* '''All games have checkboxes for damage, Creative Mode and server hosting forced upon them''' (issue: [https://github.com/minetest/minetest/pull/8927 #8927])
 
  
 
== Controls ==
 
== Controls ==
Line 55: Line 52:
 
== Hardcoded things that are probably OK ==
 
== Hardcoded things that are probably OK ==
 
* The Esc is the pause/exit key
 
* The Esc is the pause/exit key
* The debug screen
+
* The contents of the debug screen (note that whether to show basic info or everything is customizable)
 +
* WASD keys or joystick for movement
  
[[Category:Misc]]
+
[[Category:Modding_API]]
 +
[[Category:Core]]

Latest revision as of 22:27, 22 October 2024

This is a list of hardcoded features in Luanti. A hardcoded feature is a feature with a certain functionality that behaves always in a certain fixed way that cannot be customized. Luanti in general wants to allow its mods and games to customize pretty much everything, so in the long run, any hardcoded feature should be made customizable. Note not all hardoded features are created equal, some are less annoying than others, while for some features it really doesn't matter that they are hardcoded. Also, this list should be more seen as a documentation, not as a feature request to un-hardcode everything in this list.

Gameplay

Health and damage

  • The death screen
  • The fall damage calculation formula (issue: #10348)
  • Nodes that deal direct damage do so always once per second (with damage_per_second); no other time interval is possible
  • How breath works in general (issue: #8042)
  • You lose breath or take drowning damage every 2 seconds, and you regain breath every 0.5 seconds
  • The amount of time the damage_texture_modifier is applied when an object takes damage is hardcoded

Items

  • The formula that determines how fast your tool will dig
    • You can change the parameters, but not the formula itself
  • The formula that determines how much your tool will be worn
    • You can change the parameters, but not the formula itself
  • All items can point (issue: #6651)
    • range=0 does not work as you can point when you're inside a node

Players

  • All players have all camera modes, always. They can not be disabled or forced (issue: #12855)

Graphics

  • When you take damage, the screen flashes red
  • When you take damage, the screen shakes
  • Sunlight has a subtle yellowish tint
  • Darkness has a subtle blueish tint
  • The light curves
    • This means how bright each individual light level will appear. Probably tricky to customize since the client also has a huge say in this
  • The color of light
    • This does not refer to colored lamps, but to the color of light globally. Imagine a game in which the sun is red, tinting the world in red, or a game in which all lamps emit green light for some reason
  • The 3D version of an item inventory image (fixed rotation, fixed param2)
    • inventory_image only supports 2D images
  • Node digging particles (amount, size, lifetime, etc.)
  • Wielded item / hand allows only very limited graphical customization (fixed angle, can't set 3D model explicitly, etc.)

HUD

  • Chat cannot be moved (by mods)
  • Status message (for messages like “Fly mode enabled”) cannot be moved or hidden (by mods)

Formspecs

  • No or incomplete styling/theming/customization for (#8744):
    • Scrollbars
    • Drop-down lists
    • Highlight color of selected text
    • Text shadow
    • (possibly others)

Controls

  • Mouse wheel up and mouse wheel down are hard-bound to hotbar next/previous slot selection, and cannot be rebound to a different action. (But you can bind keys for this action, in addition to the scroll wheel)

Hardcoded things that are probably OK

  • The Esc is the pause/exit key
  • The contents of the debug screen (note that whether to show basic info or everything is customizable)
  • WASD keys or joystick for movement