Page 1 of 1
New types and recipes?
Posted: Tue Aug 06, 2013 11:45 pm
by Jani25051
Hi,
i have three questions about modding...
The first is, how can i add new "Types" like furnace or assembling-machine?
The second is, how can i add new recipes to the stone-furnace?
And the third is, how can i add my own recipes to my selfmade furnace?
I need all of them for my mod (:
Thanks if u can help me.
Re: New types and recipes?
Posted: Wed Aug 07, 2013 6:37 am
by zer0t3ch
If your selfmade furnace is specified as a furnace in the code, then it will automatically do all smelting stuff.
Re: New types and recipes?
Posted: Wed Aug 07, 2013 8:48 am
by Jani25051
zer0t3ch wrote:If your selfmade furnace is specified as a furnace in the code, then it will automatically do all smelting stuff.
And how can i specify selfmate items as smelting stuff?
Re: New types and recipes?
Posted: Wed Aug 07, 2013 8:59 am
by zer0t3ch
I dont know off the top of my head, but a lot of these questions can be answered by looking at the base game code. Essentially all items in the game are added in the form of mods, so if you look at how the base game items do it, you can do it yourself. look here for the base mod:
<install directory>/data/base/
Re: New types and recipes?
Posted: Wed Aug 07, 2013 9:36 am
by Jani25051
zer0t3ch wrote:I dont know off the top of my head, but a lot of these questions can be answered by looking at the base game code. Essentially all items in the game are added in the form of mods, so if you look at how the base game items do it, you can do it yourself. look here for the base mod:
<install directory>/data/base/
Yes, im looking at this often but i don´t find how are the types specified and how are the items like iron-ore specified that i can smelt them in the stone-furnace..
I think it have to do with the order but it let me not put in my own items in the stone-furnace.
Do you know my problem?
Re: New types and recipes?
Posted: Wed Aug 07, 2013 10:15 am
by drs9999
It is depends on the crating category in the recipe/entity data.
I suggest to look into my treefarm-mod code, the base mod might be a bit confusing because of the size.
In my code you can see how to assign recipes to existing categories, how to add new categories and how to assign new categories to new entites/recipes.
P.S. It would be easy to copy/paste the lines here, but you know:
Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.
Re: New types and recipes?
Posted: Wed Aug 07, 2013 11:01 am
by Jani25051
drs9999 wrote:It is depends on the crating category in the recipe/entity data.
I suggest to look into my treefarm-mod code, the base mod might be a bit confusing because of the size.
In my code you can see how to assign recipes to existing categories, how to add new categories and how to assign new categories to new entites/recipes.
P.S. It would be easy to copy/paste the lines here, but you know:
Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.
Hey thanks, now i understand modding a bit more.
But u don´t have an example for the furnace because if i change the smelting category to one of my own recipe categorys then it doesn´t work.
Code: Select all
--ELECTRIC FURNACE
{
type = "furnace",
name = "electric-furnace",
icon = "__MoreItems__/graphics/icons/machines/electric-furnace.png",
flags = {"placeable-neutral", "player-creation"},
minable = {mining_time = 1, result = "electric-furnace"},
max_health = 20,
collision_box = {{-1.0, -0.8}, {0.3, 1.2}},
selection_box = {{-1.0, -0.8}, {0.3, 1.2}},
smelting_categories = {"moreitems-mod-smelting"},
result_inventory_size = 1,
smelting_speed = 1,
source_inventory_size = 1,
energy_source =
{
type = "electric",
input_priority = "secondary"
},
drawing_scale = 0.7,
picture =
{
filename = "__MoreItems__/graphics/entity/electric-furnace/electric-furnace.png",
priority = "extra-high",
width = 96,
height = 96,
shift = {0.0, 0.0 }
},
fire_animation =
{
filename = "__MoreItems__/graphics/entity/electric-furnace/electric-furnace-fire.png",
priority = "extra-high",
frame_width = 18,
frame_height = 17,
frame_count = 16,
shift = { -0.021875, 0.5234375}
}
},
Thanks for all your help (:
And you are right, with
Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.
Re: New types and recipes?
Posted: Wed Aug 07, 2013 6:28 pm
by zer0t3ch
drs9999 wrote:Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.
One of the best lines I've ever seen. And so true!
You, sir, deserve the smile of a wise man.