Page 1 of 1
New Intermediate Entity (?)
Posted: Fri Apr 15, 2016 4:48 pm
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".
Re: New Intermediate Entity (?)
Posted: Sat Apr 16, 2016 11:15 am
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.
Re: New Intermediate Entity (?)
Posted: Sat Apr 16, 2016 11:29 am
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.
Re: New Intermediate Entity (?)
Posted: Sat Apr 16, 2016 11:37 am
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?
Re: New Intermediate Entity (?)
Posted: Sat Apr 16, 2016 12:00 pm
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.
Re: New Intermediate Entity (?)
Posted: Sat Apr 16, 2016 12:16 pm
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.
Re: New Intermediate Entity (?)
Posted: Sat Apr 16, 2016 12:27 pm
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!

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.
Re: New Intermediate Entity (?)
Posted: Sun Apr 17, 2016 1:21 am
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
}
},
}
)
Re: New Intermediate Entity (?)
Posted: Sun Apr 17, 2016 9:02 am
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.