# Multiple Use Item Actions

**URL:** <https://discourse.cataclysmdda.org/t/multiple-use-item-actions/26447>\
**Category:** The Toolbox\
**Created:** [June 5, 2021, 11:20pm UTC](https://discourse.cataclysmdda.org/t/multiple-use-item-actions/26447 "2021-06-05T23:20:26Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![FrogFrozen](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/frogfrozen/32/8452_2.png) [@FrogFrozen](https://discourse.cataclysmdda.org/u/FrogFrozen)\
**Post date:** [June 5, 2021, 11:20pm UTC](https://discourse.cataclysmdda.org/t/multiple-use-item-actions/26447/1 "2021-06-05T23:20:27Z")

</div>

I’m trying to make a mod that will involve a complicated crafting tree similar to that one lightsaber mod. Except the crafting tree will be for a suit of armor instead of a weapon. I want to give the armor multiple holsters for gun, grenades, magazines, etc. and other things.

However, I can’t seem to understand the syntax for doing this. If this is even a thing that can be done in the first place. The code I have for it goes like this:

```auto
"use_action": [{ "type": "holster", "max_volume": 10, "draw_cost": 150, "skills": [ "smg", "shotgun", "rifle", "launcher"] },
{"type": "holster",
   "holster_prompt": "Stash grenades",
   "holster_msg": "You stash your %s.",
   "multi": 4,
   "max_volume": "750 ml",
   "draw_cost": 30,
   "flags": ["GRENADE"]
 },
 { "type": "holster",
   "holster_prompt": "Stash ammo",
   "holster_msg": "You stash your %s.",
   "multi": 4,
   "max_volume": "500 ml",
   "draw_cost": 30,
   "flags": ["MAG_COMPACT"]
 } ],
 "flags": [
```

---

<div class="post-metadata">

**Author:** ![mlangsdorf](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/mlangsdorf/32/2462_2.png) [@mlangsdorf](https://discourse.cataclysmdda.org/u/mlangsdorf)\
**Post date:** [June 6, 2021, 2:29am UTC](https://discourse.cataclysmdda.org/t/multiple-use-item-actions/26447/2 "2021-06-06T02:29:49Z")

</div>

use triple ticks: ``` to surround your text.

---

<div class="post-metadata">

**Author:** ![FrogFrozen](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/frogfrozen/32/8452_2.png) [@FrogFrozen](https://discourse.cataclysmdda.org/u/FrogFrozen)\
**Post date:** [June 6, 2021, 2:39am UTC](https://discourse.cataclysmdda.org/t/multiple-use-item-actions/26447/3 "2021-06-06T02:39:01Z")

</div>

That unfucked the post. Thank you.

---

<div class="post-metadata">

**Author:** ![mlangsdorf](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/mlangsdorf/32/2462_2.png) [@mlangsdorf](https://discourse.cataclysmdda.org/u/mlangsdorf)\
**Post date:** [June 6, 2021, 12:50pm UTC](https://discourse.cataclysmdda.org/t/multiple-use-item-actions/26447/4 "2021-06-06T12:50:43Z")

</div>

One of the enchanted belts in Magiclysm has this:

```auto
"use_action": [
   {
     "type": "holster",
     "holster_prompt": "Sheath blade",
     "holster_msg": "You sheath your %s"
   },
   "CROWBAR"
 ],

```

so it looks like you should be correct on the syntax. What errors/issues are you seeing when you try it in the game?

---

<div class="post-metadata">

**Author:** ![FrogFrozen](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/frogfrozen/32/8452_2.png) [@FrogFrozen](https://discourse.cataclysmdda.org/u/FrogFrozen)\
**Post date:** [June 6, 2021, 5:45pm UTC](https://discourse.cataclysmdda.org/t/multiple-use-item-actions/26447/5 "2021-06-06T17:45:19Z")

</div>

I got the game to load. Apparently the syntax error crashing it had nothing to do with the specific pocket thing and it was such a simple error that I can only imagine I must truly be the Big Dumb.

However, still have a problem with this specific mod idea. I load it up and spawn in the item to test. I can only use the gun holster. Can’t access the magazine or grenade pouches at all.

---

<div class="post-metadata">

**Author:** ![mlangsdorf](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/mlangsdorf/32/2462_2.png) [@mlangsdorf](https://discourse.cataclysmdda.org/u/mlangsdorf)\
**Post date:** [June 6, 2021, 6:24pm UTC](https://discourse.cataclysmdda.org/t/multiple-use-item-actions/26447/6 "2021-06-06T18:24:48Z")

</div>

Development is tricky and even experienced developers make simple mistakes. Don’t beat yourself up over making an error when you get started. Try to learn from it.

My next suggestion would be to add a different type of use\_action, like CROWBAR, and see if that works.

---

<div class="post-metadata">

**Author:** ![FrogFrozen](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/frogfrozen/32/8452_2.png) [@FrogFrozen](https://discourse.cataclysmdda.org/u/FrogFrozen)\
**Post date:** [June 6, 2021, 11:07pm UTC](https://discourse.cataclysmdda.org/t/multiple-use-item-actions/26447/7 "2021-06-06T23:07:02Z")

</div>

Oh, no. I wasn’t taking it anywhere near that hard. I was just being lazy and wanted to say what the real error was in a succinct way jokingly. Instead of writing out the whole thing, which was a super common mistake, anyway.

You mean like separating the holster actions with non-holster actions like crowbar to see if it’ll accept multiple holsters, then?

---

<div class="post-metadata">

**Author:** ![mlangsdorf](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/mlangsdorf/32/2462_2.png) [@mlangsdorf](https://discourse.cataclysmdda.org/u/mlangsdorf)\
**Post date:** [June 7, 2021, 2:14am UTC](https://discourse.cataclysmdda.org/t/multiple-use-item-actions/26447/8 "2021-06-07T02:14:31Z")

</div>

I’d try that at least.

---

<div class="post-metadata">

**Author:** ![Mantar](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/mantar/32/42_2.png) [@Mantar](https://discourse.cataclysmdda.org/u/Mantar)\
**Post date:** [June 7, 2021, 7:33pm UTC](https://discourse.cataclysmdda.org/t/multiple-use-item-actions/26447/9 "2021-06-07T19:33:27Z")

</div>

> [@mlangsdorf](#):
>
> even experienced developers make simple mistakes

Oh yeah, I know that feeling.  
 ![Programming in a Nutshell](https://us1.discourse-cdn.com/flex016/uploads/cataclysmdda/original/2X/f/fb213a35903b6307579ddbc8fb3a8ce7d080a282.jpeg)  
Some days I might just as well hit compile and flip a coin.
