[Mod] Ropes and rope ladders [ropes]

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

[Mod] Ropes and rope ladders [ropes]

by FaceDeer » Wed Feb 01, 2017 03:42

Image

This mod is a fork of Vines by Bas080 but has undergone extensive rewriting. It no longer has any vine content in it so a new name was in order.

This mod adds "rope boxes", blocks that when placed in world will automatically lower a rope at 1 meter per second until it reaches a fixed maximum length. The basic rope box produces 50m of rope by default and there are up to eight additional rope box types that produce multiples of that rope length - 100m, 150m, and so forth up to 450m. The number of rope boxes and the length of a standard rope length can be configured via the settings menu. Rope boxes can be crafted from different materials and have different maximum rope lengths depending on what material they're made of - wood, copper, and steel.

The rope stops lowering if it reaches an obstruction. Ropes can be cut using an axe or other choppy tool at any location and when they're cut the bottom half of the rope will disappear, dropping any climbers. The same happens to the entire rope if the rope box at the top of the rope is removed. Cutting the rope doesn't reduce the maximum length of rope the rope box will produce if it's removed and rebuilt again. Ropes are flammable. They respect protection settings - if the player that placed the rope box isn't permitted to build in an area then the rope descending from that box will treat it as an obstruction.

Also included is a rope ladder that behaves similarly, though it only comes in one standard maximum length - 50m by default, again changeable in settings.

Optionally, this mod can enhance default wood ladders and steel ladders to make them "extendable", capable of building upward independent of support to a setting-defined limit (defaulting to 5 nodes for wood and 15 nodes for steel ladders).

This mod retains optional backward compatibility with the crafting items from the vines mod (anything with group "vines" can be used to make rope boxes and rope ladders). Ropes can also be made from cotton, available via an optional dependency on the farming mod.

In-game documentation is provided via an optional dependency on the doc mod.

Dependencies: default
License: MIT

Recommended mods that work well with this mod: Sounding line, Vines

Links

Last edited by FaceDeer on Tue Nov 27, 2018 08:17, edited 10 times in total.
 

User avatar
texmex
Member
 
Posts: 1063
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex
 

User avatar
texmex
Member
 
Posts: 1063
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex

Re: [Mod] Ropes and rope ladders [0.8] [ropes]

by texmex » Wed Feb 01, 2017 09:09

In most worlds where cotton should exist, I've found it to be very rare. That makes ropes hard to get with only farming dependency fulfilled, whereas with vines mod ropes comes easy.

The difference in balance is fine really, but if you're looking for an default alternative for vines, perhaps a rope recipe with jungle grass or similar could work as substitute.

Personally I find rope boxes to be very powerful, hence I would increase the cost of those. (or decrease each max length, which is what I'll do since you made those handy settings available)
 

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

Re: [Mod] Ropes and rope ladders [0.8] [ropes]

by FaceDeer » Wed Feb 01, 2017 17:44

texmex wrote:Personally I find rope boxes to be very powerful, hence I would increase the cost of those. (or decrease each max length, which is what I'll do since you made those handy settings available)


You could also boost the amount of cotton required by fiddling with the recipe in crafts.lua. By default a 50m rope box takes 6 cotton to build, you could boost that to 18 cotton by changing the cotton requirement for rope segments to 9 cotton and up to 81 cotton total by changing the recipe for a rope box to 9 rope segments.

It's been my experience that, where farming is concerned, I generally either have no cotton at all (haven't found the seeds yet or haven't established a secure place to farm them) or I have arbitrarily large amounts of cotton (my farm is up and running so I can harvest hundreds of cotton whenever I log on). Balancing crafting recipes is hard. :)
 

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

Re: [Mod] Ropes and rope ladders [0.8] [ropes]

by FaceDeer » Thu Feb 02, 2017 02:30

I just noticed that this mod didn't do protection checking, allowing players to lower ropes into areas they're not allowed to build in. Fixed now.
 

User avatar
texmex
Member
 
Posts: 1063
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex

Re: [Mod] Ropes and rope ladders [0.8] [ropes]

by texmex » Thu Feb 02, 2017 07:43

Yes, the default recipe is probably as balanced as it can be. I'd rather not edit mod code, because I want to be able to pull the latest updates to it without having the pull overwrite my tweaks. If there's another methods of changing recipes I don't know about them. Can recipes be overridden by writing another mod, for example?

There's also the cotton gathering method of killing mobs_redo kittens, that is, if you lack a soul.
 

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

Re: [Mod] Ropes and rope ladders [0.8] [ropes]

by FaceDeer » Thu Feb 02, 2017 16:05

texmex wrote:Yes, the default recipe is probably as balanced as it can be. I'd rather not edit mod code, because I want to be able to pull the latest updates to it without having the pull overwrite my tweaks. If there's another methods of changing recipes I don't know about them. Can recipes be overridden by writing another mod, for example?


Looks like it. I just whipped up this little example mod to override the rope segment recipe and double its cotton requirement, and it seems to work fine. Should make a good template for you to use on any other mod as well - just add a dependency on the mod to the depends.txt file (to ensure that this mod is loaded after the mod with the recipe you're overriding), add a copy of the old crafting recipe to init.lua with the output count set to zero (don't just put an empty string for output, that crashed Minetest for me :), and add the new recipe.
 

User avatar
texmex
Member
 
Posts: 1063
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex
 

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

Re: [Mod] Ropes and rope ladders [0.8] [ropes]

by FaceDeer » Sat Feb 04, 2017 18:00

I just made all of the various rope items usable as furnace fuel with burn times based off of the components that went into making them, so if you significantly change the crafting recipes you might want to look at changing those as well.

Turns out that cotton doesn't have a fuel value, which is a bit weird and probably just an oversight. I assumed a 1-second burn time per cotton.
 

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

Re: [Mod] Ropes and rope ladders [0.9] [ropes]

by FaceDeer » Thu Feb 09, 2017 07:47

Just did a big revamp of the rope nodebox models, making them resemble the ropes in the "castle" mod. In the process I increased the number of rope boxes available, there's up to 9 now (so the default maximum length rope box has 450m of rope in it). If anyone thinks this is excessive I added a setting to allow that to be changed, if you want to retain the same behaviour that there was before set the maximum rope length multiple down to 5 and you'll get the same 50-250m range of rope lengths.

Other new features:
  • You can now "ride" the descending rope if you get within a few meters of the end of it while it's lowering.
  • Rope boxes themselves are "climbable" now, allowing much easier transition from one rope to another.
  • Severing a rope will now destroy all of the rope hanging below that point instantly, all the way down to the bottom. Previously rope destruction would pause when it reached the lower edge of the loaded map region, which could result in unfortunate incidents if someone tried climbing up a partly-destroyed rope from below.
 

Nordal
Member
 
Posts: 16
Joined: Mon Jul 30, 2018 15:46
Location: Germany

Re: [Mod] Ropes and rope ladders [ropes]

by Nordal » Fri Sep 28, 2018 12:03

Thank you for your fantastic mod. I learned to know it in the context of Hamlets game.
 

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

Re: [Mod] Ropes and rope ladders [ropes]

by FaceDeer » Tue Nov 27, 2018 08:17

Just added a new optional enhancement to this mod: the ability to replace default:ladder_wood and default:ladder_steel with "extendable" versions.

These new ladder types can be built as stand-alone ladders rather than as wallmounted ones. Right-clicking on the ladder with an itemstack of the same type of ladder will automatically add new ladder segments at the top of the ladder, allowing it to be extended upwards easily. However, the ladder will still check for support "behind" it and will only extend for a limited distance if there's nothing supporting it. By default, wooden ladders will extend 5 nodes up before needing support and steel ladders will extend 15 nodes up before needing support. This should prevent players from going nuts building infinite ladders into the sky with no effort (as well as providing actual benefit to using steel ladders in some circumstances).

The extendable ladder feature is off by default because I set it up to replace default:ladder_wood and default:ladder_steel completely, with lbms for making the transition, so I figured it'd be best not to spring that on an unsuspecting server admin. Enable it by setting ropes_extending_ladder_enabled to "true".
 

User avatar
Napiophelios
Member
 
Posts: 940
Joined: Mon Jul 07, 2014 01:14
GitHub: Napiophelios
IRC: Nappi
In-game: Nappi

Re: [Mod] Ropes and rope ladders [ropes]

by Napiophelios » Tue Nov 27, 2018 14:17

I used JP's rope code to do something similar.
Just used minetest_override to add the on_place function to default ladders.

Code: Select all
-- Default : Ladders
-- Code by Mirko K. (modified by Temperest, Wulfsdad and kilbith) (License: GPL).

local place_ladder = function(itemstack, placer, pointed_thing)
   if pointed_thing.type == "node" then
      local under = pointed_thing.under
      local above = pointed_thing.above
      local pos = above
      local oldnode = minetest.get_node(pos)

      while oldnode.name == "air" and not itemstack:is_empty() do
         local newnode = {name = itemstack:get_name(), param1 = 0}
         minetest.set_node(pos, newnode)
         itemstack:take_item()
         pos.y = pos.y+1
         oldnode = minetest.get_node(pos)
      end
   end
   return itemstack
end

remove_ladder = function(pos, oldnode, digger, ladder_name)
   local num = 0
   local above = {x=pos.x, y=pos.y, z=pos.z}
   while minetest.get_node(above).name == ladder_name do
      minetest.remove_node(above)
      above.y = above.y+ 1
      num = num + 1
   end
   if num ~= 0 then
      digger:get_inventory():add_item("main", ladder_name.." "..num)
   end
   return true
end

minetest.override_item("default:ladder_wood", {
    stack_max = 10,
    on_place = place_ladder,
})

minetest.override_item("default:ladder_steel", {
    stack_max = 10,
    on_place = place_ladder,
})
 

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

Re: [Mod] Ropes and rope ladders [ropes]

by FaceDeer » Wed Nov 28, 2018 06:16

I did rather more than just override on_place for the ladders, though. I turned them into fully 3-dimensional non-wallmounted nodes, which requires the facing parameter of existing ladders to be updated (switching it from wallmounted to facedir). It's safer to use a whole new node definition for that, IMO.

Since inspiration comes in bursts, I just added yet another new node type: wooden bridges. This is getting a little far afield from the original "ropes" theme, but I felt it was reasonable: ropes help players to climb downward, ladders help them to climb upward, and now bridges help them to build outward.

I have always been a little annoyed at how hard it was to build a platform outward from a ledge that I'm currently standing on. You have to move riiiiight up to the edge to see the outward facing side of the node to click on, a tedious and often dangerous operation. A wooden bridge node can be placed from a safe distance, facing outward, and it will automatically put itself into the correct location. It's a little hard to describe in words, but imagine the player "P" is standing on a ledge like so, and wanted to place a node at the "^" to stand on:

Code: Select all
    P
   OOO^
   OOO
   OOOO


All they'd need to do to place a bridge node at the "^" is to click on the upper face of the "O" node. And the bridge can be extended further by clicking on the ^ once it's placed, putting another beyond it.

There's a setting to disable this node type if it's undesired. There's only a wooden version of it, if a player wants to build a fancier bridge then it'd be useful as scaffolding to get them out there into a place where they can build the fancier bridge more easily.
 


Return to Mod Releases



Who is online

Users browsing this forum: No registered users and 3 guests