OK, so I was looking for some tutorials on how to make mods, add entities etc etc, but, well, either I am idiot or theese tutorials are too complicated. They tell me how to make cars, entities, something that change game mechanics, but I want to do only one thing; add CHEST. Yea, nothing complicated. So please, can anyone post me some sort of code or simple tut how to add new chest with custom amount of inventory slots? You don't have to explain it too much, my methods of reverse engineering are good enough.
Thanks.
EDIT: I know there are tutorials, but I don't need that many knowledge, I just want chest
How to add chest?
Re: How to add chest?
You'll need a lua definition that looks something like this:
I'll leave adding technology as an exercise for the reader
Code: Select all
data:extend({
{
type = "item",
name = "your-chest",
icon = "__base__/graphics/icons/steel-chest.png",
flags = {"goes-to-quickbar"},
subgroup = "storage",
order = "a[items]-g[your-chest]",
place_result = "your-chest",
stack_size = 50
},
{
type = "recipe",
name = "your-chest",
enabled = true,
ingredients = {{"plastic-bar", 8}},
result = "your-chest"
},
{
type = "container",
name = "your-chest",
icon = "__base__/graphics/icons/steel-chest.png",
flags = {"placeable-neutral", "player-creation"},
minable = {mining_time = 1, result = "your-chest"},
max_health = 200,
corpse = "small-remnants",
open_sound = { filename = "__base__/sound/metallic-chest-open.ogg", volume=0.65 },
close_sound = { filename = "__base__/sound/metallic-chest-close.ogg", volume = 0.7 },
resistances =
{
{
type = "fire",
percent = 90
}
},
collision_box = {{-0.35, -0.35}, {0.35, 0.35}},
selection_box = {{-0.5, -0.5}, {0.5, 0.5}},
fast_replaceable_group = "container",
inventory_size = 48,
vehicle_impact_sound = { filename = "__base__/sound/car-metal-impact.ogg", volume = 0.65 },
picture =
{
filename = "__base__/graphics/entity/steel-chest/steel-chest.png",
priority = "extra-high",
width = 48,
height = 34,
shift = {0.2, 0}
}
}
})
Re: How to add chest?
Oh thanks, I'll build you memorial in my living room ad I'll pray to it every day.
EDIT: sounds more creepy than I planned
EDIT: sounds more creepy than I planned