Rig's assorted offerings thread
Hi. A quick introduction: I have recently (finally?) joined this site having been a Lotro player since shortly after the game's release. A control systems engineer who knows a bit about software, and an incurable Data Junkie, it was inevitable that I would experiment with the game and accumulate a mass of data. Well, could that data be of interest to plugin authors?
I reached out to Garan on the topic, and he advised me to check first on the forums to see whether my offerings overlapped with existing work. I would like to use this thread for that purpose. These are not raw ideas. Instead, in all cases, the bulk of the necessary work has been done, and it is a matter of deciding whether there is value in formatting it for the use of others and uploading it.
As I get time to sort through my material, I will add posts to this thread describing the things that might be useful to others. Please let me know if you're interested!
The first cab off the rank is Rally Circle information. This is a mapping of landscape areas to the associated rally circles, that is, those stone circles you are sent to when something unfortunate happens, or if you are a cowardly hunter, like me.
This data allows the output of the /loc command to be matched to the associated rally circle. The rally circles are identified by an enum and their minimap coordinate e.g. 10.3S, 45.4W. All the normal landscape is covered. I have no data on interiors. The crucial observation allowing the collection of the data is that the game chooses rally circles based on the player's landblock, that is, the 160m x 160m areas given by the origin coordinates in the /loc output. Overwhelming evidence for this can be gathered empirically. I have never seen an exception.
You tell me - is the data useful to you?
As an example, this data can easily be used to calculate the distance to the nearest rally circle. The distance could be converted to a running or riding time needed to recover from failure. Perhaps a player might use that information in deciding whether to take a risk.
I received a request for this data. It will be uploaded when I get a chance to add the upcoming Northern Mirkwood locations.
Next! In typical fashion, I started working on font metrics before checking to see whether anyone else had already. This is what happens when you just love the hunt. Lo and behold, a very nice Font Metrics upload by moebius92. The number of downloads shows how valuable this has been. According to the download page:
"Currently only handles characters between 0x30 and 0x7F (basic ASCII) - higher unicode characters will use the default width."
I can provide font metrics for all the fonts in the Turbine.UI.Lotro.Font enum including all Unicode characters that I have found in these fonts. Two and three byte UTF-8 strings are handled correctly - results with French, German, and Russian (well, and some others) should be as good as with English. The metrics also include heights.
Hunting Unicode characters depends on the fact that the game displays "?" if a character we request is not available. We can create a huge Label and fill it with a sequence of UTF-8 encodings, then quickly pick out anything that isn't a question mark.
Is the upload by moebius92 sufficient for people's needs, or can anyone use this extra data?
FWIW, there's already a couple of font metric solutions. The FontSupport.lua file in my plugins dynamically calculates the actual space required for any string in any of the supported fonts. The FontMetric class supports GetTextWidth to determine the actual width of a single line, or you can provide a width and use GetTextHeight to determine the height. It uses a simple trick based on scrollable controls and scrollbar visibility to determine the actual space required to render the text in the client; no guesswork or estimates and since it is based on actual client rendering, special characters also work correctly. The class is based on a technique I believe I first encountered used by Whiteberry in Compendium (not Plugin Compendium, she authored both) which I then expanded to a reusable class with additional font support features.
I haven't had any issue with the speed of the size calculation (I may revisit it at some point to make it a bit more efficient) and it handles large blocks of text well - it is used extensively in Anthology to allow the reader to select any font they want and the plugin automatically adjusts all controls - there are a few exceptions due to limits imposed by the fixed height and maximum width of certain Turbine controls, most notably Buttons, but those are easily accounted for. It also includes enumerations for the fonts that Turbine includes but never added to their enumeration.
You're talking over my head, but thought I would pass along a (possibly) related thought.
Several players are using 4k TVs which works fine for 3D graphics, but text becomes too small to read comfortably. While I'm not sure what your Font Metrics is meant for, creating something that literally enlarges entire panels displayed and/or the fonts used in said panels would probably be greatly appreciated. Note that I'm referring to all of the non-Chat related text.
The same exact situation exists with Inventory item icons needing to be enlarged as well. Here however their is a finite limit based on the size of the icons and no way to replace them with a scalable solution.
I realize in both cases enlargement past a certain point becomes so jagged as to be visually unappealing - if not downright useless - but this niche isn't getting fulfilled by SSG or modders to date.
|All times are GMT -5. The time now is 04:10 PM.|
vBulletin® - Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.