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           Collabs                             

                                 Down and Out on Newford Road          the Factory Heist                  A Collector's Errand (with Bikerdude)

                           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

    • datiswous

      So on a regular basis I try to start building something in Darkradiant but very quickly I loose interest and give up.
      I tend to
      create a room, position an ai in it (or first ai, then room, probably better) put a light in it Put some stuff in it test the room in tdm Now I had this new idea:
      Start of with a gigantic room. To skip the importance of sealing for the time being and to think broader than one room. Then just use ground without wall, just to visualise the structure of the level.  Then just use prefab walls and other elements (arches, etc.). Just building area's that aren't enclosed. I can always close them at a later point. Maybe this is all very logical from a mappers perspective, but tdm is the first game where I have done any kind of real mapping and I always stop at the start. It just takes too long to make something exciting.
      I want to build something at some point, because over time I accumulated lots of ideas.
      · 12 replies
    • MayheM

      It would be nice to have a link to the forum thread of a mission in download section, rather than having to search for it manually, like on Thief Guild.
      · 1 reply
    • taffernicus

      Anaglypta , floral and damask wallpaper look great in older homes 
      It’s rare to see anyone using “shader not found” wallpaper in their house

       
      · 0 replies
    • Ansome

      Terribly difficult juggling map designing with work, but I'm still alive and chipping away at something very special. I'm actually making a collaboration of sorts with a friend, I make the map itself and he acts as my "Chief Scope Creep Consultant" that checks in every so often to make sure this project isn't getting out of hand. It's a good system!
      · 1 reply
    • JackFarmer

      We don't need artificial intelligence; we need artistic intelligence. 
      Ralf Hütter, Kraftwerk
      · 6 replies
×
×
  • Create New...