KS Power

by Klonan

Adds a range of different power producing options

Content
2 years ago
0.12 - 1.1
97.8K
Power

i Clean Water Power Plant solution

5 years ago
(updated 5 years ago)

Hello Klonan,
Thanks for this interesting mod and first of all, this amazing game that you guys are providing us.
I have a nice suggestion (or maybe a question?) for you: Is it possible to add a water barrage thingy that would produce power? I imagine something like GetTilesFromPosition() returning a object table that would translate into a circular field where it would count how many water tiles it has in range of the water barrage on the direction -X, for example, and that would translate on the max power production factor of the barrage. Something like "shallowwaterfact=1" "deepwaterfact=3" pwfact=(shallowcount * shallowwaterfact + deepcount * deepwaterfact) * barrageentity * distancefactor This distancefactor would be ranging from 1 to 0 where the more barrage buildings you have nearby, the lower the factor gets so you won't exploit building lots of barrages without water tiles to provide the kinectic energy to produce power. I thought about neighbour bonus but that would provide an exploit as well.

Anyways, just some random suggestion.
Cheers!

5 years ago

sounds really nice at first, but what about a straight line of barrages from the shore into a lake ? or 10 parallel lines through the entire lake ? or a grid where you place barrage entities at even or odd coordiates only (eg coordinates evenX/evenY: 1 out of 4 tiles gets the barrage) ? lots of options for exploits unless the barrages analyze their surrounding (eg similar to a flood fill) and that would cost lots of computation time since it would have to be checked over and over in case someone places landfill, adds or removes barrages, or even creates new water (with some mod), etc.
factorio is only 2D and such a power plant would attempt to simulate height too ...

5 years ago

I imagine something like their range drawning mechanic for turrets, where you draw a circular area around the structure that is shown on the map, with that area, it would check the water lenght just like YARM mod does with ores, to analyse the length of the body of water. After having the max radius and the body area, then you would cut in half that area, since only behind the wall is where you wanna calculate how many water tiles you have. Now with this smaller area you would analyse how many water tiles and which type there are inside that remaining area, (simple as adding a "for" loop to store the results in a Lua table) this time you will input the maxrange for the barrage to check if you would have enough power to build it. For example, if you have at least 50 tiles of water from where the last built barrage structure is (on_player_structure_built event) then you will have enough to produce power, the more barrages you build, the lesser tiles of water you'll have, so that will decrease their overall power output and eventually if you stack too much barrage structures, you wouldn't produce power at all.

5 years ago
(updated 5 years ago)

there is a big difference between YARM and this idea: for YARM, you target the ore field once and even a little delay/lag doesn't cause much trouble. but for this idea, the water, the barrages, and tiles around them would have to be checked as often as possible to quickly react on changes. some checks might be done via events (eg only when a barrage tile is placed or removed), but other changes (eg scripted changes of water, landfill, etc) might be quite difficult to detect. and then more complicated calculations, loops around each barrage, etc might be needed, in comparison to only doing a simple loop once for YARM (and even that mod has an option to only mark every Nth tile to speed this up when checking a new ore field might cause too much lag).

thus IF this is considered at all, i would guess that it takes some time to carefully and efficiently implement this, while currently 0.17 is more important ... thus let's see whether and what is possible in the distant future (after 0.17 became stable :-)

New response