[MOD 0.12.x] Nixie Tubes - numeric display elements

Topics and discussion about specific mods
Post Reply
GopherAtl
Fast Inserter
Fast Inserter
Posts: 177
Joined: Sat Jan 31, 2015 7:54 pm
Contact:

[MOD 0.12.x] Nixie Tubes - numeric display elements

Post by GopherAtl »

Big thanks to Narc for updating this while I'm busy with life and addictions other than factorio.
Narc wrote:
Narc wrote:I'm gonna post a pull request and an unofficial binary once I'm sure everything looks right.
And done, pull request and Nixie Tubes v0.1.8 unofficial (direct download). Please prefer GopherAtl's actual release, whenever he gets around to making one.
^^Use that version for the latest Factorio, my last version is non-functional after, I think, 0.12.11?
Nixie Tubes

Image

Info:
Adds an item that can be used to display the value of signals in a circuit network.
License
Long Description
Pictures
Version history
Planned Features
Use in Mod Packs
Last edited by GopherAtl on Sat Feb 06, 2016 8:14 pm, edited 16 times in total.
My Mods:
Nixie Tubes - numeric displays for your circuit networks!
Logistic Combinators - use logistics values in circuit logic! -
Autowire - automate red/green wire connections

GopherAtl
Fast Inserter
Fast Inserter
Posts: 177
Joined: Sat Jan 31, 2015 7:54 pm
Contact:

Re: [MOD 0.12.x] Nixie Tubes - numeric display elements

Post by GopherAtl »

I debated whether to throw this in WIP for a bit, but in use it's pretty simple and I haven't found any issues in testing (except the whole invisible-in-config-gui thing, but not sure yet how I'm gonna fix that)

My art skills suck, so I'm hoping to eventually replace these graphics with something, well, better. Assuming someone who doesn't suck at arting will volunteer their time to the task...

:edit: Oh, translations of "Nixie Tube" are encouraged, that is literally the only thing to be translated for the mod at present, so couldn't really be easier.
My Mods:
Nixie Tubes - numeric displays for your circuit networks!
Logistic Combinators - use logistics values in circuit logic! -
Autowire - automate red/green wire connections

GotLag
Filter Inserter
Filter Inserter
Posts: 532
Joined: Sat May 03, 2014 3:32 pm
Contact:

Re: [MOD 0.12.x] Nixie Tubes - numeric display elements

Post by GotLag »

How's this for art?
Image

Note that these are laying "flat" rather than standing up, so work better as a 2-tile-high entity instead of 1 by 1.

Sprite strip - it's 39 pixels wide, so add a horizontal shift of 0.109375

PS: Take a look at the Language links on the Wikipedia article for translations.

PPS: Let me know if you'd like them brighter/bolder or in a different font. I used Segoe UI Light.

GopherAtl
Fast Inserter
Fast Inserter
Posts: 177
Joined: Sat Jan 31, 2015 7:54 pm
Contact:

Re: [MOD 0.12.x] Nixie Tubes - numeric display elements

Post by GopherAtl »

Certainly looks much better than my original art! I was kind of attached to the idea of them standing up, looking more like the typical designs in glass tubes, but beggars can't be choosers, so I can work with that. Thanks!

Good thought on the wikipedia translations, it should have everything I need for a translation job this simple.

I'll get a version 0.1.2 pushed out in a bit with the graphics update and some more localizations.
My Mods:
Nixie Tubes - numeric displays for your circuit networks!
Logistic Combinators - use logistics values in circuit logic! -
Autowire - automate red/green wire connections

GotLag
Filter Inserter
Filter Inserter
Posts: 532
Joined: Sat May 03, 2014 3:32 pm
Contact:

Re: [MOD 0.12.x] Nixie Tubes - numeric display elements

Post by GotLag »

I'm not a great artist either, I just copied the frame from a logistics chest, cloned the edges to extend it all the way around, and re-coloured it. However I will say that I think it's better for them to be "flat" than standing, so they aren't hiding things behind them. That would also be more consistent with the base game, the only entities that overlap others significantly are things like power poles which are not full-width and have plenty of transparency.

Let me know if there are any changes you'd like made, eg frame colour, font, brightness. I can also send you the PSD if you like.

GopherAtl
Fast Inserter
Fast Inserter
Posts: 177
Joined: Sat Jan 31, 2015 7:54 pm
Contact:

Re: [MOD 0.12.x] Nixie Tubes - numeric display elements

Post by GopherAtl »

The psd would be nice - I meant to include the .xcf of the original in the github repo, and would put yours there as well, as the original forms may be helpful in hypothetical futures were others are updating the mod and need, for example, to make higher-res versions or something.

Hmm. Is the shadow in a separate layer in the PSD? Not sure how to go about it exactly, but shadows seem to be pretty commonly rendered as separate layers in factorio, would like to do them the same way here if I can, so having them in a separate strip would be ideal. Other than that, no, no particular suggestions. Your point about consistency of style is well-taken, too.
My Mods:
Nixie Tubes - numeric displays for your circuit networks!
Logistic Combinators - use logistics values in circuit logic! -
Autowire - automate red/green wire connections

GopherAtl
Fast Inserter
Fast Inserter
Posts: 177
Joined: Sat Jan 31, 2015 7:54 pm
Contact:

Re: [MOD 0.12.x] Nixie Tubes - numeric display elements

Post by GopherAtl »

updating the mod and thought of one thing... would be nice if there was a visual indication of the attach point for wires. Any way you could add something like that? Just a little antenna sticking out, like on a smart chest, perhaps? For now I'm leaving the contact point at the bottom-right, but top-right would make more sense visually and be more consistent.

:edit: Ok, pushed out 0.1.2, main post updated. Note this is a slightly breaking change, because the tile size of the tubes went from 1x1 to 1x2; did a test loading a save from 0.1.1, though, and it didn't seem to really hurt anything, nixies already placed in the world just had a slightly wonky selection and collision box as a result, but removing and re-placing them fixed it.

Also added the following localizations: af, ca, da, de, es, fi, fr, hu, it, nl, pt, and zh. If you speak one of these, I'd appreciate it if you let me know if the translation is wonky in any way (I'm particularly unsure about fi and zh, but could have mistakes in any of them). If you speak something not listed, you can submit a localization pull request on github, or just post the proper translation of "nixie tube" here and I'll add it myself.
My Mods:
Nixie Tubes - numeric displays for your circuit networks!
Logistic Combinators - use logistics values in circuit logic! -
Autowire - automate red/green wire connections

GotLag
Filter Inserter
Filter Inserter
Posts: 532
Joined: Sat May 03, 2014 3:32 pm
Contact:

Re: [MOD 0.12.x] Nixie Tubes - numeric display elements

Post by GotLag »

I'll look into it.

Edit: how's this?
Image

GopherAtl
Fast Inserter
Fast Inserter
Posts: 177
Joined: Sat Jan 31, 2015 7:54 pm
Contact:

Re: [MOD 0.12.x] Nixie Tubes - numeric display elements

Post by GopherAtl »

looks good, thanks! Should have a 0.1.3 release ready tomorrow, which'll use these, and have another minor fix - I found that in some circumstances (?) when places, they don't initialize right, and display numbers instead of being in the off state. Will be an easy fix, just too tired tonight, as it's gotten late.

Got something else I can't decide if I should add to this mod, or do as a separate mod...

Image

Calling it a Logistic Combinator. You select item types in the constant combinator-like gui, and the counts are pulled from the logistics network and output on the connected circuit networks (any counts you enter will ignored, when opened it'll show the counts on logistics at the time of opening).

So basically it imports logistic network values into circuit networks for you, to then use as you please - in the pic, with nixie tubes, but could be used in any combinator logic. Ought to have it finished tomorrow, too.
My Mods:
Nixie Tubes - numeric displays for your circuit networks!
Logistic Combinators - use logistics values in circuit logic! -
Autowire - automate red/green wire connections

GotLag
Filter Inserter
Filter Inserter
Posts: 532
Joined: Sat May 03, 2014 3:32 pm
Contact:

Re: [MOD 0.12.x] Nixie Tubes - numeric display elements

Post by GotLag »

Separate mods in my opinion. Maybe once you have a bunch of stuff you can bundle it together.

GopherAtl
Fast Inserter
Fast Inserter
Posts: 177
Joined: Sat Jan 31, 2015 7:54 pm
Contact:

Re: [MOD 0.12.x] Nixie Tubes - numeric display elements

Post by GopherAtl »

GotLag wrote:I'll look into it.

Edit: how's this?
Image

Didn't notice last night, but you didn't include the raw graphic for the updated sprite? Gonna be pushing 0.1.3 directly, which fixes the initialization issue where the "car" sometimes places rotated (so displaying some number instead of being off), adds a technology (Cathodes, allows nixies, requires "advanced electronics"), and puts the nixies in the crafting menu next to combinators and circuit stuff instead of in the power section with lamps. I'll push a 0.1.4 with the new sprites later.
My Mods:
Nixie Tubes - numeric displays for your circuit networks!
Logistic Combinators - use logistics values in circuit logic! -
Autowire - automate red/green wire connections

DOSorDIE
Fast Inserter
Fast Inserter
Posts: 249
Joined: Sat Oct 11, 2014 3:43 pm
Contact:

Re: [MOD 0.12.x] Nixie Tubes - numeric display elements

Post by DOSorDIE »

Great Mod ... I love it :D

GotLag
Filter Inserter
Filter Inserter
Posts: 532
Joined: Sat May 03, 2014 3:32 pm
Contact:

Re: [MOD 0.12.x] Nixie Tubes - numeric display elements

Post by GotLag »

Sorry for the delay, here are the sprites:
http://gozaima.su/factorio/art/nixie-tube.png
http://gozaima.su/factorio/art/nixie-glyphs.png

For the tube, use the following settings:

Code: Select all

  shift = {0.25, -0.125}
...
  circuit_wire_connection_point =
    {
      shadow =
      {
        red = {0.9, -0.5625},
        green = {0.9, -0.5625},
      },
      wire =
      {
        red = {0.4375, -1.125},
        green = {0.4375, -1.125},
      }
    }
The delay and the minus sign are due to me trying to tinker with the mod to display negative numbers. However unless I'm reading it incorrectly, there's no way to directly access to signal amount, and you have work out the signalled amount by binary search every time?

GopherAtl
Fast Inserter
Fast Inserter
Posts: 177
Joined: Sat Jan 31, 2015 7:54 pm
Contact:

Re: [MOD 0.12.x] Nixie Tubes - numeric display elements

Post by GopherAtl »

GotLag wrote:Sorry for the delay, here are the sprites:
[snip sprites and settings]

The delay and the minus sign are due to me trying to tinker with the mod to display negative numbers. However unless I'm reading it incorrectly, there's no way to directly access to signal amount, and you have work out the signalled amount by binary search every time?
ayup. It stores the last value in an = condition so it can shortcut that process when it hasn't changed, but if it has? yawp, binary search. I've toyed with ways to change the search that will prioritize nearby values, but so far not sure if the gains would be worth the effort.

Supporting negatives shouldn't be too bad, it does resolve negative numbers already and just strips the sign off, it'll just need to remember and pass that sign up to the next nixie, and when it arrives at "0" with the negative flag, display and discard the negative and then carry on as before. Hasn't been a priority, and in fact I'd forgotten about it entirely for a while there. If you haven't done it first, I'll see about doing it tomorrow when I integrate the new sprites. Getting lateish and I'm too tired to be trusted with code right now XD
My Mods:
Nixie Tubes - numeric displays for your circuit networks!
Logistic Combinators - use logistics values in circuit logic! -
Autowire - automate red/green wire connections

jorgenRe
Filter Inserter
Filter Inserter
Posts: 535
Joined: Wed Apr 09, 2014 3:32 pm
Contact:

Re: [MOD 0.12.x] Nixie Tubes - numeric display elements

Post by jorgenRe »

Could you possibly in your mod do this small, but future proof change that will make your mod compatible with the upcomming space thing in 0.13 and my mod The underground?
Basically it is to remove the hardcoded part

Code: Select all

game.surfaces.nauvis
to this:

Code: Select all

builder.surface.
and after:

Code: Select all

local function onPlaceEntity(event)
add in:

Code: Select all

	local index = event.player_index
    builder = game.players[index]
so it looks like this:

Code: Select all

local function onPlaceEntity(event)
	local index = event.player_index
    builder = game.players[index]
  local entity=event.created_entity
Basically what it does is it uses the surface that the player who triggered that event(built the nixie tube)!
Logo
Noticed the told change in FFF #111 so il continue to use my signature ^_^
Thanks for listening to our suggestions, devs :D!
I would jump of joy if we could specify which tiles spawned in a surfaces

GopherAtl
Fast Inserter
Fast Inserter
Posts: 177
Joined: Sat Jan 31, 2015 7:54 pm
Contact:

Re: [MOD 0.12.x] Nixie Tubes - numeric display elements

Post by GopherAtl »

@jorgenRe Absolutely, I'm glad you caught that, it should've been written that way in the first place. Next update, probably later today, will have this change, as well as support for displaying negative signals and the updated sprites that show the wire connection antenna.
My Mods:
Nixie Tubes - numeric displays for your circuit networks!
Logistic Combinators - use logistics values in circuit logic! -
Autowire - automate red/green wire connections

jorgenRe
Filter Inserter
Filter Inserter
Posts: 535
Joined: Wed Apr 09, 2014 3:32 pm
Contact:

Re: [MOD 0.12.x] Nixie Tubes - numeric display elements

Post by jorgenRe »

GopherAtl wrote:@jorgenRe Absolutely, I'm glad you caught that, it should've been written that way in the first place. Next update, probably later today, will have this change, as well as support for displaying negative signals and the updated sprites that show the wire connection antenna.
Thank you :D!
Logo
Noticed the told change in FFF #111 so il continue to use my signature ^_^
Thanks for listening to our suggestions, devs :D!
I would jump of joy if we could specify which tiles spawned in a surfaces

GopherAtl
Fast Inserter
Fast Inserter
Posts: 177
Joined: Sat Jan 31, 2015 7:54 pm
Contact:

Re: [MOD 0.12.x] Nixie Tubes - numeric display elements

Post by GopherAtl »

just coded that in now; I don't see that player/builder bit is actually needed - the entity being build that triggers the events has a surface, I just create the 2nd entity on that surface. I did double-check that I didn't use game.player anywhere that I should be using the event's reported player instead, and I don't seem to be - my handler for on_player_driving_changed_state already uses the player as reported by the event instead of the local player.
My Mods:
Nixie Tubes - numeric displays for your circuit networks!
Logistic Combinators - use logistics values in circuit logic! -
Autowire - automate red/green wire connections

GopherAtl
Fast Inserter
Fast Inserter
Posts: 177
Joined: Sat Jan 31, 2015 7:54 pm
Contact:

Re: [MOD 0.12.x] Nixie Tubes - numeric display elements

Post by GopherAtl »

Version 0.1.5 is released! (updating OP right now) Direct link for the super-impatient here

Changes:
  • Updated sprites courtesy again of GotLag, which include little "antenna" wire contact point and shadow.
  • negative number support - minus sign goes to the left.
  • sprite restructure - no longer invisible in the gui, you can see it properly!
  • Actually require power - unpowered nixies will stay in the off state. In rows, unpowered ones will still pass signals up to higher digits from lower, but the "master" that is actually wired and has the signal specified (the right-most) must be powered or none will work.
  • cleaned up behavior when placing/removing - removing master now clears it's children, as does removing the signal by right-clicking on it in the condition.
  • surface no longer hard-coded to "nauvis," making them friendly with other surfaces (future space, underground, tardis, etc)
I dunno if it was intentional or not, as he didn't mention it at all, but regardless I'm giving half the credit for fixing the invisible-in-gui thing to GotLag. The numeral strip being in a separate sprite without the frames is what got me thinking in the right direction. Obvious in hindsight.
My Mods:
Nixie Tubes - numeric displays for your circuit networks!
Logistic Combinators - use logistics values in circuit logic! -
Autowire - automate red/green wire connections

DOSorDIE
Fast Inserter
Fast Inserter
Posts: 249
Joined: Sat Oct 11, 2014 3:43 pm
Contact:

Re: [MOD 0.12.x] Nixie Tubes - numeric display elements

Post by DOSorDIE »

In the new Version you forget to disalbe the "Debug Mode" in config.lua

Post Reply

Return to “Mods”