MirceaKitsune Posted November 24, 2022 Report Share Posted November 24, 2022 Figured I'd ask about this here before posting on the bug tracker, there might be a reason why it hasn't been done yet. Let me explain my reasoning first: When creators are working on multiple FM's at once, each one will obviously be located in its own directory. Most FM's contain custom assets and definitions, when working with maps in DarkRadiant you need to select their data folder for additional defs. This is done by going to File - Game / Project Setup - Mission and selecting it there. The issue: Let's say you want to take a break from one FM and work on another. Each time you load a map from a different FM, you also need to go to that menu and select it from there, otherwise custom assets won't be detected and appear as missing in DR. This is quite a bit of an annoyance. Suggestion: Is it not possible to detect and automatically select the active mission from the path the map is located in? We know every map should be located in "darkmod/fms/name/maps", so why not automatically extract the maps directory and set that to "darkmod/fms/name"? If there's an issue with getting such detection right, we can at worst simply store this information in the map.darkradiant file, so even if the player needs to first select it manually the choice is remembered per map and automatically reverted when you load it. We could technically do this with the other settings in that menu, such as Game Type and Darkmod Path. Not sure how much we need it for those unless someone is working with multiple installs and wants the convenience. Sounds good if doable but the important one is the mission directory as that must always be changed with the map you're editing. 1 Quote Mods: Builder Blocks minigame | Keypad | Disguises Link to comment Share on other sites More sharing options...
greebo Posted November 24, 2022 Report Share Posted November 24, 2022 Changing the project/game setup and paths is a pretty massive change from DR's perspective. Almost everything needs to be re-initialised when setting the paths, which sometimes takes longer than a clean restart. (For similar reasons, the TDM engine itself needs to be restarted completely when you install a FM.) DR is able to make that leap while keeping the same process alive, but it's a very expensive step, and it's better to restart to clean up any resources that are left behind when switching configs (for instance, all defs that have been loaded from another map/project are kept in memory.) From a design perspective, I'd rather not have loading a map implicitly change the whole project setup. At some points it might not be deducible or even wanted to have the paths changed on map load. When regularly switching between projects, a possible help might be to create separate DarkRadiant shortcuts, passing the FM project path as argument to DarkRadiant.exe. 1 Quote Link to comment Share on other sites More sharing options...
datiswous Posted November 24, 2022 Report Share Posted November 24, 2022 28 minutes ago, greebo said: When regularly switching between projects, a possible help might be to create separate DarkRadiant shortcuts, passing the FM project path as argument to DarkRadiant.exe. Can you give an example of such shortcut? Or is this still only an idea? Quote Link to comment Share on other sites More sharing options...
MirceaKitsune Posted November 24, 2022 Author Report Share Posted November 24, 2022 53 minutes ago, greebo said: Changing the project/game setup and paths is a pretty massive change from DR's perspective. Almost everything needs to be re-initialised when setting the paths, which sometimes takes longer than a clean restart. (For similar reasons, the TDM engine itself needs to be restarted completely when you install a FM.) DR is able to make that leap while keeping the same process alive, but it's a very expensive step, and it's better to restart to clean up any resources that are left behind when switching configs (for instance, all defs that have been loaded from another map/project are kept in memory.) From a design perspective, I'd rather not have loading a map implicitly change the whole project setup. At some points it might not be deducible or even wanted to have the paths changed on map load. When regularly switching between projects, a possible help might be to create separate DarkRadiant shortcuts, passing the FM project path as argument to DarkRadiant.exe. Thanks for the explanation. My only remaining curiosity then: Would it make sense to offer it as an option still (off by default) for those who don't find a performance an issue? I haven't noticed much additional reload time when changing the active FM in DarkRadiant so I could likely use it well. But I can understand why this change might not be possible. And I'd love to know what that command line parameter for DarkRadiant is! I use Linux but presume they're named the same way as the Windows exe. I already use a custom shortcut to launch TDM for testing my FM without changing the selected FM, via the super helpful "+set fs_currentfm my_fm_name" argument: I take it for DR it's something similar? 1 Quote Mods: Builder Blocks minigame | Keypad | Disguises Link to comment Share on other sites More sharing options...
greebo Posted November 24, 2022 Report Share Posted November 24, 2022 The shortcut variant is something like this: C:\path\to\dr\DarkRadiant.exe fs_game=fms/mission Depending on whether you have spaces in your paths, some quoting might be required. 2 Quote Link to comment Share on other sites More sharing options...
datiswous Posted November 24, 2022 Report Share Posted November 24, 2022 This works well (tested under Linux), thanks. You do have to specify it for all shortcuts, because the shortcut changes the setting for all future startups of DR (until another shortcut changes it). Quote Link to comment Share on other sites More sharing options...
MirceaKitsune Posted November 25, 2022 Author Report Share Posted November 25, 2022 6 hours ago, datiswous said: This works well (tested under Linux), thanks. You do have to specify it for all shortcuts, because the shortcut changes the setting for all future startups of DR (until another shortcut changes it). Is there also a parameter to load the map in cause? For single-map FM's this would also make the shortcut open exactly the map you need so you don't have to look for it and open separately. Quote Mods: Builder Blocks minigame | Keypad | Disguises Link to comment Share on other sites More sharing options...
greebo Posted November 25, 2022 Report Share Posted November 25, 2022 I think you can just pass the map file name along as another argument. 1 1 Quote Link to comment Share on other sites More sharing options...
MirceaKitsune Posted November 25, 2022 Author Report Share Posted November 25, 2022 11 hours ago, greebo said: I think you can just pass the map file name along as another argument. Got it, tested and it works! For anyone else looking to use this trick, these are the full arguments you need to pass to your shortcut and add after darkradiant.exe, obviously for your respective FM and OS: /home/mircea/Games/Quake/TheDarkMod/darkmod/fms/testing/maps/test.map fs_game=fms/testing Note that for thedarkmod.exe you need a different format for some reason, it's "+set var val" instead of "var=val". +set fs_currentfm testing But you can't use the Recent Files list to jump between editing FM's and have it automatically work: If my suggestion is possible as an option I hope you can keep it in mind. For now I'll add those shortcuts to every FM I'm editing which helps! Quote Mods: Builder Blocks minigame | Keypad | Disguises 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.