[Rseding91] Modding: "copper_wire_picture" not working
[Rseding91] Modding: "copper_wire_picture" not working
Has "copper_wire_picture" been removed from the electric-pole entity?
Does not seem to work.
Is there another way to remove the lines between poles?
Thanks.
Does not seem to work.
Is there another way to remove the lines between poles?
Thanks.
Re: copper_wire_picture
What do you mean by removed? Do you have an error?
Shift + Left click on the electric pole to disconnect its wires.
Use copper cable to connect it manually.
Shift + Left click on the electric pole to disconnect its wires.
Use copper cable to connect it manually.
Re: copper_wire_picture
Shift Click is a manual process, what if you don't want to show the wire or change it's color?
I'm trying to add ghost.invisible entities that don't show a wire between them, even though it is there.
In the past this could be done with "copper_wire_picture", but not working anymore. (for me at least)
I'm trying to add ghost.invisible entities that don't show a wire between them, even though it is there.
In the past this could be done with "copper_wire_picture", but not working anymore. (for me at least)
Re: copper_wire_picture
ah, I see. So it is a modding related problem. I don't even know this trick existed.
Re: Modding: "copper_wire_picture" not working
The "copper_wire_picture" property was removed and converted into a utility sprite that all electric poles use.
I'll convert all of the "utility sprites" to be defined in the core game prototype files for 0.15 so the images can be set by mods.
I'll convert all of the "utility sprites" to be defined in the core game prototype files for 0.15 so the images can be set by mods.
If you want to get ahold of me I'm almost always on Discord.
Re: Modding: "copper_wire_picture" not working
And we should also make it possible to access it from the SpriteBank, so it can be used in the gui.Rseding91 wrote:The "copper_wire_picture" property was removed and converted into a utility sprite that all electric poles use.
I'll convert all of the "utility sprites" to be defined in the core game prototype files for 0.15 so the images can be set by mods.
- aubergine18
- Smart Inserter
- Posts: 1264
- Joined: Fri Jul 22, 2016 8:51 pm
- Contact:
Re: [Rseding91] Modding: "copper_wire_picture" not working
Will this allow additional wire colors to be added, for example if I want a blue wire in addition to red, green and copper? (Would also need to update the `defines.wire_type` and facilitate adding connector/shadow offsets for wires (but not mandating them, eg. I might only want specific entity prototypes to accommodate blue wires).
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
Re: [Rseding91] Modding: "copper_wire_picture" not working
No. The game only had internal logic for the 2 wire types. It will simply allow you to change the sprite(s) used.aubergine18 wrote:Will this allow additional wire colors to be added, for example if I want a blue wire in addition to red, green and copper? (Would also need to update the `defines.wire_type` and facilitate adding connector/shadow offsets for wires (but not mandating them, eg. I might only want specific entity prototypes to accommodate blue wires).
If you want to get ahold of me I'm almost always on Discord.
- aubergine18
- Smart Inserter
- Posts: 1264
- Joined: Fri Jul 22, 2016 8:51 pm
- Contact:
Re: [Rseding91] Modding: "copper_wire_picture" not working
Would that change allow me to at least colorise/tint the wire via mod code? So player attaches any color to my entity, but then my code can see that and tint the wire blue?I'll convert all of the "utility sprites" to be defined in the core game prototype files for 0.15 so the images can be set by mods.
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
Re: [Rseding91] Modding: "copper_wire_picture" not working
No.aubergine18 wrote:Would that change allow me to at least colorise/tint the wire via mod code? So player attaches any color to my entity, but then my code can see that and tint the wire blue?I'll convert all of the "utility sprites" to be defined in the core game prototype files for 0.15 so the images can be set by mods.
If you want to get ahold of me I'm almost always on Discord.
Re: Modding: "copper_wire_picture" not working
I was wondering if this was ever implemented. Would like to have power poles with no wires showing between them, even though connected.Rseding91 wrote:The "copper_wire_picture" property was removed and converted into a utility sprite that all electric poles use.
I'll convert all of the "utility sprites" to be defined in the core game prototype files for 0.15 so the images can be set by mods.
Thanks.
Re: Modding: "copper_wire_picture" not working
Yep, it's even in the 0.15 changelogTheSAguy wrote:I was wondering if this was ever implemented. Would like to have power poles with no wires showing between them, even though connected.Rseding91 wrote:The "copper_wire_picture" property was removed and converted into a utility sprite that all electric poles use.
I'll convert all of the "utility sprites" to be defined in the core game prototype files for 0.15 so the images can be set by mods.
Thanks.
https://forums.factorio.com/44505 wrote:
- Utility sprites are now defined fully in the core mod prototypes.
If you want to get ahold of me I'm almost always on Discord.
Re: [Rseding91] Modding: "copper_wire_picture" not working
Thanks Rsending91!
I was trying to figure this out, but am having difficulties. Hoping you or someone could help please.
I was able to remove the shadows, but not the copper connecting wires themselves. (see image below. No shadow, but lines)
In the code I just blanked out the connection points like this:
What else do I need to do.
Also, I am creating a hidden entity, the power pole, to make my rails transmit power. Unfortunately, this hidden entity is causing the rails not to be able to cross each other. (see image below)
I thought the flag, "not on map" would resolve this, but it did not. What can I do to make the hidden entity not cause this issue?
Thanks!
Here is the code of the Power entity:
Here is the creation of the hidden entity in the control:
I was trying to figure this out, but am having difficulties. Hoping you or someone could help please.
I was able to remove the shadows, but not the copper connecting wires themselves. (see image below. No shadow, but lines)
In the code I just blanked out the connection points like this:
Code: Select all
connection_points =
{
{
shadow =
{
},
wire =
{
}
},
{
shadow =
{
},
wire =
{
}
},
{
shadow =
{
},
wire =
{
}
},
{
shadow =
{
},
wire =
{
}
}
},
Also, I am creating a hidden entity, the power pole, to make my rails transmit power. Unfortunately, this hidden entity is causing the rails not to be able to cross each other. (see image below)
I thought the flag, "not on map" would resolve this, but it did not. What can I do to make the hidden entity not cause this issue?
Thanks!
Here is the code of the Power entity:
Code: Select all
------- Rail Pole
{
type = "electric-pole",
name = "bi_medium-electric-pole_for_rail",
icon = "__Bio_Industries__/graphics/icons/Bio_Farm_Cabeling.png",
--flags = {"placeable-neutral", "player-creation", "placeable-off-grid", "not-repairable", "not-on-map"},
flags = {"placeable-neutral", "placeable-off-grid", "not-repairable", "not-on-map"},
selectable_in_game = false,
max_health = 1,
resistances = {{type = "fire", percent = 100}},
collision_box = {{-0, -0}, {0, 0}},
maximum_wire_distance = 8,
supply_area_distance = 5,
pictures =
{
filename = "__Bio_Industries__/graphics/icons/empty.png",
priority = "low",
width = 0,
height = 0,
frame_count = 1,
axially_symmetrical = false,
direction_count = 4,
shift = {0.75, 0},
},
connection_points =
{
{
shadow =
{
},
wire =
{
}
},
{
shadow =
{
},
wire =
{
}
},
{
shadow =
{
},
wire =
{
}
},
{
shadow =
{
},
wire =
{
}
}
},
radius_visualisation_picture =
{
filename = "__Bio_Industries__/graphics/icons/empty.png",
width = 0,
height = 0,
priority = "low"
},
},
Code: Select all
function On_Built(event)
local entity = event.created_entity
--- Concrete Rail has been built
if (entity and entity.name == "straight-rail") or (entity and entity.name == "curved-rail") then
writeDebug("Concrete Rail has been built")
local surface = entity.surface
local force = entity.force
local position = entity.position
local rail_track = entity
local pole_name = "bi_medium-electric-pole_for_rail"
local create_rail_pole = surface.create_entity({name = pole_name, position = position, force = force})
create_rail_pole.minable = false
create_rail_pole.destructible = false
group_entities(cantor(position.x,position.y), { rail_track, create_rail_pole })
end
end
Re: [Rseding91] Modding: "copper_wire_picture" not working
Giving your prototype
collision_mask = {}
should fix the first problem
collision_mask = {}
should fix the first problem
Re: [Rseding91] Modding: "copper_wire_picture" not working
Thanks Nexela, that did fix the second issue.Nexela wrote:Giving your prototype
collision_mask = {}
should fix the first problem
Now just how to get rid if the copper wires showing...
Re: [Rseding91] Modding: "copper_wire_picture" not working
Rseding91,
Anyway you could help me out here?
Thanks,
Anyway you could help me out here?
Thanks,
Re: [Rseding91] Modding: "copper_wire_picture" not working
It's defined in the core mod utilitysprites.lua "copper_wire" line 701.TheSAguy wrote:Rseding91,
Anyway you could help me out here?
Thanks,
You can mod it out to any other sprite using the same syntax as that file.
If you want to get ahold of me I'm almost always on Discord.
Re: [Rseding91] Modding: "copper_wire_picture" not working
Cool, thanks for the reply!Rseding91 wrote:It's defined in the core mod utilitysprites.lua "copper_wire" line 701.TheSAguy wrote:Rseding91,
Anyway you could help me out here?
Thanks,
You can mod it out to any other sprite using the same syntax as that file.
Re: [Rseding91] Modding: "copper_wire_picture" not working
Okay, so I see it there in the utility_sprites:
Is it possible though, to only change the copper wire on a custom power pole, without changing all copper wires?
All I want to do is remove the wire lines from my track that has a hidden pole:
Code: Select all
data:extend(
{
{
type = "utility-sprites",
name = "default",
copper_wire =
{
filename = "__core__/graphics/copper-wire_tweak.png",
priority = "extra-high-no-scale",
width = 224,
height = 46
},
}
})
All I want to do is remove the wire lines from my track that has a hidden pole: