Increasing Storage Tank Size.

Place to get help with not working mods / modding interface.
Post Reply
mat1k
Burner Inserter
Burner Inserter
Posts: 15
Joined: Sat Dec 22, 2018 8:48 am
Contact:

Increasing Storage Tank Size.

Post by mat1k » Sat Dec 22, 2018 8:51 am

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.

Bilka
Factorio Staff
Factorio Staff
Posts: 1878
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Increasing Storage Tank Size.

Post by Bilka » Sat Dec 22, 2018 9:09 am

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.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

mat1k
Burner Inserter
Burner Inserter
Posts: 15
Joined: Sat Dec 22, 2018 8:48 am
Contact:

Re: Increasing Storage Tank Size.

Post by mat1k » Sat Dec 22, 2018 8:13 pm

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.

thelordodin
Fast Inserter
Fast Inserter
Posts: 113
Joined: Fri Jan 06, 2017 1:54 am
Contact:

Re: Increasing Storage Tank Size.

Post by thelordodin » Sun Dec 30, 2018 8:27 pm

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.

Post Reply

Return to “Modding help”

Who is online

Users browsing this forum: Elgskred