Page 1 of 1

Need help with modding

Posted: Thu Oct 02, 2014 11:54 am
by speedy45
I need help with modding Factorio. So here is the details for factorio:

Factorio 10.12
Scenerio 10.1

The mod I would like to create to mod the storage tank for the oils to incease the storage tanks of the oils. Also I am need to the modding of Factorio as well. Since I the storage thanks max amount is 2500. So I would like to incease this so I don't have to craft like 20 of them. So ny questiion is how to I create this mod, so lt me know?

Re: Need help with modding

Posted: Thu Oct 02, 2014 2:24 pm
by FreeER
Well if you look in the data/base/prototypes/entity/entity.lua file you'll see that the storage tank has a type of "storage-tank" and a name of "storage-tank", you'll also see the number 250 (suspiciously close to the 2500 number you mentioned) as the base_area in the fluid_box subtable. To modify the prototypes of another mod (and what's in data/base is just a mod) you use data.raw[type][name].table.property (you'd leave off .table if the property was not within a subtable), so in your mod (a folder/zip with an info.json and data.lua file) you'd place a line like this in the data.lua

Code: Select all

data.raw["storage-tank"]["storage-tank"].fluid_box.base_area = 1000
If you plan to do more modding and haven't read through the tutorial on the wiki (link's in my sig) I'd recommend that, and at least glancing through the Programming in Lua book if you're not familiar with Lua (there's a link in the tutorial, or you can use Google).

Re: Need help with modding

Posted: Thu Oct 02, 2014 11:29 pm
by speedy45
thanks for the help,