New types and recipes?

Place to get help with not working mods / modding interface.
Post Reply
Jani25051
Burner Inserter
Burner Inserter
Posts: 14
Joined: Sat Aug 03, 2013 11:15 pm
Contact:

New types and recipes?

Post 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.

User avatar
zer0t3ch
Fast Inserter
Fast Inserter
Posts: 118
Joined: Fri Jul 26, 2013 6:06 am
Contact:

Re: New types and recipes?

Post by zer0t3ch »

If your selfmade furnace is specified as a furnace in the code, then it will automatically do all smelting stuff.
"F**k thy hater"
-George Watsky

Feel free to contact me!
Skype: Zer0t3ch
Razer Comms: Zer0t3ch
Email: zer0t3ch@live.com

Image

Jani25051
Burner Inserter
Burner Inserter
Posts: 14
Joined: Sat Aug 03, 2013 11:15 pm
Contact:

Re: New types and recipes?

Post 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?

User avatar
zer0t3ch
Fast Inserter
Fast Inserter
Posts: 118
Joined: Fri Jul 26, 2013 6:06 am
Contact:

Re: New types and recipes?

Post 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/
"F**k thy hater"
-George Watsky

Feel free to contact me!
Skype: Zer0t3ch
Razer Comms: Zer0t3ch
Email: zer0t3ch@live.com

Image

Jani25051
Burner Inserter
Burner Inserter
Posts: 14
Joined: Sat Aug 03, 2013 11:15 pm
Contact:

Re: New types and recipes?

Post 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?

drs9999
Filter Inserter
Filter Inserter
Posts: 831
Joined: Wed Mar 06, 2013 11:16 pm
Contact:

Re: New types and recipes?

Post 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.

Jani25051
Burner Inserter
Burner Inserter
Posts: 14
Joined: Sat Aug 03, 2013 11:15 pm
Contact:

Re: New types and recipes?

Post 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.

User avatar
zer0t3ch
Fast Inserter
Fast Inserter
Posts: 118
Joined: Fri Jul 26, 2013 6:06 am
Contact:

Re: New types and recipes?

Post 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. :ugeek:
"F**k thy hater"
-George Watsky

Feel free to contact me!
Skype: Zer0t3ch
Razer Comms: Zer0t3ch
Email: zer0t3ch@live.com

Image

Post Reply

Return to “Modding help”