Difference between revisions of "Setting up a campaign file"
CommanderDJ (talk | contribs) (→Available missions) |
Goober5000 (talk | contribs) (→Mission options: add Debriefing Persona Index) |
||
(5 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | In ''FreeSpace'', '''campaigns''' are stored in text-based *.fc2 files. Setting up a campaign can be done in two ways: in FRED's Campaign Editor (SHIFT-C in retail, and in | + | In ''FreeSpace'', '''campaigns''' are stored in text-based *.fc2 files. Setting up a campaign can be done in two ways: in FRED's Campaign Editor (SHIFT-C in retail, and in very old FreeSpace Open builds) or in a conventional text editor like Notepad. |
This article will be about the '''Campaign Editor'''. | This article will be about the '''Campaign Editor'''. | ||
==Prerequisites== | ==Prerequisites== | ||
− | Before you start setting up your campaign, make sure that you have all the missions that you want to be in your campaign. Gradually adding new and new missions to a campaign file is not recommended | + | Before you start setting up your campaign, make sure that you have all the missions that you want to be in your campaign. Gradually adding new and new missions to a campaign file is not recommended for beginners. |
− | If you plan to include new, | + | If you plan to include new, non-retail ships in your campaign, make sure that they are in the table files already. Gradually attaching new and new user-made ships or weapons works on the same principle as adding new missions. |
− | Your missions and table files don't have to be final. You can modify both the mission and table files unpunished. ''FreeSpace'' campaign files only refer to missions and table entries, the contents of these files are unimportant | + | Your missions and table files don't have to be final. You can modify both the mission and table files unpunished. ''FreeSpace'' campaign files only refer to missions and table entries, the contents of these files are unimportant as far as the campaign files are concerned. However, if you rename anything, revise the campaign file, as it must reflect the most recent file names. Revising the campaign file in such a way is recommended in a text editor. See [[Editing a mission in a text editor]]. |
==The Campaign Editor== | ==The Campaign Editor== | ||
− | The Campaign Editor is accessed by pressing SHIFT-C in [[Portal:FRED|FRED]]. | + | The Campaign Editor is accessed through the Editors tab, or (in [[retail]]) by pressing SHIFT-C in [[Portal:FRED|FRED]]. |
Here is a list of what windows you see, and some explanations on what you can do with them: | Here is a list of what windows you see, and some explanations on what you can do with them: | ||
===Available missions=== | ===Available missions=== | ||
− | This is a list of all the missions that are within your missions folder. You can take missions from this window and put them into the right-side window by highlighting the mission you want, holding CTRL and clicking on the part of the campaign tree you want the mission in. If the missions that you are looking for aren't in this window, make sure you have the | + | This is a list of all the missions that are within your missions folder. You can take missions from this window and put them into the right-side window by highlighting the mission you want, holding CTRL and clicking on the part of the campaign tree you want the mission in. If the missions that you are looking for aren't in this window, make sure you have the appropriate mod selected in the Launcher and your missions are indeed in mymod/data/missions folder. If you put a mission into the right-side window, it will disappear from this list. If you remove a mission from the campaign's mission list, it will reappear in the Available Missions window. |
===Campaign name, type, description=== | ===Campaign name, type, description=== | ||
− | *''Campaign name'' is the name of the campaign | + | *''Campaign name'' is the name of the campaign in the Campaign Room. |
− | *''Campaign type | + | *''Campaign type'' can be single player, multiplayer cooperative, and multiplayer team. If you set your campaign to be single player, it will appear in the Campaign Room. If it's multiplayer, it will appear under the multiplayer campaigns tab in the Campaign Host window. |
− | *''Campaign description'' is the campaign's description | + | *''Campaign description'' is the campaign's short description in the Campaign Room. |
+ | |||
===Mission options=== | ===Mission options=== | ||
These options are by default grayed out. You can edit these options if you click on a mission that you already inserted into the right-side window. | These options are by default grayed out. You can edit these options if you click on a mission that you already inserted into the right-side window. | ||
*''Briefing cutscene'': You will not need these unless you want a cutscene be played before your mission. | *''Briefing cutscene'': You will not need these unless you want a cutscene be played before your mission. | ||
− | *''Main hall index'' | + | *''Main hall name'' (previously ''Main hall index'') is the identifier of the main hall to use when the player is at the selected mission. In current versions of FSO, this can be a name or a number; in older versions of FSO, this had to be a number; and in retail, this was a checkbox. When the ''FreeSpace 1'' or ''FreeSpace 2'' campaigns are loaded, 0 represents the ''Galatea'' (''FreeSpace 1'') or the ''Aquitaine'' (''FreeSpace 2''), and 1 represents the ''Bastion'' (''FreeSpace 1'') or the ''Psamtik'' (''FreeSpace 2''). |
+ | *''Debriefing persona index'': The number prefix to be used for the automatic, or persona-based, debriefing messages. For example, badge_a.wav is the file for the Ace debriefing message. In FS2, the debriefing persona index for the 70th Blue Lions missions is 9, so 9_badge_a.wav will be used in these missions. 9 is also the default debriefing persona index used when the campaign does not specify one. | ||
===Branches=== | ===Branches=== | ||
Line 64: | Line 66: | ||
*''End of Campaign'': Used to order the game to end the campaign. | *''End of Campaign'': Used to order the game to end the campaign. | ||
− | If you take a look at the Branches section (to the left), you will see that it now says: "Branch to xx" and, if you clicked on Add a Repeat Link, "Repeat mission." If you expand them, you will see that you can set up a SEXP tree there. This SEXP tree will tell under what conditions will the player be able to proceed in the campaign or forced to replay the mission. One of these trees must be set to [[true]]. This "true" link must also be the last in the list, otherwise your campaign won't run. In the example (look at the picture), the conditions to proceed in the campaign are set, and the repeat link is set to true. If you want to set the conditions under which the player is forced to replay the mission, your "Branch to xx" must be set to true. Neither method is superior to or more advisable than the other. It's a matter | + | {{note | For training missions, the conditions for advancing to the next mission must be set using goals and not events! The reason is that the Skip Training button marks all goals as complete and all events as failed. If the next-mission-condition is an event, it'll always end up false and thus the next mission will not be selected correctly. Well, technically I guess you could use events as long as if, when they're marked false, the player will advance to the next mission...}} |
+ | |||
+ | |||
+ | If you take a look at the Branches section (to the left), you will see that it now says: "Branch to xx" and, if you clicked on Add a Repeat Link, "Repeat mission." If you expand them, you will see that you can set up a SEXP tree there. This SEXP tree will tell under what conditions will the player be able to proceed in the campaign or forced to replay the mission. One of these trees must be set to ''[[true]]''. This "true" link must also be the last in the list, otherwise your campaign won't run. In the example (look at the picture), the conditions to proceed in the campaign are set, and the repeat link is set to ''true''. If you want to set the conditions under which the player is forced to replay the mission, your "Branch to xx" must be set to true. Neither method is superior to or more advisable than the other. It's a matter of preference. If there are two conflicting set of conditions, the one that is higher in the list will take place. (This is why the "true" tree must be last to eliminate the logical possibility that nothing would return a true value). | ||
==Editing in a text editor== | ==Editing in a text editor== |
Latest revision as of 01:07, 9 September 2024
In FreeSpace, campaigns are stored in text-based *.fc2 files. Setting up a campaign can be done in two ways: in FRED's Campaign Editor (SHIFT-C in retail, and in very old FreeSpace Open builds) or in a conventional text editor like Notepad.
This article will be about the Campaign Editor.
Contents
Prerequisites
Before you start setting up your campaign, make sure that you have all the missions that you want to be in your campaign. Gradually adding new and new missions to a campaign file is not recommended for beginners.
If you plan to include new, non-retail ships in your campaign, make sure that they are in the table files already. Gradually attaching new and new user-made ships or weapons works on the same principle as adding new missions.
Your missions and table files don't have to be final. You can modify both the mission and table files unpunished. FreeSpace campaign files only refer to missions and table entries, the contents of these files are unimportant as far as the campaign files are concerned. However, if you rename anything, revise the campaign file, as it must reflect the most recent file names. Revising the campaign file in such a way is recommended in a text editor. See Editing a mission in a text editor.
The Campaign Editor
The Campaign Editor is accessed through the Editors tab, or (in retail) by pressing SHIFT-C in FRED.
Here is a list of what windows you see, and some explanations on what you can do with them:
Available missions
This is a list of all the missions that are within your missions folder. You can take missions from this window and put them into the right-side window by highlighting the mission you want, holding CTRL and clicking on the part of the campaign tree you want the mission in. If the missions that you are looking for aren't in this window, make sure you have the appropriate mod selected in the Launcher and your missions are indeed in mymod/data/missions folder. If you put a mission into the right-side window, it will disappear from this list. If you remove a mission from the campaign's mission list, it will reappear in the Available Missions window.
Campaign name, type, description
- Campaign name is the name of the campaign in the Campaign Room.
- Campaign type can be single player, multiplayer cooperative, and multiplayer team. If you set your campaign to be single player, it will appear in the Campaign Room. If it's multiplayer, it will appear under the multiplayer campaigns tab in the Campaign Host window.
- Campaign description is the campaign's short description in the Campaign Room.
Mission options
These options are by default grayed out. You can edit these options if you click on a mission that you already inserted into the right-side window.
- Briefing cutscene: You will not need these unless you want a cutscene be played before your mission.
- Main hall name (previously Main hall index) is the identifier of the main hall to use when the player is at the selected mission. In current versions of FSO, this can be a name or a number; in older versions of FSO, this had to be a number; and in retail, this was a checkbox. When the FreeSpace 1 or FreeSpace 2 campaigns are loaded, 0 represents the Galatea (FreeSpace 1) or the Aquitaine (FreeSpace 2), and 1 represents the Bastion (FreeSpace 1) or the Psamtik (FreeSpace 2).
- Debriefing persona index: The number prefix to be used for the automatic, or persona-based, debriefing messages. For example, badge_a.wav is the file for the Ace debriefing message. In FS2, the debriefing persona index for the 70th Blue Lions missions is 9, so 9_badge_a.wav will be used in these missions. 9 is also the default debriefing persona index used when the campaign does not specify one.
Branches
It's also by default grayed out until you select a mission from the right-side window.
You can define which mission will follow the selected mission and under what conditions. You can also set the conditions under which the player must restart the mission. Details will be given in the section that discusses the right-side window.
There's a gray area below your Branches section. It's the Developer Notes (set in the Mission Specs Editor) of the selected mission. Developer Notes are used by mission makers to remind themselves of things they are about to implement, improve upon, etc.
Mission loop description, brief anim, brief voice
Loop missions are like the SOC ones in the Main FreeSpace 2 Campaign. The player can choose whether or not he wishes to complete some bonus missions or proceed with the main branch.
In order to gain access to the mission loop options, you must select the mission in the right-side window that precedes your loop mission and select a branch that activates your loop. To do that, you must have at least two other missions connected to the mission that you select.
- Mission loop description is the text that appears in the window the player is asked whether or not he wishes to participate in the loop mission. This is the window with the animated SOC logo in it.
- Mission brief anim is the animation file that will be played while the player is the aforementioned window. By default, this is the SOC logo.
- Mission brief voice is the WAV file that will be played when the player is in the aforementioned window. By default, there is no voice.
If the player presses Decline, he will proceed with the main campaign branch.
Setting up initial status
You can define which ships and weapons you want the player to have access to at the beginning of the campaign. If you test your campaign and have no weapons available, it is because you forgot about this feature.
This is not permanent, as you can easily make additional ships or weapons available using the allow-ship and allow-weapon SEXPs.
Checking for errors
You can access an in-built error checker by either pressing ALT-H or clicking on Other --> Error Checker. This is a very basic error finder. It will help you pinpoint some technical errors that will prevent your campaign from loading up.
The right-side window
This window is the "heart" of the Campaign Editor. You can define which missions will follow which one and under what conditions. Ideally, you had already dragged some missions into this window, with mission 2 being below mission 1 and mission 3 below mission 2, etc.
Click on the uppermost mission. First, you must set which mission will follow it. Tap your left mouse button and drag it above the mission that you want to follow your selected mission. If you can see a line draw between the two missions, you've been successful. Now select the first mission again. Right-clicking on it will bring up the following options:
- Remove mission: Removes the mission from the hierarchy. Missions that are removed from the hierarchy can be readded by dragging them from the Missions available section.
- Add a Repeat Link: Defines that under what conditions the player will be forced to replay the mission. From a gameplay perspective, every mission requires this. Otherwise the player can simply jump out at the end of the mission and proceed in the campaign.
- End of Campaign: Used to order the game to end the campaign.
If you take a look at the Branches section (to the left), you will see that it now says: "Branch to xx" and, if you clicked on Add a Repeat Link, "Repeat mission." If you expand them, you will see that you can set up a SEXP tree there. This SEXP tree will tell under what conditions will the player be able to proceed in the campaign or forced to replay the mission. One of these trees must be set to true. This "true" link must also be the last in the list, otherwise your campaign won't run. In the example (look at the picture), the conditions to proceed in the campaign are set, and the repeat link is set to true. If you want to set the conditions under which the player is forced to replay the mission, your "Branch to xx" must be set to true. Neither method is superior to or more advisable than the other. It's a matter of preference. If there are two conflicting set of conditions, the one that is higher in the list will take place. (This is why the "true" tree must be last to eliminate the logical possibility that nothing would return a true value).
Editing in a text editor
You can edit your campaign file in a conventional text editor like Notepad or WordPad to apply some minor changes like changing the main hall indices. Only more experienced FREDders are advised to edit their campaigns in such a way. For more details, see Editing a mission in a text editor
Tips and miscellaneous notes
- Most importantly: Don't forget to set up your campaign's list of allowed ships and weapons in the Initial Status window.
- After setting up your campaign file, your campaign will appear in the Campaign Room.
- Missions that are part of a campaign will not be available in the Mission Simulator unless they are completed in campaign mode.
- To test if your hierarchy works properly, jump out at the beginning of every mission. If you are not allowed to proceed, it's okay. Also complete only the necessary mission goals to see if you can proceed when you are indeed supposed to.
- Renaming mission files, Events, Mission Objectives, ships' or weapons' table entry names, and changing the order of your Events can compromise your campaign file's stability.
- If you start testing your campaign in campaign mode, changes applied to your campaign file will only take place if you restart your campaign by clicking on Reset Campaign in the Campaign Room. Altering your missions, however, will take effect immediately.