New Intermediate Entity (?)

Place to get help with not working mods / modding interface.
AenAllAin
Long Handed Inserter
Long Handed Inserter
Posts: 61
Joined: Sat Apr 02, 2016 3:10 am
Contact:

New Intermediate Entity (?)

Post by AenAllAin »

Is it possible to create additional intermediate entities? If so, what type should the prototype be? Specifically, I wanted to create "iron-cable" similar to "copper-cable".
User avatar
Arch666Angel
Smart Inserter
Smart Inserter
Posts: 1636
Joined: Sun Oct 18, 2015 11:52 am
Contact:

Re: New Intermediate Entity (?)

Post by Arch666Angel »

You just need to make an item definition and the corresponding recipes to produce/use it. See the modding tutorial in the forum for more info on how to do it.
AenAllAin
Long Handed Inserter
Long Handed Inserter
Posts: 61
Joined: Sat Apr 02, 2016 3:10 am
Contact:

Re: New Intermediate Entity (?)

Post by AenAllAin »

Arch666Angel wrote:You just need to make an item definition and the corresponding recipes to produce/use it. See the modding tutorial in the forum for more info on how to do it.
Yeah, I did all of that; I just mean what prototype am I supposed to use for intermediate products like cable ...I had to use fish to make it work for now.
User avatar
prg
Filter Inserter
Filter Inserter
Posts: 947
Joined: Mon Jan 19, 2015 12:39 am
Contact:

Re: New Intermediate Entity (?)

Post by prg »

Have a look at how the copper-cable is defined in the base game files and do the same thing for iron-cable?
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!
User avatar
Adil
Filter Inserter
Filter Inserter
Posts: 945
Joined: Fri Aug 15, 2014 8:36 pm
Contact:

Re: New Intermediate Entity (?)

Post by Adil »

There's no wire entities defined in vanilla files.
Wire item definition is in no way different from definition of any simple item like gear.
Seeing how wire connection pics are located in __core__ I'd say they are hardcoded. (And I believe I remember seeing confirmation of that somewhere here.)

If a graphical representation of connection between two buildings is needed, without connecting electric or logical networks, you could try using beams. However last time I've tried it was mandatory to use intermediate dummy unit to create one.
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.
User avatar
prg
Filter Inserter
Filter Inserter
Posts: 947
Joined: Mon Jan 19, 2015 12:39 am
Contact:

Re: New Intermediate Entity (?)

Post by prg »

Sounds like he's just looking for a new crafting ingredient. A new wire to connect buildings would not be an intermediate but an end result.
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!
User avatar
Arch666Angel
Smart Inserter
Smart Inserter
Posts: 1636
Joined: Sun Oct 18, 2015 11:52 am
Contact:

Re: New Intermediate Entity (?)

Post by Arch666Angel »

prg wrote:Sounds like he's just looking for a new crafting ingredient. A new wire to connect buildings would not be an intermediate but an end result.
Yeah that's what I thought! :P But interesting problem and I think @Adil is right, the sprite is there in __core__ but no definition can be found, so its probably hard coded, although I would have thought that the visible cable is a Bezier curve or something and not a static sprite.
AenAllAin
Long Handed Inserter
Long Handed Inserter
Posts: 61
Joined: Sat Apr 02, 2016 3:10 am
Contact:

Re: New Intermediate Entity (?)

Post by AenAllAin »

You guys are all correct; that is my dilemma. I just want the type I should use for a new intermediate ...I guess it was the developers intent that we should use "fish" for all new intermediates :)

Code: Select all

-- Iron Cable
data:extend (
{
  {
    type = "fish",
    name = "iron-cable",
    icon = "__base__/graphics/icons/copper-cable.png",
    flags = {"player-creation"},
    max_health = 1,
    pictures =
    {
        filename = "__base__/graphics/icons/copper-cable.png",
        width = 32,
        height = 40
    }
  },

}
) 
User avatar
prg
Filter Inserter
Filter Inserter
Posts: 947
Joined: Mon Jan 19, 2015 12:39 am
Contact:

Re: New Intermediate Entity (?)

Post by prg »

What exactly is it you want to achieve in the end? If you want to make a new crafting ingredient, it needs to be an item, not an entity.
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!
Post Reply

Return to “Modding help”