change barrel size

Place to get help with not working mods / modding interface.
Post Reply
BonnaRe
Manual Inserter
Manual Inserter
Posts: 1
Joined: Tue Dec 22, 2020 8:21 pm
Contact:

change barrel size

Post by BonnaRe »

change barrel size

Hello,
sorry for my noob question but maybe i am trying to make a change that i find very difficult.
I would like to change the size of the barrel, i.e. the amount of fluid it can contain.
i searched in the data.raw but i understand that it is not possible to do it the same way as a container / box.

I tried to look at other mods but they all use scripts a little too complicated in my experience ...

Kalanndok
Long Handed Inserter
Long Handed Inserter
Posts: 58
Joined: Sat Dec 12, 2015 9:07 am
Contact:

Re: change barrel size

Post by Kalanndok »

A barrel of water is a simple item.
The fact that it contains 50 units of water is not a property of the item but a property of the recipies to fill and empty the barrel.

So to change the amount fluid within a barrel you would need to modify the recipies.

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2904
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: change barrel size

Post by darkfrei »

Made with viewtopic.php?t=45107

Code: Select all

data.raw.recipe["fill-water-barrel"].ingredients[2] = {type = "item", name = "empty-barrel", amount = 1, catalyst_amount = 1}
data.raw.recipe["empty-water-barrel"].results[1] = {type = "fluid", name = "water", amount = 50, catalyst_amount = 50}
See code of the Factorio/data/base/data-updates.lua. Don't change it!
Attachments
2020-12-23T01_45_27-ZeroBrane Studio - D__Factorio_1.1_data_base_data-updates.lua.png
2020-12-23T01_45_27-ZeroBrane Studio - D__Factorio_1.1_data_base_data-updates.lua.png (15.34 KiB) Viewed 878 times

Post Reply

Return to “Modding help”