Description: Adds an item that can display numbers from the circuit network, with several formating options.
Tested-With-Factorio-Version: 0.13.0
Locale: english, french, german
Multiplayer compatible: tested on a headless server...
Tags: Circuit Network, display
License: You are free to use and distribute this mod and also to modify it for personal use, but not to release a modified version without permission (unless visibly not maintained anymore).
smartdisplay-screencopy01.jpg (15.44 KiB) Viewed 22181 times
Description
Description
Do you want to read some nice numbers from the circuit network straight on your map ?
Well, ok, I know that GopherAtl and his Nixie Tubes are doing it very nicely, but I found that they can take a lot of place if you want to display several big numbers, and that they are not always very readable by my old eyes.
So I inspired myself from this famous mod and I created Smart Display, a more classical display item, with a basic font and some options to change font size, add some description text before of after the number, align left/center/right, fix the number of digits and even add leading zeros, thousands separator or kilo/mega/giga/tera divisors. You can even display this composite text on the general map (key 'M'), and it will update even if you are far from the Smart Display.
When you click on the item, you have access to a special window with the extra formating options. The main window (which is a lamp interface) allows the user to choose the value of the circuit network that he wants to display. The condition is not taken into account, and will always show "=" and the current value when you reopen the item.
Don't forget to connect the item to the network with red or green wire if you want the item to be activated.
Here is an example with a chest displaying its coal content on a ground panel and also on the general map.
You can even use my TimeTools mod to create a nice onground clock...
smartdisplay-screencopy08.jpg (159.51 KiB) Viewed 20835 times
And don't forget to search this new Smart Display technology !
smartdisplay-screencopy02.jpg (38.46 KiB) Viewed 22181 times
To allow the update on the map when you are far from the zone, I had to integrate a little radar in the device, so that it removes "fog of war". If you are not comfortable with this and think it's a bit cheating, you can disable this feature by editing the config.lua file.
Download
For Factorio 0.13.X : Please now use the portal for downloads (see link above or use ingame mod install/update), as I won't update both downloads links here anymore.
Re: [MOD 0.12.X] Smart Display 1.0.0
Posted: Tue May 03, 2016 10:52 pm
by judos
Oh wow, I didn't know it's possible to actually read the signal value. No that I saw your implementation I'm amazed Just downloaded the mod and it is really cool to have this kind of display in the game.
Re: [MOD 0.12.X] Smart Display 1.0.0
Posted: Wed May 04, 2016 7:27 am
by binbinhfr
judos wrote:Oh wow, I didn't know it's possible to actually read the signal value. No that I saw your implementation I'm amazed Just downloaded the mod and it is really cool to have this kind of display in the game.
Infact, as I mention in the presentation, this clever implementation of signal reading by dichotomy is from GopherAtl (the "deduceSignalValue" function). But I swear the rest is from me
Re: [MOD 0.12.X] Smart Display 1.0.0
Posted: Thu May 05, 2016 7:30 pm
by HeiRos
There is a problem with non-english letters. Using "Rohöl" as prefix causes the error
Error while running the event handler: __SmartDisplay__/control.lua:378: Unknown entity name: sd_font_char_10_195
Yes I know that. I asked the dev for this, but it seems that LUA (the language of factorio API) does not support unicode.
See my post here about the subject : viewtopic.php?f=58&t=24107
Sorry... You have to use standard ascii letters signs and numbers. See the font I created in graphics/font-arial.png
But I'll try to suppress this error anyway.
Re: [MOD 0.12.X] Smart Display 1.0.0
Posted: Thu May 05, 2016 8:39 pm
by HeiRos
binbinhfr wrote:Sorry... You have to use standard ascii letters signs and numbers. See the font I created in graphics/font-arial.png
I know the problems with non-ASCII chars, but the mod should not crash if somebody accidentally types it. At the moment I use
asc = string.byte(c)
-- prevents crash for non-ascii-chars
if asc < first_asc or asc > last_asc then
asc = 63
end
--debug( c, "=", tag )
deco = surf.create_entity({name = "sd_under_c" .. font_scale_tag, force = force, position = {x,y}})
to prevent this. Not a good solution, but better then nothing.
Re: [MOD 0.12.X] Smart Display 1.0.0
Posted: Thu May 05, 2016 9:03 pm
by binbinhfr
HeiRos wrote:Not a good solution, but better then nothing.
Yes good solution for the moment. I forgot this simple test. I release a new version v1.0.1
Re: [MOD 0.12.X] Smart Display 1.0.1
Posted: Thu May 05, 2016 9:23 pm
by HeiRos
And here is a german localization for the next version:
gui-smadisp-frame = Intelligente Anzeige Nr. __1__
gui-smadisp-prefix = Präfix:
gui-smadisp-suffix = Suffix:
gui-smadisp-scale = Größe x__1__
gui-smadisp-align-left = linksbündig
gui-smadisp-align-center = zentriert
gui-smadisp-align-right = rechtsbündig
gui-smadisp-lfix = Länge: __1__
gui-smadisp-lead = Führende Nullen
gui-smadisp-update = AKTUALISIEREN
[technology-name]
smart-display = Intelligente Anzeige
[technology-description]
smart-display = Technologie zur Anzeige von Werten aus dem Schaltungsnetzwerk
[item-name]
smart-display-visible = Intelligente Anzeige
[item-description]
smart-display-visible = Element zur Anzeige von Werten aus dem Schaltungsnetzwerk
[recipe-name]
smart-display-visible = Intelligente Anzeige
[entity-name]
smart-display-visible = Intelligente Anzeige
smart-display = Intelligente Anzeige
[entity-description]
smart-display-visible = Element zur Anzeige von Werten aus dem Schaltungsnetzwerk
smart-display = Element zur Anzeige von Werten aus dem Schaltungsnetzwerk
Here is v1.0.3
better management of display priority : player can now walk nicely on the smartdisplay.
Re: [MOD 0.12.X] Smart Display 1.0.3
Posted: Fri May 06, 2016 8:41 am
by Neotix
Can you add option to show text also on map (it can have standard font like train station)?
Re: [MOD 0.12.X] Smart Display 1.0.3
Posted: Fri May 06, 2016 8:54 am
by binbinhfr
Neotix wrote:Can you add option to show text also on map (it can have standard font like train station)?
I do not understand what you mean. Can't you already see the text on the map ?
Re: [MOD 0.12.X] Smart Display 1.0.3
Posted: Fri May 06, 2016 9:33 am
by Neotix
I mean the map after pressing "M" when you see entire factory. On that map you can see players and stations names.
It would be great to see also text from selected smart displays. In that way we could use map as operator's display (similar to that https://www.isa.org/uploadedImages/Cont ... PandID.jpg) where we see various status and values from entire factory.
I event posted almost year ago a mod request (viewtopic.php?f=33&t=15016) and your mod is almost what I need.
Re: [MOD 0.12.X] Smart Display 1.0.3
Posted: Fri May 06, 2016 10:04 am
by binbinhfr
Neotix wrote:I mean the map after pressing "M" when you see entire factory. On that map you can see players and stations names.
It would be great to see also text from selected smart displays. In that way we could use map as operator's display (similar to that https://www.isa.org/uploadedImages/Cont ... PandID.jpg) where we see various status and values from entire factory.
I event posted almost year ago a mod request (viewtopic.php?f=33&t=15016) and your mod is almost what I need.
Ok, I understand better. I never worked on the "M" map before, so I will see if it is possible.
Re: [MOD 0.12.X] Smart Display 1.0.4
Posted: Fri May 06, 2016 5:53 pm
by binbinhfr
So, this special one for Neotix : v1.0.4 = option to display the message also on the general map ("M" key).
Re: [MOD 0.12.X] Smart Display 1.0.4
Posted: Fri May 06, 2016 6:07 pm
by Neotix
Now this mod is awesome in another level of awesomeness. Just place display in critical spots and monitor situation in factory on map. No more running throe entire factory only to check if something is wrong. Put display in every outpost and check if it's depleted. Build power detector and monitor electricity level. Entire map can become operator's display that are using in real life.
Re: [MOD 0.12.X] Smart Display 1.0.4
Posted: Fri May 06, 2016 6:18 pm
by binbinhfr
Neotix wrote:Now this mod is awesome in another level of awesomeness.
No more running throe entire factory only to check if something is wrong.
Thx for the awesomeness !
You don't like to run everywhere ? Well, maybe you'll like my next mod... Suspense...
Re: [MOD 0.12.X] Smart Display 1.0.4
Posted: Fri May 13, 2016 9:09 am
by Neotix
I found another minor issue. Map is not refreshing under Fog of War. So to see actual values, it need radar near smart displays.
Re: [MOD 0.12.X] Smart Display 1.0.4
Posted: Fri May 13, 2016 10:27 am
by binbinhfr
Neotix wrote:I found another minor issue. Map is not refreshing under Fog of War. So to see actual values, it need radar near smart displays.
I'm afraid I cannot deal with that. It's a factorio limitation. It would be too cheaty to automatically integrate a free radar in these display
Re: [MOD 0.12.X] Smart Display 1.0.4
Posted: Fri May 13, 2016 9:13 pm
by NoriSilverrage
Pretty awesome! Thanks for making this. I really like the show on the map feature and being able to have prefix/suffix options.
The sizing thing could be useful, but going from 1x to 2x is a big jump. I'm guessing you can't do 1.5x though...
Is any chance of being able to change colors or add decimals/commas?