The Ship Single-Player: Adding a Mission to a Map
Jump to navigation
Jump to search

Note:For the sake of this article,
Note:The only file in
This article is an orphan, meaning that few or no articles link to it.
You can help by
adding links to this article from other relevant articles.
January 2024
You can help by
January 2024
MODDIR represents your mod's directory name.Examples
Download this example mission to see examples of what it takes to make a mission.
scripts that's worth noting is scripts/sp/mission_obj.txt.Creating the Script
Before adding a mission to a map, you must add it first to scripts/sp/mission_obj.txt. The following is a short example of what goes in this file. Remember to add all referenced localized strings to resource/MODDIR_english.txt (and/or other languages).
// Template Mission Objective Definition:
// (use this to create new objectives in this file)
//
// ============================
// "SP_Mission_<mis_num>"
// {
// "SP_Mission_<mis_num>_Obj_<obj_num>_<obj_name>"
// {
// "text" "#sp_mission<mis_num>_obj<obj_num>"
// "hint"
// {
// "text" "<local token>"
// "time" "<time in secs after which to display>"
// }
// }
// }
// ============================
"Missions"
{
"SP_Mission_1_KillQuarry"
{
"SP_Mission_1_Obj_1_KillQuarry"
{
"text" "#sp_mission1_obj1"
"hint"
{
"text" "sp_mission1_hint2"
"time" "10"
}
"hint"
{
"text" "sp_mission1_hint1"
"time" "30"
}
}
"SP_Mission_1_Obj_2_TalkToBellboy"
{
"text" "#sp_mission1_obj2"
}
}
}
Adding It to a Map
Create a ship_mission entity for each objective in the mission.
- The entity should be given a targetname that corresponds to its mission number and objective number.
- Be sure to set the
missionandobjectivekeyvalues correctly to the name of the entry in the missions file. - The
hud_locationkeyvalue should be set to the ship_trigger_room the objective can be completed in. - If there is to be no image to represent the objective, leave the
hud_modelkeyvalue blank. Otherwise, the keyvalue should be set to an entry inscripts/hud_textures.txtandresource/MODDIR_english.txt(and other languages) that represents the target person/object for the objective.- See
scripts/hud_textures.txtinthe ship common.gcfandscripts/ship_sp_english.txtinthe ship single player content.gcffor examples.
- See
- When the entity gets the
OnCompletedoutput, it should either trigger theEnableinput on the next ship_mission entity or a choreographed scene that triggers theEnableinput. - When the entity gets the
OnFailedoutput, it should trigger theTriggerinput on a logic_relay entity that will reset the map to the start of the mission. Decompilemaps/cotopaxi_sp.bspfor an example of what to do.