Page 3 of 4

Re: [MOD 0.12.x] Finite Water

Posted: Sat Apr 23, 2016 5:01 pm
by ritonlajoie
there are calls to 'math.random' in the mod (ex : water_drain.lua). This can't work in multiplayer.

Re: [MOD 0.12.x] Finite Water

Posted: Sat Apr 23, 2016 6:02 pm
by orzelek
ritonlajoie wrote:there are calls to 'math.random' in the mod (ex : water_drain.lua). This can't work in multiplayer.
Those actually work properly in multiplayer - they use map random gen which is same for all the peers.

Re: [MOD 0.12.x] Finite Water

Posted: Mon Apr 25, 2016 10:05 pm
by ljdp
This mod has been on the back-burner for a while and probably will be for a lot longer. This problem is really best solved at the C/C++ level rather then lua. There are a few misconceptions going around though. Yes a factorio dev stated that the mod API has not been tested with co-routines and so they are not supported, this is the main reason I rewrote homeworld to remove all co-routines. However co-routines are not threads, they do not run code simultaneously, they're just a fancy way doing flow control in code. Also the constant ALL_CAP variables would not be causing desyncs, there are ..constant, they never change (unless you change them manually), most likely the co-routines are causing the desyncs as it may be undeterministic on the C-boundary.

Re: [MOD 0.12.x] Finite Water

Posted: Thu Apr 28, 2016 9:22 pm
by thebacon
Just figured I should chime in and mention that this is my favorite mod, has to be combined with water drill (or some such water generation) if you play with water only in start area. Because every oil processing takes too much water.

I would love to be able to play with friends with this, Although I haven't even tried.

Re: [MOD 0.12.x] Finite Water

Posted: Thu May 12, 2016 4:22 am
by Vas
I had an idea thanks to some people in the IRC, but when you fix this for multiplayer, you can add a replenish rate for water based on its size.

For example:
50 water per tile
It gains 0.1 per second for a single tile.

Use scaling math for it, an exponential curve, so when you have 100 water tiles, you've got a gain of say something like 25 water per second. If you are draining only 20 water per second, that would make that water infinite. However if you are draining 30 per second, you'll lose 5 water per second until a tile runs out, and you do the math again to assess how much water is gained from the new one.

Alternatively, you calculate how many cells there are, do all the same math, but when removing water you calculate how many tiles would make 10% rounded to the nearest tile, say we use 100 water tiles again, making 10% be 10 tiles, makes 500 water before you drain anything. This means you drain 10 "random" tiles of water along the edges as soon as this value hits zero. Allowing you to have the script run a more advanced check on what tiles to remove so it doesn't create water puddles like it currently does.

One more thing you can do, is use clouds to determine what water gets restored to its maximum values. I'm not entirely sure how you currently handle water, so if you were to total up all the water in the lake from all connected water blocks, and drain water the same way I mentioned above with that 10% method, you could handle clouds better, I assume.

I'd also like you to calculate deep water as triple the water.
Green water should be 60% the normal water, as it appears to be swamp water which has lots of other things in it, and is thicker so its actually less water than it looks like.

I likely have further ideas, but not at the moment.

Re: [MOD 0.12.x] Finite Water

Posted: Mon Jun 13, 2016 4:30 pm
by thereaverofdarkness
^ I came here to say this, but Vas already said it for me.
Vas wrote:This means you drain 10 "random" tiles of water along the edges as soon as this value hits zero. Allowing you to have the script run a more advanced check on what tiles to remove so it doesn't create water puddles like it currently does.
I think it's good that it leaves puddles behind. When you find out that your water has run out, you can tap into those puddles to buy you some time while you search for a new lake.

Re: [MOD 0.12.x] Finite Water

Posted: Tue Jun 14, 2016 2:18 pm
by Pagan_PL
Greetings!

First off - This is great mod in my opinion. But I have serious issues and performance drops because of Finite water. Let me explain. First issue appears sometimes when I am trying to remove pump from dry land - game crashes. Unfortunalely there is nothing I can send and show here. Second, most disturbing: Game is laggy. It happends when one of the pump completly drain water from tile where it was placed and when that pump is on gras tile - it is impossible to place pump on the ground normally. Now, when I am far far away from my base and lags starts to occur I know that one of the pump drains water from tile and it is on the dry ground.

Re: [MOD 0.12.x] Finite Water

Posted: Tue Jun 14, 2016 2:55 pm
by Woehler
Pagan_PL wrote:Greetings!

First off - This is great mod in my opinion. But I have serious issues and performance drops because of Finite water. Let me explain. First issue appears sometimes when I am trying to remove pump from dry land - game crashes. Unfortunalely there is nothing I can send and show here. Second, most disturbing: Game is laggy. It happends when one of the pump completly drain water from tile where it was placed and when that pump is on gras tile - it is impossible to place pump on the ground normally. Now, when I am far far away from my base and lags starts to occur I know that one of the pump drains water from tile and it is on the dry ground.
That is all known issues. But there is no active programmer for this mod.

Re: [MOD 0.12.x] Finite Water

Posted: Wed Jun 29, 2016 5:03 pm
by patmo98
Pagan_PL wrote:Greetings!

First off - This is great mod in my opinion. But I have serious issues and performance drops because of Finite water. Let me explain. First issue appears sometimes when I am trying to remove pump from dry land - game crashes. Unfortunalely there is nothing I can send and show here. Second, most disturbing: Game is laggy. It happends when one of the pump completly drain water from tile where it was placed and when that pump is on gras tile - it is impossible to place pump on the ground normally. Now, when I am far far away from my base and lags starts to occur I know that one of the pump drains water from tile and it is on the dry ground.
I've been thinking about fixing what I can on this mod, and porting it to 0.13. I'm having trouble understanding what you're saying though.

Are you saying that the pump will remove all of the water, including the water under the pump, and that once the pump is not sitting on water, the game will lag?

Re: [MOD 0.12.x] Finite Water

Posted: Sun Jul 10, 2016 4:06 pm
by patrykbono20
Any chance to update ?

Re: [MOD 0.12.x] Finite Water

Posted: Tue Jul 19, 2016 4:51 pm
by Factorio2016
Any chance to update ?
+1

Re: [MOD 0.12.x] Finite Water

Posted: Wed Jul 20, 2016 1:19 am
by Afforess
For the love of all things holy, please don't update this mod. It is dangerous, will crash your game in spectacular ways, and should not be used or installed by anyone.

Re: [MOD 0.12.x] Finite Water

Posted: Wed Jul 20, 2016 10:25 am
by Woehler
Factorio2016 wrote:
Any chance to update ?
+1
Probably just add "factorio_version": "0.13", to the info.json. That's why most mods broke in version 13.

Re: [MOD 0.12.x] Finite Water

Posted: Sat Aug 27, 2016 1:56 pm
by patrykbono20
this is from json file:


{
"name": "finitewater",
"version": "1.0.2",
"title": "Finite Water",
"author": "Luke Perkin",
"contact": "",
"www": "www.locogame.co.uk",
"description": "Offshore pumps slowly drain lakes until they are removed entirely.",
"dependencies": ["base >= 0.12.11"]
}

Where I must paste this: "factorio_version": "0.13"

Re: [MOD 0.12.x] Finite Water

Posted: Sat Aug 27, 2016 3:05 pm
by Woehler
Doesn't matter.

{
"name": "finitewater",
"version": "1.0.2",
"title": "Finite Water",
"author": "Luke Perkin",
"contact": "",
"www": "www.locogame.co.uk",
"description": "Offshore pumps slowly drain lakes until they are removed entirely.",
"dependencies": ["base >= 0.12.11"]",
"factorio_version": "0.13"
}

something like that.

Re: [MOD 0.12.x] Finite Water

Posted: Sat Aug 27, 2016 6:35 pm
by patrykbono20
factorio blad.png
factorio blad.png (435.34 KiB) Viewed 7950 times
Add this line to file, start the game, try generate a new world and have this :)

Re: [MOD 0.12.x] Finite Water

Posted: Sat Aug 27, 2016 7:10 pm
by Woehler
Yeah. The mod is broken and needs to be remade. I'm only a script kiddie and have no idea how what kind of task it would take to remake this mod although I would like having this mod.

Re: [MOD 0.12.x] Finite Water

Posted: Sat Aug 27, 2016 11:22 pm
by aubergine18
It would be great if the drained area was filled with sand or dirt rather than fresh grass land. Also, if there was a way for lakes to refill should there be deep water nearby.

Re: [MOD 0.12.x] Finite Water

Posted: Sat Aug 27, 2016 11:57 pm
by Nexela
I might take a crack at making a better version of this at some point.

Re: [MOD 0.12.x] Finite Water

Posted: Sun Oct 02, 2016 2:15 pm
by patrykbono20
any chance ?