# How to edit monster groups?

**URL:** <https://discourse.cataclysmdda.org/t/how-to-edit-monster-groups/16546>\
**Category:** The Toolbox\
**Created:** [September 10, 2018, 8:08pm UTC](https://discourse.cataclysmdda.org/t/how-to-edit-monster-groups/16546 "2018-09-10T20:08:24Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hirmuolio](https://avatars.discourse-cdn.com/v4/letter/h/dc4da7/32.png) [@Hirmuolio](https://discourse.cataclysmdda.org/u/Hirmuolio)\
**Post date:** [September 10, 2018, 8:08pm UTC](https://discourse.cataclysmdda.org/t/how-to-edit-monster-groups/16546/1 "2018-09-10T20:08:24Z")

</div>

I’m trying to make a mod that edits the monster groups but I can’t get it working.

Lets for example reduce child zombies in schools and add cocroaches instead.

So I add a json file in the mod with the following contents (reduced child freq, added cocroach).

```
[
{
"type":"monstergroup",
"name": "GROUP_SCHOOL",
"default": "mon_null",
"//": "School monster spawns.",
"monsters": [
  { "monster": "mon_zombie_child", "freq": 50, "cost_multiplier": 1 },
  { "monster": "mon_zombie_fat", "freq": 50, "cost_multiplier": 1 },
  { "monster": "mon_zombie_tough", "freq": 50, "cost_multiplier": 1 },
  { "monster": "mon_zombie", "freq": 150, "cost_multiplier": 1 },
  { "monster": "mon_zombie_anklebiter", "freq": 5, "cost_multiplier": 5 },
  { "monster": "mon_zombie_sproglodyte", "freq": 5, "cost_multiplier": 3 },
  { "monster": "mon_zombie_shriekling", "freq": 5, "cost_multiplier": 5 },
  { "monster": "mon_zombie_creepy", "freq": 5, "cost_multiplier": 3 },
  { "monster": "mon_zombie_snotgobbler", "freq": 5, "cost_multiplier": 3 },
  { "monster": "mon_zombie_waif", "freq": 5, "cost_multiplier": 3 },
  { "monster": "mon_giant_cockroach", "freq": 610, "cost_multiplier": 1 }
  ]
}
]

```

And nothing changes. I also tried copying the whole monstergroups.json into the mod folder and changing the lines in it to make sure nothign was wrong with the formatting and still nothing changes.

I then just edited the monstergroups.json in its right place and then it works. But that isn’t a mod anymore so that isn’t good enough.

The mod itself works other than the monster group thing. The new item in the mod is visible in game.

---

<div class="post-metadata">

**Author:** ![TheMurderUnicorn](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/themurderunicorn/32/5706_2.png) [@TheMurderUnicorn](https://discourse.cataclysmdda.org/u/TheMurderUnicorn)\
**Post date:** [September 10, 2018, 9:58pm UTC](https://discourse.cataclysmdda.org/t/how-to-edit-monster-groups/16546/2 "2018-09-10T21:58:27Z")

</div>

If you’re just adding things to an existing monster\_group, add the line “edit-mode”: “modify”, to your mod file. If you’re overwriting a monstergroup that already exists, use “edit-mode”: “override”,

IE:

```auto
  {
	"type": "monstergroup",
	"edit-mode": "modify",
	"name": "GROUP_ZOMBIE",
	"monsters" : [
		{ "monster" : "mon_ravlady", "freq" : 10, "cost_multiplier" : 3 },
		{ "monster" : "mon_zombie_fetus", "freq" : 10, "cost_multiplier" : 2 },
	]
  }
```

In the above example, I’ve used modify to edit the monstergroup called GROUP\_ZOMBIE. I’ve added two monsters to that list. I can vouch that this works, but I’ve never used override.

---

<div class="post-metadata">

**Author:** ![Hirmuolio](https://avatars.discourse-cdn.com/v4/letter/h/dc4da7/32.png) [@Hirmuolio](https://discourse.cataclysmdda.org/u/Hirmuolio)\
**Post date:** [September 11, 2018, 5:50am UTC](https://discourse.cataclysmdda.org/t/how-to-edit-monster-groups/16546/3 "2018-09-11T05:50:25Z")

</div>

The override is not working for changing the already existing spawns.

Having this in the mod doesn’t add cocroaches to schools and childs still spawn in large numbers (sing modify instead of override doesn’t seem to change it).

```
[
{
"type":"monstergroup",
"edit-mode": "override",
"name": "GROUP_SCHOOL",
"default": "mon_null",
"//": "School monster spawns.",
"monsters": [
  { "monster": "mon_zombie_child", "freq": 50, "cost_multiplier": 1 },
  { "monster": "mon_zombie_fat", "freq": 50, "cost_multiplier": 1 },
  { "monster": "mon_zombie_tough", "freq": 50, "cost_multiplier": 1 },
  { "monster": "mon_zombie", "freq": 150, "cost_multiplier": 1 },
  { "monster": "mon_zombie_anklebiter", "freq": 5, "cost_multiplier": 5 },
  { "monster": "mon_zombie_sproglodyte", "freq": 5, "cost_multiplier": 3 },
  { "monster": "mon_zombie_shriekling", "freq": 5, "cost_multiplier": 5 },
  { "monster": "mon_zombie_creepy", "freq": 5, "cost_multiplier": 3 },
  { "monster": "mon_zombie_snotgobbler", "freq": 5, "cost_multiplier": 3 },
  { "monster": "mon_zombie_waif", "freq": 5, "cost_multiplier": 3 },
  { "monster": "mon_giant_cockroach", "freq": 610, "cost_multiplier": 1 }
  ]
}
]

```

But this one adds cocroaches in (also works the same with override instead):

```
[
{
"type":"monstergroup",
"edit-mode": "modify",
"name": "GROUP_SCHOOL",
"default": "mon_null",
"//": "School monster spawns.",
"monsters": [
  { "monster": "mon_giant_cockroach", "freq": 610, "cost_multiplier": 1 }
  ]
}
]
```

---

<div class="post-metadata">

**Author:** ![Zhilkin](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/zhilkin/32/3749_2.png) [@Zhilkin](https://discourse.cataclysmdda.org/u/Zhilkin)\
**Post date:** [September 12, 2018, 6:59am UTC](https://discourse.cataclysmdda.org/t/how-to-edit-monster-groups/16546/4 "2018-09-12T06:59:13Z")

</div>

See [https://github.com/CleverRaven/Cataclysm-DDA/pull/24301#issuecomment-406717477](https://github.com/CleverRaven/Cataclysm-DDA/pull/24301#issuecomment-406717477)

---

<div class="post-metadata">

**Author:** ![TheMurderUnicorn](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/themurderunicorn/32/5706_2.png) [@TheMurderUnicorn](https://discourse.cataclysmdda.org/u/TheMurderUnicorn)\
**Post date:** [September 12, 2018, 9:08am UTC](https://discourse.cataclysmdda.org/t/how-to-edit-monster-groups/16546/5 "2018-09-12T09:08:22Z")

</div>

So, I’m a bit confused. I think I get it, but can someone tell me if this is right?

Basically, if I’m modifying a monstergroup, using “edit-mode”: “modify”, still works fine.

However, if I wanted to completely reshape a monstergroup, I should NOT use edit-mode override, but I should add the line : “override”: true,

Is that correct?

---

<div class="post-metadata">

**Author:** ![Shard](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/shard/32/2139_2.png) [@Shard](https://discourse.cataclysmdda.org/u/Shard)\
**Post date:** [September 12, 2018, 10:11am UTC](https://discourse.cataclysmdda.org/t/how-to-edit-monster-groups/16546/6 "2018-09-12T10:11:00Z")

</div>

You don’t need modify anymore because that is default, but to redo the whole thing you use override.

---

<div class="post-metadata">

**Author:** ![Hirmuolio](https://avatars.discourse-cdn.com/v4/letter/h/dc4da7/32.png) [@Hirmuolio](https://discourse.cataclysmdda.org/u/Hirmuolio)\
**Post date:** [September 12, 2018, 11:42am UTC](https://discourse.cataclysmdda.org/t/how-to-edit-monster-groups/16546/7 "2018-09-12T11:42:48Z")

</div>

Using `"override": true,` did the trick.
