Download (5 KB)
For Minetest 5.4 and above

How do I install this?

Grimoire

Apply Lua file edits without restarting Minetest. Not intended for multiplayer.

by monk

Chat Command, /grimoire

methods_chat.lua

Command parameters can be introduced or removed from the method table. Keys with function values indexed in the param_args table are returned methods called as chat command parameters.

In this demo, the following parameters are included:

  • /grimoire <fire> [<size>]

    • Sets a ring of fire of optional size around player
  • /grimoire <water> [<drops>]

    • Spawn falling water nodes around player
  • /grimoire <echo_arg> [<arg>]

    • Sends chat message containing the <arg> value
  • /grimoire <formspec> [<arg>]

    • Shows demo formspec

If the parameter does not exist in the param_args table, the table returns with a catchall function.

Registered Tool, "grimoire:spellbook"

methods_tool.lua

Callback functions on_use, on_place, on_secondary, on_drop, in combination with player controls.

The table returned from get_player_control() may contain: up, down, left, right, jump, aux1, sneak, dig, place, LMB, RMB, and zoom

If the method function return not nil, the spellbook is taken from inventory.

Tool functions include: - Use Item: Dig pointed node - Aux1 + Use Item: Remove pointed node

  • Secondary Use, (Pointing at Nothing): Set time to morning
  • Sneak + Secondary, : Set time to night

  • Place Item: Teleport to pointed pos

  • Aux1 + Place Item: Place dirt against pointed node

  • Drop Item: Remove water in radius

  • Aux + Drop Item: Spawn falling stone

'Place' and 'Drop' will return the book to inventory.

Reviews

Review

Do you recommend this mod?

  • No reviews, yet.