# Learning the codebase

**URL:** <https://discourse.cataclysmdda.org/t/learning-the-codebase/13039>\
**Category:** The Toolbox\
**Created:** [November 28, 2016, 8:43pm UTC](https://discourse.cataclysmdda.org/t/learning-the-codebase/13039 "2016-11-28T20:43:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![DanielPBak](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/danielpbak/32/2120_2.png) [@DanielPBak](https://discourse.cataclysmdda.org/u/DanielPBak)\
**Post date:** [November 28, 2016, 8:43pm UTC](https://discourse.cataclysmdda.org/t/learning-the-codebase/13039/1 "2016-11-28T20:43:27Z")

</div>

Hi guys,

I’m a CS student who hasn’t participated in a large-scale project before, and I find the CDDA codebase quite intimidating. Do you guys have any tips or strategies about the more important portions of the codebase? Is there any documentation apart from the /doc/ folder?

Dan

---

<div class="post-metadata">

**Author:** ![Coolthulhu](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/coolthulhu/32/2446_2.png) [@Coolthulhu](https://discourse.cataclysmdda.org/u/Coolthulhu)\
**Post date:** [November 28, 2016, 10:00pm UTC](https://discourse.cataclysmdda.org/t/learning-the-codebase/13039/2 "2016-11-28T22:00:29Z")

</div>

Doxygen (all classes, namespaces and comments for many of them): [http://dev.narc.ro/cataclysm/doxygen/](http://dev.narc.ro/cataclysm/doxygen/)

In general it’s the best to pick a simple problem and track it down to the bottom. That helps with understanding everything along the way.  
Simple parts are weather (except for weather generation math), sounds, monster attacks. Those are mostly hardcoded and defined in 1-2 places.  
Complex parts are items, characters, map, submaps. Those are either handled all over the place (items), involve caches (characters, map) or just plain hard to understand (submaps, mostly due to coordinates).

Trying to understand it all at once is neither necessary nor a good idea. Many sections are incredibly important yet rather small, while others are lengthy but don’t do anything.

---

<div class="post-metadata">

**Author:** ![DanielPBak](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/danielpbak/32/2120_2.png) [@DanielPBak](https://discourse.cataclysmdda.org/u/DanielPBak)\
**Post date:** [November 28, 2016, 10:05pm UTC](https://discourse.cataclysmdda.org/t/learning-the-codebase/13039/3 "2016-11-28T22:05:00Z")

</div>

Are there any starter / newbie bugs? I can’t find any tagged starter bugs on the repo.

---

<div class="post-metadata">

**Author:** ![Zanos](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/zanos/32/422_2.png) [@Zanos](https://discourse.cataclysmdda.org/u/Zanos)\
**Post date:** [November 28, 2016, 10:41pm UTC](https://discourse.cataclysmdda.org/t/learning-the-codebase/13039/4 "2016-11-28T22:41:10Z")

</div>

There’s an “[easy fix](https://github.com/CleverRaven/Cataclysm-DDA/labels/Easy-fix)” tag on the github issues, but they may or may not actually be easy to fix.

---

<div class="post-metadata">

**Author:** ![Coolthulhu](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/coolthulhu/32/2446_2.png) [@Coolthulhu](https://discourse.cataclysmdda.org/u/Coolthulhu)\
**Post date:** [November 28, 2016, 10:51pm UTC](https://discourse.cataclysmdda.org/t/learning-the-codebase/13039/5 "2016-11-28T22:51:18Z")

</div>

Simple to fix:

> <https://github.com/CleverRaven/Cataclysm-DDA/issues/17790>

  
Find monster::process\_turn and wrap the part that emits field with an “if( !is\_hallucination() ) { … }”

> <https://github.com/CleverRaven/Cataclysm-DDA/issues/18585>

  
Doesn’t need any C++ changes or compiling, just json changes.  
Would require finding the json for jumper cable installation and removal, then changing them from the old version to the new one, that specifies time and skills explicitly.

Balancing professions can be done with jsons only. Many professions are unbalanced (generally too weak for their point costs).
