[MOD] Water Mod

Really? You did it in about a day? OMG, gosu programmer. Really well done, I want so see it getting improved badly!

Move it up one line, just beneath ā€œenable_64_bitā€, then add a comma:

ā€œenable_64_bitā€: true,
ā€œenable_debug_keysā€: true

I tried that, still didnā€™t work, Iā€™ll try it again

@jonzoid:

I reused most of the hydrology and channel_lib code as those are the meat of the water system that Team Radiant had already been working on but I fixed a bunch of things and added plenty more. And Iā€™m not done adding things yet. Iā€™ve got more up my sleeve that just wasnā€™t ready for release yet :wink:

@Raffo:

There is a way to dig up single blocks but itā€™s part of some unfinished features in the 2283 build. You have to turn on "show_in_progress_ui" : true in your users_settings.json. Thereā€™s a new harvesting button to mine out single blocks and itā€™s fantastic.

@micheal_handy76_mh:

Paste your user_settings.json file into this site and make sure it validates as proper JSON: http://jsonlint.com/ Iā€™m betting that you have some typo somewhere and if so this site can point it out.

3 Likes

While this all cool and exciting, @chessmaster42 didnā€™t invent water, nor did he write most of this. Itā€™s cool to see it in game for sure, but the main credit still goes to Radiant.

Over a month ago, when they first pushed the 64bit client, they also added the first draft of water: the water and waterfall component and the hydrology service. They were cute and tiny and certainly interesting.

Since then, those components were changed with almost every release (2176, 2193, 2283). Each release saw a change of several dozen code lines (additions or modifications). Watching them ā€œgrowā€ was quite interesting.

Compared to the current build of 2283, the things this mod does that Radiantā€™s water does not is

  • allows water coloration (which I do like as an idea, the question of how to do that in a normal game is a bit wonky though)
  • Adds WaterComponent:get_volume() that seems to be solely used to determine the color of waterfalls
  • Removes the need for enable_water in the settings to have water going
  • Added sinkholes and springs using the existing API
  • Added a few entities and commands
  • Changes a bunch of logging calls to another level

So in the end, this mod is little more than exposing what Radiant was currently working on all along. Radiant is responsible for this pretty cool water implementation so far and @chessmaster42 has brought it to us in a colored form.

10 Likes

I havenā€™t looked at this as close as you, but Iā€™m guessing a lot of the core flow mechanics are done in C++ and then exposed through the hydrology serviceā€¦that sound about right?

1 Like

@jonzoid:

The only real external call is csg_lib.get_non_diagonal_xz_inflated_region. Everything else is run entirely in the LUA code.

@RepeatPan:

As was stated in my main post I never invented the hydrology service, thatā€™s all Team Radiant. This mod takes that unfinished core of the water system and making it useable and adds in a few extra things here and there. But keep in mind that the flow mechanics, while amazing, are just a small part of a potentially much bigger and more complex set of systems. Thereā€™s plenty more on its way for this mod :wink:

2 Likes

ahhh ok this explain the duplicated mining ui that i have found while translating xDDD and the showing task ui when you hit number 7 on the keyboard xD

No, no, try putting it between user_id and collect_analytics, for example, and put a comma after it.

I have it after collect analytics.


@chessmaster42. You, sir, spoiled the best. But I wonā€™t unleash my wrath on you because - look at all these excited people. You made the dream of many become true. I congratulate you, and definitely going to test this and update my fountain model :smile: (well, if it can run on my low-end laptop - still have to download the latest release).

Water, at last! :fountain:

3 Likes

i got it to work :stuck_out_tongue:

2 Likes

Let me marry your brain, please.

1 Like

So heres a quest, how do you know the grid numbers?

which numbers do you mean?

I would like to know what extra things you are adding though - Iā€™ve diffed your mod against Stonehearthā€™s current branch and it had literally just the changes Iā€™ve listed above. If it wasnā€™t for the colored water, there would be no need to override the components or the service.

1 Like

Iā€™ve really got to download this.

I originally voted for bug fixing in the polls but damn I want water even more now.

like say for example you want to place call watermod:create_water_body 1 2 3 20 255 100 100, all the numbers meaning (im guessing is Syntax: X Y Z Volume R G B)

okay now on my map how do place the water?

with this
call watermod:create_water_body 1 2 3 20 255 100 100

open up the console (with the ~ key) and write it there, then press enter.

In my keyboard the console is opened/closed with this key -> Ʊ :smile:
I find it funny.

call watermod:create_water_body 1 2 3 20 255 100 100 im putting that in but getting no water lol

regardless of what portion is Radiantā€™s and what is @chessmaster42ā€™s, one of the main things we should take away from this mod is that SH, at its core, is a moddable gameā€¦ virtually every aspect can be exposed to and manipulated by the communityā€¦

if nothing else, @chessmaster42 exposed us to the beginnings of the water system and for that, we thank you! :wink:

5 Likes

I havenā€™t tested, so I canā€™t help any more.

Try testing first with the example in the OP, thereā€™s a download of a save where you can call these steps:

  1. call watermod:create_sinkhole 870 46 295 32
    
  2. call watermod:create_spring 870 62 342 2 28 191 255
    
  3. call watermod:create_spring 877 62 323 1 120 255 0
    

Other than that, I donā€™t know.