Water As A Resource

Turns water into a non infinite resource. Offshore Drains allow FluidAreas to be refilled! 0.5.0 - Crude Oil can be stored in depleted FluidAreas!
14 days ago
0.16
1747
Owner: TreefrogGreaken
Source: N/A
Homepage: N/A
License: MIT
Created: 8 months ago
Latest Version: 0.5.14 (14 days ago)
Factorio version: 0.16
Downloaded: 1747 times

Water As A Resource

This Mod aims to turn Water into an non-infinite resource.

Latest Major Release

0.5.0 (24/10/18) - Crude Oil can now be pumped into/out of FluidAreas!

Description

Once an Offshore Pump is built, it assigns that pool of water an amount, whilst it is being used the amount left drains away, once 80% depleted the pool starts to disappear with random dry spots appearing, until at 100%, the entire pool becomes solid ground.

The Mod starts to count water production from when the first pipe/storage tank is connected to an offshore pump. Simply remove this connection to stop production counting against the water body that the offshore is placed into, otherwise you can drain a tiny water body by simply having to many active offshores elsewhere. (Limitation of the Mod as the Factorio API doesn't allow for an entity.active on an offshore pump)

Offshore Drains work in the opposite manner, they look for a pipe connection with a fluidbox, then add into the area the amount in the pipe, they empty the pipe and then the cycle continues. Drains only currently work with Water and Crude Oil, hope to get this working with other fluids soon.

Crude oil works in the same way as water. Any pump jacks that are created have there output monitored so they don't impact the fluid calculations.

Mod Settings

Alarms - Low Level (50/75/90%) : Enables the alarms for 50, 75 & 90 % depletion. (Def: On)
Alarms - High Level (95/97/98/99%) : Enables the alarms for 95, 97, 98 & 99 % depletion. (Def: On)
Alarms - Landfill Message: Enables the Landfill Message when being used in a FluidArea. (Def: On)
Disable RestoreWater Command : Disables the RestoreWater Command. Useful to prevent any players from using this on a server or mid-game. (Def: Off)
FluidArea - Initial Size (Tiles) : Number of Tiles the first pump/drain will find in a new body of water. (Min: 300, Def: 500, Max: 100,000)
FluidArea - Additional Tiles per Second: If an area is bigger the the Initial Size, this is the additional number of tiles added per second. (Min: 100, Def: 300, Max: 50,000)
Tile Fluid Amount - Shallow : The amount of fluid that a Shallow fluid tile is. (Min: 10, Def: 50, Max: 5000)
Tile Fluid Amount - Deep : The amount of fluid that a Deep fluid tile is. (Min: 20, Def: 100, Max: 10,000)
FluidArea - Regen Factor : Regens 0.001 per Tick, Factor increases/decreases this. (Min: 1, Def: 10, Max: 100)
Disable FluidArea Regen : Disabled the Regen of WaterAreas (Def: Off)
FluidArea - Tile Replacement Method: Pick which replacment method you wish, either the default Random tiles, or To/From Pump which has the water moving towards from the orignal pump.

Commands Available

/RestoreWater - Restores the FluidAreas and Pumps back into there infinite defaults. Useful if uninstalling the mod or want a restart, mid-game.

/Offshores - Will display the Offshore Pumps FluidAreas, there location and if they are active.

/OffshoreDrains - Will display the Offshore Drains FluidArea, Fluid Type, there location and if the are active.

/PumpJacks - Will display the amount of Pumpjacks and there position.

/WaterAreas - Will show all the FluidAreas created, there Name, Total Amount Water, Percentage Depleted and how many Offshore Pumps and Drains are active in that area.

Landfill

When Landfill is used on an already existing FluidArea, the area the landfill takes up will be decremented from the existing area and the Fluid amount recalculated.

Landfill cannot be used to split up an existing Fluidarea into multiple parts. You must first split up the area with Landfill and then place the offshore pumps to create the FluidAreas.

Next Update(s) - Within 0.6.X

  • Factorio 0.17 Support

Mod Compatibility

0.5.6 - AAI (0.2.4) : Graphics + Power Requirements for Offshore Pumps support.
0.5.7 - SeaBlock(0.2.17) : Restrict the Max No of tiles to 60,000 (A Sea!)

Other Notes

This mod was inspired by finitewater by Luke Perkin, found on the Forums : https://forums.factorio.com/viewtopic.php?f=94&t=14506

This is my first MOD and has taught me a lot about the inner workings of Factorio and LUA, please be gentle with the comments, I've tried to make it as user friendly as possible.

Mod Notes:
- Untested in Multiplayer
- Untested with other Mods that manipulate Water Tiles (Works alongside other Mods)
- Untested with Entities that create water (May mess up WaterCalcs!)

Mod To Dos:
- Other Misc issues as they are found!

Mod Future Ideas:
- Fill up Depleted FluidAreas with other liquids (Oil, Sulphuric Acid etc), alternative to storage tanks.