Please note, the following only applies to people running RoM under Linux via Wine (or one of its variants). Further, only try this if you are actually having problems getting your add-ons to load in the correct order. If none of this applies to you, you can ignore this post.
As promised, here's a wacky workaround for the Wine "bug" that causes files to come out in the wrong order. It is somewhat convoluted, but it works.
But before we get to the workaround, lets get some background on this "bug".
The root cause of this so-called bug is the short vs long filenames on Windows file systems and how Wine has to handle them. On old Windows file systems (FAT, FAT16, FAT32), short filenames are the norm and some trickery needs to be done to get long filenames. VFAT file systems also have short names as the norm but contain aliases to the long filenames. The newer (comparatively) NTFS flips this around and has long filenames as the norm with aliases to the short names. Meanwhile, Linux file systems have long filenames and no concept of a short filename.
So Wine needs to somehow handle these short filenames in order to emulate Windows, but it cannot (for various technical reasons) use the same algorithm that Windows does (well okay, it could but it would require a lot of caching of directories, yadda yadda) and therein lies the problem. The method Wine uses to emulate short filenames when converting from a Linux filesystem just doesn't make things come out right.
The workaround then is to get wine to load stuff from a file system that actually does support short and long filenames natively, and therefore bypassing the problem. Namely, we'll put the addons onto an NTFS partition. A proper solution to this problem would require Wine code patches and manual compiles of Wine. Lets not go there.
I also do not suggest putting the entirety of RoM on an NTFS partition or the game loading will be slower than molasses in the north-pole. I mean it, having the whole game on an NTFS partition took me several minutes to load it. Having the game on a Linux partition makes the game load in a reasonable (i.e. normal) amount of time.
Step 1: Getting hold of an NTFS partition
If you already have an NTFS formatted drive on your Linux machine, then you are good to go so just proceed to step 2. Otherwise, read on.[INDENT]For this step we'll format a USB key (aka USB flash drive, USB stick, or thumb drive) as an NTFS partition. This will of course delete everything on that USB key, so make a backup if there is anything important on it. Obviously, you are going to need a USB key to format so either grab an old one lying around, or go buy the cheapest one you can get (a 1 or 2 GB flash drive will be more than sufficient).
You are also going to need to have a couple of packages installed so that Linux can mount the NTFS drive. So open your package manager and make sure you have ntfs-3g and libntfs10 installed.
Plug the thumb drive into a USB port and then run either gParted, KDE Partition Manager, or some other Linux partition editor (I'll be describing KDE Partition Manager, but gParted is almost identical in usage).
Select the USB key (**Extremely Important** make sure it is the USB key you are selecting or you may end up re-formatting your entire root file system! You have been warned!), in gParted and KDE partition Manager, right click the drive's partition and select unmount.
Now with the partition still selected, right-click again and select properties. In the dialog window that opens, select NTFS from the File System drop down box. Confirm the choice.
**Important Note** Up to this point, you can still back out of any changes you've done since they have not actually been performed. Double check everything before proceeding!
Click the Apply button on the main toolbar to start formatting the USB key.
If you didn't have any errors then you are done, so proceed to step 2, otherwise continue on.
So you tried the format and it didn't actually take. Before panicking, close any extra message windows to return to the main partition editor window and see if the partition is marked as NTFS. If it isn't marked as NTFS then close the partition editor, unplug the USB stick and try again (it took me three times and then I still had an error but I got the partition marked as NTFS.
If you have the partition marked as NTFS but still had errors, then you'll need to plug your USB flash drive onto an actual Windows machine (with XP or later) and run CHKDSK /f [USB drive letter]: from a command line window or select the flash drive in Windows Explorer and right click then select Properties. In the properties dialog that opens, go to the Tools tab click the Check Now button and click the Automatically fix file system errors check box. Now click Start.
Once done, restart Windows TWICE while the USB thumb drive is plugged-in. This should fix the file system.[/INDENT]
Step 2: Putting the add-ons on the USB stick
Here we put RoM's add-on folder on the NTFS partition.[INDENT]Now that we have a working (and mounted) NTFS partition, create a folder on the NTFS drive. It doesn't really matter what it is called, but as this is where we'll put the actual add-ons, give it a name that is at least relevant.
Copy the entire contents of your RoM add-on folder (the interface/addons folder) to the folder on the NTFS drive and either rename or delete the addons folder in the RoM game folder (I renamed mine, just in case).
Now in the interface folder, create a symbolic link to the folder on the NTFS drive. We can do this from the command line with ln -s path and name to the NTFS folder addons or use a file manager. In KDE's Dolphin file manager, right click and select New > Basic Link to File or Directory. Type Addons for the file name, and select the folder on the NTFS drive where the add-ons actually are then click OK.[/INDENT]
Start the game.
Final Words
With the add-ons now being on a file system with short and long file name support, Wine will find the files in the correct order and therefore your add-ons will load correctly.
Yes, this is a rather messy workaround but it does work. If you are using a USB stick for the add-ons. you'll have to make sure that it is always plugged in or the game won't find your add-ons.