Daft Mugi Posted October 2, 2022 Report Posted October 2, 2022 (edited) @duzenko I'm not sure if you've worked on the notes that appear in the upper-left corner before. The notes seem to have a similar behavior as this x-ray fade in issue that you just fixed. Is that something you could look at next? It's especially reproducible during the training mission, since there are many notes that show in that mission. When the note fades in, it will sometimes be at 100% opacity on its first frame and then fade in from a low (maybe 0%) opacity to 100% opacity. Visually, it looks like it blinks, disappears, and then slowly fades in. https://bugs.thedarkmod.com/view.php?id=6117 Edited December 4, 2022 by Daft Mugi 1 Quote
datiswous Posted October 14, 2022 Report Posted October 14, 2022 (edited) It's the atdm:gui_message entity with gui tdm_message.gui . The strange thing in the training mission is that the issue doesn't happen with the messages in the starter room. Only the later ones. It also doesn't happen in the archery range. At least in my tests. Could also have something to do with the trigger maybe? Edited October 14, 2022 by datiswous Quote
duzenko Posted October 29, 2022 Report Posted October 29, 2022 @Daft Mugi In case it's not always reproducible could you add a getviewpos in the training mission where the text is about to show? I have been rather busy lately IRL, e.g. this weekend I want to go looking for a used microwave, before that I was traveling, and before that I had some delivery business to attend to. Which is why it's going slow. Quote
AluminumHaste Posted November 2, 2022 Report Posted November 2, 2022 I've seen this before, it's been around a long time. Quote I always assumed I'd taste like boot leather.
AluminumHaste Posted November 2, 2022 Report Posted November 2, 2022 @duzenkoThese 3 messages did it for me, but they don't show up in the video. I'm assuming that's because it's doing it for only 1 frame out of 240fps, and the video is only recording at 60 fps, so chances of catching it are low. Now I haven't tried at 60 fps, that might be worth looking into. EDIT: So what's happening is that the message shows fully for 1 frame or a few, then disappears, then fades in over a second. Quote I always assumed I'd taste like boot leather.
Daft Mugi Posted November 4, 2022 Author Report Posted November 4, 2022 (edited) @duzenko No worries about being busy with real life stuff. I hope you found a microwave you liked. I've included a series of images that show the bug. I used my phone to record my monitor using 60 fps video capture and the game is running at 60 fps. The series of images shows that the previous message displays at 100% opacity and disappears. Then, the current message fades in over time. This was recorded on the training mission. ]getviewpos 1427 -359.26 560.25 3.3 176.1 0.0 Though, it is noticeable with most (or all) messages in that mission and other missions. @AluminumHaste Thank you for looking into this as well. Edited November 4, 2022 by Daft Mugi Quote
Daft Mugi Posted November 4, 2022 Author Report Posted November 4, 2022 (edited) Another way to see this bug is to use the stealth stat mod that shows the stats as a message. I've seen this bug a lot in Klatremus' walkthrough YouTube videos where he used that particular mod. These days Klatremus uses a different stealth stat mod that replaces the loot stat instead. I've attached a series of screenshots from one of Klatremus' videos. It shows a blank message at 100% opacity and disappears. Then, the stealth stat message fades in. To see it yourself, you can step frame by frame on YouTube by first pausing and then using the "." key to step forwards (and the "," key to step backwards). The video link starts at 1:15:56 and the message appears during 1:15:57. Edited November 4, 2022 by Daft Mugi 1 Quote
duzenko Posted November 6, 2022 Report Posted November 6, 2022 @Daft Mugi I can't repeat this on my end. Is there a decent free program to capture the game video? I tried Windows game bar but it seems to capture at 30 fps. Here's the capture file: https://e1.pcloud.link/publink/show?code=XZW8WQZ1WCAgUYXA98oXTyi3LyFnk0jNChk Quote
duzenko Posted November 6, 2022 Report Posted November 6, 2022 Here's a 60gps phone video, also seemingly right https://e1.pcloud.link/publink/show?code=XZd8WQZ8WaOTicVS3jarNa6RLe7ABka9dpX Quote
datiswous Posted November 6, 2022 Report Posted November 6, 2022 I think it happens when you move very quickly to the spot. But in some scenes it does not happen at all (as previously noted). Quote
Daft Mugi Posted November 9, 2022 Author Report Posted November 9, 2022 (edited) On 11/6/2022 at 2:46 AM, duzenko said: I can't repeat this on my end. If I "Start This Mission" and "setviewpos", message #2 fades in ok without issue. However, if I "Start This Mission" and traverse to that position, message #2 fade in has the issue. After seeing message #1, shooting a rope arrow, and climbing it, a save can be made. Then, that save can be loaded to reproduce the issue again and again. // Message #1 Look up for the wooden beam that sticks out. Shoot a rope arrow into it, jump on the rope, climb up, and jump off the rope to detach yourself. // Message #2 Jump onto the rope. Stay near its bottom end. Tap 'Attack' to swing. Repeat as the rope goes through its mid point to make it swing more. Then jump over the canal on the far swing. Edited November 9, 2022 by Daft Mugi Quote
AluminumHaste Posted November 9, 2022 Report Posted November 9, 2022 I've had this issue for years, never really bothered me. I get this on my Radeon 6800XT, as well as my on my wife's computer with the Nvidia GTX1080ti. We're both running high FPS on this map, but this happens even with FPS capped at 60fps. Recorded these videos from my Samsung Galaxy S21. Slow Mo Super Slow Mo Quote I always assumed I'd taste like boot leather.
Daft Mugi Posted November 10, 2022 Author Report Posted November 10, 2022 @AluminumHaste The slow mo is pretty awesome. Good idea! Thanks! Quote
AluminumHaste Posted November 10, 2022 Report Posted November 10, 2022 @duzenko I played the second one back at 0.25X speed, and you can see that it's flashing a blank parchment. Quote I always assumed I'd taste like boot leather.
Daft Mugi Posted December 4, 2022 Author Report Posted December 4, 2022 (edited) I worked on this today, but I haven't been able to track down the problem yet. I found that the previous message or info about the previous message is not cleared from memory completely. Interesting results happen if: Trigger message. Wait for message to fade out. Save game. Edit "tdm_message.gui" and change "rect" to something else, such as "100,100,206,160". Load game. Trigger next message. (The previous message parchment will blink for a single frame at the previous "tdm_message.gui" "rect" value. The next message parchment will fade in at the current "rect" value.) (See attached screenshot.) It seems the messages are not being removed from memory after fade out. @duzenko @Obsttorte Any ideas? Are scripts completely controlling this feature? If not, where in the game code is it handled? The following shows the code change made to "guis/tdm_message.gui" for this example to expose part of the issue. // A GUI for showing little messages to the player, used f.i. by the training map: windowDef parchment { - rect 0,-10,206,160 + rect 100,100,206,160 nocursor 1 background "guis/assets/mainmenu/oldparchment_backdrop3" matcolor 0,0,0,0 Edited December 11, 2022 by Daft Mugi 1 Quote
duzenko Posted December 10, 2022 Report Posted December 10, 2022 It appears as gui duplication caused by the standard def "atdm:gui_message". At the same time, it calls a script function "tdm_gui_message::showMessage" and triggers redraw of "guis/tdm_message.gui" linked via its "gui" property. The glitch seems to go away when I comment out line 59 in tdm_message.def // "gui" "guis/tdm_message.gui" @nbohr1more @stgatilov who can advise on this? 1 Quote
nbohr1more Posted December 10, 2022 Report Posted December 10, 2022 I would remove that line. It was probably added out of caution to ensure that the correct area is referenced. Quote Please visit TDM's IndieDB site and help promote the mod: http://www.indiedb.com/mods/the-dark-mod (Yeah, shameless promotion... but traffic is traffic folks...)
stgatilov Posted December 10, 2022 Report Posted December 10, 2022 8 hours ago, duzenko said: At the same time, it calls a script function "tdm_gui_message::showMessage" and triggers redraw of "guis/tdm_message.gui" linked via its "gui" property. The glitch seems to go away when I comment out line 59 in tdm_message.def // "gui" "guis/tdm_message.gui" @nbohr1more @stgatilov who can advise on this? I think "gui" spawnarg is used for customizing the message .gui file: string gui_name = getKey("gui"); if (gui_name == "") { gui_name = "guis/tdm_message.gui"; // the default value } gui = $player1.createOverlay(gui_name, 10); You can delete the line, but if someone uses the customization, it won't help them. What's the duplication exactly? Does the engine handle "gui" spawnarg automatically? Quote
duzenko Posted December 10, 2022 Report Posted December 10, 2022 1 hour ago, stgatilov said: I think "gui" spawnarg is used for customizing the message .gui file: string gui_name = getKey("gui"); if (gui_name == "") { gui_name = "guis/tdm_message.gui"; // the default value } gui = $player1.createOverlay(gui_name, 10); You can delete the line, but if someone uses the customization, it won't help them. Well, this is TDM-era script, and the trigger C++ must predate that Quote What's the duplication exactly? Does the engine handle "gui" spawnarg automatically? On triggers it displays the (separate) message GUI immediately (idEntity::ActivateTargets). Not sure why it's not visible after the first frame - that code makes me sleep Quote
stgatilov Posted December 10, 2022 Report Posted December 10, 2022 I'm afraid it is not a proper fix: it will only help for "default" messages. There are ton of missions which use "atdm:gui_message" with custom "gui" set, you fix will do nothing for them. For instance: // entity 1769 { "classname" "atdm:gui_message" "name" "message_citywatch_gate1" "angle" "-90.000000" "delay" "0" "force" "1" "gui" "guis/volta_sign_small.gui" "lines" "2" "origin" "345.751 1089.88 213" "show" "1" "text" "Finnley Murray" } Just ask almost any mapper around. Here is e.g. a list of missions which all probably suffer from the problem: "gui" "guis/tdm_message_no_art.gui" hazard/hazard.pk4 -> maps/hazard_night.map northdale2/northdale2.pk4 -> maps/m2.map sirt/sirt.pk4 -> maps/sirt.map ac1/ac1.pk4 -> maps/ac1.map painterswife/painterswife.pk4 -> maps/city.map ac2/ac2.pk4 -> maps/ac2_autosave.map itb/itb.pk4 -> maps/itb.map nobleaffairs/nobleaffairs.pk4 -> maps/noble_affairs.map northdale1/northdale1.pk4 -> maps/m1.map ws1_north/ws1_north.pk4 -> maps/ws1_north.map away0/away0.pk4 -> maps/away0.map ac2/ac2.pk4 -> maps/ac2.map ws5_commerce/ws5_commerce.pk4 -> maps/ws5_commerce.map snowed_inn/snowed_inn.pk4 -> maps/snowed_inn.map airpocket/airpocket.pk4 -> maps/airpocket.map And that is just one particular value of "gui" spawnarg on messages, there are many others. Quote
duzenko Posted December 11, 2022 Report Posted December 11, 2022 8 hours ago, stgatilov said: I'm afraid it is not a proper fix: it will only help for "default" messages. There are ton of missions which use "atdm:gui_message" with custom "gui" set, you fix will do nothing for them. For instance: // entity 1769 { "classname" "atdm:gui_message" "name" "message_citywatch_gate1" "angle" "-90.000000" "delay" "0" "force" "1" "gui" "guis/volta_sign_small.gui" "lines" "2" "origin" "345.751 1089.88 213" "show" "1" "text" "Finnley Murray" } Just ask almost any mapper around. Here is e.g. a list of missions which all probably suffer from the problem: "gui" "guis/tdm_message_no_art.gui" hazard/hazard.pk4 -> maps/hazard_night.map northdale2/northdale2.pk4 -> maps/m2.map sirt/sirt.pk4 -> maps/sirt.map ac1/ac1.pk4 -> maps/ac1.map painterswife/painterswife.pk4 -> maps/city.map ac2/ac2.pk4 -> maps/ac2_autosave.map itb/itb.pk4 -> maps/itb.map nobleaffairs/nobleaffairs.pk4 -> maps/noble_affairs.map northdale1/northdale1.pk4 -> maps/m1.map ws1_north/ws1_north.pk4 -> maps/ws1_north.map away0/away0.pk4 -> maps/away0.map ac2/ac2.pk4 -> maps/ac2.map ws5_commerce/ws5_commerce.pk4 -> maps/ws5_commerce.map snowed_inn/snowed_inn.pk4 -> maps/snowed_inn.map airpocket/airpocket.pk4 -> maps/airpocket.map And that is just one particular value of "gui" spawnarg on messages, there are many others. You're right of course, but what would be the final solution? The gui code confuses me. Simplest way might be to use a different spawnarg (other than "gui") to pass gui name to the standard script. But we'd have to fix it on each mission level - too much stress. Then we could add more hacks to the gui code, such as ignore standard "gui" for "some" entities - but what would be the filtering criteria? Quote
stgatilov Posted December 11, 2022 Report Posted December 11, 2022 Maybe use a spawnarg which disables builtin "gui" behavior? Maybe there is already an existing one? @Dragofer @kingsal Quote
stgatilov Posted December 11, 2022 Report Posted December 11, 2022 You can replace the loop in idEntity::ActivateTargets with a call to TriggerGuis. Then you can probably add a condition to TriggerGuis, which would skip gui if its "gui_trigger" / "gui_enable_trigger" is zero? Quote
Dragofer Posted December 17, 2022 Report Posted December 17, 2022 So there's this: When reproducing this bug, it seems there are always multiple messages involved. The first message in the training mission isn't affected, so it suggests the bug begins with the 2nd message. Also supported by the fact that if you view the 2nd message first it's fine, too. This comment in tdm_gui_message::showMessage() seems to be aware of a flickering issue due to "multi-trigger" and therefore checks whether a gui has already been created for that particular message entity. However, the value of the float variable "gui" is unique to each message entity, so the check doesn't work if a different message entity has created a gui. So a possible attempt at a solution could be to turn the gui handle into a global variable shared between all message entities (I renamed it to dragofer_gui to ensure there are no conflicts with other scriptobjects that have some kind of "gui" variable): tdm_message.script Would be nice if someone who can reproduce the bug can try whether this makes any difference. In this implementation it will not show the next message overlay if the old message overlay is still present. If this approach works we might consider destroying the existing message overlay. 1 Quote FM: One Step Too Far | FM: Down by the Riverside | FM: Perilous Refuge Co-FM: The Painter's Wife | Co-FM: Written in Stone | Co-FM: Seeking Lady Leicester Dragofer's Stuff | Dragofer's Scripting | A to Z Scripting Guide | Dark Ambient Music & Sound Repository
Dragofer Posted December 17, 2022 Report Posted December 17, 2022 After some further research, it really seems to be caused by the inbuilt trigger behaviour for any entity that has a "gui" spawnarg. I created a random func_static, gave it a valid "gui" spawnarg and triggered it twice which resulted in flashing a blank parchment for a frame (after some reloading). So it's unlikely the fault is with the scriptobject.. The question is: does any entity in any map rely on this inbuilt "gui" behaviour? If no we can just remove TriggerGUIs from idEntity::Activate. Do we have a way to extract all entities from all released maps that have a "gui" spawnarg? Edit: extracted all existing "gui" spawnargs from released maps, removed duplicates and removed those that contain words like "message", "map", "text" etc. in order to look for potential non-message GUIs. I looked up the remaining 32 entries in their respective maps to check what kind of entities they're given to with the following results: Spoiler gui found in entity class guis/code1.gui at1_lucy/maps/lucy.map atdm:secret_messages guis/cuckolds_pages.gui at1_lucy/maps/lucy.map atdm:moveable_custom_item guis/le_guin_pages1.gui at1_lucy/maps/lucy.map atdm:map_of guis/cutscene_video_nsfw.gui away0/maps/away0.map atdm:gui_message guis/cutscene_video_sfw.gui away0/maps/away0.map atdm:gui_message guis/final_cutscene_replacement_slide.gui away0/maps/away0.map atdm:gui_message guis/first_cutscene_replacement_slide.gui away0/maps/away0.map atdm:gui_message guis/success_cutscene_video.gui away0/maps/away0.map atdm:gui_message guis/memory_sketch.gui black_mage/maps/tbm.map atdm:static_custom_item guis/lookbehind.gui blackgrove/maps/manor.map atdm:mover_door guis/nameplates.gui braeden_church/maps/braeden_church.map func_static guis/rooms.gui braeden_church/maps/braeden_church.map func_static guis/sewer/deplankkseal.gui dufford/maps/dufford.map func_static guis/FirstFloor.gui fever/maps/fever.map atdm:map_of guis/SecondFloor.gui fever/maps/fever.map atdm:map_of guis/abOutpostClock.gui flakebridge/maps/aboutpostii.map func_static guis/abOutpostDoorNo.gui flakebridge/maps/aboutpostii.map func_static guis/abOutpostGraveName.gui flakebridge/maps/aboutpostii.map func_static guis/waterworks.gui good/maps/good.map func_static guis/debrief.gui hareinthesnare/maps/man2.map atdm:gui_message guis/frobscreenread.gui iris/maps/iris.map atdm:gui_message guis/welli_memento.gui iris/maps/iris.map atdm:gui_message guis/sotha_pagan_mage.gui mandrasola/maps/mandrasola.map func_static guis/finale.gui nowandthen/maps/nowandthen.map atdm:gui_message guis/manor1.gui pearlsnswine/maps/pearls8.map atdm:map_of guis/manor2.gui pearlsnswine/maps/pearls8.map atdm:map_of guis/black_fade.gui reap/maps/reap.map atdm:gui_message guis/epilogue.gui reap/maps/reap.map atdm:gui_message guis/ice_fade.gui reap/maps/reap.map atdm:gui_message guis/john01.gui samhain/maps/samhain.map func_static guis/degrenefelds.gui transaction/maps/transaction.map func_static guis/key_bindings.gui volta1_3/maps/snapshots/volta_v1.map.0.map shopitem_map_of Turns out that quite a few of these entities (i.e. the func_statics) rely on TriggerCall being part of the base idEntity::Activate method in order to call up their GUIs. So it's not some forgotten legacy code we can remove. We could add a custom spawnarg to the entityDef for atdm:gui_message to disable this behaviour for them - no FM overrides this entityDef, btw, so it'll apply to all FMs - but it won't fix other entities that call GUIs and don't have this spawnarg. 1 Quote FM: One Step Too Far | FM: Down by the Riverside | FM: Perilous Refuge Co-FM: The Painter's Wife | Co-FM: Written in Stone | Co-FM: Seeking Lady Leicester Dragofer's Stuff | Dragofer's Scripting | A to Z Scripting Guide | Dark Ambient Music & Sound Repository
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.