[Mod] Handholds Redo [2.0.1] [handholds_redo]

Post Reply
User avatar
TestificateMods
Member
Posts: 35
Joined: Sat Apr 11, 2020 02:09
GitHub: t-affeldt
In-game: Testificate

[Mod] Handholds Redo [2.0.1] [handholds_redo]

by TestificateMods » Post

Handholds Redo
Mountaineering made easy for Minetest Game, MineClone2, and Realtest

Image

This mod is inspired by the handholds mod that adds a climbing pick for easier mountaineering.
In that mod you can use a specialized tool to carve handholds into stone, sandstone, and ice blocks. These handholds would then allow you to climb upwards.


Noticeable Differences
The code has been completely rewritten from scratch in order to make some significant changes.
  • Instead of adding a new tool, handholds_redo lets you use your normal pickaxes by right-clicking
  • Handholds can now be carved into a lot more materials including nodes from various different mods and subgames
  • Handholds can now be carved into multiple sides of the same node
  • Handholds can now be carved into the bottom face of a node, allowing you to climb on the ceiling
  • Mod authors can now mark nodes as carveable more easily
  • Mod authors can now assign a climbing pick ability to custom tools
  • On a technical note, handhold nodes are now wallmounted and attached, meaning they don't need to be synced with their neighbouring nodes anymore

Modding Capabilities
Adding a carveable node: Adding additional nodes to the list of carveable materials is extremely easy.
All you need to do is assign a group value called handholds to the respective node like so:

Code: Select all

minetest.register_node("mymod:test_node", {
	description = "Test Node",
	tiles = { "mymod_testnode.png" },
	groups = { handholds = 2 },
})
If you want to assign a group value to an already registered node you can either override that node
using minetest.override_item(node_name, node_definition) or a helper utility provided by this mod: handholds.mark_climbable(node_name, level).
This function will apply the specified level to the handholds group and assign it to the given node.
A pickaxe needs to have at least the same level in order to carve the material.
If left unspecified, this value defaults to 1.
For reference: A wooden pickaxe has a value of 1, stone a value of 2, bronze and steel a value of 3, mese and diamond a value of 4.

Adding a custom pickaxe: In order to apply the climbing behaviour to a custom pickaxe you will need to tell this mod about it. Register it as a tool like normal and then call handholds.register_pick(name, level). This function will then override the tool's right-click handler in order to assign the new behaviour. The specified level determines which nodes can be carved. If left unspecified, this value defaults to 1.


License Information
The source code is licensed under GNU Lesser General Public License v3.0. Look at the included license file for more information.

The texture for the handholds node is taken from the mod handholds and licensed under CC BY-SA 4.0. Credit for this goes to Shara RedCat. The texture has been marginally tweaked by me for better visibility.


Links: Downloads - Source Code - ContentDB
Last edited by TestificateMods on Mon Jun 01, 2020 18:18, edited 2 times in total.

User avatar
TestificateMods
Member
Posts: 35
Joined: Sat Apr 11, 2020 02:09
GitHub: t-affeldt
In-game: Testificate

Re: [Mod] Handholds Redo [2.0.0] [handholds_redo]

by TestificateMods » Post

I just uploaded a huge update. Handholds Redo no longer has a hard dependency on default. Instead, it now supports MineClone2 and Realtest MT5 in addition to Minetest Game.
I have also added more optional dependencies. Pickaxes from lavastuff and obsidianstuff can now be used as well. You can also climb some nodes from gloopblocks.

Post Reply

Who is online

Users browsing this forum: Bob0800 and 0 guests