It would be useful to have textual entity, which can live indefinitely and is not resized with zooming.
Also, text alignment control would be nice. At least text centered around its position seems to me more consistent with other entities than the current left alignment.
Extended flying text entity.
Extended flying text entity.
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.
I also update mods, some of them even work.
Recently I did a mod tutorial.
Re: Extended flying text entity.
You can make your own flying text entity:
That's the default entity's data. Just change time_to_live to something ridiculously high and speed to 0 and you've got yourself an infinite flying-text entity.
Code: Select all
data:extend(
{
{
type = "flying-text",
name = "flying-text",
flags = {"not-on-map"},
time_to_live = 150,
speed = 0.05
}
}
)
Re: Extended flying text entity.
Ridiculously high is not infinite time (You cant set that to math.huge or 1/0). I really don't agree with practice of "oh I'll just set it to the biggest number that comes to my head instead of doing everything correctly". Besides, this way the game still performs a number of useless arithmetic to determine whether it time for eternal text to die. I don't know whether setting the text entity inactive (which is what I do now) disables those checks.
Regardless, apart from this somewhat personal matter, there are other features requested:
1) Immunity to zoom, so that text preserves its relative size to ingame entities no to the screen.
2) Alignment control, currently, when you spawn any other entity, you provide its central position. For text, the position parameter is used as the position of the beginning of the string.
No, you cannot create flying text entity with such properties by modifying the current prototype.
Regardless, apart from this somewhat personal matter, there are other features requested:
1) Immunity to zoom, so that text preserves its relative size to ingame entities no to the screen.
2) Alignment control, currently, when you spawn any other entity, you provide its central position. For text, the position parameter is used as the position of the beginning of the string.
No, you cannot create flying text entity with such properties by modifying the current prototype.
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.
I also update mods, some of them even work.
Recently I did a mod tutorial.
Re: Extended flying text entity.
That's a technicality. You can put in the signed 32-bit integer limit and have the text stay for almost ten thousand hours, which is more than a year of playing the game day and night. Yes, it is inelegant, but you don't have the source code of the game to care too much about that, this was just a way to get it working without having to wait for the implementation. Looking at your signpost mod, you've found a better way to do it by deactivating the flying text entity, so the point is moot anyway.
The request is still very much valid, though, additional options for the flying text entity would be great. Perhaps, instead of making the text stay the same size, it should not render if you zoom out more than a certain amount?
The request is still very much valid, though, additional options for the flying text entity would be great. Perhaps, instead of making the text stay the same size, it should not render if you zoom out more than a certain amount?
[Improvement] Add a bool to "flying-text" for scaling
merged with existing request
-- daniel34
Just a simple suggestion for adding a bool to disable the scaling of flying-text with the zoom.
This way you can disable text in the world, instead of having a tile to display the text itself.
With it disabled, it could try to fit in the width of a tile, or maybe a bounding box that's supplied with the prototype.
-- daniel34
Just a simple suggestion for adding a bool to disable the scaling of flying-text with the zoom.
This way you can disable text in the world, instead of having a tile to display the text itself.
With it disabled, it could try to fit in the width of a tile, or maybe a bounding box that's supplied with the prototype.
Re: Extended flying text entity.
So, it's been 18 months and 80 releases since the creation of the original signpost mod and yet its successors are still limited to the same cludgy ways of expressing themselves.
Let this request surface once more.
And remind of other relevant one as well.
Let this request surface once more.
And remind of other relevant one as well.
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.
I also update mods, some of them even work.
Recently I did a mod tutorial.
Re: Extended flying text entity.
I would love it if flying-text prototype had an option to not scale-with-zoom
As for time to live/speed: To have it stay indefinitely just set it to active=false after it is created.
My guess is getting the "center" point of the string would not be possible due to localisations.
As for time to live/speed: To have it stay indefinitely just set it to active=false after it is created.
My guess is getting the "center" point of the string would not be possible due to localisations.
Re: Extended flying text entity.
The text implemented in the new script rendering which I implemented for 0.17 can be set to not scale: https://lua-api.factorio.com/0.17.0-pre ... _with_zoom and have any lifetime you set (including infinite). I hope this helps solve this long standing problem :)
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.