View Single Post
Old 02-04-12, 10:26 PM   #11
peabody
Admiral
 
Join Date: Jan 2008
Location: New York State, USA
Posts: 2,390
Downloads: 126
Uploads: 7
Default

Fitzcarraldo

Chapter II

Ok, now we (actually You) will create the Career Start and Flotilla for the base you created. If you had any problems, post the file and I can check them.

I usually start with the CareerStart.upc but I will start with the Flotillas.upc so it makes more sense. I will post the entry then explain it (I may even lie a little bit on the parts I don't know...)
You will be working with notepad to do this, some word processors add formatting information that can cause problems. Also, if you don't know, adding a semicolon ; at the beginning of a line tells the game to ignore the line.

Open Flotillas.upc and scroll to the bottom. You will see the last Flotilla is Flotilla 7, so New London will be Flotilla 8. I will put the comments at the end of the code so you can copy/paste if you want. To create it I did a copy/paste of another Flotilla and made the necessary changes, which is what you should do, so you will see how it is done.
I am also only putting in one sub and one mission to make it easier to understand, you can add more by seeing how the others are set up.

;************************************************* ******
;*********NewLondon******************************* ********

[Flotilla 8]
ID= NewLondonCommand
NameDisplayable= Sub Base New London
AvailabilityInterval=NULL, NULL


[Flotilla 8.Base 1]
ID= NewLondon
NameDisplayable= Groton, Ct
Info= Sub Base New London
ExternalBaseName=New London
AvailabilityInterval= NULL, 1945-12-31
DepartureDescription1= -8650307, 4961550, 256.779 ; Enum of available points, choose one randomly each time a patrol is started
;DepartureDescription2= -18954874, 2563059, 46.252201
DepartureDescriptionOut1= -8649880, 4957245, 180 ; Enum of starting points for when the player selects the option to start outside the base

[Flotilla 8.UserPlayerUnitType 1]
ID= F8Porpoise
NameDisplayable= Porpoise class
AvailabilityInterval= NULL, 1944-11-11
IDLinkUserPlayerUnitType= Porpoise
UnitTypeCommonality= 1 ; to be used when a random choice is assigned
IDFlotillaLinkTransferTo= PearlHarborCommand ; when the flotilla is disbanded, the subs of this type are transferred to this one. If NULL then submarine assigned to training -> desk job or reassignment

[Flotilla 8.UserPlayerUnitType 1.Objective 1]
ID= NL8Obj1
NameDisplayable= Empire Waters
AvailabilityInterval=1941-12-06, 1941-12-31
ObjectiveCode= JapanSouth

;*****end of New London**********

Explanations:
1.
;************************************************* ******
;*********NewLondon******************************* ********

Notice the ; at the beginning of the lines. Added these so you can easily find the Flotilla if it is in the middle of the file instead of the last one, and the game ignores those lines because of the ;
1. [Flotilla 8] The number of the Flotilla, when adding one just use the next number in line.
2.ID= NewLondonCommand- This is important, it is the link from CareerStart to the Flotilla and must match the entry in CareerStart.upc.
3. NameDisplayable= Sub Base New London - Name that shows at points during the game. (It is actually Naval Submarine Base New London)
4. AvailabilityInterval=NULL, NULL- Obviously the time it is available as a Flotilla, you can put dates. NULL,NULL is always.

Next section is the Base:
[Flotilla 8.Base 1]
Tells the game it is the first Base in Flotilla 8. If you look in the stock files for the Asiatic Fleet (FremantleCommand) you will see there are 3 bases. When the first base, Manila, is captured by IJN they move to Surabaya. When that is captured they move to Fremantle. So there can be more than one base to a Flotilla.
ID= NewLondon An ID for the game to keep track of things.
NameDisplayable= Groton, CT The is what you see at the beginning of the game when you start at a base. "Report to Groton, Ct no later........" The base is actually in Groton which is the east side of the river and the mailing address, New London is on the west side of the river. If you want to use "New London, CT. go ahead, it will not cause any problems.
Info= Sub Base New London Actually should point to a Localization file for the info and we can set that up properly, didn't want to overload you. The info should tell that it is a Training facility and was the first Sub base. We can fix that later.
ExternalBaseName=New London IMPORTANT this is the Name you gave the base in the mission editor in the box, "Unit New Name" and must match.
AvailabilityInterval= NULL, 1945-12-14 - Obvious
DepartureDescription1= -8650307, 4961550, 256.779 - this is the start point IN port that you wrote down the numbers for. First number is lng second is lat, third is heading for the sub. Just enter the numbers you wrote down, they will not match mine.
;DepartureDescription2= -18954874, 2563059, 46.252201 - This is for a second departure that the game can select at random, I just put a ; so the game would ignore it. You can use it by getting another set of numbers, you can put a semicolon to ignore it, or you can delete it.
DepartureDescriptionOut1= -8649880, 4957245, 180 - Notice this one adds the work Out, so it uses the numbers you wrote down to start outside the base when you select that option at the beginning of your mission.

Next section the subs:
[Flotilla 8.UserPlayerUnitType 1] This is the section to define the subs, I only used one to keep it simple, easy to understand and easy to find mistakes.
ID= F8Porpoise The ID of the sub and is linked to from CareerStart.upc.

NameDisplayable= Porpoise class
AvailabilityInterval= NULL, 1945-12-11
IDLinkUserPlayerUnitType= Porpoise

Can be copied from other Flotillas and is standard to link to the sub. If you build a custom sub then they would be different, the IDLinkUserPlayerUnitType is taken from the submarinename.upc file in the Submarine folder.
UnitTypeCommonality= 1 This I have no idea, I never got an answer to what this does, There is also a Flotilla commonality in the careerstart that I do not understand.
IDFlotillaLinkTransferTo= PearlHarborCommand I do not know if this even works, I know this is not used if the base is captured, that is where the Base1, Base2 etc that you see in the Asiatic fleet I mentioned before, is used, not this.

Ok that is the end of this section only because I put in ONE sub to keep it simple. You can add more if you want. You just have to watch the dates and make sure the sub is available on that date. That info is in the subs.upc file.
If you put more subs in CareerStart (the next section to explain) then you will need to continue the numbering.
[Flotilla 8.UserPlayerUnitType 1]
ID=F8Porpoise
........
[Flotilla 8.UserPlayerUnitType 2]
ID=F8Tambor
..........
[Flotilla 8.UserPlayerUnitType 3]
ID=F8Gar


Now the Objectives section

I just put in an objective that you can't even do, it is too far away. But I thought you would be writing your own missions to do. For information this is how it is set up:
[Flotilla 8.UserPlayerUnitType 1.Objective 1] This still Flotilla 8, the sub is userplayerunitType 1 because the Porpoise is the first one, and the objective is number one. So if you made three missions for the Porpoise they would be numbered:
[Flotilla 8.UserPlayerUnitType 1.Objective 1]
[Flotilla 8.UserPlayerUnitType 1.Objective 2]
[Flotilla 8.UserPlayerUnitType 1.Objective 3]

then if you added a second sub the unittype would change:
[Flotilla 8.UserPlayerUnitType 2.Objective 1]
[Flotilla 8.UserPlayerUnitType 2.Objective 2]
[Flotilla 8.UserPlayerUnitType 2.Objective 3]

So that would give you 3 objectives for the first sub and three for the second sub.

ID= NL8Obj1
Again an ID for the game to keep track of stuff, usually numbered to be easily understood. The would be New London, Flotilla 8, objective1
NameDisplayable= Empire Waters
AvailabilityInterval=1941-12-06, 1941-12-31
ObjectiveCode= JapanSouth
IMPORTANT Objective Code is used by the game to pick a mission using a line in the PatrolObjectives called AllMatch= So the game would only pick available missions that use AllMatch=JapanSouth. That is how you limit what missions are assigned. So if you write training missions from New London and save them, add them to the PatrolObjectives.cfg file you could use AllMatch=NLTraining and in the Flotilla file you would use ObjectiveCode=NLTraining.

One more note before we go to CareerStart.upc. Missions are assigned to your sub when you ENTER port, not when you leave. So if you have training missions near New London and then transfer to Pearl Harbor you take your mission with you. So you will have a training mission near New London but your sub will be in Pearl Harbor. That leaves you three choices: Go through the Panama Canal to do the mission, ignore the mission and go where you wnat OR do what Ducimus did. He wrote 3 training missions and when you finished the last one there was a message to RTB and transfer to Pearl Harbor, and the fourth mission is near Japan, so as you enter New London to transfer you get assigned that one.

Whew, a lot of talk for so few lines.... Now on to CareerStart.upc, again I will post the code then explain what I can. But before I do that you should fix one line in the Careerstart.upc in RSRDC TMO 502:
At the top of the file is this:
[CareerStart 1.Flotilla 2]
ID= C2Flotilla2

Remember I mentioned they are number so they make sense and are easy to locate? Well this is Career 1 Flotilla 2 but the ID is numbered for Career 2 Flotilla 2, so change it to ID= C1Flotilla2. There is no ID conflict now since there is no other C2Flotilla2 but if you happen to add one it MAY cause a problem. I am not sure but it is an easy fix.

Now this has very few lines and what I did is add a Flotilla to [CareerStart 1] so you can select New London from the beginning of the Campaign. I didn't make it a separate "New Construction" for two reasons, one so you can start at the very beginning without a lot of hassle in writing it, and New London did not build submarines. It can be changed easily if you want to do it, but here is how it is now.

At the very top of the file you have:
[CareerStart 1]

[CareerStart 1.Flotilla 1]

[CareerStart 1.Flotilla 2]

;+++++++++++++++++++++++++++


Above the ;+++++++++++++++ add this:

[CareerStart 1.Flotilla 3]
ID= C1Flotilla3
NameDisplayable= Sub Base New London
IDLinkFlotilla= NewLondonCommand
IDLinkUserPlayerUnits= F8Porpoise, 3
FlotillaBriefingText= ; seems to have no function
FlotillaCommonality= 1

So we are adding the New London Flotilla to [CareerStart 1] So when you start the game and get to the menu you can select Sub Base New London on Dec 6th, 1941. There willl be three choices:
Pearl Harbor
Manila
Sub Base New London

Now explaination:
[CareerStart 1.Flotilla 3] Adding a new Flotilla to the first Career Start.
ID= C1Flotilla3 again an ID for the game to keep track of stuff.
NameDisplayable= Sub Base New London This is what will show in the menu to select a base when starting the game. (If you want you can change it to "New Contruction 41" if that is what you want.
IDLinkFlotilla= NewLondonCommand IMPORTANT this links to the ID in the Flotilla file and it must match:
[Flotilla 8]
ID= NewLondonCommand

IDLinkUserPlayerUnits= F8Porpoise, 3 IMPORTANT This is where I see some mistakes by beginners. If you remember in the Flotilla file we numbered the subs using F8Porpoise because it was Flotilla 8 and we wanted to keep the numbering correct. If you look at the this file it is called [CareerStart 1.Flotilla 3] so why isn't the sub F3?
Because it is a link to the sub we want to use, which is F8Porpoise NOT F3Porpoise. If you put F3Porpoise here it will crash the game before you even start to play. That is one reason I did the Flotilla file first, to show you why this is F8Porpoise and NOT F3.

FlotillaBriefingText= ; seems to have no function I think this comment may have been added by Ducimus, it is not commented in the stock files.
FlotillaCommonality= 1
Again I don't know

Now like I said before I only put in one sub so you can try it make sure it works and then by looking at the other entries you can add more subs
For the Career Start it would look like this:

IDLinkUserPlayerUnits= F8Sboat, 5, F8Porpoise, 7, F8Salmon, 4, F8Sargo, 8

commas after each but no comma at the end, just remember they are F8 NOT F3.


In the Flotillas.upc add an entry for each sub and Objectives for each sub. You can look at another flotilla to see how it is set up.

If you get this working I can fix the line for info and show you how to put it into the localization file. Easier than what we just did. It is the info that shows on the Transfer paper when you select the phone to transfer.

I hope this helped. I am not sure how much you already knew, but I hope it was a help.
I think you should try it to learn how it is done, but if you do have problems I can send my NewLondon MOD to you, but that is the easy way out.

I will not be responsible for any exploding computers or computers being thrown out of windows. I should read this over to see if there are any typos, but I'm tired. Any questions let me know, I will help with what I can, which isn't much.

Peabody
__________________

System Spec: Gigabyte GA-965P-DS3, PentiumD Dual Core Presler 945 3.4Ghz, Gigabyte Geforce 7600GS, 2-1GB Corsair XMS2 800Mhz in Dual Channel, 2-WD 250 SATA 3Gb/s, Onboard Realtek HD 7.1 Audio, DVD ROM, DVD burner, Hiper 580 Watt Power supply, WinXP SP2.


Last edited by peabody; 02-20-12 at 06:29 AM.
peabody is offline   Reply With Quote