[WIP] Prodiggas Water Mod

Started by Prodigga, April 10, 2016, 07:43:49 AM

Previous topic - Next topic

Prodigga

Heyo

So I thought I'd give modding a go, I am fairly experienced with C# and was awesome to see we can write our own actual code. Awesome stuff.

I always felt that there was a lack of a second utility - water!

I want to add water in to the game similar to water in prison architect.

I've been toying around with modding today and I don't have screenshots just yet but so far I've gotten my toes wet by implementing a new "water" need that all pawns have. Everything will need to drink water just as they will need to eat. Currently the water need gives colonists a bad mood when they are thirsty and starts to hurt them once they are completely dehydrated, similar to starving. The pawns loose water based on the temperature and (haven't figured this out yet) will loose more water if they are doing labor intensive tasks like hauling. So that's the state of the mod at the moment of writing this. I imagine the water will function similarly to power. Water reservoirs will hold water like batteries, pipes will disperse water to water outlets like taps from which colonists can grab a drink. Again, not sure how far I will be able to take this concept as I am not sure on the limitations. I'll attach some (relatively unexciting) screenshots of what I have in action tomorrow. This paragraph is just a brief overview of where I am at at the moment and I'll remove it later.

The ultimate goals of the mod:

  • All living things must drink water to survive, functioning similarly to food.
  • Water can be obtained a different number of ways (lakes, rain catchers, wells, etc)
  • Water reservoirs, pumps and piping will deliver water throughout your base to taps and other furniture that requires water.
  • Soil will hold a moisture content, replenished slowly over time (biome dependant) and replenished quickly via rain.
  • Plants will die on dry soil, depending on the type of plant
  • farms will need to be watered (with the possibility to automate it with plumbing + sprinklers) which means you can't just carelessly place a giant field of potatoes and be set for life. You need to balance your resources.

"Nice to have" features which I won't focus on yet:

  • Water purity level, lower purity (Lake water) resulting in higher chance of existing illnesses (plague, gut worms, etc).
  • Use plumbing to feed water in to showers, and have a "hygiene" requirement for colonists, imposing negative mood on the colonists if they are dirty and negative relationship penalties for those around them ("That guy stinks")

Things to think about:

  • Ideally I would like the rain to replenish soil dryness, which means I might have to force the game to rain every so often (just as the game forces it to rain after a big fire).
  • Possibility for new events like Drought, which would cause all plants to slowly whither away and die while in effect, since the soil moisture would not get replenished.
  • Not sure if it's possible to mod the dirt to support a new "property" like this. Probably not possible. :P maybe a togglable overlay where I simulate moisture level for blocks myself and display this info via overlay?
  • Not sure how to make the colonists drink the water.  I don't want the water to be an object that exists in the world, like food plates on the floor. I want the colonists to approach a water source like a tap or lake and replenished their water by "using it". The problem here is there is no way to "carry water" to hospitalized colonists or prisoners? I'm not sure if it would be possible to make the colonists approach a tap to generate a cup of water to carry to their friend. Anyway..
  • Similar to the soil issue, I'm not sure if I could add an additional property to the existing hydroponic farm. Ideally it would require a connection to the water to function correctly.
  • As above, I don't know if I can add properties to existing animals to make them drought tolerant (camels not needing to find much/any water, since there is no water in desert biomes for them to wonder towards and consume)


Prodigga

#2
Thanks. I see you've worked on a few mods - anything on my list stand out to be glaring unachievable? lol.

Ykara

Quote from: Prodigga on April 10, 2016, 08:14:03 AM
Thanks. I see you've worked on a few mods - anything on my list stand out to be glaring unachievable? lol.
I'm not really experienced in dll modding, but it doesn't seem too unrealistic to me. Of course it's a lot of work, but I think that it's achievable.

NoImageAvailable

I've been wishing for someone to do a water mod for a while now. We've had someone a few months ago who apparently had a working prototype with pawns drinking from flasks which they'd refill automatically from wells and other water sources but he disappeared without a trace.

Most of the stuff on your list is very much achievable, just keep in mind that a project of this scale would require a large time commitment and dedication, especially if you're a new modder and need to familiarize yourself with Rimworld's system first.

If you need help with specific implementations, you should check out the modding slack. There are lots of experienced modders hanging out there who can help you with any questions you might have.
"The power of friendship destroyed the jellyfish."

Prodigga

Cool man, I feel confident in my ability to get this stuff done, just need to figure out what fits where in rimworld haha. That knowledge will only come with lots of toying around.. Do you have a link to the other guys topic?

And thanks for the slack link, will definitely jump on tomorrow when I do some more work on this mod.

Korn.Mil

Its amazing idea! Waiting to see this in a game

Prodigga

#7
Progress report! Colonists can now actually die from thirst/dehydration.

There is no way for them to quench their thirst yet, so they just die. :p along with every creature on the map.






nightblue

This is going to be really cool!  Maybe even having some sort of difference between coastal water and inland lakes?  Looking forward to this a lot :)
Don't mind me, just slacking off and having fun :)

ArtStation
DeviantArt

something776

I like the sound of this a lot!  Especially ground saturation levels, it will make deserts feel a lot more like... well deserts.

  I'm curious how this would interact with colder environments.  Like melting snow for water, and having to worry about your water lines freezing over and stuff.  Keep up the good work!

ReaperX

Can`t wait for this,its awesome,i have 2 ideas for this in mountains there can sources of water,springs and in deserts there could be oases just like geysers randomly spawned

jere8184

hope your mod gets completed sounds great so far. here's a idea how about with the help of modding magic turning geothermal geysers into springs (holes filled in water) the potential benefit of this being they will already natrule occur so you dont have to relie on the map have a lake

RickyMartini

This is really funny haha!

I started with the same Mod idea a couple of days ago and your screenshots look extremely similar to mine lol:

New need:


Dehydration is deadly:


Their sad end:

Deathawaits4

#13
This mod looks realy great! You asked about limitations, with dll modding, you wont be hitting that big of a wall. if done correctly, you can propably change most aspects of the game to your liking. BUT the engine needs to be capable of handling the pressure. Adding a water system to the game shouldnt be to bad for the engine, but its a whole new mechanic that needs to be "tracked" by the game, which will cost cpu and ram. As long as the rimworld engine is not refined, adding too much will cause problems long term(not saying your mod will cause problems, only if you use many mods that alter gameplay mechanics). Also the other thing will be the biggest issue, compatibility.. Modded crops, even tho  they will propably work, they most likely wont work as intended. Modded animals need to be tweaked, because some need way less water than others. Also you would have to change how priorities work, because you wouldnt want your hauler to die because he does not want to drink, maybe you can just somehow expand the eating priority? im not that good with that stuff. This mod has potential to somewhen get implemented by tynan and i think it will be a realy realy popular mod, so maybe adding a api, so other modders can expand on your idead(like adding softdrinks, easy compatibility between the mods and stuff). Otherwise there will have to be loads and loads of patches :P I wish you the best of luck! This mod will be great if it gets released, which im certain it will.

Dragoon

Quote from: faltonico
I truly can't understand that sense of balancing a LOT of modders have, pouring more resources on something doesn't make it more difficult, but more annoying. It is not engaging, even if i'm swimming in silver at late game ¿why to bother?, why all the effort to get there?.