Jump to content
The Dark Mod Forums

Recommended Posts

Posted (edited)

Question:

Is it possible to create a gui and in it display different sections of an xdata file but in different places? I can't really directly find this info in the wiki.

Edited by datiswous
Posted

I don't understand the question.

My missions:           Stand-alone                                                      Duncan Lynch series                              

                                      Down and Out on Newford Road              the Factory Heist

                                The Wizard's Treasure                             A House Call

                                                                                                  The House of deLisle                                                                                                  

                              

Posted (edited)

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
Posted (edited)

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
Posted

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
Posted (edited)

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
Posted (edited)

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
Posted
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.

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

    • thebigh

      Starting a playthrough of the whole Dark Mod, from oldest mission to newest. I've knocked over the first few already and about to start Living Expenses. Only ~170 missions to go!
      · 8 replies
    • Ansome

      I'm back! Happy new years, TDM folks!
      I brought with me a quick update for my first FM that fixes up a lot of small issues that didn't get caught in beta testing. I didn't exactly expect it to take me nearly 9 months to release a patch, but it's been a wild year to say the least. Teaching, finishing up my Master's of Education, and all manner of other events forced me to drop out of the anniversary FM contest and ate up all my time, but I'm back again in a comfortable position to start catching up on all the new FMs. I may even start work on another spooky project of greater length and difficulty in the coming year.
      Thanks again for the warm welcome to the community and have a happy new year!
      · 3 replies
    • JackFarmer

      I got myself the apple tv trial subscription. I have to say, “Foundation” (season 1) is very exciting. Shall I read the books as well?
      · 2 replies
    • datiswous

      One more like..
       

      · 3 replies
    • snatcher

      TDM Modpack v4.6 released!
      Introducing... the Forward Lantern mod.
      · 0 replies
×
×
  • Create New...