[MOD] [SPOILERS] Water Mod v0.7.0

This mod enables the work-in-progress water system and builds a number of new mechanics on top of it.


  • Water pooling and flowing (credit to Albert at Team Radiant on this part)
  • ‘Spring’ component and entity that continuously spawns water
  • Cubemitter effect that simulates water spraying upwards
  • ‘Sinkhole’ component and entity that continuously consumes water
  • Cubemitter effect that simulates water swirling downwards
  • Console commands for creating still water, springs, and sinkholes
  • ‘Well’ that sources water from nearby bodies of water
  • Crafted by Mason using 1 wood and 1 stone
  • Holds up to 50 water
  • Continuously collects water from nearby water bodies (within 4 blocks in all directions)
  • Provides 2.5x more thirst quenching than open water bodies
  • Visible water level in well indicates how much water is in the well
  • ‘Thirst’ mechanic that works similar to hunger
  • Actions for finding water and drinking water
  • New hearthling attribute ‘hydration’ (min: -25, max: 75)
  • Observer for monitoring the hydration of the hearthling
  • Buff for indicating critical dehydration (reduces speed by 25%)
  • Thought bubble for indicating need of water
  • ‘Irrigation’ mechanic for crops
  • Tilled dirt collects nearby water to improve soil quality over time
  • NEW - Lakes
  • Spawn naturally in Plains areas upon world generation
  • Range in size from 9x9 to 21x21 and up to 5 blocks deep


  1. Copy the mod file into your mods directory
  2. Add "enable_debug_keys" : true to your user_settings.json file
  3. Add the following to your user_settings.json file
    “mods” : {
    “stonehearth” : {
    “enable_water” : true
  4. Start with a fresh world or use the test world linked below

The screenshot(s) show my test world with a few springs setup and a sinkhole setup. The world and instructions for spawning the springs and sinkhole are below. The only way to manually setup things right now is by entering the console commands into the debug console. To turn this on press ~ in-game to open up the console. Then just type in the commands listed below.

Optional Setup

Add "enable_terrain_coordinates" : true to your user_settings.json in the mods - stonehearth section (as detailed above) to enable the terrain coordinates tool. You press * on the numpad to turn it on and off. This is a built-in feature of the game that makes positioning springs and sinkholes and such quite easy.

For Modders

Using the various components of this mod within another mod is very easy. For example, to give a consumable food serving a given amount of hydration you add the following into a mixinto:

	"components": {
		"watermod:consumable_hydration": {
			"hydration": 3

Or if you want to make anything into a well just add the following into a mixinto:

    	"components": {
		"watermod:well" : {
			"rate" : 1.5,
			"range" : 4,
			"min_water" : 0,
			"max_water" : 50



v0.7.0: watermod_0.7.0.smod - Google Drive
v0.6.0: watermod_0.6.0.zip - Google Drive
v0.5.0: watermod_0.5.0.zip - Google Drive
v0.4.0: watermod_0.4.0.zip - Google Drive
v0.3.0: watermod_0.3.0.zip - Google Drive
v0.2.0: watermod_0.2.0.zip - Google Drive
v0.1.0: watermod_0.1.0.zip - Google Drive

Console Commands

Syntax: X Y Z Volume R G B

call watermod:create_water_body 1 2 3 20 255 100 100

Syntax: X Y Z Rate R G B

call watermod:create_spring 1 2 3 2 28 191 255

Syntax: X Y Z Rate

call watermod:create_sinkhole 1 2 3 32

Example World

v0.2.0: water_testing_world_0.2.0.zip - Google Drive

Notes: This save for v0.2.0 already has a spring, sinkhole, wells, and a thriving town setup for you to test with.

Known Issues

  • Log is getting spammed with “horde.general | Adding Debug Shape node ‘edge_node’”. Still trying to figure out why the water and waterfall renderers are causing this
  • Water that spreads out over a surface doesn’t ever go away … yet.
  • Hearthlings aren’t drinking from open water bodies

Thanks @chessmaster42, only problem i have run into is expecting the thrist, when we need to get the water up and running. just so you know lol

1 Like

WOW, looking to create more interesting things, such as “boat”

Yeah, the balance of the thirst mechanic is totally arbitrary and needs testing and feedback. I just threw a bunch of numbers in there that definitely need some tweaking. Let me know if you see anything “off” or that needs adjusting :smile:

Well it does try to take health away, but the Hp regen, stops it. other then that, making it take a bit longer to be thristy would change that.

Edit: instead of health or put a factor in it that at a certian point they slow down, like tired. then if they cont without water, then later they start losing health

That’s actually mostly how it’s supposed to work. I guess maybe the Thirsty debuff isn’t triggering properly probably due to a bug that’s causing the health weirdness. I plan to have another build out tonight so providing I have time I’ll be sure to rebalance that and hopefully make it more predictable and reliable.

Should I remove the HP loss altogether or only if hydration is at the minimum of -25? Right now it’s supposed to start ticking away when they reach 0 hydration and continue into the negative until they bring hydration above 0. The thirsty debuff is also supposed to trigger at the same time.

Just my opinion, But the Health loss to Hp regen isn’t working, they regen what they lose quick, Like i said I would make it tired at -25 then, and hp loss at 0. when heavily thirsty and make the Hp loss more then the regen. but make it take longer to get thirsty,

When i started my game, less then a min they was thristy, didnt even have time to get a water source going and the mason up for the well lol.

Edit: Also is there a way to fill the water, like say i want it 2 voxels deep, with out it just dropping off. Do i need to add 2 sources?

@chessmaster42, unfortantely the mod conflist with building toos for some reason as soon as i try to lay down a spring, I wont let me lay roads or Floors or anything else

I think I have the HP thing sorted out now but I currently have the buff triggering at 0 hydration at the same time as the HP loss. Also, the quick thirst was due to me putting the wrong starting value for that attribute in the human mixin. I’ve got that fixed now.

Here’s the new code for doing the HP loss and buff. Let me know if looks good to you:

local deydrated = hydration <= 0
if deydrated then
	hp = hp - (5 * (math.abs(hydration) / 5))
	if hp < 0 then
		hp = 0
	self._attributes_component:set_attribute('health', hp)
	if not self._drink_task then
	if not self._is_deydrated then
		radiant.entities.add_buff(self._entity, 'watermod:buffs:thirsty')			
	self._is_deydrated = true
elseif not deydrated then
	if hydration >= 75 and self._drink_task then
	if self._is_deydrated then
		radiant.entities.remove_buff(self._entity, 'watermod:buffs:thirsty')
	self._is_deydrated = false

Umm, alrighty then. That’s bizarre. This mod doesn’t touch anything to do with construction. Any errors in the log? That’s not much to go on and I have no idea why that could be happening since that’s totally unrelated to this mod :confused:

Actually it’s just the game. Hold on tracking it down

Does anyone have any ideas about why my zone renderers in the spring and sinkhole renderers are glitching out? I’ve been poking at them here and there and while they render fine, technically, as soon as you click on them it de-selects the entity. Right now I’m just writing a basic renderer from scratch until I can get the zone renderer to behave.

I’ve spent some time today with the effects for the spring and sinkhole and they look much nicer. If only they’d show up on the entities. So if anyone can help with that I would certainly appreciate the extra eyes on it :stuck_out_tongue:

Lastly, I’ve just about got the next feature/mechanic done, crop irrigation! It works by piggy-backing off of the dirt plots and similar to the well it searches around for nearby water sources and periodically consumes some water. This increases the fertility and moisture levels of the dirt plot.

If all goes well I should have the next version out later tonight :smiley:

I would an could tell you anything you need to know, but there is a game breaking bug out, that doesn’t allow any building on the current build. Till they fix it I will have to wait . sorry @chessmaster42

@chessmaster42 I’m getting this when i try and place a spring

Can you either click on error 1 there and post another screenshot of the full error as well or post your log file? Something screwy is going on there but I need the full error to figure out what. Chances are it’s something I’ve already fixed in the next version but hard to say.

I think it was the old command line from the first water mod, u changed it slightly

Hey also, can you add a coordinate finder in the mod, and set it to a keybind. It would be helpful to know where to place the spring and waterbody ect ect

There’s one built into the game. Just add the following to your user_settings.json:

"mods" : {
	"stonehearth" : {
		"enable_terrain_coordinates" : true

Then just press * on the numpad to turn it on and off. Quite useful and not many people know about it as it seems.

Updated to v0.3.0 and this is mostly a bugfix update but contains some new features as well:

  • NEW - Irrigation mechanic for crops
  • NEW - Cubemitter effects for Spring and Sinkhole
  • NEW - Well now has several model variants that indicate the water level in the well
  • FIXED - Springs and Sinkholes are now selectable and deleteable again
  • FIXED - Numerous minor bugs with wells
  • FIXED - Glitched thirsty buff
  • FIXED - Numerous minor bugs with AI find/drink water actions
  • FIXED - Incorrect starting hydration attribute
  • TWEAK - Adjusted the HP loss/gain from dehydration

There’s probably some other minor things I’m forgetting but that’s it for a couple days probably. Going to be busy all of tomorrow but I’ll probably be back at it fixing more bugs and working on the next mechanic (hint: moving things + water = awesome)

Enjoy! :smiley:


Wow, you are going ham with this. Great work.
irrigation mechanic for crops :heart_eyes:
I also like the thirst mechanic and coloring water is awesome!

How does this irrigration thingie work actually? I created a farm in a pond of water. Do you need to see anything?