# Help me tweak grappling hook: retrieve it after climbing up

**URL:** <https://discourse.cataclysmdda.org/t/help-me-tweak-grappling-hook-retrieve-it-after-climbing-up/27427>\
**Category:** The Toolbox\
**Tags:** mod, inventory\
**Created:** [December 16, 2021, 10:09pm UTC](https://discourse.cataclysmdda.org/t/help-me-tweak-grappling-hook-retrieve-it-after-climbing-up/27427 "2021-12-16T22:09:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joseph\_Botosh](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/joseph_botosh/32/11654_2.png) [@Joseph\_Botosh](https://discourse.cataclysmdda.org/u/Joseph_Botosh)\
**Post date:** [December 16, 2021, 10:09pm UTC](https://discourse.cataclysmdda.org/t/help-me-tweak-grappling-hook-retrieve-it-after-climbing-up/27427/1 "2021-12-16T22:09:15Z")

</div>

So yea, the grappling hooks again. The way I understand it, currently they are pretty useless, also the implementation is strange. So I wanted to to make it even stranger 🙂

This is how I was imagining it: you climb up on the deployed grappling hook (which, as I understood, is a “furniture” with the t\_rope\_up ID), and after that it just “magically” appears in your inventory, or under your feet, if it’s full (or maybe in your hands?). The deployed t\_rope\_up disappears, of course. There are no additional menus or prompts asking you anything, the annoying “do you want to use your grappling hook?” when you try to climb down is already enough.

But staring at the code for some time made me understand that it will take too much of my time to figure it out, so HELP! Whoever has good understanding of the code, please point me into the right direction. So far I came up with these:

1. `game.cpp: game::vertical_move()` at the end of function, before calling `cata_event_dispatch::avatar_moves( old_abs_pos, u, m );` maybe check if your old position had a `t_rope_up` on it, then call `here.ter_set(t_none)` or something like that, then try adding the item to your inventory. Here is where I gave up, no idea about the inventory.

2. maybe it is possible to un-deploy the `t_rope_up`, but IDK if it works across z-levels, then again, it would add another prompt/menu, which I really don’t need. But I could live with that, if it comes to this.

3. if the feature turns out interesting or useful enough, it could become a PR

---

<div class="post-metadata">

**Author:** ![Joseph\_Botosh](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/joseph_botosh/32/11654_2.png) [@Joseph\_Botosh](https://discourse.cataclysmdda.org/u/Joseph_Botosh)\
**Post date:** [December 16, 2021, 10:14pm UTC](https://discourse.cataclysmdda.org/t/help-me-tweak-grappling-hook-retrieve-it-after-climbing-up/27427/2 "2021-12-16T22:14:56Z")

</div>

oh, it’s actually `here.furn_set( pos, f_null );`

---

<div class="post-metadata">

**Author:** ![ejseto](https://avatars.discourse-cdn.com/v4/letter/e/9dc877/32.png) [@ejseto](https://discourse.cataclysmdda.org/u/ejseto)\
**Post date:** [January 9, 2022, 8:42am UTC](https://discourse.cataclysmdda.org/t/help-me-tweak-grappling-hook-retrieve-it-after-climbing-up/27427/3 "2022-01-09T08:42:18Z")

</div>

> [@Joseph\_Botosh](#):
>
> then try adding the item to your inventory.

item itm(m.furn(u.pos()).obj().deployed\_item, calendar::turn, 1);  
u.i\_add\_or\_drop(itm);

I don’t think it’s possible to get the exact same item back but you can spawn a new one with that. You may need to add null checks. You can also call(or copy the relevant code if you don’t want the query) iexamine::deployed\_furniture which is the same as if you had (e)xamined it.

---

<div class="post-metadata">

**Author:** ![ThinkSome](https://avatars.discourse-cdn.com/v4/letter/t/278dde/32.png) [@ThinkSome](https://discourse.cataclysmdda.org/u/ThinkSome)\
**Post date:** [January 9, 2022, 9:01am UTC](https://discourse.cataclysmdda.org/t/help-me-tweak-grappling-hook-retrieve-it-after-climbing-up/27427/4 "2022-01-09T09:01:52Z")

</div>

You could just add “climb up” in the grappling hook use menu that would just teleport you up after 1 minute. Ditto for “climb down”. This does not need any messing with furniture.
