Page 1 of 4

[MOD 0.13] Smart Display - circuit informations display

Posted: Sat Apr 30, 2016 4:12 pm
by binbinhfr
Infos
  • Type: Mod
  • Name: SmartDisplay
  • 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).
  • Portal download : https://mods.factorio.com/mods/binbinhfr/SmartDisplay
smartdisplay-screencopy01.jpg
smartdisplay-screencopy01.jpg (15.44 KiB) Viewed 21071 times
Description
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 :D Just downloaded the mod and it is really cool to have this kind of display in the game. :D

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 :D Just downloaded the mod and it is really cool to have this kind of display in the game. :D
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 :D

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

Code: Select all

Error while running the event handler: __SmartDisplay__/control.lua:378: Unknown entity name: sd_font_char_10_195

Re: [MOD 0.12.X] Smart Display 1.0.0

Posted: Thu May 05, 2016 8:18 pm
by binbinhfr
HeiRos wrote:There is a problem with non-english letters. Using "Rohöl" as prefix causes the error

Code: Select all

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

Code: Select all

		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:

Code: Select all

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
Oops, I was to slow for 1.0.1. :)

Re: [MOD 0.12.X] Smart Display 1.0.2

Posted: Thu May 05, 2016 9:35 pm
by binbinhfr
Thx for the locale !

So here is v1.0.2

Re: [MOD 0.12.X] Smart Display 1.0.3

Posted: Fri May 06, 2016 7:57 am
by binbinhfr
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 ! :mrgreen:

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? :)