Jump to content
The Dark Mod Forums

Geep

Contributor
  • Posts

    1083
  • Joined

  • Last visited

  • Days Won

    58

Everything posted by Geep

  1. For a new FM, if you limit yourself to readables that use Stone, Carleton, Carleton_condensed, or (more limited) Treasure_map, then your translation can include and show European characters. However, that won't help your dream... The translation system is to show the language the user-selects, not what the mapper wants at particular locations. Probably you'd have to burn text into images instead, like an in-game map. And then you can have Asian, Arabic, and the artist formerly known (and I guess known again) as Prince.
  2. Refont v 2.1 is released, and available through Refont/Downloads. The main changes are detailed in that wiki article's much-revised section on "Errors, Warnings, and Auto-Corrections". Briefly, better code for these issues was first ported from datBounds, then reworked to boost coverage and consistency. Testing and incremental improvements of this was done by DAT --> REF conversions while I marched through TDM's 2.12 font corpus. Highlights: Checks that font metric values are in expected ranges. Checks if character bounds (s, t, s2, t2) expressed as 0..1 floats, can be expressed exactly as 0..256 ints. Distinguishes between minor & major warnings. Minor = very-slightly-off conversion from float to int. Cross-checks of (s2-s) vs imageWidth, (t2-t) vs imageHeight vs height. Always generate REF character bounds values (i.e., coord_s, etc.) as ints, never as decimals. When generating a REF file, for certain problematic line items, optionally append a comment starting with "// WARNING:". Adds options -scaling_ok, -no_warn_comments.
  3. As one debugging technique you might try: just give the Player_position some fixed coordinates on-screen, and try to pass some content into the "text" (e.g., instead of the "X") from your script.
  4. Maybe have your script call inventoryHandle=$player1.getInventoryOverlay(); ?
  5. Example of handle use follows. You might consider using the atdm_message entity, and showing the map through that. It has the advantage of already having a "show" time-out-if-not-clicked mechanic. Caveat: I didn't test this code "classname" "atdm:gui_message" "name" "atdm_gui_message_my_map" "comment" "Slide of map. 'show' is maximum seconds if user doesn't click. 'lines' & 'text' are ignored." "gui" "guis/my_map.gui" "show" "10" A script to use it might be like: void show_map() // called from some external trigger { sys.trigger($atdm_gui_message_my_map); tdm_gui_message e = $atdm_gui_message_my_map; // Can takes awhile for the overlay handle to be created and for e.gui to be non-zero. // If spawnarg "delay" is zero, the default, a 0.1 second delay is imposed. float handlenum = 0; while(handlenum == 0) { handlenum = e.gui; // 10 is default overlayHandle for atdm:gui_message layer sys.wait(0.1); } //sys.println("Handle Num: " + handlenum); // MAP IS NOW SHOWING float map_done = 0; while(map_done == 0) { // NOT SHOWN: your code here to calculate xdisp, ydisp; $player1.setGuiFloat(handlenum, "dispx", xdisp); $player1.setGuiFloat(handlenum, "dispy", ydisp); sys.wait(0.1); map_done = $player1.getGuiFloat(handlenum, "MyMapDone"); } } Where associated my_map.gui is windowDef MyMapSlide { visible 1 rect 0,0,640,480 // x, y, w, h. Origin upper-left backcolor 0, 0, 0, 1 // Map clicked: onAction { set "MyMapSlide::visible" "0"; set "gui::MyMapDone" "1"; } windowDef MyMapArt { visible 1 rect 0,0,640,480 // x, y, w, h. background "guis/assets/my_map_art" // If you wanted map to have a transparent perimeter, you could base it on a standard asset like "guis/assets/readables/scroll" // In that case, adjust rect, which can be bigger than the parent if you want to reduce transparent perimeter. } windowDef Player_position { // NOT SHOWN: your code to read "gui::xdisp" and "gui::ydisp" to show player position } }
  6. I think this might be what you want in your .gui: rect "gui::dispx", "gui::dispy", "gui::dispx"+1, "gui::dispy"+40
  7. I've noticed that DAT definitions of the TDM mason and mason_glow fonts use a special type of per-character scaling. I've describe this now in the wiki: https://wiki.thedarkmod.com/index.php?title=Font_Metrics_%26_DAT_File_Format#Per-Character_Font_Scaling In that article, I've also made some minor tweaks in the description of how xSkip is used in practice, based on more experience.
  8. @wesp5, please do add it to your patch in the meantime. Perhaps that would allow it to get a touch more of early testing. Anyone playing under a non-English European language may see fuller use of accents on the names of weapons and stock inventory items. But there could be existing or new problems there to be further addressed, as well as with any FM custom inventory item. Also, any readable or sign that uses Stone font merits inspection. This is true for text presented in English, or (if the player has gone through the considerable hassle of tracking down and installing a pertinent language pack) in other Latin-based languages. Expected problems with latter, requiring freshening of translation to fix, are still-missing accents or (worst conceivable case) changed word-wrap leading to confusing formatting or truncated end of text.
  9. Under the wiki's Refont entry, annotation files are now available that reflect the change in the TDM charmap for 2.13, replacing the duplicate O/o circumflex chars with G/g breve.
  10. Stone 24pt Font Upgrade, June 20, 2024 Final Release With this third and (I hope) final update, Stone 24pt becomes TDM's only font+size that fully provides all 256 characters defined in the TDM custom character map. This last update concludes adding the more difficult characters, chiefly symbols, Icelandic, and remaining accented letters. Plus general overall tweaks to improve character rendering and spacing (as evaluated with testSubtitlesANSI), while preserving important metrics, e.g., xSkip of ASCII alphanumerics. Unwanted overlapping boundaries were eliminated, and things made more consistent. As one example, the metrics for the lower-case "e", and accented characters based on it, were adjusted a year ago to suppress stray marks, but at the expense of clipping the glyphs, making them less stylish. With the added insight now provided by datBounds visualization, it was possible to restore the style while keeping the stray marks away. In summary - 16 new glyphs were created. 64 existing characters got tweaks. These were mostly affecting the .dat, but some glyphs were moved in the bitmap (a little or a lot) to solve various problems. Download: 2024 June 20 Stone 24 Final Font Update.zip As with the prior interim releases, this download is made up of - .dat and 2 .dds files, for distribution/game inclusion .ref [with changes annotated] and .xcf [master source GIMP project, including datBounds layers] The hand-annotations in the .ref file are neither absolutely conclusive, nor necessary to preserve for future work. You may generate a fresh .ref without them from the .dat file by using refont. Enumeration of Changes: There will be some follow-on work, e.g., expressed earlier in this thread in a bugtracker entry.
  11. Release of datBounds 1.2 This fixes a bug with codepoint 255 being skipped. It also adds metadata consistency checking as console warnings. As before, available from the Downloads section of https://wiki.thedarkmod.com/index.php?title=DatBounds
  12. They are reportedly part of Turkish/Tatar (e.g., Crimean)/Azerbaijani. Turkish is one of the 17 languages seen in TDM Settings. They are part of the ISO 8859-3 standard (at 0xAB, 0xBB) and ISO 8859-9 (at 0xD0, 0xF0). EDIT: @wesp5, let me answer more broadly. Like most hobbyists, I enjoy a certain amount of magical thinking. In this case, I'd like to think that improvements to the translation system might grow the potential TDM player base. But as to which improvements... we have no focus groups. Of course, this particular improvement - choosing 2 additional characters - is minuscule. (After I finish the Stone 24pt font work, I hope to formulate and float some more impactful ideas.) EDIT2: https://bugs.thedarkmod.com/view.php?id=6543 lists additional work needed to support 2 new characters for TDM 2.13
  13. As detailed above (see hidden content), 2 characters may be chosen to replace duplicate characters in the existing TDM codepoint map. Since I didn't hear any feedback here, I have chosen: Ğ/ğ, with breve (cup), where Ğ uses TDM codepoint 0x88 ğ uses TDM codepoint 0x98 Why these? Because they are reasonable language-wise, and easy to bitmap-draw. At the moment, I will be doing Stone 24pt glyphs and DAT entries for these characters. I intend to add a bugtracker entry (for assignment to me) for additional work needed to fully support this new mapping
  14. A third option would be to delay the briefing until right after the game starts, and just treat it as a video cutscene, invoked by a script. Then you would have access to the if statements and language cvar you need.
  15. Actually, even without the post, I'm now thinking this may be hopeless without "forbidden" overrides, or new capabilities added. However, here's long-shot ideas: 1) See if i18n can work for you #define MM_BRIEFING_VIDEO_MATERIAL_1 "str_1234" where where the non-Russian sections of all.lang (and their generated codepage-specific-encoded <language>.lang) would have: #str_1234 "video/tdm_briefing_video_english" Likewise Russian section with (I guess) Cyrllic-encoded codepage listing _russian version. 2) It possible you could use the deprecated SDK-controlled briefing system, designed mainly for multi-mission campaign system, which reportedly can be used with a single mission, too, as stated here: https://wiki.thedarkmod.com/index.php?title=Setting_up_Campaigns#Briefing_Videos However, how you control that, I dunno. Probably some trickery involving Mission number. And it may not work with non-Roq videos.
  16. Could you post a snippet of the code you tried that failed?
  17. I noticed something during the Stone 24 work. There is an opportunity to add 2 new characters to the custom TDM codepage. I've identified some reasonable candidates... Paired upper/lower case: Ğ/ğ, with breve (cup) Ľ/ľ, with abbreviated caron shown as stroke or apostrophe İ/ı, namely I with dot above / i without dot and individual candidates: ẞ, the relatively new capital form of German "sharp S" ¡, the Spanish inverted exclamation mark đ, the Barred d EDIT: No, this is already defined at 0x90 I'd like to hear feedback about what characters to use. @Petike the Taffer, your experience with 2019 translations is particularly germane. Details about these candidates, and how the change might be rolled out, follow.
  18. Yeah, I agree, it probably would be a good new-feature request for the bugtracker, and likely not too hard to implement. I wouldn't mind having "side by side" tracking too (one or two more spawnargs), but that's no doubt a bigger bite, and has complications like passing through doors.
  19. Appears not. It is hardcoded in FollowActorTask.cpp as 60 units, specifically: #define DISTANCE_FOLLOWER_REACHED 60 #define DISTANCE_FOLLOWER_CATCHUP_DISTANCE 480 #define DISTANCE_FOLLOWER_CLOSE_ENOUGH_TO_STOP_RUNNING 180
  20. Stone 24pt Font Upgrade, May 20, 2024 Interim Release This second release is mainly concerned with providing accented upper-case characters, particularly in populating two rows of bitmap _1_. In summary - 31 capital letters now have proper accents. 5 other characters got minor improvements. As with the first release, this download has been double-checked with testSubtitlesANSI FM and is made up of - .dat and 2 .dds files, for distribution/game inclusion .ref [with changes annotated] and .xcf [master source GIMP project, including datBounds layers] 2024 May 20 Stone 24 Interim font update.zip Details of Improvements: This is likely the last interim release. The remaining work, leading to final release, involves a dozen more difficult cases, chiefly lower case, symbols, or Icelandic. Plus general spot cleanups.
  21. Certainly I intend the Stone 24 end product to be included in 2.13. As for the Interim(s), I'm posting them as "hit by a bus" insurance. It also gives anyone interested a chance to kick their tires in testing FMs. Or include them in 2.13 betas. Or in your Unofficial Patch. Enjoy.
  22. Stone 24pt Font Upgrade, May 9 2024 Interim Release This first release just clears away some of the low-hanging fruit, while buffing the new datBounds program. In summary - stray mark next to W removed poor spacing of J and AE improved 6 characters got accents added. The download is made up of: .dat and 2 .dds files, for distribution/game inclusion .ref [with changes annotated] and .xcf [master source GIMP project, including datBounds layers] 2024 May 9 Stone 24 Interim font update.zip The changes were also doubled-checked using the testSubtitlesANSI FM. As this work continues, with an interim release approximately monthly, characters to be fixed will be chosen seemingly "at random", but actually due to layout considerations... you don't want to know. They'll all be done eventually. Details of Improvements:
  23. Release of datBounds v 1.0 My new tool to visualize the font metrics in a .dat file is now available. For more, see https://wiki.thedarkmod.com/index.php?title=DatBounds I've been using this and testing it as I begin the long process of extending the Stone 24pt character set.
  24. It's true, there's no real place on the Wiki for menu customization... it relies on comments in the mainmenu_custom_defs.gui. So I'd guess I'd recommend you do a bug report, to either add a comment to that .gui file about it, or, if it's really a bug, fix it.
  25. I'm now considering the .xcf files as being in effect the source texture for the game fonts, at least those that have been bitmap edited in GIMP. So that's an argument for putting them in the TDM assets repo. But, in any event, they do need to be backed up somewhere official.
×
×
  • Create New...