User Tools

Site Tools


modding:xml:missiontype

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
modding:xml:missiontype [2017/01/31 22:22] – Fixed links to functions xephyrmodding:xml:missiontype [2017/02/07 01:26] (current) – [Mission Lifecycle] 0xabcdef
Line 5: Line 5:
  
 ==== Mission Lifecycle ==== ==== Mission Lifecycle ====
-To create a mission, the developer should call [[modding:function:msncreate|msnCreate]] with the UNID of the MissionType to create and the owner object. Missions are generally associated with an //owner// object (such as a station) which gives the mission and the reward on completion. When created, the OnCreate event is called on the MissionType. The event should gather all the information necessary to describe the mission (for example, it may pick a target for the mission) and store information as data in the mission object. If for some reason, the mission cannot be created (e.g., imagine that a proper target could not be found), the code should call msnDestroy inside of OnCreate. You may also register notification events with functions such as [[modding:function:msnRegisterForEvents]] and [[modding:function:msnAddRecurringTimerEvent]].+To create a mission, the developer should call [[modding:function:msncreate|msnCreate]] with the UNID of the MissionType to create and the owner object. Missions are generally associated with an //owner// object (such as a station) which gives the mission and the reward on completion. When created, the OnCreate event is called on the MissionType. The event should gather all the information necessary to describe the mission (for example, it may pick a target for the mission) and store information as data in the mission object. If for some reason, the mission cannot be created (e.g., imagine that a proper target could not be found), the code should call msnDestroy inside of OnCreate. You may also register notification events with functions such as [[modding:function:msnRegisterForEvents]], [[modding:function:msnAddTimerEvent]], and [[modding:function:msnAddRecurringTimerEvent]]. These functions work on any mission, even on those that are already completed.
  
 When first created, a mission is //open//. An open mission is a mission that has been defined (e.g., a target has been chosen) and is available for the player to accept. You may obtain a list of open mission with the [[modding:function:msnFind]] function. For example: When first created, a mission is //open//. An open mission is a mission that has been defined (e.g., a target has been chosen) and is available for the player to accept. You may obtain a list of open mission with the [[modding:function:msnFind]] function. For example:
Line 43: Line 43:
  
 **failureAfterOutOfSystem=** This optional parameter specifies that the mission should fail after the given number of ticks spent outside the original mission system. For example, specifying 1,800 for this parameter causes the mission to fail if the player leaves the system and doesn't return for 1,800 ticks (one real minute). By default, a mission does not fail when leaving the system. **[apiVersion 13]** **failureAfterOutOfSystem=** This optional parameter specifies that the mission should fail after the given number of ticks spent outside the original mission system. For example, specifying 1,800 for this parameter causes the mission to fail if the player leaves the system and doesn't return for 1,800 ticks (one real minute). By default, a mission does not fail when leaving the system. **[apiVersion 13]**
 +
 +**forceUndockAfterDebrief=** Optional, false by default. If set to **true**, the player is forced to undock after the debrief screen is shown.
  
 **level=** If present, this represents the system level(s) for which the mission is appropriate. You may specify either a single number or a range (e.g., "1-5"). This value is used when looking for missions using **typFind**; that is, you may use level queries in typFind to select missions of a given level. **[apiVersion 23]** **level=** If present, this represents the system level(s) for which the mission is appropriate. You may specify either a single number or a range (e.g., "1-5"). This value is used when looking for missions using **typFind**; that is, you may use level queries in typFind to select missions of a given level. **[apiVersion 23]**
Line 49: Line 51:
  
 **noDebrief=** If set to **true** then the mission completes after a call to msnSuccess or msnFailure. That is, there is no need to call msnReward or msnSetProperty (to set the debriefed flag). Use this option when the player does not need to return to the original station that gave out the mission. **[apiVersion 13]** **noDebrief=** If set to **true** then the mission completes after a call to msnSuccess or msnFailure. That is, there is no need to call msnReward or msnSetProperty (to set the debriefed flag). Use this option when the player does not need to return to the original station that gave out the mission. **[apiVersion 13]**
 +
 +**NoDecline=** If set to **true** then the player cannot decline the mission.
  
 **noFailureOnOwnerDestroyed=** If set to **true** then the mission continues even if the object that issued the mission is destroyed. **noFailureOnOwnerDestroyed=** If set to **true** then the mission continues even if the object that issued the mission is destroyed.
modding/xml/missiontype.1485901364.txt.gz · Last modified: 2017/01/31 22:22 by xephyr