# Double damage mod request

**URL:** <https://discourse.cataclysmdda.org/t/double-damage-mod-request/12198>\
**Category:** The Lab\
**Created:** [July 11, 2016, 12:34pm UTC](https://discourse.cataclysmdda.org/t/double-damage-mod-request/12198 "2016-07-11T12:34:06Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vulpes\_Inculta](https://avatars.discourse-cdn.com/v4/letter/v/9f8e36/32.png) [@Vulpes\_Inculta](https://discourse.cataclysmdda.org/u/Vulpes_Inculta)\
**Post date:** [July 11, 2016, 12:34pm UTC](https://discourse.cataclysmdda.org/t/double-damage-mod-request/12198/1 "2016-07-11T12:34:06Z")

</div>

[s]Can somebody make a mod that doubles melee damage of all zombies (or all creatures in the game) the same way Tough Zombies mod doubles their health?

Or could somebody explain how can I do it myself? Thanks![/s]

With the help of good comrades I made it! Here is the mod that doubles melee damage of every monster in the game.

[https://drive.google.com/file/d/0B\_kHPATPNutWQ0cxU3dYcDVnLUk/view?usp=sharing](https://drive.google.com/file/d/0B_kHPATPNutWQ0cxU3dYcDVnLUk/view?usp=sharing)

---

<div class="post-metadata">

**Author:** ![Kadian](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/kadian/32/214_2.png) [@Kadian](https://discourse.cataclysmdda.org/u/Kadian)\
**Post date:** [July 11, 2016, 1:02pm UTC](https://discourse.cataclysmdda.org/t/double-damage-mod-request/12198/2 "2016-07-11T13:02:30Z")

</div>

This would require quite a bit of work, and I’m lazy, so I’ll just tell you how it’s done.

Move to Cataclysm/data/json  
There you will find the following:

a .json file named "monsters.json"  
a folder named "monsters"  
inside the monsters folder are several other .json files, namely “defense\_bot.json”, “military.json”, “obsolete.json”, “zed\_children.json” and “zed\_explosive.json”

You can open those .json files with an editor or notepad, inside those files you will see entries like this one:

```auto
    },{
    "type" : "MONSTER",
    "id" : "mon_deer",
    "name": "deer",
    "species":"MAMMAL",
    "default_faction":"herbivore",
    "symbol":"D",
    "color":"brown",
    "size":"LARGE",
    "material":"flesh",
    "diff":1,
    "aggression":-99,
    "morale":-5,
    "speed":300,
    "melee_skill":3,
    "melee_dice":3,
    "melee_dice_sides":3,
    "melee_cut":0,
    "dodge":3,
    "armor_bash":0,
    "armor_cut":0,
    "vision_day":40,
    "vision_night":12,
    "hp":60,
    "death_function":"NORMAL",
    "description":"The northern woodland white-tailed deer, a quick and strong grazing animal. Favored prey of coyotes, wolves, and giant spider mutants.",
    "flags":["SEES", "HEARS", "SMELLS", "ANIMAL", "PATH_AVOID_DANGER_1", "WARM", "FUR", "BONES", "FAT"],
    "fear_triggers":["SOUND", "PLAYER_CLOSE"],
    "categories":["WILDLIFE"]
    },{
```

Now you just have to find the following: “melee\_dice” and “melee\_dice\_sides” ; Those govern the damage rolls of the enemies. For example, the deer has 3 Dice with 3 sides, so it’s damage ranges from 3 to 9. In order to increase this, you can either raise the amount of dice (for example to 6, which would mean it’s damage would range from 6 to 18) or the sides (example to 4, which would mean a damage of 3 to 12) or both (doubling both would do 6-36 damage instead of the 3-9)

In order to simply double it’s damage you should usually just double the amount of dice. If you want to keep a low minimum damage, just double the amount of sides per dice. If you’re crazy, double everything for massive damage.

---

<div class="post-metadata">

**Author:** ![Vulpes\_Inculta](https://avatars.discourse-cdn.com/v4/letter/v/9f8e36/32.png) [@Vulpes\_Inculta](https://discourse.cataclysmdda.org/u/Vulpes_Inculta)\
**Post date:** [July 11, 2016, 1:18pm UTC](https://discourse.cataclysmdda.org/t/double-damage-mod-request/12198/3 "2016-07-11T13:18:50Z")

</div>

Oh. So do I have to edit every single monster manually? Or is it possible to do it as Tough/Fast mods do, like:

[code]monster\_types = game.get\_monster\_types()

– double the speed of all monsters whose species is "ZOMBIE"  
for \_, monster\_type in ipairs(monster\_types) do  
local mtype = monster\_type:obj()  
if mtype:in\_species(species\_id(“ZOMBIE”)) then  
mtype.speed = mtype.speed \* 2  
end  
end[/code]

Will it work if I just change that entry to this?

```auto

```

---

<div class="post-metadata">

**Author:** ![pisskop](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/pisskop/32/1327_2.png) [@pisskop](https://discourse.cataclysmdda.org/u/pisskop)\
**Post date:** [July 11, 2016, 1:20pm UTC](https://discourse.cataclysmdda.org/t/double-damage-mod-request/12198/4 "2016-07-11T13:20:25Z")

</div>

try it.

I dont know if the lua would work, but Im sure if you knew what variables you needed to name…

---

<div class="post-metadata">

**Author:** ![Vulpes\_Inculta](https://avatars.discourse-cdn.com/v4/letter/v/9f8e36/32.png) [@Vulpes\_Inculta](https://discourse.cataclysmdda.org/u/Vulpes_Inculta)\
**Post date:** [July 11, 2016, 5:26pm UTC](https://discourse.cataclysmdda.org/t/double-damage-mod-request/12198/5 "2016-07-11T17:26:40Z")

</div>

I tried and it works! I copypasted fast\_zombies mod LUA and changed the code to this

[code]monster\_types = game.get\_monster\_types()

– double the damage of all monsters whose species is "ZOMBIE"  
for \_, monster\_type in ipairs(monster\_types) do  
local mtype = monster\_type:obj()  
if mtype:in\_species(species\_id(“ZOMBIE”)) then  
mtype.melee\_dice = mtype.melee\_dice \* 20  
end  
end[/code]

First regular zed I encountered instakilled my test character so I assume their melee\_dice is indeed x20 now (it will be x2, 20 is for testing)

Now the question is, how can I make it affect every single monster in the game and not just “ZOMBIE”? Tried couple things with the same piece of code but I’m completely incompetent so didn’t work so far…

---

<div class="post-metadata">

**Author:** ![pisskop](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/pisskop/32/1327_2.png) [@pisskop](https://discourse.cataclysmdda.org/u/pisskop)\
**Post date:** [July 11, 2016, 5:32pm UTC](https://discourse.cataclysmdda.org/t/double-damage-mod-request/12198/6 "2016-07-11T17:32:01Z")

</div>

try mtype melee dicem \* 2.0 without using all that mtype stuff. Thats lua, so you could look up online?

---

<div class="post-metadata">

**Author:** ![Vulpes\_Inculta](https://avatars.discourse-cdn.com/v4/letter/v/9f8e36/32.png) [@Vulpes\_Inculta](https://discourse.cataclysmdda.org/u/Vulpes_Inculta)\
**Post date:** [July 11, 2016, 5:52pm UTC](https://discourse.cataclysmdda.org/t/double-damage-mod-request/12198/7 "2016-07-11T17:52:08Z")

</div>

> [@pisskop](#):
>
> try mtype melee dicem \* 2.0 without using all that mtype stuff. Thats lua, so you could look up online?

Do you mean make it like this?

[code]monster\_types = game.get\_monster\_types()

– double the speed of all monsters whose species is “ZOMBIE”  
mtype.melee\_dice = mtype.melee\_dice \* 20  
end  
end[/code]

Doesn’t work ☹

---

<div class="post-metadata">

**Author:** ![pisskop](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/pisskop/32/1327_2.png) [@pisskop](https://discourse.cataclysmdda.org/u/pisskop)\
**Post date:** [July 11, 2016, 5:55pm UTC](https://discourse.cataclysmdda.org/t/double-damage-mod-request/12198/8 "2016-07-11T17:55:46Z")

</div>

There arent that many species. And you can also specify factions or even indivdual monsters, iirc.

So go to the species list and add them all?

---

<div class="post-metadata">

**Author:** ![Vulpes\_Inculta](https://avatars.discourse-cdn.com/v4/letter/v/9f8e36/32.png) [@Vulpes\_Inculta](https://discourse.cataclysmdda.org/u/Vulpes_Inculta)\
**Post date:** [July 11, 2016, 8:18pm UTC](https://discourse.cataclysmdda.org/t/double-damage-mod-request/12198/9 "2016-07-11T20:18:12Z")

</div>

[quote=“pisskop, post:8, topic:12198”]There arent that many species. And you can also specify factions or even indivdual monsters, iirc.

So go to the species list and add them all?[/quote]

Alright I multiplied that piece of code and added every type of species in it.

Zombies oneshot me, moose oneshots me, wasp oneshots me, it finally works! And without editing every single monster by hand.

Thank you Kadian and Pisskop!

Now I will test this with less extreme values (\*2 or \*3) and if it plays well I’ll be happy to contribute it as a small balance mod.

---

<div class="post-metadata">

**Author:** ![StopSignal](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/stopsignal/32/1923_2.png) [@StopSignal](https://discourse.cataclysmdda.org/u/StopSignal)\
**Post date:** [July 11, 2016, 8:34pm UTC](https://discourse.cataclysmdda.org/t/double-damage-mod-request/12198/10 "2016-07-11T20:34:00Z")

</div>

I’d love this to be merged!

---

<div class="post-metadata">

**Author:** ![kevin.granade](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/kevin.granade/32/1316_2.png) [@kevin.granade](https://discourse.cataclysmdda.org/u/kevin.granade)\
**Post date:** [July 11, 2016, 11:14pm UTC](https://discourse.cataclysmdda.org/t/double-damage-mod-request/12198/11 "2016-07-11T23:14:00Z")

</div>

Just this should do it if you really want all monsters damage doubled.

A side note, this will not affect damage from special attacks or guns, such as those fired by turrets.

```auto
-- double the damage of all monsters
monster_types = game.get_monster_types()
for _, monster_type in ipairs(monster_types) do
    local mtype = monster_type:obj()
    mtype.melee_dice = mtype.melee_dice * 20
end
```

---

<div class="post-metadata">

**Author:** ![Kadian](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/kadian/32/214_2.png) [@Kadian](https://discourse.cataclysmdda.org/u/Kadian)\
**Post date:** [July 11, 2016, 11:21pm UTC](https://discourse.cataclysmdda.org/t/double-damage-mod-request/12198/12 "2016-07-11T23:21:13Z")

</div>

Question: Will this also affect the player? or npcs? You said special attacks or guns wouldnt be affected, how about melee weapons though?

---

<div class="post-metadata">

**Author:** ![kevin.granade](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/kevin.granade/32/1316_2.png) [@kevin.granade](https://discourse.cataclysmdda.org/u/kevin.granade)\
**Post date:** [July 12, 2016, 2:34am UTC](https://discourse.cataclysmdda.org/t/double-damage-mod-request/12198/13 "2016-07-12T02:34:33Z")

</div>

Only monster melee attacks.  
Does not include player or npc.

---

<div class="post-metadata">

**Author:** ![Vulpes\_Inculta](https://avatars.discourse-cdn.com/v4/letter/v/9f8e36/32.png) [@Vulpes\_Inculta](https://discourse.cataclysmdda.org/u/Vulpes_Inculta)\
**Post date:** [July 12, 2016, 5:55am UTC](https://discourse.cataclysmdda.org/t/double-damage-mod-request/12198/14 "2016-07-12T05:55:17Z")

</div>

Ok I tested \*3 and it seems to be too much so I changed to \*2 and here it is for anyone willing to try it 🙂

[https://drive.google.com/file/d/0B\_kHPATPNutWQ0cxU3dYcDVnLUk/view?usp=sharing](https://drive.google.com/file/d/0B_kHPATPNutWQ0cxU3dYcDVnLUk/view?usp=sharing)

---

<div class="post-metadata">

**Author:** ![Vulpes\_Inculta](https://avatars.discourse-cdn.com/v4/letter/v/9f8e36/32.png) [@Vulpes\_Inculta](https://discourse.cataclysmdda.org/u/Vulpes_Inculta)\
**Post date:** [July 14, 2016, 1:08pm UTC](https://discourse.cataclysmdda.org/t/double-damage-mod-request/12198/15 "2016-07-14T13:08:39Z")

</div>

Double damage works well so far! Now you need real armor for decent protection against bites and claws, not just sweater and a t-shirt.

Only problem it doesn’t seem to be compatible with PK’s rebalance, have to stick to vanilla monsters for now.

---

<div class="post-metadata">

**Author:** ![pisskop](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/pisskop/32/1327_2.png) [@pisskop](https://discourse.cataclysmdda.org/u/pisskop)\
**Post date:** [July 14, 2016, 4:45pm UTC](https://discourse.cataclysmdda.org/t/double-damage-mod-request/12198/16 "2016-07-14T16:45:12Z")

</div>

It should; nothing conflicts and I dont add new specieis.

I have just made a world with both. Make sure you load the Deadly\_creature mod after my own to be sure, but even if PKs is last it should.

But, I dont design the mod to be fair at double damage.

---

<div class="post-metadata">

**Author:** ![Vulpes\_Inculta](https://avatars.discourse-cdn.com/v4/letter/v/9f8e36/32.png) [@Vulpes\_Inculta](https://discourse.cataclysmdda.org/u/Vulpes_Inculta)\
**Post date:** [July 15, 2016, 8:09am UTC](https://discourse.cataclysmdda.org/t/double-damage-mod-request/12198/17 "2016-07-15T08:09:15Z")

</div>

[quote=“pisskop, post:16, topic:12198”]It should; nothing conflicts and I dont add new specieis.

I have just made a world with both. Make sure you load the Deadly\_creature mod after my own to be sure, but even if PKs is last it should.

But, I dont design the mod to be fair at double damage.[/quote]

Oh. My bad then 🙂
