R Soul on 7/6/2016 at 14:36
Hello! I'm currently working on a replacement for FMSel which looks like Darkloader. Thanks to the Sneaky Upgrade it also works with T3 FMs. When it comes to playing FMs, uninstalling and handling savegames it's fully functional (if the savegames are kept in their default 'SU' location).
I know enough about T1/2 FMs to be confident that I can work out their names, but not so for T3.
Here's my plan for working out the name:
If the FM contains a GarrettLoader file, use the GLTITLE tag.
If it contains a .txt file (in the Extras folder) look for the first line that contains tile, followed by any number of tabs or spaces, followed by a colon, and then take whatever's next, with leading spaces removed.
If nothing matches, I'll just use the archive's file name and let users set the FM name manually. Users can save some effort with existing info by using a copy of fmsel.ini.
Does that sound like a reasonable strategy? Or are there any other ways of working out the name?
snobel on 8/6/2016 at 04:47
That should be fine - the T3-capable version of FMSel will only show the title if there's a .glml file so your approach is more thorough.
You've probably discovered that T3 readmes can be either in the FM root or in the Fan Mission Extras folder, which is also sometimes spelled FanMissionExtras? In FMSel I look in the root and all first-level subdirs just to be sure.
AntiMatter_16 on 9/6/2016 at 04:14
I think Darkloader searches the .\Strings\English\Titles.str file, then matches the mission from .\Strings\Missflag.str to come up with a title. I think that works pretty well for standalone missions, but for a short campaign, it gets a little complicated.
R Soul on 9/6/2016 at 15:37
This thread is about T3 FMs, so Darkloader's system isn't relevant. I already have a system in place for T1/2 FMs, which is working well. Thanks for the effort though ;)
snobel, thanks for the info. I didn't know about the alternative folder name, so my condition for its existence will be if "folder in zip with spaces removed and converted to lower case" == "fanmissionextras".
Revised title search:
Before opening the zip file, NewDarkLoader looks in its own ini. (already doing this but didn't state it)
If title not found, look in fm.ini (in zip file) for NiceName.
If NiceName not found, look for GarrettLoader file (first in fanmissionextras then the root) and GLTITLE tag.
If no GLTITLE tag, look for 'title' line also in the file.
If nothing found there, open each text file (fanmissionextras folder, then root) for 'title' line.
If title not found there, call it a day and stick with the archive name.
Just like with FMSel, the user will be able to set the title themselves.