LuaPlayer.create_local_flying_text speed is a double given in tiles/second. This means it is dependent on zoom level. Specifically, it rises further (and thus faster) when zoomed in (zoom level greater than 1) because tiles are larger, and it rises less (and thus slower) when zoomed out (zoom level less than 1) because tiles are smaller. However, when using create_at_cursor, all other parameters are ignored, and thus the speed of the text is constant regardless of zoom level.
Request: Since accessing the zoom level from a mod directly isn't tenable, can we have a flag on this function that scales speed by (inverse) zoom level?
Use case: I've created a simple mod that allows the player to interact with an object using a keyboard control hotkey. If the player is too far away to interact, I display a cant-reach error, which is the same text that the player gets when attempting to interact with the entity with the mouse. I noticed that the mouse button interaction actually displays the flying text at the position of the entity. I can mimic this behavior exactly by passing position = entity.position. However, the mouse interaction text speed does not depend on the zoom level.
Through trial and error, I've discovered that the built-in speed for this particular error is 2.4 when game.player.zoom is 1.0. I would like to scale my own speed by zoom level, like 2.4 / game.player.zoom, but zoom level isn't readable.
As it currently exists, the speed parameter isn't particularly useful except as a boolean: zero or non-zero, because there's no way for a mod to actually control the effective speed.
This is a follow-up to LuaPlayer :: create_local_flying_text at cursor position.
LuaPlayer :: create_local_flying_text speed depends on zoom level
Place to ask discuss and request the modding support of Factorio. Don't request mods here.
-
- Manual Inserter
- Posts: 1
- Joined: Thu Jul 06, 2023 3:45 am
- Contact:
Return to “Modding interface requests”
Jump to
- General
- ↳ Releases
- ↳ News
- ↳ General discussion
- ↳ Multiplayer
- ↳ Find Servers / Tools / Guides
- ↳ Show your Creations
- ↳ Videos
- ↳ Combinator Creations
- ↳ Mechanical Throughput Magic (circuit-free)
- ↳ Railway Setups
- ↳ Energy Production
- ↳ Medium/Big/Gigantic Sized Structures
- ↳ Fan Art
- ↳ Gameplay Help
- ↳ Spread the Word
- ↳ Off topic
- ↳ This Forum
- ↳ Celebration Party
- Support
- ↳ Gameplay Help
- ↳ Discover Factorio Wiki
- ↳ Discover Others Creations
- ↳ Discover Mods
- ↳ Discover Tools Around Factorio
- ↳ Technical Help
- ↳ Bug Reports
- ↳ Resolved for the next release
- ↳ Assigned
- ↳ Not a bug
- ↳ Pending
- ↳ 1 / 0 magic
- ↳ Duplicates
- ↳ Minor issues
- ↳ Desyncs with mods
- ↳ Won't fix.
- ↳ Resolved Problems and Bugs
- Factorio Direction
- ↳ Ideas and Suggestions
- ↳ Outdated/Not implemented
- ↳ Frequently Suggested / Link Collections
- ↳ Implemented Suggestions
- ↳ Implemented in 2.0
- ↳ Development Proposals
- ↳ Balancing
- Contributions
- ↳ Mods
- ↳ Download mods
- ↳ Mod portal Discussion
- ↳ Mods
- ↳ Mod Packs / Libs / Special Interest
- ↳ 5dim's mod
- ↳ Angels Mods
- ↳ Atomic Power
- ↳ Bob's mods
- ↳ DyWorld
- ↳ F.A.R.L
- ↳ Fentus Challenge & Tool Mods
- ↳ Logistic Train Network
- ↳ MoMods
- ↳ Reika's Mods
- ↳ Resource Spawner Overhaul
- ↳ Yuoki Industries
- ↳ PyMods
- ↳ Questions, reviews and ratings
- ↳ Modding Discussions
- ↳ Modding discussion
- ↳ Modding help
- ↳ Ideas and Requests For Mods
- ↳ Modding interface requests
- ↳ Implemented mod requests
- ↳ Already exists
- ↳ Won't implement
- ↳ Documentation Improvement Requests
- ↳ Resolved Requests
- ↳ Development tools
- ↳ Tools
- ↳ Mod and installation managers
- ↳ Cheatsheets / Calculators / Viewers
- ↳ Development tools
- ↳ Special interest mods and libraries
- ↳ Modding Development
- ↳ Multiplayer / Dedicated Server
- ↳ Multiplayer Board
- ↳ Archive
- ↳ Maps and Scenarios
- ↳ Translations
- ↳ Texture Packs
- ↳ Fan Art
- ↳ Wiki Talk
- ↳ To be sorted
- ↳ Campaign / Scenario suggestions