-
Posts
1105 -
Joined
-
Last visited
-
Days Won
58
Posts posted by Geep
-
-
That precursor code snippet by the late great grayman might suggest that one of his FMs uses it. Or once did, but "lingers". Not conclusive though.
-
7 hours ago, datiswous said:
wonder what this core script is for then
Looks like it waits for something (a wheel?) probably wall-mounted to rotate 360 degrees in the x plane before opening the associated door. Since it hard-codes that rotating object as func_static_1858, this script is intended for 1 particular FM. (Lots of FMs have a func_static_1858... of ones I have on my hard drive, I didn't see a likely "wheel" candidate.)
- 1
-
Probably someone who has actually successfully deployed it in an FM needs to help here. (My last FM had a video ending, but it did a fake debrief - while the game was still running - with a lot of scripting.)
-
5 hours ago, MirceaKitsune said:
As I'm planning to use this in my upcoming FM: Can I have a reminder of how the newly added debrief GUI is defined? The information doesn't seem to be on the wiki yet.
I guess look at comments in tdm_gui01.pk4/guis/mainmenu_custom_defs.gui
- 1
-
I think what's of most interest here is Stone font, the default for subtitles, and its calculated width-compressed value.
The TDM scaling factor for subtitles is no longer 0.25, instead 0.24. So any actual displayed string length is now shorter than what this utility calculates, by about (24.0/25.0). "About" because calculated results is rounded to int.
Beyond that, when I updated Stone 24pt for 2.11, I tried really hard to not have to change the underlying xskip values of any character. But to be absolutely correct, it would be good to review the xskip spacing array embedded in this program, against the current DAT/REF file xskip values.
Probably the scale factor should be an optional parameter for this utility. I'll put an update of this program on my list of things to look at in 2025. For now, just do the 24/25 recalc.
-
I wonder if renaming the inventory name so it contains no space would make a difference.
-
To https://wiki.thedarkmod.com/index.php?title=Teleporting_entities , under the topic "Making an AI Start a Path after Teleporting", at the end I've added a description of this new method, as:
Technique 3: "Kicking a Single Path Target Down the Road"
Plus a link to the wizard discussion above about
Visual and Sound Effects During Teleport
- 2
-
On 10/5/2024 at 6:37 PM, boissiere said:
You might consider setting the 3 following CVars.
tdm_ai_debug_blocked
tdm_ai_showdest
tdm_ai_showtasksAdded to https://wiki.thedarkmod.com/index.php?title=Pathfinding
as new section "Viewing AI Current Path Goals and Obstacles"- 2
-
6 hours ago, datiswous said:
Also is there a way to set the distance of the sound at which the subtitles are shown? I thought there was an idea to decrease the range, so that you don't see subtitles from sounds that you aren't supposed to really hear.
I don't recall that idea being implemented, whether based on distance or volume. I think - to an approximation - if you can hear the sound when it starts playing, however faintly, then you get the subtitle.
Otherwise, there's a problem. Suppose you have a distant guard running towards you... you want to trigger the subtitle even when faint, rather than lose it entirely. Perhaps there's some way to make it work OK. Dunno.
Otherwise, for now, if you aren't suppose to hear the sound, maybe in some cases you can set its shader's max distance to be smaller.
-
stgatilov
5 hours ago, datiswous said:Possibility to only show a subtitle once, although the sound is played from multiple sources.
QuoteIn this specific situation multiple speakers are placed and played at the same time.
I presume the speaker sources have overlapping max distance spheres, and all are triggered to start at the same moment. If the player is in an overlap location when triggering happens (and so can hear the same monologue start from multiple sources, although probably without realizing it), then multiple subtitles appear.
If the player is in a non-overlap location when triggering happens, but moves into an overlap location while the monologue continues, I'm guessing the extra subtitle would not appear. (Could be wrong about this.)
In any event, this is a common speaker setup (although most often with looping sounds). @stgatilov would know better, but I think a reasonable restriction would be to enforce a prohibition on multiple subtitle slots starting the same subtitle (i.e., sharing a subtitle path/name) "at the same time" (e.g., a frame or 2), irrespective of source.
Probably that would be enough. Don't want to have to calculate whether sources are part of an overlap. Or look at whether sources are distinct and/or static (see next pp).
In my subtitle test FMs, I have a single static sound source, but if desired can trigger multiple recurrences of the same monologue with multiple button presses. The button presses and so monologue instances are offset in time. I see that as a feature, not a bug. So the prohibition on duplicate subtitles "at the same time" would be appropriately constrained.
If you had two nearby instances of the same guard model, and they emitted the same bark at *exactly* the same moment, you'd only see one subtitle. Probably rare and not a problem.
We'd have to rethink that if there was choral singing.
- 1
-
I wonder if you could suppress response temporarily on nearby guards using SetAlertLevel or SetAlertGracePeriod script functions
-
On 9/17/2024 at 8:55 PM, ERH+ said:
What this script error means?:
"...EnterFunction: locals stack overflow"In general in programming, it often indicates you've called a function from within itself (e.g., recursively), and didn't provide any way to stop the recursion. Sometimes more than 1 function is involved in the endless call chain.
-
On 9/13/2024 at 5:20 PM, MirceaKitsune said:
Edit: Doesn't work. I set the ragdoll team to 5 and AI team to 2, the wiki page indicates they are neutral. The ragdoll still makes AI alert when the map starts.
Could you make the ragdoll a friend instead of a neutral? Maybe that would work.
-
I just posted another release to https://bugs.thedarkmod.com/view.php?id=6543 for incremental improvements to 3 more fonts.
I've now touched all the ASCII-only fonts (the majority), and next will start looking at the remaining fonts for which the title of 6543 - "Change TDM codemap to add 2 new characters" - actually applies.
-
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.
- 1
- 1
-
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
-
-
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.
- 1
-
On 6/8/2024 at 6:34 PM, MirceaKitsune said:
readables only allowed english characters, everything else will appear as a rectangle
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...
On 6/8/2024 at 6:34 PM, MirceaKitsune said:My dream with creating a multi city hub FM was to allow the player to travel to different countries by ship. Part of the plan was having a few readables written in relevant languages, granted I can use Google Translate to obtain a few sentences in an Asian or Arabic or other language.
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
}
}
Analysis of 2.12 TDM Fonts
in The Dark Mod
Posted
Refont v 2.3 is released. This brings more font-set-analysis capabilities that I needed to the "-stats" function.
For details & download, see https://wiki.thedarkmod.com/index.php?title=Refont