Extended flying text entity.

User avatar
Adil
Filter Inserter
Filter Inserter
Posts: 945
Joined: Fri Aug 15, 2014 8:36 pm
Contact:

Extended flying text entity.

Post by Adil »

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.
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.

Rahjital
Filter Inserter
Filter Inserter
Posts: 435
Joined: Thu May 29, 2014 10:44 am
Contact:

Re: Extended flying text entity.

Post by Rahjital »

You can make your own 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
  }
}
)
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.

User avatar
Adil
Filter Inserter
Filter Inserter
Posts: 945
Joined: Fri Aug 15, 2014 8:36 pm
Contact:

Re: Extended flying text entity.

Post by Adil »

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.
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.

Rahjital
Filter Inserter
Filter Inserter
Posts: 435
Joined: Thu May 29, 2014 10:44 am
Contact:

Re: Extended flying text entity.

Post by Rahjital »

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?

Ichorio
Burner Inserter
Burner Inserter
Posts: 11
Joined: Fri Jan 01, 2016 3:12 pm
Contact:

[Improvement] Add a bool to "flying-text" for scaling

Post by Ichorio »

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.

User avatar
Adil
Filter Inserter
Filter Inserter
Posts: 945
Joined: Fri Aug 15, 2014 8:36 pm
Contact:

Re: Extended flying text entity.

Post by Adil »

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.
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.

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

Re: Extended flying text entity.

Post by Nexela »

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.

Bilka
Factorio Staff
Factorio Staff
Posts: 3308
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Extended flying text entity.

Post by Bilka »

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.

Post Reply

Return to “Implemented mod requests”