Go to file
luk3yx dd68abd1e4 Bugfix 2019-03-05 15:01:57 +13:00
LICENSE.md Update the copyright in LICENSE.md 2019-02-10 13:56:02 +13:00
README.md Add cloaking.hide_player() 2019-03-05 14:38:23 +13:00
chat3.lua Add cloaked chat 2019-02-10 13:49:56 +13:00
chatcommands.lua Add cloaked chat 2019-02-10 13:49:56 +13:00
cloaked-chat.lua Add cloaked chat 2019-02-10 13:49:56 +13:00
core.lua Bugfix 2019-03-05 15:01:57 +13:00
depends.txt Remove HUDs when cloaking 2019-02-24 12:07:13 +13:00
init.lua Mitigate unrelated bug in Minetest 2019-03-02 19:28:46 +13:00
irc.lua Add cloaked chat 2019-02-10 13:49:56 +13:00
mod.conf Fix mod.conf description 2019-02-24 12:10:16 +13:00
screenshot.png Add screenshot.png 2019-02-12 21:04:08 +13:00
settingtypes.txt Add cloaked chat 2019-02-10 13:49:56 +13:00

README.md

Minetest cloaking mod

Allows players to cloak and uncloak, inspired by Star Trek's cloaking device.

What is cloaking?

In this instance, cloaking is a way to go invisible and become undetectable by most mods (unless they explicitly want to detect cloaked players, so they can still send chat messages to them).

Why is cloaking so hacky, and where does it send the 'left the game' messages?

Cloaking sends no left the game messages, it leaves that up to the built-in left the game functions. The aim of cloaking is to trick other mods into thinking the player is not in-game, and for this it must be hacky.

Help, it crashes

If it crashes, it is either caused by a mod not liking non-existent players running around, or by a bug in cloaking itself.

How do I use cloaking?

Cloaking adds a modding API and two chatcommands. Both of these require the cloaking privilege to execute, however you can uncloak yourself without any privileges.

  • /cloak [victim]: Cloaks yourself, alternatively an unsuspecting victim.
  • /uncloak [victim]: Uncloaks yourself, or a victim.
  • /cloak_chat <message>: Sends <message> to all online players with the cloaking privilege. You can disable cloaked chat by setting cloaking.enable_cloaked_chat to false in minetest.conf.

How do I download cloaking?

You can either run git clone https://github.com/luk3yx/minetest-cloaking cloaking, or download a zip or tar.gz file. You will need to rename the folder from minetest-cloaking-master to cloaking for it to work properly.

How do I use the API?

Cloaking adds the following functions:

  • cloaking.cloak_player(player): Cloaks a player.
  • cloaking.uncloak_player(player): Uncloaks a player.
  • cloaking.get_cloaked_players(): Gets a list of cloaked player names.
  • cloaking.get_connected_names(): Gets a list of cloaked and uncloaked player names.
  • cloaking.is_cloaked(player): Checks if a player is cloaked.
  • cloaking.hide_player(player): Hides a player without cloaking them. If/when minetest.hide_player() gets introduced, this will become an alias for that.
  • cloaking.unhide_player(player): Unhides a player previously hidden with cloaking.hide_player().
  • cloaking.chat: Cloaked chat API, this is nil if cloaked chat is disabled.
    • cloaking.chat.send(message): Sends a message to cloaked chat.
    • cloaking.chat.prefix: The text (-Cloaked-) that is prepended to cloaked chat messages before they are sent to players.

Any above functions requiring "player" as a parameter also accept a player name, provided the player is online.

It also adds the following functions that ignore cloaked players and can interact with them: cloaking.get_connected_players, cloaking.get_objects_inside_radius and cloaking.get_player_by_name.

If you have made chatcommand work with players that aren't in-game, you can add _allow_while_cloaked = true to the chatcommand definition. If you explicitly don't want your chatcommand working with cloaked players, you can add _disallow_while_cloaked = true to the definition. These modifications do not require that you add cloaking to depends.txt, as when cloaking is not loaded this parameter is simply ignored.