Popular Post stgatilov Posted June 6, 2021 Popular Post Report Share Posted June 6, 2021 Almost a year ago I raised concern about reckless overriding of main menu GUI files (which explicitly say they must not be overridden) by mappers. I have changed ton of things now, and I think I'm ready to show the new version for beta testing. If everything goes well, these changes will be released in TDM 2.10. You can obtain the game build for beta testing via tdm_installer. Just check "Get custom version" on the first page and select "test-menugui-N" version in test build. Note that it is close to the latest dev build, and thus includes all the changes done since 2.09. Here is the list of customizations in the new version that I know of: Change background everywhere. Change music everywhere. Disable mission-specific screens. Briefing and Debriefing videos (done the "old" way). Replace briefing screen with whatever mapper wants. Custom mission loading GUIs. All of the above can be set independently for each mission in a campaign. Customize the "Wait until ready" screen. I did not expose the ability to change stuff in Credits screen, since in my understanding that's credits for TheDarkMod itself, thus mission authors should not touch it. The instructions about how to achieve points 1, 2, 3, 4, 6 are given in "mainmenu_custom_defs.gui". Here are things which I have marked as deprecated and want to remove: Videos "controlled by SDK". The "old" approach can now be used both for briefing and debriefing, even in campaign. Custom title. As far as I remember, it has only been used to hack custom background into the menu. Why keeping it? Of course, all the missions which use deprecated features need to be fixed to rely on something else. The missions which override .gui files in unsupported way are most likely broken too and need fixing. All the other missions should work properly now. Here is the policy about fixing FMs: I will fix all FMs, unless mission author wants to do it himself. Fix will only change .gui files, nothing else. Fixed mission should work as intended in 2.10. Fixed mission should play well in 2.09, except that main menu can look differently, and probably briefing/debriefing video can be skipped. Every mission will be briefly beta-tested here. Not the gameplay of course (that would take too much effort), but various menu/gui interactions. Until 2.10 is released, the fixed missions will be stored on separate server and will only be available via special cvars tweaking. Ordinary players will still get non-fixed versions, since they most likely use TDM 2.09. In order to download fixed FMs, you should add the following line to "autoexec.cfg": set tdm_mission_list_urls "http://darkmod.taaaki.za.net/5323_menugui/missionlist.xml" If you want to join testing, I suggest copying TDM installation without FMs, then updating it to appropriate version and changing "autoexec.cfg". Trying to juggle with one installation will be confusing. 8 1 Quote Link to comment Share on other sites More sharing options...
stgatilov Posted June 6, 2021 Author Report Share Posted June 6, 2021 Known general issues: When clicking "Restart" in settings, the game does not land back to the same settings. In mission failed screen, the list of objectives does not show status of objectives properly. Missions to be checked and fixed: A) Overriding some mainmenu_*.gui which should not be overriden: ac1 (post) ac2 (post) bcd (post) bathhouse (post) briarwood_manor (post, update) claw1_31 (post, fix) cauldron_v2_2 (post) --- changes accepted by @kingsal elixir (post) gatehouse1_3 (post) good (post) hhi (post) hhta (post) hhvf (post) hhtlc (post) itb (post) lich_queens_demise (post) northdale1 (post) northdale2 (post) nowandthen (post) painterswife (post) snowed_inn (post) springcleaning (post) talbot (post) ulysses_genesis (post) u2_flock (post) volta1_3 (post) NEW: away0 (post) B| Videos controlled by SDK (both briefing and debriefing): ahouseoflockedsecrets (post) nhat3 (post, update) requiem (post) score_to_settle (post) -- acknowledged by @Springheel sneak_destroy (post) C) Custom title: hareinthesnare (post) marshofrahena (post) 4 Quote Link to comment Share on other sites More sharing options...
stgatilov Posted June 6, 2021 Author Report Share Posted June 6, 2021 (Now that I see the list of FMs , I guess I'll reserve one more post) 1 Quote Link to comment Share on other sites More sharing options...
datiswous Posted June 7, 2021 Report Share Posted June 7, 2021 On 6/6/2021 at 9:32 AM, stgatilov said: C) Custom title: hareinthesnare marshofrahena Just a thought: Wouldn't it be better for readability if the words in the name are seperated with unserscores? So for example marsh_of_rahena . Is there a naming rule for the mission folder, or is this completely up to the modder? Another thing: I think it would be nice if there is also a config file where in the player can do modifications to the gui of their own installation. I'm talking about things that don't intervene (too much) with mission specific modifications, like font size or background transparency. For example, personally I have changed a core file to change transparency of install_splash.tga from 0.2 to 0.3 . Quote Link to comment Share on other sites More sharing options...
stgatilov Posted June 7, 2021 Author Report Share Posted June 7, 2021 30 minutes ago, datiswous said: Just a thought: Wouldn't it be better for readability if the words in the name are seperated with unserscores? So for example marsh_of_rahena . Is there a naming rule for the mission folder, or is this completely up to the modder? This is so-called "internal name", it matches the name of the subdirectory in fms directory. I'm writing it because it is the easiest for me to obtain with search scripts. Quote Another thing: I think it would be nice if there is also a config file where in the player can do modifications to the gui of their own installation. I'm talking about things that don't intervene (too much) with mission specific modifications, like font size or background transparency. For example, personally I have changed a core file to change transparency of install_splash.tga from 0.2 to 0.3 . Hah! There are mission authors who want to do font changes too. And backgrounds are de-facto controlled by mission authors. I'm afraid there is no way to "not intervene with mission modifications". In principle, you can unpack the guis directory and edit the files. Of course, if developers change these files, then you can get into trouble after update. Another approach is to expose something via cvar, but I think it is worth doing only if many people want it (yeah, it is fragile!) Quote Link to comment Share on other sites More sharing options...
datiswous Posted June 7, 2021 Report Share Posted June 7, 2021 8 minutes ago, stgatilov said: In principle, you can unpack the guis directory and edit the files. Well that's what I do now. I thought a cleaner way to force certain gui settings would've been nice, but then I just do it manually (after each version update). Quote Link to comment Share on other sites More sharing options...
stgatilov Posted June 8, 2021 Author Report Share Posted June 8, 2021 Let's start with a hard example: "Volta 2: Cauldron". I'm afraid I need help from @kingsal here. There is a ton of changes and overrides in GUI files when I compare to 2.09, but the only difference that I can spot is the background. Also parchments are changed for objectives, but I think it is done directly by overriding images, no .gui files involved. It looks very weird of course, since some objectives parchment has new default style, some has old default style ("dirty" parchment), and some have customized parchment. I have added a "fixed" version, but I only removed all forbidden file overrides, and added the following to "mainmenu_custom_defs.gui": //stgatilov: disable briefing state after video #define ENABLE_MAINMENU_BRIEFING 0 //stgatilov: display custom background everywhere #define MM_BACKGROUNDS_MAINMENU_NOTINGAME BackgroundCauldron #define MM_BACKGROUNDS_EXTRAMENU_NOTINGAME BackgroundCauldron #define MM_BACKGROUNDS_MAINMENU_INGAME BackgroundCauldron #define MM_BACKGROUNDS_EXTRAMENU_INGAME BackgroundCauldron #define MM_BACKGROUNDS_BRIEFING BackgroundCauldron #define MM_BACKGROUNDS_DIFFSELECT BackgroundCauldron #define MM_BACKGROUNDS_SHOP BackgroundCauldron Of course, I defined "BackgroundCauldron" in "mainmenu_background_custom.gui" too. P.S. I also wonder if I should support something like MM_BACKGROUNDS_ALL, which would automatically override all backgrounds. Although failure and success screens are not changed here... so I guess it would be hard to decide what "ALL" should mean. Quote Link to comment Share on other sites More sharing options...
kingsal Posted June 8, 2021 Report Share Posted June 8, 2021 So I released this mission right around when I started tinkering with .GUI files, so its probably a mess. 1 hour ago, stgatilov said: Also parchments are changed for objectives, but I think it is done directly by overriding images, no .gui files involved. Yes, this and I think volta 1 both have a custom objective screens + guis. These can go for now. I think we can keep the dds file overrides as those shouldnt interfere. Down the road, I'd like to revisit the objective pages for the core, we can fit more objectives on that page and clean it up a bit. As long as the custom MM_backgrounds, the briefings, MM audio, and custom loading screen stay. I am happy. Many missions use custom loading screens GUIs so those we need to keep. I might have forgotten that in my list of requests, sorry. 1 Quote Volta Missions: Volta and the Stone, Volta II: Cauldron of the Gods Standalones: Snowed Inn, Hazard Pay (2.10 BETA) Link to comment Share on other sites More sharing options...
kingsal Posted June 8, 2021 Report Share Posted June 8, 2021 I just looked, loading screens are held in guis/map/cauldron_v2.gui (map name) Those need to stay as overridable by authors. Quote Volta Missions: Volta and the Stone, Volta II: Cauldron of the Gods Standalones: Snowed Inn, Hazard Pay (2.10 BETA) Link to comment Share on other sites More sharing options...
stgatilov Posted June 8, 2021 Author Report Share Posted June 8, 2021 9 hours ago, kingsal said: Yes, this and I think volta 1 both have a custom objective screens + guis. These can go for now. I think we can keep the dds file overrides as those shouldnt interfere. Down the road, I'd like to revisit the objective pages for the core, we can fit more objectives on that page and clean it up a bit. Yes, texture overrides don't should not be a problem, here at least. As for objectives, I think they need major refactoring in TDM core game. As I wrote once, there are 4 instances of objectives list, and some of them are copy/pasted, some have name collisions. Quote Many missions use custom loading screens GUIs so those we need to keep. I guess I forgot to mention it: of course mission loading GUI is fully defined by FM --- nothing changes here. 1 Quote Link to comment Share on other sites More sharing options...
datiswous Posted June 9, 2021 Report Share Posted June 9, 2021 (edited) (sorry wrong topic) Edited June 9, 2021 by datiswous about something in dev version Quote Link to comment Share on other sites More sharing options...
stgatilov Posted June 10, 2021 Author Report Share Posted June 10, 2021 The next case is Score to Settle FM by @Springheel. This one does not override anything inappropriate, but it uses debriefing (controlled by SDK), which I'd like to get rid of. This case is rather strange, because I had problems checking its behavior. I used "tdm_end_mission" command to quickly win, and tested 2.09, then 2.06, then 2.05. The debriefing simply did not trigger for me in 2.09 and 2.06, but it triggered in 2.05 --- however, it was without sound (main menu music kicked in immediately). Then I retried 2.09 and debriefing worked this time, but again with main menu music. I assume that the intent is to play debriefing video with its sound. I guess this story confirms the idea that rarely used stuff breaks without anyone noticing it sooner or later In this FM, I have only added the following defines in mainmenu_custom_defs.gui: //stgatilov #5323: enable and configure debriefing video #define ENABLE_MAINMENU_DEBRIEFING_VIDEO 1 #define MM_DEBRIEFING_VIDEO_MATERIAL_1 "video/tdm_final_vid" #define MM_DEBRIEFING_VIDEO_LENGTH_1 43000 #define MM_DEBRIEFING_VIDEO_SOUND_CMD "music tdm_video_finalroq_1;" This does not affect its behavior in 2.09 and earlier, but fully fixes the debriefing in the test version of TDM. 2 Quote Link to comment Share on other sites More sharing options...
Springheel Posted June 10, 2021 Report Share Posted June 10, 2021 Quote I guess this story confirms the idea that rarely used stuff breaks without anyone noticing it sooner or later Yes, it seems so. Thanks for fixing it. Quote TDM Missions: A Score to Settle * A Reputation to Uphold * A New Job * A Matter of Hours Video Series: Springheel's Modules * Speedbuild Challenge * New Mappers Workshop * Building Traps Link to comment Share on other sites More sharing options...
stgatilov Posted June 11, 2021 Author Report Share Posted June 11, 2021 Next case is March of Rahena by @ERH+. Again, no bad overrides here, but I'd like to remove "custom title" feature, which is used here to replace background. As far as I remember, @ERH+ agreed to change the way how background looks. Here are my changes: Added mainmenu_background_custom.gui with one background layer for the actual image. Commented using #if 0 the group of defines related to custom title. Added the code to override background in main menu: #define MM_BACKGROUNDS_MAINMENU_NOTINGAME BackgroundCustomRahena #define MM_BACKGROUNDS_EXTRAMENU_NOTINGAME BackgroundCustomRahena #define MM_BACKGROUNDS_MAINMENU_INGAME BackgroundCustomRahena #define MM_BACKGROUNDS_EXTRAMENU_INGAME BackgroundCustomRahena Since custom briefing uses default TDM backgrounds in this FM, I did not override background for DIFF_SELECT state: it uses TDM's default too. Quote Link to comment Share on other sites More sharing options...
stgatilov Posted June 11, 2021 Author Report Share Posted June 11, 2021 The next one is "Accountant 1" by @Goldwell. It was overriding some things in order to change background and to hide briefing. I have removed the overriding files, and added the following to "mainmenu_custom_defs.gui": //stgatilov #5323: disable briefing state #define ENABLE_MAINMENU_BRIEFING 0 //stgatilov #5323: override background everywhere #define MM_BACKGROUNDS_MAINMENU_NOTINGAME BackgroundCustomAccountantGears #define MM_BACKGROUNDS_EXTRAMENU_NOTINGAME BackgroundCustomAccountantGears #define MM_BACKGROUNDS_MAINMENU_INGAME BackgroundCustomAccountantGears #define MM_BACKGROUNDS_EXTRAMENU_INGAME BackgroundCustomAccountantGears #define MM_BACKGROUNDS_BRIEFING BackgroundCustomAccountantGears #define MM_BACKGROUNDS_DIFFSELECT BackgroundCustomAccountantGears #define MM_BACKGROUNDS_SHOP BackgroundCustomAccountantGears Then added "mainmenu_background_custom.gui" with animated background image. 1 Quote Link to comment Share on other sites More sharing options...
stgatilov Posted June 12, 2021 Author Report Share Posted June 12, 2021 Tried fixing campaign: No Honor Among Thieves by @Goldchocobo, @Mortem Desino and @Bikerdude. I wonder if any of the original authors is reachable today. This campaign has its own briefing video for each of the three missions. Previously it was done via the "controlled by SDK method", which I'd like to remove. So I had to provide old-style defines instead. Here are my changes in "mainmenu_custom_defs.gui": // stgatilov 5323: use old-style briefing video system instead //#define BRIEFING_VIDEO_CONTROLLED_BY_SDK 1 #if MM_CURRENTMISSION == 1 #define MM_BRIEFING_VIDEO_MATERIAL_1 "video/nhat_briefing_video_politics" #define MM_BRIEFING_VIDEO_LENGTH_1 121509 #define MM_BRIEFING_VIDEO_SOUND_CMD "music video/nhat_briefing_politics;" #elif MM_CURRENTMISSION == 2 #define MM_BRIEFING_VIDEO_MATERIAL_1 "video/nhat_briefing_video_anoott" #define MM_BRIEFING_VIDEO_LENGTH_1 34205 #define MM_BRIEFING_VIDEO_SOUND_CMD "music video/nhat_briefing_anoott;" #elif MM_CURRENTMISSION == 3 #define MM_BRIEFING_VIDEO_MATERIAL_1 "video/nhat_briefing_video_forest" #define MM_BRIEFING_VIDEO_LENGTH_1 34600 #define MM_BRIEFING_VIDEO_SOUND_CMD "music video/nhat_briefing_forest;" #endif Also I commented out the MM_BRIEFING_VIDEO_MATERIAL_X, MM_BRIEFING_VIDEO_LENGTH_X and MM_BRIEFING_VIDEO_SOUND_CMD defines in the rest of the file. It works for me now. Unfortunately, the briefing won't work in 2.09 and earlier versions: it simple displays black screen, waiting for player to click mouse button. Quote Link to comment Share on other sites More sharing options...
Goldwell Posted June 16, 2021 Report Share Posted June 16, 2021 On 6/12/2021 at 3:21 AM, stgatilov said: The next one is "Accountant 1" by @Goldwell. It was overriding some things in order to change background and to hide briefing. I have removed the overriding files, and added the following to "mainmenu_custom_defs.gui": //stgatilov #5323: disable briefing state #define ENABLE_MAINMENU_BRIEFING 0 //stgatilov #5323: override background everywhere #define MM_BACKGROUNDS_MAINMENU_NOTINGAME BackgroundCustomAccountantGears #define MM_BACKGROUNDS_EXTRAMENU_NOTINGAME BackgroundCustomAccountantGears #define MM_BACKGROUNDS_MAINMENU_INGAME BackgroundCustomAccountantGears #define MM_BACKGROUNDS_EXTRAMENU_INGAME BackgroundCustomAccountantGears #define MM_BACKGROUNDS_BRIEFING BackgroundCustomAccountantGears #define MM_BACKGROUNDS_DIFFSELECT BackgroundCustomAccountantGears #define MM_BACKGROUNDS_SHOP BackgroundCustomAccountantGears Then added "mainmenu_background_custom.gui" with animated background image. Thank you! Has that been uploaded to the official mirrors? Because i'd like to replicate what you've done here with my future missions. Quote Shadows of Northdale Campaign ACT I: A Curious Mind | ACT II: Down The Rabbit Hole Stand Alone Missions Accountant 1: Thieves and Heirs | Accountant 2: New In town | Spring Cleaning | Lord Edgar's Bathhouse | Snowed Inn | Noble Affairs Link to comment Share on other sites More sharing options...
stgatilov Posted June 16, 2021 Author Report Share Posted June 16, 2021 1 hour ago, Goldwell said: Has that been uploaded to the official mirrors? Because i'd like to replicate what you've done here with my future missions. If I upload it now, then players will play your mission without custom background and with empty briefing until February. Read the original post, it describes where the missions are and when will they be published properly. Quote Link to comment Share on other sites More sharing options...
Dragofer Posted June 25, 2021 Report Share Posted June 25, 2021 Some experiences I made trying to replace the stock background with a custom background image for the first time: It seems there are 2 ways to achieve this: making custom background window defs (line 61) or applying custom title graphics (line 300). I found the background windowDefs method first since it's higher up, so tried that first. This method is more complex, considering the setup that's required outside of the custom_defs file, so it should probably be shown after the custom_title method. There was also trial and error with modifying the windowDefs, so it'd be useful if the GUIs automatically reloaded themselves when you switch between states, if performance allows, so that it gets easier to try out changes without restarting TDM. Then I tried the custom_title method, which is much simpler but has some downsides: The menu parchment gets replaced too - can't see a way to change only the background, which is what I think most people who would use this simpler method want. When the player clicks into another menu, i.e. Options, the background is the default one again. Quote FM: One Step Too Far | FM: Down by the Riverside | FM: Perilous Refuge Co-FM: The Painter's Wife | Co-FM: Written in Stone Dragofer's Stuff | Dragofer's Scripting | A to Z Scripting Guide | Dark Ambient Music & Sound Repository Link to comment Share on other sites More sharing options...
stgatilov Posted June 26, 2021 Author Report Share Posted June 26, 2021 11 hours ago, Dragofer said: Then I tried the custom_title method, which is much simpler but has some downsides: The menu parchment gets replaced too - can't see a way to change only the background, which is what I think most people who would use this simpler method want. When the player clicks into another menu, i.e. Options, the background is the default one again. It is deprecated, and will be removed soon. Quote I found the background windowDefs method first since it's higher up, so tried that first. This method is more complex, considering the setup that's required outside of the custom_defs file, so it should probably be shown after the custom_title method. It is more complex because it is more flexible. Quote There was also trial and error with modifying the windowDefs, so it'd be useful if the GUIs automatically reloaded themselves when you switch between states, if performance allows, so that it gets easier to try out changes without restarting TDM. What about reloadGUI console command? Quote Link to comment Share on other sites More sharing options...
stgatilov Posted June 26, 2021 Author Report Share Posted June 26, 2021 Repacked Hidden Hands: Initiation by @JackFarmer. This one overrode background. So I added custom background in mainmenu_background_custom.gui and put the following into mainmenu_custom_defs.gui: //stgatilov #5323: customize background in main menu the new way #define MM_BACKGROUNDS_MAINMENU_NOTINGAME BackgroundCustomHHI #define MM_BACKGROUNDS_EXTRAMENU_NOTINGAME BackgroundCustomHHI #define MM_BACKGROUNDS_MAINMENU_INGAME BackgroundCustomHHI #define MM_BACKGROUNDS_EXTRAMENU_INGAME BackgroundCustomHHI #define MM_BACKGROUNDS_BRIEFING BackgroundCustomHHI #define MM_BACKGROUNDS_DIFFSELECT BackgroundCustomHHI #define MM_BACKGROUNDS_SHOP BackgroundCustomHHI The behavior is now the same as it was (although I find it strange that background changes to default one for briefing, but then changes back for difficulty selection). The updated FM works properly in 2.09, except that custom menu background is gone. Quote Link to comment Share on other sites More sharing options...
stgatilov Posted June 26, 2021 Author Report Share Posted June 26, 2021 Tried to repack "A house of Locked Secrets" by @Moonbo This one is perfectly valid again, just it seems to use "briefing video controlled by SDK", since it is a campaign. Also, it has a very important debriefing video. First of all, mainmenu_custom_defs.gui starts with three letters "bri", which should be syntax error, affecting the rest of the file in unpredictable way. I have removed these letters. Then I commented out the "controlled by SDK" thing: //stgatilov #5323: use default way of setting up videos //#define BRIEFING_VIDEO_CONTROLLED_BY_SDK 1 //activated for campaign Then enabled debriefing state for second mission (it is disabled by default): #define ENABLE_MAINMENU_BRIEFING_VIDEO 1 //stgatilov #5323: enable debriefing video after second mission #if MM_CURRENTMISSION == 2 #define ENABLE_MAINMENU_DEBRIEFING_VIDEO 1 #endif Finally, I provided debriefing information for second mission (similar to how we do it for briefing videos in non-campaigns): //stgatilov #5323: set up debriefing video after second mission #if MM_CURRENTMISSION == 2 #define MM_DEBRIEFING_VIDEO_MATERIAL_1 "House_Credits" #define MM_DEBRIEFING_VIDEO_SOUND_CMD "music House_Credits;" #define MM_DEBRIEFING_VIDEO_LENGTH_1 71000 #endif Now everything works as before with new TDM build (also music in debriefing is now fixed). In 2.09, the updated FM works fine, except that debriefing/credits video is skipped. Quote Link to comment Share on other sites More sharing options...
Dragofer Posted June 26, 2021 Report Share Posted June 26, 2021 3 hours ago, stgatilov said: It is deprecated, and will be removed soon. This would be a shame, I think the GUI customisation system would profit from a simple & easy way to just drop in a custom background image that instantly replaces all of the stock menu effects in one go. The new menu customisation system looks like it's very powerful for advanced effects and complete control, but could be tricky for a mapper who's not familiar with the GUI system and only wants to make a simple change like this. In this case he'd have to find out that you can't use a custom background image directly but need to make a GUI material with an appropriate blend mode (ok, seems this is not the case, but it seemed necessary after inspecting the stock menu), a GUI window containing this material with an appropriate rect size, and replace all the stock windows of every state with this new window. I think this is a system for advanced users. Quote FM: One Step Too Far | FM: Down by the Riverside | FM: Perilous Refuge Co-FM: The Painter's Wife | Co-FM: Written in Stone Dragofer's Stuff | Dragofer's Scripting | A to Z Scripting Guide | Dark Ambient Music & Sound Repository Link to comment Share on other sites More sharing options...
stgatilov Posted June 26, 2021 Author Report Share Posted June 26, 2021 58 minutes ago, Dragofer said: This would be a shame, I think the GUI customisation system would profit from a simple & easy way to just drop in a custom background image that instantly replaces all of the stock menu effects in one go. All effects? I thought about having single macro like MM_BACKGROUNDS_ALL instead of many individual ones, but should it replace background on success and failure screens too? And if not, then how should it be called to avoid confusion? Maybe something like MM_BACKGROUNDS_META_ALLBEFOREGAME ? Quote The new menu customisation system looks like it's very powerful for advanced effects and complete control, but could be tricky for a mapper who's not familiar with the GUI system and only wants to make a simple change like this. In this case he'd have to find out that you can't use a custom background image directly but need to make a GUI material with an appropriate blend mode (ok, seems this is not the case, but it seemed necessary after inspecting the stock menu), a GUI window containing this material with an appropriate rect size, and replace all the stock windows of every state with this new window. I think this is a system for advanced users. Material is not required, you can reference texture directly (as usual). File mainmenu_background_custom.gui already contains a stub of GUI window: Spoiler /* ============================================================================================= * * This file is included into The Dark Mod's Main Menu GUI. * * Mission Authors: You CAN safely edit and include in your PK4. * * When this file is included in your PK4 as "guis/mainmenu_background_custom.gui", it will * override the standard TDM file with the same name and the definitions within. * * stgatilov: You can add mission-specific background layers here. * See mainmenu_background.gui for examples of background layers used in core game. * Make sure to use macro BACKGROUND_DEFAULT_BEHAVIOR or maintain the same naming convention and behavior. * Note that relative order of layers cannot be changed. * * ============================================================================================= */ /** * Example: custom background texture * Uncomment it, rename, adjust to your needs (or just delete). */ #if 0 windowDef BackgroundCustomTexture { rect 0, 0, 640, 480 background "guis/assets/custom_background" BACKGROUND_DEFAULT_BEHAVIOR(BackgroundCustomTexture) } #endif Quote Link to comment Share on other sites More sharing options...
Dragofer Posted June 26, 2021 Report Share Posted June 26, 2021 38 minutes ago, stgatilov said: All effects? I thought about having single macro like MM_BACKGROUNDS_ALL instead of many individual ones, but should it replace background on success and failure screens too? And if not, then how should it be called to avoid confusion? Maybe something like MM_BACKGROUNDS_META_ALLBEFOREGAME ? I think the most common usage would be: - custom background for the main menu (pregame and ingame) and its submenus: Load/Save, Settings, Select Mission. - stock background for everything else: TDM credits, anything after Start Mission (briefing, objectives, shop), success/failure screens and so on The 2nd macro could assign the custom background image to everything. Also, I think the parchment overlays should be kept by default. If a mapper is engaged enough to draw a new menu box they'd probably want to use the more advanced method. 51 minutes ago, stgatilov said: File mainmenu_background_custom.gui already contains a stub of GUI window: Ah right, my TDM install's gui .pk4 doesn't contain this file so I was deriving it from mainmenu_background.gui Quote FM: One Step Too Far | FM: Down by the Riverside | FM: Perilous Refuge Co-FM: The Painter's Wife | Co-FM: Written in Stone Dragofer's Stuff | Dragofer's Scripting | A to Z Scripting Guide | Dark Ambient Music & Sound Repository Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.