View Single Post
Old 01-28-19, 12:58 PM   #6
propbeanie
CTD - it's not just a job
 
propbeanie's Avatar
 
Join Date: May 2016
Location: One hour from Music City USA!
Posts: 9,749
Downloads: 439
Uploads: 2


Default

Warning Will Robinson - Warning - Verbose explanation ensues!

OK, so you're ready to integrate the mission file into the Campaign. One reason they don't mention the Campaign too much in that pdf is because it is rather complex, and subject to all sorts of approaches. We'll have you do the "easy" way here.

First, copy the "Game / Data / Campaigns / Campaign / Campaign_SCR.mis" file, a put the copy in a "Game / MODS / YourMod / Data / Campaigns / Campaign /" folder path. "YourName" being whatever you want it to be. We'll work with the copy.

Look at your SingleMission file in a text editor first, and see where your submarine is listed. You want it to be listed last. If you have sixteen units you are adding, you want the submarine to be #17. We'll try to change that with the ME. Using SH3 Mission Editor, open your mission file with the new units in it. Zoom in to where you can see them reasonably well, including your submarine. If your submarine is not the last unit in the scenario, click to select it, and delete it with the <Delete> key. Use the ME menu and add back in another submarine, with one waypoint. Make it user-playable. Save the file to your "Game / MODS / YourMod / Data / Campaigns / Campaign /" folder. Hopefully, that will change the listing numbering.

Now use the "File", "Merge..." menu options. This will bring up a "Merge Confirmation" dialog box. Make certain that the tick box for "Mark merged date as saveable" is empty. You do NOT want to save the merged data yet. Click on "[ OK ]", and that will open a File Open dialog. Choose your Campaign_SCR.mis file copy. It might take a few shakes for that to open. Make any adjustments needed to your units only (the Campaign_SCR is NOT saveable in this set-up). If desired, you could also "Merge..." the Campaign_RND.mis file from the Game / Data / Campaigns / Campaign folder to be certain your new units are out of the way. But again, be certain that the tick box is empty for "Mark merged data as saveable". If you have very many WayPoints associated with your submarine, it would be best to remove all but one of them. When you are satisfied with where your Units are placed, click "File" and "Save (Normal Mission) As..." and save it to the same "Game / MODS / YourMod / Campaigns / Campaign /" folder as the Campaign_SCR.mis copy is. If you don't have to make any edits, do that "Save As" anyway. You want a copy of the file in there, to keep your original mission file "safe".

Using the SH3 Mission Editor again, now open the Campaign_SCR.mis file copy first this time (the one in the Game / MODS / YourMod / Data / Campaigns / Campaign folder) and once it's open, again use "File" and "Merge...", only this time, place a check mark in the tick box for "Mark merged data as saveable". This is what will integrate your mission into the Campaign_SCR file. Click "OK". In the File Open dialog, chose your mission file in that same MODS folder path. Zoom in and make certain your Units are in there correctly still. Now open the "Mission" and "Parameters" menu choice, and be certain your dates are correct for the game, which would be Start Date Year: 1939, Month: 1, Day: 1, and Start Time Hour: 12 Minute: 0. Click "Accept" there. Click on the Save button on the toolbar. This will combine the two files into one.

You still have to do one more thing though, and that is remove your submarine from the file. So open it in the text editor of your choice (Notepad works fine, but you could also try Notepad++ or 010 Editor. You have to pay for the 010 Editor, but it does lots more than text editing.). There are quite a few Units in there, and at the end of that list is the OrdnanceUnits, so it'd be easier to "Search" to find your sub. Press and hold the <Ctrl> button, and while holding it, press the <F> button. You should get a "Search" dialog in your text editor. Search on "Type=200" (without the quote marks, of course), and you should find your submarine. It would look similar to this:
[Unit 1943]
Name=MySub
Class=SSTypeVIIC
Type=200
Origin=German
Side=0
Commander=1
CargoExt=-1
CargoInt=-1
CfgDate=19420101
DeleteOnLastWaypoint=false
DockedShip=false
GameEntryDate=19420215
GameEntryTime=100
GameExitDate=19430903
GameExitTime=0
EvolveFromEntryDate=false
Long=-715165.000000
Lat=4336900.000000
Height=0.000000
Heading=276.582001
Speed=9.000000
CrewRating=4
DelayMin=0
ReportPosMin=-1
ReportPosProbability=100
RandStartRadius=0.000000
NextWP=0

[Unit 1943.Waypoint 1]
Speed=14.000000
Radius=0.000000
Loop=-1
LoopProbability=100
Long=-718965.000000
Lat=4334900.000000
Height=0.000000
Whatever Unit number is associated with your submarine, it all has to be deleted, which in this case is 38 lines of data, from "[Unit 1943]" to "Height=0.000000" in the Waypoint 1 section. If you have more waypoints, they all have to be removed also. You cannot have a Player sub in the campaign files. If you have other Units and WayPoints after the player sub, you will have to renumber them all in sequence. Once you have that done, "Save" the file where it is in the "Game / MODS / YourMod / Campaigns / Campaign" folder. Now remove all other files from that folder. Leave only the "Campaign_SCR.mis" file. If desired, <Ctrl><X> the others, and then <Ctrl><V> them somewhere else for safe-keeping, in case I steered you wrong here... Now activate your mod with JSGME, and go try to find your Units in a Career Start.

The "Mark merged data as saveable" is what does the trick here. It will take the original Campaign_SCR.mis file, and add the SingleMission file you had of before to it, sequentially. Automatically renumbering your Units and their WayPoints for you, which is why you'll find your submarine so far down the list of units, since you added the SingleMission last. I just used the #1943 as an example. It may well be further down than that, all dependent upon how you built your original mission. It's easiest if you add your submarine to the SingleMission last for when you go to do this type of edit with the ME. If you don't, then you have to renumber things in the text editor, which can be a bother. "Search and Replace" in a text editor can be your friend there. The SH4 Mission Editor is a lot easier to work with, since it has an "Ignore player sub" choice in the Parameters, and you can delete the sub before saving, or just build the file from the get-go without one. I am definitely more familiar with its use than SH3's. If I did you wrong, let me know, and we'll try to "talk" you through it...
__________________

"...and bollocks to the naysayer/s" - Jimbuna

Last edited by propbeanie; 01-28-19 at 01:08 PM. Reason: wow - who typed this??
propbeanie is offline   Reply With Quote