[Mod] Mountain Climbing [handholds]

User avatar
Beerholder
Member
Posts: 199
Joined: Wed Aug 03, 2016 20:23
GitHub: evrooije
In-game: Beerholder

Re: [Mod] Mountain Climbing [handholds]

by Beerholder » Post

Really nice mod! No more sneak ladders, and they aren't as conspicuous as ladders (so if you want to hide your traces a bit, e.g. on an anarchy server, this is ideal).

One minor issue though ... I had some sand fall down the climbable air, and probably it was removed as a result since they no longer worked ... I will try fix it myself for now by registering an ABM to periodically call the remove_air function and see if that works (can't be bothered to fix the fall code in Minetest for now ...)

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: [Mod] Mountain Climbing [handholds]

by paramat » Post

Yeah the author is aware of that issue. I suggest adding an 'on destruct' function to climb air so that if it is removed it also removes any surrounding handholds and returns them to normal stone/ice.

User avatar
Beerholder
Member
Posts: 199
Joined: Wed Aug 03, 2016 20:23
GitHub: evrooije
In-game: Beerholder

Re: [Mod] Mountain Climbing [handholds]

by Beerholder » Post

Hi paramat, yeah better to use events instead of an ABM. Thanks for the suggestion :) I can always use the pick to create new handholds. In case anyone is interested, the fix:

Code: Select all

-- Restore the original non-handholds node in case e.g. sand or gravel falls
local function remove_handholds(pos)
	local north_node = minetest.get_node({x = pos.x, y = pos.y, z = pos.z+1})
	local south_node = minetest.get_node({x = pos.x, y = pos.y, z = pos.z-1})
	local east_node = minetest.get_node({x = pos.x+1, y = pos.y, z = pos.z})
	local west_node = minetest.get_node({x = pos.x-1, y = pos.y, z = pos.z})

	local node_to_restore
	local node_to_restore_pos

	if minetest.get_item_group(north_node.name, "handholds") == 1 then
		node_to_restore = north_node
		node_to_restore_pos = {x = pos.x, y = pos.y, z = pos.z+1}
	elseif minetest.get_item_group(south_node.name, "handholds") == 1 then
		node_to_restore = south_node
		node_to_restore_pos = {x = pos.x, y = pos.y, z = pos.z-1}
	elseif minetest.get_item_group(east_node.name, "handholds") == 1 then
		node_to_restore = east_node
		node_to_restore_pos = {x = pos.x+1, y = pos.y, z = pos.z}
	elseif minetest.get_item_group(west_node.name, "handholds") == 1 then
		node_to_restore = west_node
		node_to_restore_pos = {x = pos.x-1, y = pos.y, z = pos.z}
	else
		return
	end

	if node_to_restore.name == "handholds:stone" then
		minetest.set_node(node_to_restore_pos, {name = "default:stone"})
	elseif node_to_restore.name == "handholds:desert_stone" then
		minetest.set_node(node_to_restore_pos, {name = "default:desert_stone"})
	elseif node_to_restore.name == "handholds:sandstone" then
		minetest.set_node(node_to_restore_pos, {name = "default:sandstone"})
	elseif node_to_restore.name == "handholds:ice" then
		minetest.set_node(node_to_restore_pos, {name = "default:ice"})
--	else
--		In this case, the node was actually "manually" removed because handhold stone/ ice was dug
	end

end

-- climbable air!
minetest.register_node("handholds:climbable_air", {
	description = "Air!",
	drawtype = "airlike",
	paramtype = "light",
	sunlight_propagates = true,
	walkable = false,
	pointable = false,
	diggable = false,
	climbable = true,
	drop = "",
	groups = {not_in_creative_inventory = 1},
	on_destruct = function(pos)
		remove_handholds(pos)
	end,
})

Shara
Moderator
Posts: 179
Joined: Sat Aug 20, 2016 15:18
GitHub: ezhh
IRC: Shara

Re: [Mod] Mountain Climbing [handholds]

by Shara » Post

Hi Beerholder, thanks for the feedback and code. The falling nodes problem is a known issue as paramat pointed out. I'm very busy at the moment, but will be looking at adding in a fix soon.

I'll avoid looking at your code for the moment, because I would prefer to try my own way of fixing it first, but I might come back to this if I'm not happy with what I get.

User avatar
Achilles
Member
Posts: 247
Joined: Sun Dec 15, 2013 11:55
In-game: Achilles
Location: Excuse Me???? -_-

Re: [Mod] Mountain Climbing [handholds]

by Achilles » Post

Nice mod, Shara. The handholds look far better than any ladders that I've seen.

+1

User avatar
Beerholder
Member
Posts: 199
Joined: Wed Aug 03, 2016 20:23
GitHub: evrooije
In-game: Beerholder

Re: [Mod] Mountain Climbing [handholds]

by Beerholder » Post

Shara wrote:I'll avoid looking at your code for the moment, because I would prefer to try my own way of fixing it first, but I might come back to this if I'm not happy with what I get.
Hi Shara, good idea :) my code was quick and dirty anyways to resolve the issue without spending too much time on it so it may not be as efficient as it could be ... :)

Shara
Moderator
Posts: 179
Joined: Sat Aug 20, 2016 15:18
GitHub: ezhh
IRC: Shara

Re: [Mod] Mountain Climbing [handholds]

by Shara » Post

Thanks again Beerholder. I've updated the mod with (what I hope is...) a working fix, though please feel free to let me know if you see any issues with how I've done it. I like to try and work out my own solutions, but I'm always happy to adjust them. :)

I took a quick look at your code as well, and I think it leaves a hole; it doesn't check which direction the handholds nodes face. Even though that's not an issue when you've only got one node to worry about, if you have another facing the same way positioned two nodes behind it then, depending on the direction they face, the on_destruct check might remove the wrong one. You might want to either adjust your own code for this or switch over to mine (assuming you can't find problems with it!).

User avatar
Beerholder
Member
Posts: 199
Joined: Wed Aug 03, 2016 20:23
GitHub: evrooije
In-game: Beerholder

Re: [Mod] Mountain Climbing [handholds]

by Beerholder » Post

Hi Shara, thanks! I will switch to yours, as my quick fix was pretty much a copy/ paste/ modify bandaid kind of fix ;) I will switch to your code and give it a test and will let you know in case of any issues :)

Thanks again, really like this mod!

Shara
Moderator
Posts: 179
Joined: Sat Aug 20, 2016 15:18
GitHub: ezhh
IRC: Shara

Re: [Mod] Mountain Climbing [handholds]

by Shara » Post

Fix added to prevent screwdrivers being used to leave orphaned climbable air nodes. I'd suggest anyone using this updates to the current version.

Shara
Moderator
Posts: 179
Joined: Sat Aug 20, 2016 15:18
GitHub: ezhh
IRC: Shara

Re: [Mod] Mountain Climbing [handholds]

by Shara » Post

An API has now been added so that nodes from other mods can be registered as handholds nodes. I've not written documentation for this yet, but it shouldn't be too difficult to work out from the existing node registrations in the mod.

I've also now added silver and desert sandstone to the default handholds types.

Image

Nordal
Member
Posts: 158
Joined: Mon Jul 30, 2018 15:46
GitHub: Nordall

Re: [Mod] Mountain Climbing [handholds]

by Nordal » Post

Thank you for this great mod!
CFS - still widely unknown

User avatar
voxelproof
Member
Posts: 1087
Joined: Sat Aug 05, 2017 08:13
Location: Europe

Re: [Mod] Mountain Climbing [handholds]

by voxelproof » Post

How could I overlook this mod? Now going to the mountains with it :) Thanks a lot, Shara!
To miss the joy is to miss all. Robert Louis Stevenson

User avatar
AiTechEye
Member
Posts: 1000
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: Sweden

Re: [Mod] Mountain Climbing [handholds]

by AiTechEye » Post

instead of making a node for each registryd item, air nodes and etc, why not make a attached steps node?

and because it is wallattached and drop="" tha nodes disappear whan the stone are dug

Code: Select all

minetest.register_node("handholds:lol", {
	description = "steps",
	tiles = {"handholds_holds.png"},
	climbable = true,
	groups={attached_node=1},
	drop="",
	alpha=100,
	sunlight_propagates=true,
	pointable=false,
	paramtype="light",
	paramtype2 = "wallmounted",
	legacy_wallmounted = true,
	walkable=false,
	drawtype="nodebox",
	node_box = {
		type="wallmounted",
		wallmounted = {
			 {-0.5, -0.5, -0.5, 0.5, 0.5, -0.49}
		}
	},
})
Image
Attachments
screenshot_20181126_222312.png
screenshot_20181126_222312.png (228.39 KiB) Viewed 970 times

Shara
Moderator
Posts: 179
Joined: Sat Aug 20, 2016 15:18
GitHub: ezhh
IRC: Shara

Re: [Mod] Mountain Climbing [handholds]

by Shara » Post

Tried it originally, and it was ruled out because you could see the handholds sticking out slightly instead of having the appearance of going into the stone.

It also doesn't make any sense for handholds (a thing you cut into stone) to drop off when hit.

FaceDeer
Member
Posts: 506
Joined: Sat Aug 29, 2015 19:01
GitHub: FaceDeer

Re: [Mod] Mountain Climbing [handholds]

by FaceDeer » Post

You could perhaps add a callback to the wallmounted handhold to auto-dig the backing node when it itself gets dug. You'd need a couple of different handhold types to represent different classes of backing node (cracky, choppy, etc) but it would make adding new nodes much easier and perhaps solve a few quirks.

Shara
Moderator
Posts: 179
Joined: Sat Aug 20, 2016 15:18
GitHub: ezhh
IRC: Shara

Re: [Mod] Mountain Climbing [handholds]

by Shara » Post

Which quirks? Last time I tested, everything was working as intended.The major reason not to add it as a separate node is the visual appearance. It looks like a separate node, and I don't like that.

The major issue I still dislike is "air bubbles" in water, but a separate node isn't going to fix that.

FaceDeer
Member
Posts: 506
Joined: Sat Aug 29, 2015 19:01
GitHub: FaceDeer

Re: [Mod] Mountain Climbing [handholds]

by FaceDeer » Post

The main one that comes to mind is the fact that you can only have handholds on one side of a given node. Granted, with wallmounted handholds you can't have handholds on two adjacent nodes that are facing into the same air node, so there's a different quirk there, but that would just be visual since you could still climb in that spot either way.

It also forces handhold nodes to have a particular orientation, so chopping handholds into tree trunks (which have an orientation already) could be tricky.

These aren't major issues, mind you, just "quirks". As you say, wallmounted handholds would have quirks of their own. There's limits to what can be done with the Minetest engine.

Oh, ABMs have become more efficient in recent versions of Minetest, so perhaps you could add one that removes climbable air that's adjacent to water and replaces it once the water's gone? Climbable air is pointless underwater anyway since the player can swim upward anyway.

User avatar
voxelproof
Member
Posts: 1087
Joined: Sat Aug 05, 2017 08:13
Location: Europe

Re: [Mod] Mountain Climbing [handholds]

by voxelproof » Post

I've checked it out. Great mod, makes climbing a more realistic play than with steel slabs I used so far, however it seems that overhangs and rocky corners cannot be traversed using handholds from your mod. I think the easiest solution to this deficiency would be to make nodes with handholds passable and making them have "hand-holding" property on all of their sides. What do you think? (However even in such situation overhangs couldn't be passed through in straightforward vertical way).
To miss the joy is to miss all. Robert Louis Stevenson

Shara
Moderator
Posts: 179
Joined: Sat Aug 20, 2016 15:18
GitHub: ezhh
IRC: Shara

Re: [Mod] Mountain Climbing [handholds]

by Shara » Post

voxelproof - glad that you had some fun with it. But I think for overhangs most people would need more than just a climbing pick anyway. :)

FaceDeer - I've thought about it, and also considered having submerged handholds "wash away" much like ones buried by falling nodes get lost. I'm reluctant to add ABMs even with the current improvements, and was initially thinking of an on_flood check, though based on lua_api.txt on_flood doesn't work for air nodes. I don't know if that means all airlike nodes, or just "air" nodes.

User avatar
voxelproof
Member
Posts: 1087
Joined: Sat Aug 05, 2017 08:13
Location: Europe

Re: [Mod] Mountain Climbing [handholds]

by voxelproof » Post

Shara wrote:voxelproof - glad that you had some fun with it. But I think for overhangs most people would need more than just a climbing pick anyway. :)
OK. I've just realized that you implemented handholds as an air node, so my proposal obviously doesn't apply to it. Nevertheless it adds a lot of reality and goes well with my intent of creating via ferratas in interesting Alpine sceneries. Overhangs will be passable through ladders and corners through slabs.

But at least you could make Climbing Pick able to dig snow and ice -- as for now you have to unwield it to pass through layers of snow.
To miss the joy is to miss all. Robert Louis Stevenson

Shara
Moderator
Posts: 179
Joined: Sat Aug 20, 2016 15:18
GitHub: ezhh
IRC: Shara

Re: [Mod] Mountain Climbing [handholds]

by Shara » Post

It's not possible for it to dig ice, because it's also used to make handholds in ice, and I feel it would be odd if it could just dig one single node (snow) in the whole game.

I know that in theory you should be able to use the tool to clear certain nodes out of the way, but we'd need something like different left and right click behaviours for tools so they could be multi-function even with the same target. It's probably just easier to have a default pick in the next slot and switch between them as needed.

User avatar
voxelproof
Member
Posts: 1087
Joined: Sat Aug 05, 2017 08:13
Location: Europe

Re: [Mod] Mountain Climbing [handholds]

by voxelproof » Post

Shara wrote:It's not possible for it to dig ice, because it's also used to make handholds in ice, and I feel it would be odd if it could just dig one single node (snow) in the whole game.
I didn't use it on a glacier yet, but that's great news -- it's exactly how like real climbing proceeds (in the highest real mountains most of the climbing is usually done through ice).
It's probably just easier to have a default pick in the next slot and switch between them as needed.
This is how I resolved this not-really-a-problem. Thx for nice mod :)
To miss the joy is to miss all. Robert Louis Stevenson

Innomen
Member
Posts: 28
Joined: Fri May 31, 2019 15:47

Re: [Mod] Mountain Climbing [handholds]

by Innomen » Post

Diamonds only? Really? O.o

Iron would have been bad enough since you have to tunnel to hades before you ever see any, but diamond? /uninstall

User avatar
theGoodNeighbor
Member
Posts: 28
Joined: Sun Jul 28, 2019 19:12
Location: Southern Illinois, USA

Re: [Mod] Mountain Climbing [handholds]

by theGoodNeighbor » Post

Innomen wrote:Diamonds only? Really? O.o

Iron would have been bad enough since you have to tunnel to hades before you ever see any, but diamond?
This bothers me, too. Why is this only craftable with the rearest ore in the whole game? :( Please, make it craftable with common matterials. This is such an essential tool!

ThorfinnS
Member
Posts: 311
Joined: Mon Feb 25, 2019 22:05
GitHub: ThorfinnS

Re: [Mod] Mountain Climbing [handholds]

by ThorfinnS » Post

Take a look at MyMasonHammer. No diamonds required, anyway.

Post Reply

Who is online

Users browsing this forum: No registered users and 22 guests