# Dirty Hacks Pack. Edition #5

**URL:** <https://discourse.cataclysmdda.org/t/dirty-hacks-pack-edition-5/6949>\
**Category:** The Lab\
**Created:** [July 31, 2014, 7:08pm UTC](https://discourse.cataclysmdda.org/t/dirty-hacks-pack-edition-5/6949 "2014-07-31T19:08:06Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Reaper](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/reaper/32/74_2.png) [@Reaper](https://discourse.cataclysmdda.org/u/Reaper)\
**Post date:** [July 31, 2014, 7:08pm UTC](https://discourse.cataclysmdda.org/t/dirty-hacks-pack-edition-5/6949/1 "2014-07-31T19:08:06Z")

</div>

Branch: [https://github.com/Reaper42/Cataclysm-DDA/tree/mod](https://github.com/Reaper42/Cataclysm-DDA/tree/mod)  
Windows build: [http://www.filedropper.com/cataclysm-tiles\_4](http://www.filedropper.com/cataclysm-tiles_4)

DLLs : [http://46.102.243.119/public/CDDA-deps.zip](http://46.102.243.119/public/CDDA-deps.zip)  
Included mods:  
[http://smf.cataclysmdda.com/index.php?topic=5735.0](http://smf.cataclysmdda.com/index.php?topic=5735.0)  
[http://smf.cataclysmdda.com/index.php?topic=6825.0](http://smf.cataclysmdda.com/index.php?topic=6825.0)  
[http://smf.cataclysmdda.com/index.php?topic=7132.0](http://smf.cataclysmdda.com/index.php?topic=7132.0)  
[http://smf.cataclysmdda.com/index.php?topic=7281.0](http://smf.cataclysmdda.com/index.php?topic=7281.0)  
[http://smf.cataclysmdda.com/index.php?topic=7276.0](http://smf.cataclysmdda.com/index.php?topic=7276.0)

Updated version of hordes:

[ul][li]React hordes to light [/li]  
[li]Check light indoor/outdor[/li]  
[li]Hordes visible on overmap[/li]  
[li]Show size,direction and speed of horde on map.[/li]  
[li]React hordes to smell and track. (Add track map)[/li]  
[li]Player leave tracks on overmap. [/li]  
[li]Removing tracks every 20 min by rain - 50% tracks, by sunny - 5%, in other cases - 1%.[/li]  
[li]Hordes move and get signals between overmaps[/li]  
[li]Hordes less speed in forest/river/city/etc[/li]  
[li]Indoor player no leaves scent track and send less noise volume to hordes[/li][/ul]

Running mod.

[ul][li]Each turn send to run/swim/walk takes 15/25/7 + (15/25/7 \* % wieght load) STA.[/li]  
[li]Melee reduce STA to 20 + (weapow wieght (kg) \* 0.1)[/li]  
[li]Player walk with +40 move cost[/li]  
[li]Player run with up to -10 move cost or % of move cost if STA \> 25%[/li]  
[li]Player run with up to +40 move cost if STA \< 25%[/li]  
[li]Player melee attack with up to 50 move cost if STA \< 25%[/li]  
[li]Each turn restore STA to 10.[/li]  
[li]Losing stamina rising running skill (no use focus)[/li]  
[li]Trowing and firing from bow reduce STA[/li][/ul]

Stamina points = 400 (base) + 25 \* (STR+DEX) + 25 \* (Swimming skill + Athletic skill (add it) + Melee + Throwing )  
Athletic skill on level \> 3 gives lower STA cap for run = 50 \* Athletic - 3, i.e. player with athletic 4 stop drain stamina, if there \< 50, when run, if they not loaded.  
WARNING!!! Run/walk can switch with key. You must bind it (?1). Action name is “switch\_run”.

Depression:

[ul][li]Player become depressed if average morale\<=0 (avg\_morale / 10 - 1 point every 30 minutes) else +avg\_morale / 10 point every 30 minutes.  
[/li][li]If depression points \< 0 reduce morale (by depr.points / 10)[/li]  
[li]If player up morale depression become reduced.[/li]  
[li]If depression lower -2000 player can’t eat[/li]  
[li]All skill books don’t give morale boost[/li]  
[li]Killing zombies give morale boost (+1 per kill)[/li]  
[li]Addiction tweaks[/li][/ul]

Hardmod:

[ul][li]Less wild animals spawn rate [/li]  
[li]Less some food nutrition[/li]  
[li]Less chance to found eggs/plants in forest.[/li]  
[li]No harvest food spring/winter[/li]  
[li]house basements are much more rare[/li]  
[li]more ammo weight[/li]  
[li]dead mil. and sci. squads are much more rare[/li]  
[li]No water in LOME shelter[/li]  
[li]More start locations[/li][/ul]

WARNING!!! You must use “Hard mode” and “Hard mode black list” it world generation menu.

Seasonal forage:

[ul][li]Apples can get only autumn, berries - summer, mushrooms - summer/autumn, eggs, flowers - all seasons but winter.(included in main repo)[/li]  
[li]All wild food can take only from apple tree/shrubs.(included in main repo)[/li]  
[li]Much less food from forage (eggs/wild vegs.)[/li][/ul]

Attach/detach mod.

[ul][li]You must attach/detach some parts (wheels,batteries,stereo,seat,seatbelt,…)[/li]  
[li]Attach/detach takes time[/li][/ul]

WARNING!!! You must map key to “attach” action in vehicle construction menu.

Misc.features:

[ul][li][s]Stomach/s[/li]  
[li]Funnels no longer use random for filling[/li]  
[li]Arrows and items leave in monsters if cut/stab damage \> 5[/li]  
[li]Crafting. Risk of getting a low quality (cracked, damaged) item if your skill isn’t adequate.[/li]  
[li]Throw skill grows after level 1 only when throw to target.[/li]  
[li]Bolas[/li][/ul]

INSTALLATION:  
Download zip from branch ([https://github.com/Reaper42/Cataclysm-DDA/tree/mod](https://github.com/Reaper42/Cataclysm-DDA/tree/mod)) and unzip it.

Download windows exe (if you use windows)  
Download dlls [http://46.102.243.119/public/CDDA-deps.zip](http://46.102.243.119/public/CDDA-deps.zip) and unzip all dll files from /bin in this zip to you cataclysm folder.  
OR (if you have cataclysm)  
Rename your data/json folder (json\_bak, for example)  
Copy data/json folder from my branch.  
Copy data/mods/HardMode and data/mods/HardModeBL  
Download windows exe.

Linux users build debug version and use gdb. Help to find segfault.

Enjoy.

TODO list:

[ul][li]Adv.health mod.[/li]  
[li]Rework inventory. (Add “pockets” on clothing)[/li]  
[li]Rework zlaves[/li]  
[li]Multitile monsters[/li]  
[li]Autoforage[/li]  
[li]Smearing for hide scent[/li][/ul]

---

<div class="post-metadata">

**Author:** ![Reaper](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/reaper/32/74_2.png) [@Reaper](https://discourse.cataclysmdda.org/u/Reaper)\
**Post date:** [August 2, 2014, 4:44pm UTC](https://discourse.cataclysmdda.org/t/dirty-hacks-pack-edition-5/6949/2 "2014-08-02T16:44:08Z")

</div>

I add stomach to player. Stomach filled when player eats. Every 50 turns food/water amount in stomach reduce by 20%. (minimum - 10). If player vomit they lost only food from stomach. If stomach is empty (players already threw up, for example) then player not lost food/water. I do it to except starving/dehydrating after few vomit acts.

---

<div class="post-metadata">

**Author:** ![Datanazush](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/datanazush/32/1055_2.png) [@Datanazush](https://discourse.cataclysmdda.org/u/Datanazush)\
**Post date:** [August 2, 2014, 6:52pm UTC](https://discourse.cataclysmdda.org/t/dirty-hacks-pack-edition-5/6949/3 "2014-08-02T18:52:42Z")

</div>

> [@Reaper](#):
>
> I add stomach to player. Stomach filled when player eats. Every 50 turns food/water amount in stomach reduce by 20%. (minimum - 10). If player vomit they lost only food from stomach. If stomach is empty (players already threw up, for example) then player not lost food/water. I do it to except starving/dehydrating after few vomit acts.

That is actually a really cool design idea. Would there be any mechanical way to make your starvation/thirst slowly fill after eating and drinking, so as to still make vomiting an issue when it comes to survival?

---

<div class="post-metadata">

**Author:** ![KA101](https://avatars.discourse-cdn.com/v4/letter/k/278dde/32.png) [@KA101](https://discourse.cataclysmdda.org/u/KA101)\
**Post date:** [August 3, 2014, 12:31am UTC](https://discourse.cataclysmdda.org/t/dirty-hacks-pack-edition-5/6949/4 "2014-08-03T00:31:45Z")

</div>

> [@Datanazush](#):
>
> [quote=“Reaper, post:2, topic:6949”]I add stomach to player. Stomach filled when player eats. Every 50 turns food/water amount in stomach reduce by 20%. (minimum - 10). If player vomit they lost only food from stomach. If stomach is empty (players already threw up, for example) then player not lost food/water. I do it to except starving/dehydrating after few vomit acts.

That is actually a really cool design idea. Would there be any mechanical way to make your starvation/thirst slowly fill after eating and drinking, so as to still make vomiting an issue when it comes to survival?[/quote]

Depending on how smooth you want digestion to be, it could well be done with a few modifications to the current code. Reaper’s stomach would probably be half the battle already; I haven’t looked.

---

<div class="post-metadata">

**Author:** ![Reaper](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/reaper/32/74_2.png) [@Reaper](https://discourse.cataclysmdda.org/u/Reaper)\
**Post date:** [August 3, 2014, 11:57am UTC](https://discourse.cataclysmdda.org/t/dirty-hacks-pack-edition-5/6949/5 "2014-08-03T11:57:08Z")

</div>

> Would there be any mechanical way to make your starvation/thirst slowly fill after eating and drinking, so as to still make vomiting an issue when it comes to survival?

There is to many direct manipulation on integers hunger and thirst in code. All this should replace to mod\_hunger(int mod) mod\_thirst(int mod) to make possibility for custom nutrition modeling. I just add 2 variables to player class and manipulate with it. I can do stomach as list of items in it and make simulation of digestion, possibility to eat non food items (flash, for example), simulation of work guts and possibility to take a shit (and save flash device from enemy patrol / hide tin can of condensed milk / etc) But it is too complexly now. ------ Latest features:

[ul][li]Stomach[/li]  
[li]Funnels no longer use random for filling[/li]  
[li]Less eggs.[/li]  
[li]Hordes less speed in forest/river/city/etc.[/li]  
[li]Depression tweaks[/li][/ul]

---

<div class="post-metadata">

**Author:** ![Slax](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/slax/32/5385_2.png) [@Slax](https://discourse.cataclysmdda.org/u/Slax)\
**Post date:** [August 3, 2014, 5:27pm UTC](https://discourse.cataclysmdda.org/t/dirty-hacks-pack-edition-5/6949/6 "2014-08-03T17:27:07Z")

</div>

A somewhat tricky idea for hardmod.  
Harder crafting. You can make stuff but there’s a risk of getting a low quality (cracked, damaged) item if your skill isn’t adequate. Gonna have to repair it afterwards.

---

<div class="post-metadata">

**Author:** ![Reaper](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/reaper/32/74_2.png) [@Reaper](https://discourse.cataclysmdda.org/u/Reaper)\
**Post date:** [August 3, 2014, 5:31pm UTC](https://discourse.cataclysmdda.org/t/dirty-hacks-pack-edition-5/6949/7 "2014-08-03T17:31:24Z")

</div>

[quote=“Slax, post:6, topic:6949”]A somewhat tricky idea for hardmod.  
Harder crafting. You can make stuff but there’s a risk of getting a low quality (cracked, damaged) item if your skill isn’t adequate. Gonna have to repair it afterwards.[/quote]  
Ok. If we craft we have 3 results:

[ol][li]Epic fail. (Waste materials)[/li]  
[li]Just fail. (Don’t waste materials)[/li]  
[li]Win.[/li][/ol]

I may expand variant #2 and damage item one in 2 cases for example.

---

<div class="post-metadata">

**Author:** ![Rivet](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/rivet/32/11_2.png) [@Rivet](https://discourse.cataclysmdda.org/u/Rivet)\
**Post date:** [August 3, 2014, 5:58pm UTC](https://discourse.cataclysmdda.org/t/dirty-hacks-pack-edition-5/6949/8 "2014-08-03T17:58:44Z")

</div>

A lot of the ideas in here are really good. You should consider splitting this into categorized PRs.

---

<div class="post-metadata">

**Author:** ![Reaper](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/reaper/32/74_2.png) [@Reaper](https://discourse.cataclysmdda.org/u/Reaper)\
**Post date:** [August 3, 2014, 6:20pm UTC](https://discourse.cataclysmdda.org/t/dirty-hacks-pack-edition-5/6949/9 "2014-08-03T18:20:26Z")

</div>

> [@Rivet](#):
>
> A lot of the ideas in here are really good. You should consider splitting this into categorized PRs.

What are they?  
I can do this, but some people do not like my implementation. Is there any point to try?

---

<div class="post-metadata">

**Author:** ![Rivet](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/rivet/32/11_2.png) [@Rivet](https://discourse.cataclysmdda.org/u/Rivet)\
**Post date:** [August 3, 2014, 6:43pm UTC](https://discourse.cataclysmdda.org/t/dirty-hacks-pack-edition-5/6949/10 "2014-08-03T18:43:14Z")

</div>

[quote=“Reaper, post:9, topic:6949”]What are they?  
I can do this, but some people do not like my implementation. Is there any point to try?[/quote]

A lot of times that can be reconciled by making very small alterations to a PR.

But as for which ideas are good, I’d say the majority of them look like good ideas, but you’d need to split it into multiple PRs so as to make the process easier for everyone involved. Like, for example, if you were to make a PR that contained this:

> [@Reaper](#):
>
> Apples can get only autumn, berries - summer, mushrooms - summer/autumn, eggs, flowers - all seasons but winter.

Or this:

> [@Reaper](#):
>
> I add stomach to player. Stomach filled when player eats. Every 50 turns food/water amount in stomach reduce by 20%. (minimum - 10). If player vomit they lost only food from stomach. If stomach is empty (players already threw up, for example) then player not lost food/water. I do it to except starving/dehydrating after few vomit acts.

Which are both very good ideas, by the way, but if you were to split this into PRs by individual topic, then most of it looks like the sort of thing we’d want to have in the game. Along the way we’ll probably be commenting on the PRs and requesting some minor alterations as we go, but having it as a larger quantity of more specific PRs would hasten that process a great deal.

---

<div class="post-metadata">

**Author:** ![Reaper](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/reaper/32/74_2.png) [@Reaper](https://discourse.cataclysmdda.org/u/Reaper)\
**Post date:** [August 3, 2014, 7:30pm UTC](https://discourse.cataclysmdda.org/t/dirty-hacks-pack-edition-5/6949/11 "2014-08-03T19:30:45Z")

</div>

Stomach: [https://github.com/CleverRaven/Cataclysm-DDA/pull/8419](https://github.com/CleverRaven/Cataclysm-DDA/pull/8419)  
Forage: [https://github.com/CleverRaven/Cataclysm-DDA/pull/8420](https://github.com/CleverRaven/Cataclysm-DDA/pull/8420)

---

<div class="post-metadata">

**Author:** ![KA101](https://avatars.discourse-cdn.com/v4/letter/k/278dde/32.png) [@KA101](https://discourse.cataclysmdda.org/u/KA101)\
**Post date:** [August 3, 2014, 10:23pm UTC](https://discourse.cataclysmdda.org/t/dirty-hacks-pack-edition-5/6949/12 "2014-08-03T22:23:43Z")

</div>

[quote=“Reaper, post:11, topic:6949”]Stomach: [https://github.com/CleverRaven/Cataclysm-DDA/pull/8419](https://github.com/CleverRaven/Cataclysm-DDA/pull/8419)  
Forage: [https://github.com/CleverRaven/Cataclysm-DDA/pull/8420[/quote]](https://github.com/CleverRaven/Cataclysm-DDA/pull/8420%5B/quote%5D)

Forage pulled for mergetest. Stomach may need some more fiddling as I’ve got a mutation or two that interacts with that anatomy. But it’s a good idea and I like the concept.

---

<div class="post-metadata">

**Author:** ![Slax](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/slax/32/5385_2.png) [@Slax](https://discourse.cataclysmdda.org/u/Slax)\
**Post date:** [August 3, 2014, 10:54pm UTC](https://discourse.cataclysmdda.org/t/dirty-hacks-pack-edition-5/6949/13 "2014-08-03T22:54:48Z")

</div>

Oh, and this might be interesting.  
[http://smf.cataclysmdda.com/index.php?topic=7359.msg167395#msg167395](http://smf.cataclysmdda.com/index.php?topic=7359.msg167395#msg167395)

And spitter goo corroding your gear with direct hits. Mwahahaha!

---

<div class="post-metadata">

**Author:** ![Reaper](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/reaper/32/74_2.png) [@Reaper](https://discourse.cataclysmdda.org/u/Reaper)\
**Post date:** [August 3, 2014, 11:14pm UTC](https://discourse.cataclysmdda.org/t/dirty-hacks-pack-edition-5/6949/14 "2014-08-03T23:14:11Z")

</div>

[quote=“Slax, post:13, topic:6949”]Oh, and this might be interesting.  
[http://smf.cataclysmdda.com/index.php?topic=7359.msg167395#msg167395[/quote]](http://smf.cataclysmdda.com/index.php?topic=7359.msg167395#msg167395%5B/quote%5D)  
If do this then is be as a complex system. Stomach, chemical balance of organism, metabolism simulation…

> And spitter goo corroding your gear with direct hits. Mwahahaha!

Hmm..:)

---

<div class="post-metadata">

**Author:** ![Reaper](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/reaper/32/74_2.png) [@Reaper](https://discourse.cataclysmdda.org/u/Reaper)\
**Post date:** [August 3, 2014, 11:17pm UTC](https://discourse.cataclysmdda.org/t/dirty-hacks-pack-edition-5/6949/15 "2014-08-03T23:17:11Z")

</div>

> Stomach may need some more fiddling as I've got a mutation or two that interacts with that anatomy.

Explain this, i don't know what you want.

---

<div class="post-metadata">

**Author:** ![FunsizeNinja123](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/funsizeninja123/32/118_2.png) [@FunsizeNinja123](https://discourse.cataclysmdda.org/u/FunsizeNinja123)\
**Post date:** [August 3, 2014, 11:53pm UTC](https://discourse.cataclysmdda.org/t/dirty-hacks-pack-edition-5/6949/16 "2014-08-03T23:53:02Z")

</div>

[quote=“Reaper, post:15, topic:6949”]

> Stomach may need some more fiddling as I’ve got a mutation or two that interacts with that anatomy.

  
Explain this, i don’t know what you want.[/quote]

He means that mutations mess with the player’s stomach placement. I think.

---

<div class="post-metadata">

**Author:** ![Reaper](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/reaper/32/74_2.png) [@Reaper](https://discourse.cataclysmdda.org/u/Reaper)\
**Post date:** [August 3, 2014, 11:58pm UTC](https://discourse.cataclysmdda.org/t/dirty-hacks-pack-edition-5/6949/17 "2014-08-03T23:58:29Z")

</div>

How it work? I don’t understand the mechanic.

---

<div class="post-metadata">

**Author:** ![KA101](https://avatars.discourse-cdn.com/v4/letter/k/278dde/32.png) [@KA101](https://discourse.cataclysmdda.org/u/KA101)\
**Post date:** [August 4, 2014, 12:51am UTC](https://discourse.cataclysmdda.org/t/dirty-hacks-pack-edition-5/6949/18 "2014-08-04T00:51:19Z")

</div>

> [@Reaper](#):
>
> How it work? I don’t understand the mechanic.

Sorry for the confusion. There are a LOT of mutations (and bionics!) that affect your stomach, intestines, etc. Gizzard was the immediate one I recognized, but thinking about it, several others are involved.

Gizzard: your stomach is much smaller, so currently you only get 66% the benefit you normally would. If we track digestive capacity with an actual stomach, the amount one can fit in that stomach should be significantly reduced, but you’d get full benefits again.

Expanded Digestion bionic: You have three synthetic stomachs, and industrial-grade intestines\*. Currently, you get a lot more benefit from food, and have a chance to safely eat rotten food. With a stomach meter, this should triple its capacity and probably speed processing (so you empty out faster), with somewhat higher food-benefit than baseline, but lowered from the current implementation.

\*I didn’t write that CBM description, that’s how we got it from Whales. Not sure what industry routinely uses intestines.

Metabolism/Thirst: Lots of mutations affect the rate you gain hunger/thirst. Those should probably affect stomach-emptying as well as the actual nutrition gains.

Hyper-Metabolism: Currently, if you’ve completely filled up and have this, you can continue eating and have the nutrition converted directly to HP. (Since you’ve got the triple-hunger mutation as well, you need a LOT of food to heal this way.) If you’re that boosted, I’d imagine it would imply that your stomach empties remarkably fast.

Recycler bionic: This reduces your lost nutrition, meaning you get hungry/thirsty less. Probably should not have an effect on the stomach.

Hoping that helps. Sorry for the delay and confusion.

---

<div class="post-metadata">

**Author:** ![Reaper](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/reaper/32/74_2.png) [@Reaper](https://discourse.cataclysmdda.org/u/Reaper)\
**Post date:** [August 4, 2014, 1:00am UTC](https://discourse.cataclysmdda.org/t/dirty-hacks-pack-edition-5/6949/19 "2014-08-04T01:00:18Z")

</div>

Hmm…here i must do something like  
Food nutrition(int) -\> Stomach(int) -\> Player nutrition.  
Add max\_stomach\_size (based on volume of food), and simulation of digestion. But is too cool, because i must rewrite many code.  
I want do good simulation of digestion with drugs effect/possibility to clean stomach etc, but not now.

---

<div class="post-metadata">

**Author:** ![Reaper](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/reaper/32/74_2.png) [@Reaper](https://discourse.cataclysmdda.org/u/Reaper)\
**Post date:** [August 7, 2014, 3:12pm UTC](https://discourse.cataclysmdda.org/t/dirty-hacks-pack-edition-5/6949/20 "2014-08-07T15:12:49Z")

</div>

Make some addiction tweaks. Nicotine and alcohol morale penalties depended from addiction intensity. Strong addictions more difficult to overcome (about a week of sufferings), but for alcohol and nicotine addictions at small level cause much less suffering.  
After epic death of my current character i make new release and try write pockets.

[Next page](https://discourse.cataclysmdda.org/t/dirty-hacks-pack-edition-5/6949.md?page=2)
