# The question about stats throught kills code

**URL:** <https://discourse.cataclysmdda.org/t/the-question-about-stats-throught-kills-code/28404>\
**Category:** The Toolbox\
**Created:** [December 7, 2022, 7:49pm UTC](https://discourse.cataclysmdda.org/t/the-question-about-stats-throught-kills-code/28404 "2022-12-07T19:49:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![DCHY](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/dchy/32/10511_2.png) [@DCHY](https://discourse.cataclysmdda.org/u/DCHY)\
**Post date:** [December 7, 2022, 7:49pm UTC](https://discourse.cataclysmdda.org/t/the-question-about-stats-throught-kills-code/28404/1 "2022-12-07T19:49:30Z")

</div>

I’m wondering where in the code are the lines of code responsible for the number of kills needed to get 1 point, and the line of code responsible for increasing this number.

I play on version 0.F, and use the mod already supplied with the game

---

<div class="post-metadata">

**Author:** ![Valase](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/valase/32/6972_2.png) [@Valase](https://discourse.cataclysmdda.org/u/Valase)\
**Post date:** [December 7, 2022, 8:07pm UTC](https://discourse.cataclysmdda.org/t/the-question-about-stats-throught-kills-code/28404/2 "2022-12-07T20:07:24Z")

</div>

> [@DCHY](#):
>
> […] code responsible for the number of kills needed to get 1 point, and the line of code responsible for increasing this number.

This would probably be the [‘xp\_cutoffs’ variable in avatar.cpp](https://github.com/CleverRaven/Cataclysm-DDA/blob/ef85f3ce35864947b54113c11cb2eec6bdf8522c/src/avatar.cpp#L1277-L1284).

I’m not sure what exactly you’re referring to with `increasing this number`… **The kills/XP necessary** to get 1 point, or the **points available**. If it’s the former case, that’s already covered.  
If you mean the latter, that’d be calculated in the [‘avatar::free\_upgrade\_points()’ function, also in avatar.cpp](https://github.com/CleverRaven/Cataclysm-DDA/blob/ef85f3ce35864947b54113c11cb2eec6bdf8522c/src/avatar.cpp#L1286).
