Jump to content
The Dark Mod Forums

Recommended Posts

  • 2 months later...
Posted
On 6/15/2024 at 3:55 PM, stgatilov said:

it uses all the old ways of doing GUI in campaigns which you should not use today

What do you mean with that?

Btw. I think typing the amount for the sword's worth in gold inside the briefing is cool, but I found that there is a limit how high that number is. I typed in something like 10000000000000000 and the amount was not added when I frobbed the sword. It's not really a problem here, but I wondered if there's a set maximum amount of possible loot in tdm.

  • 2 weeks later...
Posted
On 8/18/2024 at 1:32 PM, datiswous said:

What do you mean with that?

The way main menu is customized was changed greatly somewhere about 2.08, which affects both single missions and campaigns.

If you look into mainmenu_custom_defs.gui, you'll see that the current suggested approach for main menu in campaigns is using #if MM_CURRENTMISSION == 2. So you can set defines for separate single missions first, then put them all in a single file and wrap in #if-s.

The sample uses the old approach unfortunately.

  • 1 month later...
Posted

I've nearly finished what will be my second FM which I'm preparing for release in a couple of days. I'd like to use the new debriefing system. It will probably be the first new mission to have it actually.

Strangely enough neither this thread nor the bug report seem to have clear instructions on what exactly the FM must do to enable GUI debriefing, or I'm unable to see it. I was pointed to tdm_gui01.pk4/guis/mainmenu_custom_defs.gui but I only see a lot of variables about a lot of things, it's unclear which and where must be set.

What's the exact procedure for using the default debrief? Is there a flag or worldspawn argument I need to set, or do I just add a "maps/*/mission_debriefing" to suffixed.xd and that automatically makes it work? No need to customize it, it's a small FM with one ending and I'm using defaults for the most part.

Posted (edited)

Well there is now a mainmenu_debriefing.gui with this info:

Debriefing GUI. This file is part of The Dark Mod's Main Menu GUI and is shown right after the Debriefing Video.

You can edit the file for your own debrief.

In mainmenu_custom_defs.gui there is now:

//#define ENABLE_MAINMENU_DEBRIEFING 0

 

If I'm not wrong this mainmenu_debriefing.gui file is a text debriefing. So if you want a fancy text with images debriefing, you might have to copy-paste some stuff from Sotha's briefing templates.

Edited by datiswous
  • Thanks 1
Posted (edited)

  So first thing if I understand correctly, I need my own copy of mainmenu_custom_defs.gui where I set:

#define ENABLE_MAINMENU_DEBRIEFING 1

After that is done, how do I edit the text? I looked at both mainmenu_briefing.gui and mainmenu_debriefing.gui: The first gets its text from the GUI string gui::BriefingText and the later is gui::DebriefingText. I know the first is read from maps/*/mission_briefing in suffixed.xd, but what is it for the debrief? Is it simply "mission_debriefing" in the same format?

Edit: Yes, that seems to be exactly it, got it working as desired! Thanks for the help.

Edited by MirceaKitsune
Posted (edited)
24 minutes ago, MirceaKitsune said:

So first thing if I understand correctly, I need my own copy of mainmenu_custom_defs.gui where I set:

#define ENABLE_MAINMENU_DEBRIEFING 1

Yes.

I think it's:

maps/<mapname>/mission_debriefing

in some xd file.

 

See also:

On 6/15/2024 at 3:55 PM, stgatilov said:
Edited by datiswous
  • Thanks 1
  • 8 months later...
Posted
On 4/28/2024 at 2:55 PM, stgatilov said:

P.S. By the way, you can also override which .map file to start, although I'm very skeptical that this feature is worth the trouble you'll get in maintainability. Small variations of the same map should be better implemented by writing the "main" game script.

Could you make a text-based briefing and then make a selection menu in it where you select which map is being loaded? So this would be for a single fm, not a campaign.

Posted
On 7/23/2025 at 1:00 AM, datiswous said:

Could you make a text-based briefing and then make a selection menu in it where you select which map is being loaded? So this would be for a single fm, not a campaign.

As far as I remember, yes.
All the persistent info is carried through a single mission just as well.

Posted

I was just thinking, you could make a campaign but in the first mission briefing, you could give the option to play any mission in the campaign seperate instead. Not sure if this would generate problems, because the missions are originally set up as a campaign.

  • 4 months later...
Posted

Btw. I got feature "gui::persistent_builtin_startMap" working on a mission. I was trying it out wit Snatcher's Virtual Rooms Vol.1 . It works with the checkbox aproach (copied over from my starterlocation testmap), but I couldn't get a ChoiceDef working correctly. Might have to do with run order or something. It's not good for long lists anyway.

Problem with the checkbox aproach is that if the amount of maps is long, it does not fit.

The console doesn't give info about what it's doing or not during clicking on the ChoiceDef. Do you know a way to post info of it in the console? I personally think that whenever you click on things inside a gui, the console should tell you what command you executed and what result it had. Or at least a mode for that (like debug mode) would be handy.

Posted (edited)

I was actually just thinking: You could set the "gui::persistent_builtin_startMap" and at the same time change the gui toward a specific briefing. So you could say:

What mission do you want to play?

  • Mission 1
  • Mission 2
  • Mission 3

Then if you click on one of these missions, the onaction command sets both the "gui::persistent_builtin_startMap" and moves the gui toward the briefing of that mission.

Even more experimental thoughts:

Spoiler

I also think that maybe it's still possible to set persistant info on different play order in a campaign. What you have to do is make the briefing always start at a screen where you have to make a choice what mission to start and hide the next button untill they click on a mission. You can make them even run the same map again I think.. In the map you have to set scripts etc. to make changes based on if they did things in a previous mission/run. Of course it will always only play the amount of missions in the campaign list so every mission has to end on the last mission of the campaign list.

Or: You could maybe even show a map selection screen based on what has been played before via persistent info, so that it hides the missions you already played.

Edited by datiswous
Posted

In Virtual Rooms, file "guis/mainmenu_custom_defs.gui" looks like this:

#if MM_CURRENTMISSION == 1

	#define ENABLE_MAINMENU_BRIEFING_VIDEO 1
	#define ENABLE_MAINMENU_BRIEFING 1
	#define ENABLE_MAINMENU_DIFF_SELECT 0
	#define ENABLE_MAINMENU_SHOP 0

	#define ENABLE_MAINMENU_DEBRIEFING_VIDEO 0
	#define ENABLE_MAINMENU_DEBRIEFING 0
	#define ENABLE_MAINMENU_SUCCESS 1

#elif MM_CURRENTMISSION > 1 && MM_CURRENTMISSION < 15

	#define ENABLE_MAINMENU_BRIEFING_VIDEO 1
	#define ENABLE_MAINMENU_BRIEFING 0
	#define ENABLE_MAINMENU_DIFF_SELECT 0
	#define ENABLE_MAINMENU_SHOP 0

	#define ENABLE_MAINMENU_DEBRIEFING_VIDEO 0
	#define ENABLE_MAINMENU_DEBRIEFING 0
	#define ENABLE_MAINMENU_SUCCESS 1

#elif MM_CURRENTMISSION == 15

	#define ENABLE_MAINMENU_BRIEFING_VIDEO 1
	#define ENABLE_MAINMENU_BRIEFING 0
	#define ENABLE_MAINMENU_DIFF_SELECT 0
	#define ENABLE_MAINMENU_SHOP 0

	#define ENABLE_MAINMENU_DEBRIEFING_VIDEO 0
	#define ENABLE_MAINMENU_DEBRIEFING 1
	#define ENABLE_MAINMENU_SUCCESS 1

#endif

Despite having "ENABLE_MAINMENU_BRIEFING_VIDEO" set to 1 in the first block the intro video doesn't play. Even more interesting is that ENABLE_MAINMENU_BRIEFING_VIDEO must be set to 1 in the second and third blocks otherwise consequent missions won't launch.

Something is off somewhere with ENABLE_MAINMENU_BRIEFING_VIDEO. I thought it was worth mentioning it here.

TDM_Modpack_Thumb_51.png.748522d7ee2ef4ae4c47f52887da2c66.png

  • 2 weeks later...
Posted
On 12/4/2025 at 7:18 PM, snatcher said:

Despite having "ENABLE_MAINMENU_BRIEFING_VIDEO" set to 1 in the first block the intro video doesn't play.

It plays for 1 millisecond:

#define MM_BRIEFING_VIDEO_LENGTH_1 1        // for backwards compatibility only

You need to set the duration of the video here in case it is ROQ, or you need to set 0 (or don't touch it at all) to use automatic duration in case of FFmpeg video.

UPDATE: The second issue is a real bug.
It happens when campaign transitions to the next mission, and all states there are disabled.

  • Like 1
  • Thanks 1
Posted
3 hours ago, stgatilov said:

Fixed the issue, now it is possible to do this:

Thanks! VR1 will be updated in due time.

On the subject of campaigns please look to review def/tdm_campaign.def

Line 75:

"weapon_limit_sword" "-1"

Should be:

"weapon_limit_shortsword" "-1"

Otherwise setting in DarkRadiant weapon_limit_sword to 0 (do not carry over) won't work.

And for the sake of completion I suggest you review line 40 as well:

//"diff_0_weapon_limit_sword" "1" // "1" means: the sword will be kept ("-1" works as well) on easy

Should be :

//"diff_0_weapon_limit_shortsword" "1" // "1" means: the sword will be kept ("-1" works as well) on easy
  • Like 1

TDM_Modpack_Thumb_51.png.748522d7ee2ef4ae4c47f52887da2c66.png

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

    • JackFarmer

      Happy Labour Day, my taffing taffers & hard working mapping friends!
      And remember the poor souls who, within the Inventors’ organization, labor under Jonus’s yoke to ensure the success of that very guild! Always remember the hard workers!
      · 0 replies
    • datiswous

      Is there a script command to make a screenshot?
      I just though it could be interesting to be able to create a screenshot at a certain point in time. Then use that screenshot possibly in a debrief.
      I guess the second question is: Can you use a (in-game made) screenshot in a (debrief) gui?
      · 1 reply
    • Bikerdude  »  Display Cement

      So what type, and what ratio of portland to sand 😏
      · 1 reply
    • JackFarmer

      Our esteemed professional mapping predecessors from 20 years ago faced the same challenges we do today!
      · 2 replies
    • snatcher

      TDM Modpack 5.1 is out!
      · 0 replies
×
×
  • Create New...