# Manhack deactivation

**URL:** https://discourse.cataclysmdda.org/t/manhack-deactivation/10233
**Category:** The Toolbox
**Created:** [August 1, 2015, 4:37pm UTC](https://discourse.cataclysmdda.org/t/manhack-deactivation/10233 "2015-08-01T16:37:25Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![jaked122](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/jaked122/32/473_2.png) [@jaked122](https://discourse.cataclysmdda.org/u/jaked122)
#### Post date: [August 1, 2015, 4:37pm UTC](https://discourse.cataclysmdda.org/t/manhack-deactivation/10233/1 "2015-08-01T16:37:25Z")

</div>

I’m currently working on a Pokemon mod for cataclysm(because we definitely need it), and I am having a difficult time finding what enables friendly manhacks to be deactivated and picked up.

Can someone tell me which source files those functions are in?

---

<div class="post-metadata">

### Author: ![Coolthulhu](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/coolthulhu/32/2446_2.png) [@Coolthulhu](https://discourse.cataclysmdda.org/u/Coolthulhu)
#### Post date: [August 1, 2015, 4:55pm UTC](https://discourse.cataclysmdda.org/t/manhack-deactivation/10233/2 "2015-08-01T16:55:44Z")

</div>

game.cpp, disable\_robot

---

<div class="post-metadata">

### Author: ![jaked122](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/jaked122/32/473_2.png) [@jaked122](https://discourse.cataclysmdda.org/u/jaked122)
#### Post date: [August 1, 2015, 6:52pm UTC](https://discourse.cataclysmdda.org/t/manhack-deactivation/10233/3 "2015-08-01T18:52:25Z")

</div>

Thanks, that is helpful.

Wow, game.cpp is so long…

I’ve managed that, in the same manner as the turrets.

Okay, how do I instantiate an item from the id and place it somewhere?  
edit: Figured it out, was also in that function.

---

<div class="post-metadata">

### Author: ![Coolthulhu](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/coolthulhu/32/2446_2.png) [@Coolthulhu](https://discourse.cataclysmdda.org/u/Coolthulhu)
#### Post date: [August 2, 2015, 10:46am UTC](https://discourse.cataclysmdda.org/t/manhack-deactivation/10233/4 "2015-08-02T10:46:52Z")

</div>

Note that it’s currently not really possible to store an entire monster type inside an item. It wouldn’t be particularly hard to make it possible, though.

Just adding an unique\_ptr in the item type and handling it on save/load in a similar way item contents are handled would probably be enough.

---

<div class="post-metadata">

### Author: ![jaked122](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/jaked122/32/473_2.png) [@jaked122](https://discourse.cataclysmdda.org/u/jaked122)
#### Post date: [August 2, 2015, 7:01pm UTC](https://discourse.cataclysmdda.org/t/manhack-deactivation/10233/5 "2015-08-02T19:01:18Z")

</div>

I kindof liked the manhack method, as it’s really funny when you throw out a pichu and the game says "The pichu scans you and emits an IFF beep"  
Though, I suspect that this is a stupid stopgap that ruins the whole point of having pokemon in it.  
I’ll look into actually changing the item so that this can happen without being stupid.

edit: It appears that there isn’t a forward definition of monster in the item class, so it can’t have the unique\_ptr type for that.  
Adding that in, it seems to cause everything, and I do mean everything to break, mostly the things that need the default constructor for the Item class, the copy constructor, the destructor, etc… I don’t want to rewrite any of that, so I need a bit more help with that. I think I might be able to just use a monster pointer normally, as it is checked considerably less…

Anyway, thanks for helping me around the code.

Edit again:

I’m having trouble figuring out how to serialize the monster internally. I’ve settled on storing the id, and its experience for now.
