Jump to content
The Dark Mod Forums

Gui displaying different sections of xdata file


datiswous

Recommended Posts

I don't understand the question.

My missions:           Stand-alone                                                      Duncan Lynch series                              

                                      Down and Out on Newford Road              the Factory Heist

                                                                                                  A House Call

                                                                                                  The House of deLisle                                                                                                  

                              

Link to comment
Share on other sites

Ok so the original reason I came up with this question is that I was looking at Sotha's Button Controlled Animated Briefing

To make that work, you have to edit a gui file and put the text blocks in it. Wouldn't it be easier if you can use text from xdata instead? Then the gui file is just for the looks and operation, like a template that you snap onto your mission, while you create the text in the xdata file. I wondered if that's possible. The normal text based briefing also uses a gui (obviously), which then includes the xdata file.

At that point I was thinking of a broader aproach for other gui's, but I probably should've keep it simple.

Edited by datiswous
Link to comment
Share on other sites

The text based briefing uses one xdata "section" consisting of multiple pages, which you scroll through while reading the briefing. But whould it be possible to make a gui with text only from page one of the briefing text from xdata and then make somewhere else in the same gui text from page 2 of the briefing text from xdata.

 

I wasn't asking for a whole tutorial. Just wanted to know if it's technically possible.

Edited by datiswous
Link to comment
Share on other sites

It might be possible, but the thing to realise is that for readables the text that is displayed in the readable's gui is set by the script tdm_readables.script. This, amongst other things. extracts each page from the xdata item and sets the corresponding items in the gui.

The briefing text is similar but in this case the xdata item is read by the C++ code which then sets the BriefingText item.

In other words, guis know nothing about xdata.

  • Like 1
Link to comment
Share on other sites

Hm, looking at the mainmenu_briefing.gui file it might actually be possible to make a gui with navigation buttons, make the navigation buttons move to a new page with possible graphics, but also list the second page of the xdata file. Because it does this:

windowDef scrollDown
	{
		rect		292,390,57,27
		background	"guis/assets/briefing/nextpage"
		visible		("gui::ScrollDownVisible" == 1)

		onMouseEnter
		{
			set "cmd" "play sound/meta/menu/mnu_hover;";
		}

		onAction
		{
			// Send the request to the script
			set "cmd" "play sound/meta/menu/mnu_select; briefing_scroll_down_request";
		}
	}

So you remove the scrolldown button and when you do the next page action, you activate:

set "cmd" "play sound/meta/menu/mnu_select; briefing_scroll_down_request";

 

Edit: Actually you can also keep the normal navigation but include graphics, etc. and when you do the scroll down action, you can change the page, add new graphics, etc. and also move to the next xdata page. I think.

But it doesn't seem like you can specify a certain xdata page.

Edited by datiswous
Link to comment
Share on other sites

It's at least interesting (to me) to think of possibilities of a different briefing gui. Currently there is a.f.a.I.k.:

  1. A text based briefing
  2. A briefing with navigation slides, or auto-slides all specified in a gui file.
  3. an mp4 movie (which still might include slides)

 

Maybe it could be useful for some to have the option of:

A text based briefing of x page(s) with a background image for every page.

Edited by datiswous
Link to comment
Share on other sites

On 9/29/2023 at 8:42 PM, datiswous said:

But it doesn't seem like you can specify a certain xdata page.

I think this is the crux of the problem in that there's no linkage from a .gui to an xdata item. What you need to be able to do is call a script from inside the gui and the script will read the xdata and populate the gui variables.

Now theoretically there is a "runScript" command that is callable from inside guis but it doesn't currently seem to work in TDM. There's actually a feature request, 6164, to fix this. Maybe we should agitate to get this fixed.

Link to comment
Share on other sites

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

    • The Black Arrow

      Hey @nbohr1morehow come the zombies in The Dark Mod don't have a "resurrection" mechanic to it, similar to how Thief has it?
      They're quite a weak creature as of right now, it's merely a walking corpse that slashes you, making attacking them to kill them an actual strategy.
      Would be better if they had some cool mechanism to it that truly makes them a danger, such as the resurrection idea itself.
      · 2 replies
    • Ansome

      Query: when was the last time a zombie in a video game was unnerving or scary to you? I'm chipping away at my anniversary submission and I've been trying to gather opinions on the subject. I'm perfectly capable of lighting them well, changing their sfx, and creating effective ambience, but I'm worried that zombies at their core are just too overdone to be an effective payoff to the tension I'm creating.
      · 4 replies
    • nbohr1more

      The Lieutenant 3 is out! Congrats Frost_Salamander! ( raising awareness )
      · 2 replies
    • OrbWeaver

      Has anyone had any luck with textures from Polyhaven? Their OpenEXR normal maps seem too washed out and give incorrect shading in the engine.
      · 5 replies
    • datiswous

      I tried to upscale the TDM logo video. First try:

      briefing_video.mp4 You can test it ingame by making a copy of the core tdm_gui.mtr and place it in your-tdm-root/materials/ , then edit line 249 of that file into the location where you placed the new briefing.mp4 file.
      What I did was I extracted all the image files, then used Upscayl to upscale the images using General photo (Real-Esrgan) upscale setting and then turn it back into a video.
      I might have to crop it a bit, the logo looks smaller on screen (or maybe it's actually better this way?). My video editor turned it into a 16:9 video, which I think overal looks better than 1:1 video of original.
      · 1 reply
×
×
  • Create New...