Page 1 of 1

Increasing Storage Tank Size.

Posted: Sat Dec 22, 2018 8:51 am
by mat1k
Trying to increase the vanilla storage tank size to 100K but I keep getting a Syntax error.

I have these 2 lines in data-updates.lua

Code: Select all

data.raw.data.raw.storage-tank["storage-tank"].fluid_box.base_area = 1000
data.raw.storage-tank["storage-tank"].max_health = 1000
But trying to load the game returns the error: Failed to Load Mods: __Test__/data-updates.lua:1:syntax error near '-'

The tank code is the only 2 lines in the file.

Re: Increasing Storage Tank Size.

Posted: Sat Dec 22, 2018 9:09 am
by Bilka
You correctly quoted the second dash but forgot the first. Here is the corrected code:

Code: Select all

data.raw["storage-tank"]["storage-tank"].fluid_box.base_area = 1000
data.raw["storage-tank"]["storage-tank"].max_health = 1000
Your code errors because "-" is a special character in lua, so to use it as a key it needs to be quoted.

You also had a duplicate "data.raw" in front of "data.raw" in your first line of code.

Re: Increasing Storage Tank Size.

Posted: Sat Dec 22, 2018 8:13 pm
by mat1k
Thank you. I completely missed the duplicate data.raw, I thought it might be something to do with the - being a special character but wasn't sure how to correct that in lua. I'm used to use \ to escape out things like that.

Re: Increasing Storage Tank Size.

Posted: Sun Dec 30, 2018 8:27 pm
by thelordodin
There are several big tank storage mods with graphics:
example https://mods.factorio.com/mod/StorageTank2

If you find out than you cant fill this new big tank you made, or, that you can't take all the liquid from it - try my mod
https://mods.factorio.com/mod/ReallyPressureTanks
This solves the problem.