# Anthills and mobspawn

**URL:** <https://discourse.cataclysmdda.org/t/anthills-and-mobspawn/26426>\
**Category:** The Toolbox\
**Tags:** mod\
**Created:** [June 2, 2021, 11:54am UTC](https://discourse.cataclysmdda.org/t/anthills-and-mobspawn/26426 "2021-06-02T11:54:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![SuddenEyePuncture](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/suddeneyepuncture/32/11111_2.png) [@SuddenEyePuncture](https://discourse.cataclysmdda.org/u/SuddenEyePuncture)\
**Post date:** [June 2, 2021, 11:54am UTC](https://discourse.cataclysmdda.org/t/anthills-and-mobspawn/26426/1 "2021-06-02T11:54:37Z")

</div>

I’m creating a bugs expansion mod and noticed a problem: aphids and ladybugs (which should generally spawn near anthills) don’t spawn on the surface near an anthill, but instead spawn underground.

My solution (which didn’t work and caused this issue): I’ve listed ladybugs and aphids in the “GROUP\_ANT” monstergroup. But as far as I noticed, it only affects underground athill dwellers.

How do I make them spawn only near the anthill and not inside it?

Here is a link to my mod, if you would need to check json coding. If you need any additional info, I’d be glad to provide it.

> **[SuddenEyePuncture/Bugs\_life](https://github.com/SuddenEyePuncture/Bugs_life)**
>
> Mod for a CDDA. It adds new kinds of insects. Contribute to SuddenEyePuncture/Bugs\_life development by creating an account on GitHub.

Platform : Windows\_x64  
Graphics : Tiles  
Build number : #11581  
Build version: 0.E-10395-g4525b4f  
Major version: 0.E

---

<div class="post-metadata">

**Author:** ![Venera3](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/venera3/32/10569_2.png) [@Venera3](https://discourse.cataclysmdda.org/u/Venera3)\
**Post date:** [June 2, 2021, 12:57pm UTC](https://discourse.cataclysmdda.org/t/anthills-and-mobspawn/26426/2 "2021-06-02T12:57:37Z")

</div>

The problem is that anthills are ugly, ugly hardcoded locations that use a hardcoded spawn of GROUP\_ANT both above and below ground. But they also use a JSON-modifiable monster group in their overmap special definition, so the way you could game that is making a new GROUP\_ANT\_SURFACE, and replacing GROUP\_ANT with it in data\json\overmap\overmap\_specials\specials.json

Also, why add them as a mod instead of submitting them to the main project? More creepy crawlies are always welcome.

---

<div class="post-metadata">

**Author:** ![SuddenEyePuncture](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/suddeneyepuncture/32/11111_2.png) [@SuddenEyePuncture](https://discourse.cataclysmdda.org/u/SuddenEyePuncture)\
**Post date:** [June 2, 2021, 4:25pm UTC](https://discourse.cataclysmdda.org/t/anthills-and-mobspawn/26426/3 "2021-06-02T16:25:23Z")

</div>

Thanks for you answer, it was clear. The main reason I’ve made a mod and not a pull request was bugtesting. I’ll try to fix this problem and if everything works correct, I’ll submit a pull request.

---

<div class="post-metadata">

**Author:** ![SuddenEyePuncture](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/suddeneyepuncture/32/11111_2.png) [@SuddenEyePuncture](https://discourse.cataclysmdda.org/u/SuddenEyePuncture)\
**Post date:** [June 3, 2021, 2:35pm UTC](https://discourse.cataclysmdda.org/t/anthills-and-mobspawn/26426/4 "2021-06-03T14:35:27Z")

</div>

Thank you very much. My beautiful aphids, antlions and ladybug no longer spawn underground, but there are plenty of them on the surface. I’m going to submit my mod to the main project.
