Double damage mod request

[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

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:

    },{
    "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.

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?

try it.

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

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…

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 :frowning:

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=“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.

I’d love this to be merged!

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.

-- 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

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

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

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 :slight_smile:

https://drive.google.com/file/d/0B_kHPATPNutWQ0cxU3dYcDVnLUk/view?usp=sharing

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.

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=“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 :slight_smile: