Jump to content
The Dark Mod Forums

Recommended Posts

Posted

Destined, the pauseGUI routine is worrisome. The tdm_events.script entry for it has this warning, that it interferes with execution of normal threads, but unfortunately gives no hint how to create a thread by "a special SDK method":

/**
 * Pauses the game. This should only be called for threads that are explicitly maintained
 * by a special SDK method, because ordinary threads won't get executed during g_stopTime == true.
 * Note: This is used by the objective GUI threads.
 * Note: Must be called on the player entity, not the sys entity.
 */

Posted

Yeah, I saw that note, but if you start the GUI before in teh script, it might still work. Or you would have to teleport the player after all, but you could avoid using the whole camera and wall setup, which maybe would still make it easier.

Posted

Regarding that thread note, the worry I have is not so much starting the GUI, but whether you could get the game to resume afterwards. Dunno.

Posted

Pausing the game would probably be the most elegant solution, but you can probably get away with using the camera to freeze the player's controls and calling that video overlay which covers the whole screen. The player wouldn't know the difference.

If the cutscene should be shown in an area that AI can access it'd be best to teleport the player to a safe blue room while the cutscene is playing.

Posted

Hm, I want to show a message during a cutscene (by using sys.trigger() on an atdm:gui_message entity) but as long as there's an active func_cameraview it doesn't show up, while outside of the cutscene it shows up fine.

This is despite cinematic 1 being set on the entity. Also tried force 1, which made it show for just a split second. Has anyone pulled this off before?

Posted

IIRC, If your cam view is an overlay, as part of the request to create the overlay, you can give the overlay a layer number.

Perhaps you can look at the def of the message overlay to see if you can give it a higher layer number than the cam view?

  • Thanks 1
Posted

@grayman thank you for the promising idea, but it doesn't seem to be what it takes.

I've started with cloning & renaming the message scriptobject + def, with the difference that it calls the message gui with layer 101 instead of 10 (and I set cinematic 1 inside DR). That didn't change things.

Then I lifted the bare essentials from the scriptobject and turned it into a map script. Tried layer 11, 16, 26, 51, 102, 250, 1002... works fine except when there's a func_cameraview active.

Spoiler

void message_cutscene()
{
	entity test_camera	= $test_camera;

	test_camera.activate($player1);						//start the camera

	float gui = $player1.createOverlay("guis/tdm_message.gui", 1002);	//create message and show for 6s
	$player1.setGuiInt(gui, "msg_lines", 1);
	$player1.setGuiString(gui, "msg_text", "text");
	sys.wait(6);

	$player1.callGui(gui, "doFadeOut");					//fade out & reset message
	sys.wait(1);
	$player1.destroyOverlay(gui);
	gui = 0;

	test_camera.activate($player1);						//stop the camera
}

 

I'd take a look at the func_cameraview's coding but that seems to be buried in the source code, which is a different beast from Doomscript.

I don't know... do you have an idea what's going wrong?

Posted

No idea at all.

A quick glance through the player camera code indicates that the screen is simply taken over by the camera's viewport. No GUI involved. My suggestion is invalid if the camera doesn't use a GUI to paint the screen.

Looks like this is a dead end.

I can't think of another way to do it.

Posted

Had another idea: tried calling the overlay on the camera instead of the player, since they both have their own viewports. Still no dice, so it looks like we've got a proper bug here. Also tried a different GUI, guis/underwater/underwater_greengrey_thickmurk.gui.

Having thought about this I can convey my meaning more than well enough by a change in sound and lighting alone - maybe that's the best way anyway. But it does feel like cutscenes would be a fairly common usage case for messages.

Posted

I guess a "change in sound" could include voice-over audio, perhaps delivered by an off-screen narrator AI. Though lots more effort to do that well than a text message.

Posted

You can make a skin that swaps all existing materials (~= textures) with a tiling gold material. Rename a .txt to .skin and create a skins folder in your fm, then put this into it:
skin name_of skin

{
model name_of_model

name_of_original_material name_of_new_material
}

 

Can have multiple models and material swaps in one skin definition.

Then in DR click on File -> Reload Skins and in TDM enter into the console reloadDecls (can bind that to a hotkey).

 

@Geep yes, that's still feasible. Voiceovers are generally prime solutions, but in this case it'd also be reasonable to go a more subtle route.

  • Thanks 1
Posted (edited)

A small addition: In order to get all the "name_of_the_original_material"s for your skin, you can use "Create Model" in DR and select the model you want to create the skin for. On the lefter side there is a list with all materials used in that model.

Edited by Destined
Spelling
  • Thanks 1
Posted

I was able to get an .mp4 video+.ogg audio to run as a briefing in my test map, by cloning the methods and assets used in Goldwell's Shadows of Northdale ACT II. (I'll be writing that up for the wiki. @Springheel, see my PM).

I'm now trying to get the same vid to play as a non-briefing full screen. Dragofer, at one point you seemed to imply that this could be done without a func_camera and videoWall, just using an GUI overlay. So I tried that, having a trigger call this target in <fm>.script:

void dovideo() {
  float overlayHandle = $player1.createOverlay( "guis/overlay_video.gui", 100 );
  sys.wait(5);
  $player1.destroyOverlay( overlayHandle );
}

Where the 5 second wait is just a placeholder for whatever would really be needed. Which in turn invokes my overlay_video.gui:
 

Spoiler

 

windowDef OverLayVid
{
    rect        0,0,640,480
    visible        0

#define MY_VID "video/briefing_video.mp4"

    windowDef Video
    {
        rect        0, 0, 640, 480
        background    MY_VID
        matcolor    1,1,1,1
        backcolor    0,0,0,1
        
        onTime 0
        {
            set "Video::background" MY_VID;
            resetCinematics ; // Reset Video to start
            set "Video::matcolor" "1,1,1,1" ; // Show video
        }

        onNamedEvent CinematicEnd
        {
            // Hide video
            set "HideBriefingVideo::notime" "0";
            resetTime "HideBriefingVideo" 0;
        }
    }
    
    // Utility windowDef to hide the video,
    // called when all video fragments are done playing
    windowDef HideBriefingVideo
    {
        noTime 1
        onTime 0
        {
            set "notime" "1";
        }
    }
}

 

I know the gui is being parsed, though whether I structured it correctly, don't know. But nothing happens in-game. So should I just move on to deploy a videoWall+func_camera? And forget about createOverlay call, just activate the camera pointing to a videoWall painted with overlay_briefing.gui?

Posted

It would seem you can make an ingame video GUI overlay, but at this point you know more than I do. If this were me working on it I'd try to start with a standard message scroll GUI and convert it step by step into a fullscreen video.

Posted

I'm going over to the func_cameraview and video-on-ingame-surface method now. Using a .gui more like Drumple's RoQ example, and generally sticking close to his method. No luck so far in getting video to appear on wall, though (either mp4 or roq).

Posted

I want to activate torch flames through completion targets from the objectives editor.

The flame entities received the following properties:

grafik.png.bd16046e7d428be88bfab826f9ccc998.png

 

Result: triggering only activates the light texture, but not the particle effect. What is my mistake?

 

Posted
10 hours ago, Dragofer said:

Might be because you have start_off 1 even though you only need extinguished 1 for a flame light?

I've tried your suggestion as well on both a combination of flame entity plus torch torch model  and one of the torch entities:

invisible_flames.jpg.9cf23cc2689b153cc272bde8faa5933c.jpg

 

After triggering, only the "light" (or whatever you call that) of the flame is visible, but not the flame particle effect itself.

:( :(

 

 

Posted

Instead of a trigger you could use the S/R-system with a response effect "Turn extinguishable Light On". It is more effort than a simple trigger, but it is explicitly designed for extinguishable lights.

Posted (edited)
1 hour ago, Dragofer said:

@JackFarmeralright one last thing before we descend into S/R, how does it work when you use start_off 1 and extinguished 0?

Then it looks like in the shot above plus the flame is visible.

I thought it would be possible to trigger torches like regular lights. :( :( :(

 

Edited by JackFarmer
Posted

@JackFarmer If the flame entity is def_attached to a torch you can trigger the torch to toggle the flame. If it doesn't work for a torch, then I 100% know it will for an oil lamp like atdm:lamp_oil_wall_hanging_lit. Can start with that lamp entity and modify it to your liking.


If you want special properties on the flame, i.e. custom light_radius, you can use "set light_radius on flame" etc. spawnargs.

Check the name_attach spawnarg on the lamp/torch to see if the def_attached flame is really called "flame".

  • Like 1
Posted
54 minutes ago, Dragofer said:

@JackFarmer If the flame entity is def_attached to a torch you can trigger the torch to toggle the flame. If it doesn't work for a torch, then I 100% know it will for an oil lamp like atdm:lamp_oil_wall_hanging_lit. Can start with that lamp entity and modify it to your liking.


If you want special properties on the flame, i.e. custom light_radius, you can use "set light_radius on flame" etc. spawnargs.

Check the name_attach spawnarg on the lamp/torch to see if the def_attached flame is really called "flame".

Thanks, will check and revert to you.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recent Status Updates

    • jivo

      I just uploaded a new version of the Visible Player Hands mod. It's been updated for TDM 2.13 and has new animations. Check out the post if you're interested!
      · 0 replies
    • datiswous

      I moved from Manjaro Linux (rolling release) to Linux Mint (LTS). One of the reasons was that I found the updates a bit too often and long. But now on Mint I get updates every day, although they're usually small updates.
      · 3 replies
    • JackFarmer

      "Hidden Hands: Vitalic Fever" - new update available including subtitles & compressed briefing video (thanks to @datiswous) and several fixes.
      · 0 replies
    • Wolfmond

      🇬🇧

      2025-04-20
      I'd like to track my level design progress a bit more often now, so I'm using the feed in my profile here.
      I've been working intensively on Springheel's YouTube course over the past few days. I'm currently up to lesson 8. There is so much information that needs to be processed and practiced. 
      I have started to create my own house. As I don't have the imagination to create a good floor plan, I grabbed a floor plan generator from Watabou and experimented with it. I chose a floor plan that I will modify slightly, but at least I now have an initial idea. 
      I used two guards as a measuring tape: The rooms are two guards high. It turned out that I can simply double the number of boxes in DarkRadiant in grid size 8 that are drawn in the floor plan. 
      I practiced the simplest things on the floor plan first. Drawing walls, cutting walls, inserting doors, cutting out frames, creating VisPortals, furnishing rooms.
      I have had my first success in creating a book. Creating a book was easier than I thought. I have a few ideas with books. The level I'm creating will be more or less a chill level, just for me, where I'll try out a few things. I don't have an idea for my own mission yet. I want to start small first.
      For the cellar, I wanted to have a second entrance, which should be on the outside. I'm fascinated by these basement doors from the USA, I think they're called Bilco basement doors. They are very unusual in Germany, but this type of access is sometimes used for deliveries to restaurants etc., where barrels can be rolled or lifted into the cellar. 
      I used two Hatch Doors, but they got completely disoriented after turning. I have since got them reasonably tamed. It's not perfect, but it's acceptable. 
      In the cellar today I experimented with a trap door that leads to a shaft system. The rooms aren't practically finished yet, but I want to continue working on the floor plan for now. I'll be starting on the upper floor very soon.

      __________________________________________________________________________________
      🇩🇪

      2025-04-20

      Ich möchte nun mal öfters ein bisschen meinen Werdegang beim Leveldesign tracken, dazu nutze ich hier den Feed in meinem Profil.
      Ich habe mich in den vergangenen Tagen intensiv mit dem Youtube-Kurs von Springheel beschäftigt. Aktuell bin ich bis zu Lektion 8 gekommen. Das sind so viele Informationen, die erstmal verarbeitet werden wollen und trainiert werden wollen. 

      Ich habe mich daran gemacht, ein eigenes Haus zu erstellen. Da mir die Fantasie fehlt, einen guten Raumplan zu erstellen, habe ich mir einen Grundrissgenerator von Watabou geschnappt und damit experimentiert. Ich habe mich für einen Grundriss entschieden, den ich noch leicht abwandeln werde, aber zumindest habe ich nun eine erste Idee. 

      Als Maßband habe ich zwei Wächter genommen: Die Räume sind zwei Wächter hoch. Es hat sich herausgestellt, dass ich in DarkRadiant in Gittergröße 8 einfach die doppelte Anzahl an Kästchen übernehmen kann, die im Grundriss eingezeichnet sind. 

      Ich habe bei dem Grundriss erstmal die einfachsten Sachen geübt. Wände ziehen, Wände zerschneiden, Türen einsetzen, Zargen herausschneiden, VisPortals erstellen, Räume einrichten.

      Ich habe erste Erfolge mit einem Buch gehabt. Das Erstellen eines Buchs ging leichter als gedacht. Ich habe ein paar Ideen mit Bücher. Das Level, das ich gerade erstelle, wird mehr oder weniger ein Chill-Level, einfach nur für mich, bei dem ich ein paar Sachen ausprobieren werde. Ich habe noch keine Idee für eine eigene Mission. Ich möchte erst einmal klein anfangen.

      Beim Keller wollte ich gerne einen zweiten Zugang haben, der sich außen befinden soll. Mich faszinieren diese Kellertüren aus den USA, Bilco basement doors heißen die, glaube ich. Diese sind in Deutschland sehr unüblich, diese Art von Zugängen gibt es aber manchmal zur Anlieferung bei Restaurants etc., wo Fässer dann in den Keller gerollt oder gehoben werden können. 
      Ich habe zwei Hatch Doors verwendet, die allerdings nach dem Drehen vollkommen aus dem Ruder liefen. Inzwischen habe ich sie einigermaßen gebändigt bekommen. Es ist nicht perfekt, aber annehmbar. 
      Im Keller habe ich heute mit einer Falltür experimentiert, die zu einem Schachtsystem führt. Die Räume sind noch quasi nicht eingerichtet, aber ich möchte erstmal am Grundriss weiterarbeiten. In Kürze fange ich das Obergeschoss an.



      · 2 replies
    • JackFarmer

      On a lighter note, thanks to my cat-like reflexes, my superior puzzle skills and my perfect memory, I was able to beat the remastered version of "Tomb Raider: The Last Revelation" in a new superhuman record time of 23 h : 35 m, worship me!
      · 5 replies
×
×
  • Create New...