[MOD 0.14] Text Plates

Topics and discussion about specific mods
User avatar
Earendel
Factorio Staff
Factorio Staff
Posts: 711
Joined: Sun Nov 23, 2014 11:57 am
Contact:

Re: [MOD 0.14] Text Plates

Post by Earendel »

derpumu wrote:I am getting a crash when placing Textplates with Nanobots. It seems to be something in the interaction between the two mods.

Reproduce: In a game that has only Textplates and Nanobots mods active, place a few text plates. Make a blueprint of them. With Nanobots in the active weapon slot, put down the blueprint somewhere.

The mods then crash, ending the game:
more1.png
Happens as well when you come near a Textplate that has been destroyed (pesky biters) and the Nanobots replace it.

Nanobots 2.0.7
Textplates 0.3.3
Have you reported this to Nexela?

Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: [MOD 0.14] Text Plates

Post by Nexela »

It goes back to that Nexela guy using on_built_entity for this. I will change it for .17 version to use on_robot_built_entity. Chances are I won't have the time to do anything with the .16 version though

In the meantime you could probably do an if event.mod_name == "Nanobots" do robot built function

npuldon
Fast Inserter
Fast Inserter
Posts: 159
Joined: Thu Dec 08, 2016 8:36 am
Contact:

Re: [MOD 0.14] Text Plates

Post by npuldon »

Reika says this is a bug on your end ( https://imgur.com/a/8KcsvrP )? Was trying to put down a blueprint with Reika's easy creative mod, LTN, and textplates.

https://imgur.com/a/svZHcj9

Hope you can assist. Thank you

npuldon
Fast Inserter
Fast Inserter
Posts: 159
Joined: Thu Dec 08, 2016 8:36 am
Contact:

Re: [MOD 0.14] Text Plates

Post by npuldon »

Any movement on this? The error still happens.

MisterFister
Long Handed Inserter
Long Handed Inserter
Posts: 99
Joined: Tue Jun 27, 2017 1:12 am
Contact:

Re: [MOD 0.14] Text Plates

Post by MisterFister »

^^ Second with respect to nanobots usage.

Is this mod actively supported? Should we anticipate v0.17 compatibility in the future?

User avatar
Earendel
Factorio Staff
Factorio Staff
Posts: 711
Joined: Sun Nov 23, 2014 11:57 am
Contact:

Re: [MOD 0.14] Text Plates

Post by Earendel »

There will be an update soon.

User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2528
Joined: Fri Nov 06, 2015 7:41 pm

Re: [MOD 0.14] Text Plates

Post by Deadlock989 »

Hi Earendel,

What font did you use to create the plates? I'm looking at making a compatibility patch for my mod which adds gold plates etc. I've figured out how to easily render a whole batch of letter sprites in Blender - but I've looked at a million fonts and none of them fit the bill. Needs to be monospaced and fill a square, and have unicode support for the arrows etc., and not have too many descenders e.g. capital Q, and not look like crap. That rules out everything I've tried so far ...
Image

User avatar
Earendel
Factorio Staff
Factorio Staff
Posts: 711
Joined: Sun Nov 23, 2014 11:57 am
Contact:

Re: [MOD 0.14] Text Plates

Post by Earendel »

Deadlock989 wrote:
Thu Apr 18, 2019 12:51 pm
Hi Earendel,

What font did you use to create the plates? I'm looking at making a compatibility patch for my mod which adds gold plates etc. I've figured out how to easily render a whole batch of letter sprites in Blender - but I've looked at a million fonts and none of them fit the bill. Needs to be monospaced and fill a square, and have unicode support for the arrows etc., and not have too many descenders e.g. capital Q, and not look like crap. That rules out everything I've tried so far ...
I had the same problem, the requirements for them to be functional and look good are very specific. I had to make every letter and shape using vectors in photoshop. There is no font.

User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2528
Joined: Fri Nov 06, 2015 7:41 pm

Re: [MOD 0.14] Text Plates

Post by Deadlock989 »

Earendel wrote:
Fri Apr 19, 2019 9:19 am
I had the same problem, the requirements for them to be functional and look good are very specific. I had to make every letter and shape using vectors in photoshop. There is no font.
Gosh. Nice work.
Image

User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2528
Joined: Fri Nov 06, 2015 7:41 pm

Re: [MOD 0.14] Text Plates

Post by Deadlock989 »

So, I got this far (textures WIP):

Image

Because you can now require() files from other mods, it was straightforward to alter existing text plates and create new material types by using copper plates as a template.

But then I hit a wall. The problems come with the control phase. That part is locked down tight. There's no way to add to the list of material types and everything in Text Plate's control.lua is local so no chance of poking in it (which is fair enough). So I get no GUI and entertaining strings of gibberish when I lay down gold plates.

Can't think of how to solve this. My first thought was to ask for some simple mechanism that lets you add to the list of material types. But I don't see how that would help or even work in the control phase. I guess this is what control script interfaces are for? No experience of coding for those (or GUIs).
Image

User avatar
Earendel
Factorio Staff
Factorio Staff
Posts: 711
Joined: Sun Nov 23, 2014 11:57 am
Contact:

Re: [MOD 0.14] Text Plates

Post by Earendel »

I think we can get this working by you adding an interface:
remote.add_interface("my-mod-name", {textplate_add_materials = function() return {"shinycopper", "shinyiron", "gold", "silver"} end})

And then at some point my mod would call all mods that implement that interface to get an extended list of materials.

Sound good?

User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2528
Joined: Fri Nov 06, 2015 7:41 pm

Re: [MOD 0.14] Text Plates

Post by Deadlock989 »

Earendel wrote:
Sat Apr 20, 2019 10:40 pm
I think we can get this working by you adding an interface:
remote.add_interface("my-mod-name", {textplate_add_materials = function() return {"shinycopper", "shinyiron", "gold", "silver"} end})

And then at some point my mod would call all mods that implement that interface to get an extended list of materials.

Sound good?
Sounds perfect. I'll go and read up on interfaces. Cheers!
Image

Pi-C
Smart Inserter
Smart Inserter
Posts: 1648
Joined: Sun Oct 14, 2018 8:13 am
Contact:

Re: [MOD 0.14] Text Plates

Post by Pi-C »

I have an issue with blueprinting text plates. If I copy/paste an area, I get ghosts showing the correct text plates. I'd expected that placing empty text plates over the ghosts would automatically fill in the ghosted characters (just as placing a constant combinator over a ghost would preserve the signals), but instead the blank plates get placed. Robots are not researched yet, so it may well be that they would do it right.

Could you fix it, please, so that the correct characters will be used when ghosts are placed manually?
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!

Solinya
Long Handed Inserter
Long Handed Inserter
Posts: 79
Joined: Sun Mar 17, 2019 10:39 pm
Contact:

Re: [MOD 0.14] Text Plates

Post by Solinya »

Pi-C wrote:
Thu May 09, 2019 5:44 am
I have an issue with blueprinting text plates. If I copy/paste an area, I get ghosts showing the correct text plates. I'd expected that placing empty text plates over the ghosts would automatically fill in the ghosted characters (just as placing a constant combinator over a ghost would preserve the signals), but instead the blank plates get placed. Robots are not researched yet, so it may well be that they would do it right.

Could you fix it, please, so that the correct characters will be used when ghosts are placed manually?
Robots won't put them down, it'll just say item missing. Or at least if the plates get returned to your inventory/a chest, robots won't place down letter plate ghosts.

I think fixing the ghosts would also fix it for robots as I suspect they have the same cause.

User avatar
Earendel
Factorio Staff
Factorio Staff
Posts: 711
Joined: Sun Nov 23, 2014 11:57 am
Contact:

Re: [MOD 0.14] Text Plates

Post by Earendel »

I'll try and fix this soon.

User avatar
Earendel
Factorio Staff
Factorio Staff
Posts: 711
Joined: Sun Nov 23, 2014 11:57 am
Contact:

Re: [MOD 0.14] Text Plates

Post by Earendel »

I've made it so that placing a blank text plate over a ghost creates the ghost's symbol.

I can't recreate the problem with bots, they make the plates just fine.

Pi-C
Smart Inserter
Smart Inserter
Posts: 1648
Joined: Sun Oct 14, 2018 8:13 am
Contact:

Re: [MOD 0.14] Text Plates

Post by Pi-C »

Earendel wrote:
Sat May 11, 2019 1:48 pm
I've made it so that placing a blank text plate over a ghost creates the ghost's symbol.
Thanks, that does work now! However, I saved my game, updated your mod, reloaded, and saw this:
Changed textplates after mod update
Changed textplates after mod update
textplates.png (348.9 KiB) Viewed 4557 times
Before the update, the text was "SOLAR CELLS". Seems like all existing text plates got switched to the next letter during the update. :-D

This issue looked familiar, and indeed I've found a related post in this thread from January 2018. Could you fix that new/old bug again, please? :-)
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!

User avatar
Earendel
Factorio Staff
Factorio Staff
Posts: 711
Joined: Sun Nov 23, 2014 11:57 am
Contact:

Re: [MOD 0.14] Text Plates

Post by Earendel »

Oops. I have reverted the change that did that, however any new text placed since will now be offset the other way. No easy way around that unfortunately. Sorry.

Pi-C
Smart Inserter
Smart Inserter
Posts: 1648
Joined: Sun Oct 14, 2018 8:13 am
Contact:

Re: [MOD 0.14] Text Plates

Post by Pi-C »

Earendel wrote:
Sat May 11, 2019 6:05 pm
Oops. I have reverted the change that did that, however any new text placed since will now be offset the other way. No easy way around that unfortunately. Sorry.
Thank you, everything looks normal again! As I'd already suspected that fixing this bug might cause problems with newly placed text plates, I patiently waited and paused my game. So no damage in that respect was done in my case. But:

Code: Select all

Error while running event textplates::on_player_pipette (ID 92)
LuaItemStack API call when LuaItemStack was invalid.
stack traceback:
	__textplates__/control.lua:193: in function <__textplates__/control.lua:189>
stack traceback:
	[C]: in function '__index'
	__textplates__/control.lua:193: in function <__textplates__/control.lua:189>
This reliably happens as soon as I use "mouse over a text plate" + "q" while having no text plates in my inventory. The game will crash and take me back to the Main menu. (I've removed all other mods and it still happens.)

While I'm at it, you also introduced an error into your changelog file. Line 5 is supposed to be an empty line, but contains some spaces. :-)
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!

User avatar
Earendel
Factorio Staff
Factorio Staff
Posts: 711
Joined: Sun Nov 23, 2014 11:57 am
Contact:

Re: [MOD 0.14] Text Plates

Post by Earendel »

Pi-C wrote:
Sat May 11, 2019 7:30 pm
Earendel wrote:
Sat May 11, 2019 6:05 pm
Oops. I have reverted the change that did that, however any new text placed since will now be offset the other way. No easy way around that unfortunately. Sorry.
Thank you, everything looks normal again! As I'd already suspected that fixing this bug might cause problems with newly placed text plates, I patiently waited and paused my game. So no damage in that respect was done in my case. But:

Code: Select all

Error while running event textplates::on_player_pipette (ID 92)
LuaItemStack API call when LuaItemStack was invalid.
stack traceback:
	__textplates__/control.lua:193: in function <__textplates__/control.lua:189>
stack traceback:
	[C]: in function '__index'
	__textplates__/control.lua:193: in function <__textplates__/control.lua:189>
This reliably happens as soon as I use "mouse over a text plate" + "q" while having no text plates in my inventory. The game will crash and take me back to the Main menu. (I've removed all other mods and it still happens.)
Thanks, that should be fixed now.
Pi-C wrote:
Sat May 11, 2019 7:30 pm
While I'm at it, you also introduced an error into your changelog file. Line 5 is supposed to be an empty line, but contains some spaces. :-)
I like atom, but it does like adding spaces a little too much. I guess I'll have to show invisible characters from now on otherwise this will keep happening.

Post Reply

Return to “Mods”