Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Damocles on December 25, 2007, 01:39:27 pm
-
Hi, im pretty shure, this already came up quite often, but i wasnt able to find it.
I wanted to make some minor changes to the original campaign missions. So first i searched for the mission files, and thought i found them in the "root_fs2.vp" so i extracted the mission.fs2 in question, made my changes and "reincluded" the modified one into the "root_fs2.vp".
However the mission doesnt change ingame....
I even deleted ALL mission files inside the root file, and FS was still able to run any missions. So i guess there has to be another copy of those mission files. But where? i checked my .vp files, but found no matches. Any ideas?
I know FS still reads the root file, since removing it or removing the campaign files inside the mission folder results in some error messages. But the mission files themself appear to be totally unnecessary.
-
1. Modifying original vp files is never fun. Or advisable. A better way would be to extract the desired mission, modify it, and then save/move it to the \freespace\data\missions folder, where it would override the vp.
2. If you have the mediavps installed, particularly a set that makes the missions to take full advantage of LightSpeed's Nebulae, the missions would play even if you happened to **** up root_fs2.vp.
3.
:welcomered:
-
You can get the original root_fs2.vp in the HotU Crack Pack on my site. I advise you grab that wipe your version and then add your changes to the ones in the media VPs not by remaking the media VP but simply by placing them in Freespace2\Mediavps\Data\Missions where they'll safely override the originals.
I further advise using WinMerge (http://www.winmerge.org/) to copy any large changes across to the enhanced missions much more quickly than repeating everything in FRED.
-
I've noticed on quite a few occasions that FS2 will not use the ones in the data\missions folder but continue to use the ones in the VP. A quick rename of the extracted file solves the problem. This is in the tech room.
-
Ah wrong folder!
i copied the new files to : freespace2/data/missions/ folder.
like FUBAR-BDHR said, he didnt recognize them. So when i tried it in the campaign it still used the original mission. When i renamed it, it became playable in mission simulator.
I safed the original .vp files, and tried removing the mission files, from both root_fs2.vp (freespace 2 root folder) and mv_core.vp (FreeSpace2\mediavps ) . That had no effect, but when i copied the mission files files to FreeSpace2\mediavps\data\missions it worked, even with restored core files. So, i guess problem solved. Thx :)
Was that a change, that came with SCP? I have the retail version, and always thought that freespace2/data/mission/ was the usual override folder?
-
As far as I know, it has always been a plural form, or 'missions' if you want to put it that way. At least the HotU download has the data folder with all the subfolders installed, and among them is a folder named 'missions'. And I think it's logical. You know, you can put many missions there, so it's only proper to call it 'missions'.
-
ah yes, that was just a typing error in this post. I copied them in the "missions" folder. But it works fine now, though i dont know, why i had to put it in this other directory.
-
Basically when the SCP added the mod system we had to change where FS2 looks for files slightly. In retail anything in Data\Missions overrode anything in a VP file in the main FS2 folder. This is still true.
However anything in a mod folder will override anything in either folder. If I start the game with mod -transcend,mediavps the search order will be something like this
\Transcend\Data\Missions
VPs in \Transcend
Mediavps\Data\Missions
VPs in \Mediavps
Data\Missions
VPs in Main FS2 folder
If you'd run the game with no mods active the missions you had made would have worked. But if you choose to run with -mod mediavps then they will have lower priority than the versions in the mediavps.
-
Ah.. thank you for this nice explanation :yes:
-
Basically when the SCP added the mod system we had to change where FS2 looks for files slightly. In retail anything in Data\Missions overrode anything in a VP file in the main FS2 folder. This is still true.
However anything in a mod folder will override anything in either folder. If I start the game with mod -transcend,mediavps the search order will be something like this
\Transcend\Data\Missions
VPs in \Transcend
Mediavps\Data\Missions
VPs in \Mediavps
Data\Missions
VPs in Main FS2 folder
If you'd run the game with no mods active the missions you had made would have worked. But if you choose to run with -mod mediavps then they will have lower priority than the versions in the mediavps.
There might be a bug then. Recently in testing in both FS2 and TBP with no mods the campaign missions in the .vp show up in the tech room not the modified ones in the data\missions folder. I'll make sure that I can reproduce this.
-
Well of course I couldn't get it to do that now. What I might have been experiencing was modifying a file with the same name as one in a campaign that the currently selected pilot had not played yet. Won't show up unless you select the campaign and unlock the missions or you rename the file. I'm still not 100% convinced that the .vp files don't take priority over the data/missions files sometimes. I will keep an eye out for it happening.
-
There might be a bug then. Recently in testing in both FS2 and TBP with no mods the campaign missions in the .vp show up in the tech room not the modified ones in the data\missions folder. I'll make sure that I can reproduce this.
How the hell can you tell them apart in tech room? :confused: :confused:
FSOpen loading priority only ensures that the HIGHEST priority located version of each equal named file will be used. In this way if you have different versions of MyMission.fs2 in FS2\data\missions, (I suppose the fixed one), and packed in FS2\WhichEver.vp>>data\missions, (I suppose the original "bugged" one), you know that the game will use the unpacked one. But unless they have different mission titles, (set through FRED), you won't be able to notice the difference in tech room because the mission name and file name are the same. Only when you play it, you'll see your fixes/changes applied.
And if you have NewMission.fs2 in data subfolder and OldMission.fs2 in any vp, FSOpen will actually load them both. And unless you change the campaign file, OldMission.fs2 will still be the only one used in that campaign. NewMission.fs2 will only be available as single mission.
Although a bug can always happen, it's really strange that a bug like that hasn't been noticed before. If it were me who thought about FSOpen loading priority failing, I would probably recheck TEN times that I wasn't doing anything wrong myself.
-
You can't tell unless you change the title or actually play the mission. When you make an obvious change and you go into the simulator and the change isn't there, you rename the file and then it is, what conclusion would you draw? Weird thing is I still have a bunch of missions files with "a" added to the end. I was doing that to get so it wouldn't grab the one out of the .vp file.
-
CFILE figures out what is present on game load. If you had FRED and FS2_Open running at the same time and only saved your mission to the folder after FS2 was running you'd see exactly what you describe until you restarted the game.
It's only if the mission files already exist in Data\Missions that you can save them and have it work. Otherwise as far as the game is concerned the folder is empty.
-
CFILE is actually supposed to always hit the disk when looking for new files for certain locations, such as: /data, /data/cache, /data/players/*, /data/multidata, /data/missions. But that is restricted to the default path only, so if you are using a mod then it will only physically check in those locations under that one moddir. It will also always hit the disk if you are looking in one specific location (like it should for loading model textures, pilot files and a couple of other little things). If it isn't doing that properly then it is actually a bug.
Of course, it will still cache files in those locations as well, so if you delete a file later on while the game is running, the game will still think that it's there and try to use it. That's probably one of the bigger problems with the CFILE code, with the cache vs. disk issue not really being a problem if you are basically aware of how the game looks for things.