# Ants and stuff. Also, game Map. Also, WorldGen

**URL:** <https://discourse.cataclysmdda.org/t/ants-and-stuff-also-game-map-also-worldgen/15261>\
**Category:** The Garage\
**Created:** [April 10, 2018, 12:19pm UTC](https://discourse.cataclysmdda.org/t/ants-and-stuff-also-game-map-also-worldgen/15261 "2018-04-10T12:19:04Z")\
**Posts on this page:** 1\
**Showing post:** 50

<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:** [April 11, 2018, 8:49pm UTC](https://discourse.cataclysmdda.org/t/ants-and-stuff-also-game-map-also-worldgen/15261/50 "2018-04-11T20:49:29Z")

</div>

The answer is: that was a bug which wouldn’t necessary affect all of generated mansions.

You can do some research with older CDDA versions:

> [@Mansion Spawn Bug (Build 7179)](https://discourse.cataclysmdda.org/t/mansion-spawn-bug-build-7179/15073):
>
> Hello, something’s up with the mapgen as it pertains to the new mansion layouts. Looks like the game is spawning tiles of the mansion as “house” on the map, resulting in a disjointed and incomplete mansion. The up/down stairs lead to nowhere and hurt you if you try to climb them. Can anyone else confirm/reproduce, or is my install corrupted somehow? Build 7179. Edit: screencapped the wrong mods.json. I think it may be an incompatibility with the More Buildings submod.

> <https://github.com/CleverRaven/Cataclysm-DDA/issues/22358>
>
> Game version:
> 0.C-24831-g6a32f4f
> Operating system:
> Win10 64
> Tiles or curses:…
> Tiles (MShock32Modded)
> Mods active:
> Vehicle Addtions Pack, Filthy Clothing, Prevent Zombie Revivication, Simplified Nutrition
> \### Expected behavior
> Map gen was far more natural 1-2 weeks ago and forever before
> \### Actual behavior
> As of week or so ago and continuing in latest build, buildings are unnaturally lumped together at times and/or in the middle of roads, leading to some very odd road networks in cities compared to the past.
> \### Steps to reproduce the behavior
> Create world, load in, view map. Suicide and repeat a few times to see constency in oddness.
> 
> Examples:
> !\[image\](https://user-images.githubusercontent.com/33404851/32420761-c746677e-c24c-11e7-953d-2a9f2f01a5ea.png)

> <https://github.com/CleverRaven/Cataclysm-DDA/pull/22723>
>
> Closes #22358.
> Closes #21497.
> 
> \## Overview
> 
> @kevingranade was right in his …suspicions regarding the first issue. The @Coolthulhu's idea of unifying town buildings with overmap specials is really great, the implementation, however, has a minor bug which caused #22358. \`find\_max\_size()\` performs checks after it increments its counters, so the result value isn't always correct. #21497 is fixed by allowing buildings to override marshlands. Also, buildings can't spawn by themselves like other overmap specials do. This was definitely possible, but I didn't find a corresponding issue.
> 
> \## Implementation details
> 
> \- Town buildings are now yet more like the real overmap specials. They both use the same check (\`can\_place\_special()\`) which obsoletes \`building\_size\` along with the functions that operate on it. So they all were removed (\`find\_max\_size()\` was among them).
> \- Added \`locations\` and a check for max occurrences to the fake overmap specials (zero \`max\_occurrences\` prevents their spawn "in the wild").
> \- Introduced \`overmap::get\_default\_terrain()\` which allows minor code deduplication and localization of a couple hard-coded terrain ids.
> \- Tiny code improvements.

> <https://github.com/CleverRaven/Cataclysm-DDA/issues/20429>
>
> I've run into two overlapped 2 story motels in build 6290. Didn't caught anythin…g similar to this earlier. Could it be somthing in #20232?
> 
> \<img width="730" alt="2storymotel" src="https://cloud.githubusercontent.com/assets/16213433/23551565/5602b658-0028-11e7-9b1d-c295c8a64f25.png"\>
> \<img width="730" alt="2storymotel\_2" src="https://cloud.githubusercontent.com/assets/16213433/23551566/5604b7be-0028-11e7-83fe-046e4aad5072.png"\>

> <https://github.com/CleverRaven/Cataclysm-DDA/pull/22724>
>
> It's proven useless since it's always the same. No observable changes intended.

---

_[View the full topic](https://discourse.cataclysmdda.org/t/ants-and-stuff-also-game-map-also-worldgen/15261)._
