Nixie Tubes


Adds nixie tubes, for displaying values from a connected circuit network.

a month ago
0.13 - 2.0
71.3K

i Glow effect?

7 years ago

Real Nixie tubes glow, and I noticed that these don't. Is adding such a glow feasible?

7 years ago

Not really, due to the level at which entities need to be abused to make adjustable sprites in the first place :/

7 years ago

I'm now thinking that this might be possible via shaders, although I'm not sure Factorio supports shader usage in mods yet.

3 years ago

how about ..

function nixie_sprite(char,xoffset,yoffset)
  return   {
      type = "sprite",
      name = "nixie-tube-sprite-" .. char,
      layers =
      {
          {
              filename = "__nixie-tubes__/graphics/nixie-chars-mono.png",
              x = xoffset * 40, -- Increase the offset by image table
              y = yoffset * 88,
              width = 40, -- New size image 2x
              height = 88, -- New size image 2x
              scale = 0.5, -- Reduced so that the sprite does not crawl over the edges
              apply_runtime_tint = true,
              shift = {-2/64,-18/64}, -- Move the sprite to fit into the tube
          },
          {
              filename = "__nixie-tubes__/graphics/nixie-chars-mono.png",
              x = xoffset * 40, -- Increase the offset by image table
              y = yoffset * 88,
              width = 40, -- New size image 2x
              height = 88, -- New size image 2x
              scale = 0.5, -- Reduced so that the sprite does not crawl over the edges
              apply_runtime_tint = true,
              shift = {-2/64,-18/64}, -- Move the sprite to fit into the tube
              draw_as_glow = true, -- <------------ magic
          }
      }
    }
end
3 years ago

I would be interested to learn how the above coding would work, and what is the difference between the two layer paragraphs? They seem to be the same text to me. I do see an added line about the draw as a glow... is that something the computer recognizes to do the glowing by?

3 years ago

It works similar to the glow effect of heat pipes by using the same flag draw_as_glow.
The one layer without that flag gets drawn under/before light effects while the one layer with that flag gets drawn over/after light effects like day&night cycle.
Except for that flag, the two layers are completely the same.

Little trivia: the draw_as_* flags where added in Factorio version 1.1.0 which is ~3.5 years younger than this thread ^^

2 years ago

Hey @justarandomgeek, when you find the time, can you please add this little feature?
If you don't have time, can we help out?

We are longing for glowing nixie tubes :)

2 years ago

It also would be nice, if the characters are illuminated. Meaning they should be visible in complete darkness, like a real display. :)

New response