# A bit of help need. (adding a function)

**URL:** <https://discourse.cataclysmdda.org/t/a-bit-of-help-need-adding-a-function/5581>\
**Category:** The Toolbox\
**Created:** [March 24, 2014, 5:28pm UTC](https://discourse.cataclysmdda.org/t/a-bit-of-help-need-adding-a-function/5581 "2014-03-24T17:28:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Funk](https://avatars.discourse-cdn.com/v4/letter/f/d07c76/32.png) [@Funk](https://discourse.cataclysmdda.org/u/Funk)\
**Post date:** [March 24, 2014, 5:28pm UTC](https://discourse.cataclysmdda.org/t/a-bit-of-help-need-adding-a-function/5581/1 "2014-03-24T17:28:47Z")

</div>

Im trying to add a new weapon, basicy an electric cestus, the problem is the game doesn’t recognise my function and i cant find where new ons go.

[spoiler=Code so far]{ “type”:“GENERIC”,  
“id”: “powerglove\_off”,  
“symbol” : “3”,  
“color”: “light\_gray”,  
“name”: “cestus”,  
“description”: “A heavy metal glove that covers the fist and increases striking power, The glove is fitted with capacitors and a high-yield rechargeable storage battery.When a switch on the handle is pressed, a high-voltage current is transmitted to electrodes mounted on the knuckles, and by extension to anyone unfortunate enough to be in contact with [them.it](http://them.it)’s so bad”,  
“material”: [“steel”,“leather”],  
“techniques” : [“WBLOCK\_2”, “RAPID”],  
“flags” : [“UNARMED\_WEAPON”,“DURABLE\_MELEE”],  
“price”: 0,  
“volume”: 2,  
“weight”: 970,  
“bashing” : 14,  
“cutting” : 0,  
“to\_hit” : 2,  
“max\_charges” : 500,  
“initial\_charges” : 0,  
“charges\_per\_use” : 1,  
“turns\_per\_charge” : 0,  
“ammo” : “battery”,  
“revert\_to” : “null”,  
“category”: “weapons”,  
“use\_action” : “POWERGLOVE\_OFF”  
},  
{ “type”:“GENERIC”,  
“id”: “powerglove\_on”,  
“symbol” : “3”,  
“color”: “light\_gray”,  
“name”: “cestus”,  
“description”: “A heavy metal glove that covers the fist and increases striking power, The glove is fitted with capacitors and a high-yield rechargeable storage battery.When a switch on the handle is pressed, a high-voltage current is transmitted to electrodes mounted on the knuckles, and by extension to anyone unfortunate enough to be in contact with [them.it](http://them.it)’s so bad”,  
“material”: [“steel”,“leather”],  
“techniques” : [“WBLOCK\_2”, “RAPID”],  
“flags” : [“UNARMED\_WEAPON”,“DURABLE\_MELEE”,“CHARGEDIM”],  
“price”: 0,  
“volume”: 2,  
“weight”: 970,  
“bashing” : 14,  
“cutting” : 0,  
“to\_hit” : 2,  
“max\_charges” : 500,  
“initial\_charges” : 0,  
“charges\_per\_use” : 1,  
“turns\_per\_charge” : 15,  
“ammo” : “battery”,  
“revert\_to” : “powerglove\_off”,  
“category”: “weapons”,  
“use\_action” : “POWERGLOVE\_ON”  
}

[spoiler/]

---

<div class="post-metadata">

**Author:** ![i2amroy](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/i2amroy/32/909_2.png) [@i2amroy](https://discourse.cataclysmdda.org/u/i2amroy)\
**Post date:** [March 24, 2014, 5:43pm UTC](https://discourse.cataclysmdda.org/t/a-bit-of-help-need-adding-a-function/5581/2 "2014-03-24T17:43:45Z")

</div>

(Code tags and spoilers don’t mix well, just use the code tags and it will automatically create a scrollable inner window)

You would need to add it to the iuse.cpp and iuse.h files and then recompile (alternatively you might be able to do something with lua, but I have no idea how that stuff works, so don’t ask me how).
