-
Posts
1089 -
Joined
-
Last visited
-
Days Won
58
Everything posted by Geep
-
Both New Job and Tears of St. Lucia use trigger_look and ai_trigger_look. Others I'm aware of that use trigger_look include my airpocket and Goldwell's The Accountant 2. Probably lots more.
-
datBound 1.3 Released Bug fixes and more visualization options, the latter prompted by working with the odd-metrics Medusa font. Details & downloads as usual at https://wiki.thedarkmod.com/index.php?title=DatBounds
-
FYI, I just posted a proposal to drop the 12pt size of fonts (in DATs & DDS’s) from the TDM 2.13 distribution.
-
A Proposal to Drop the 12pt Size of Fonts (in DATs & DDS’s) from TDM 2.13 Distribution I’d like to suggest distributing only 24pt and 48pt sizes going forward. Reasons are as follows: 12pt is little used. It appears that none of the readable or sign prefabs come with a .gui with a textscale value (i.e., under 0.15) that would invoke 12pt glyphs. Engine wouldn’t care if it’s dropped. If an FM-specific .gui used a textscale that would ordinarily invoke a font’s 12pt glyphs, but those files are not present, it would automatically switch over to 24pt instead. This is a well-worn functionality. 12pt coverage of codepoints is unimpressive. Generally, ASCII-only at best. Provided 12pt glyphs are often worse-looking than scaled-down 24pt glyphs, particularly on modern screens. The traditional case for 12pt was that, when generated from TTF, it could take advantage of small-scale “hinting” to make better tiny bitmaps. Maybe some fonts do that successfully; I just looked at 12pt Camberic in detail, and there are a number of glyphs that are crap. Nowadays, with higher-rez screens than Doom days, passing it through the 12pt bitmap before scaling to the screen seems like a quality bottleneck. It’s not worth the effort to make 12pt fonts better. This is the most important point. Tweaking glyphs and expanding codepoint coverage (e.g., for missing or European characters) is slow work. That effort with DATs & DDS’s is better spent on 24 & 48pt.
-
BTW, this is also covered in the wiki's DDS creation article.
-
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.
-
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.
-
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.
-
Maybe have your script call inventoryHandle=$player1.getInventoryOverlay(); ?
-
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 } }
-
I think this might be what you want in your .gui: rect "gui::dispx", "gui::dispy", "gui::dispx"+1, "gui::dispy"+40
-
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.
-
@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.
-
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.
-
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.
-
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
-
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
-
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
-
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.
-
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.
-
Could you post a snippet of the code you tried that failed?
-
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.
-
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.
-
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
-
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.