📂
Bannerlord Modding CN
  • 骑马与砍杀2 领主 Mod 制作文档
  • C# API Documentation
    • Core
      • MBObjectManager
      • GameModel
      • InformationManager
      • BasicCharacterObject
      • Game
      • ItemObject
    • Campaign System
      • GameMenu
      • Settlement
      • CampaignGameStarter
      • actions
        • ChangeOwnerOfSettlementAction
      • TournamentGame
      • Hero : MBObjectBase, ITrackableCampaignObject, ITrackableBase
      • CampaignBehaviorBase
    • Mount And Blade
      • MissionBehaviour
        • MissionView
        • MissionLogic
      • MBInitialScreenBase
      • Mission
      • MBSubModuleBase
      • agent
      • Team
    • Input System
      • Input
    • Engine
      • GlobalLayer
      • ScriptComponentBehaviour
      • Scene
      • GameEntity
    • Library
      • ModuleInfo
    • Platform Service
    • Save System
    • Localization
      • MBTextManager
      • TextObject
    • Network
    • Two Dimension
  • XML Documentation
    • NPCCharacters
      • NPCCharacter(NPC角色)
        • upgrade_targets
          • upgrade_target
        • equipmentSet
          • equipment
        • Face
          • BodyProperties
          • hair_tags
            • hair_tag
          • BodyPropertiesMax
          • beard_tags
            • beard_tag
          • face_key_template
        • equipment
        • skills
          • skill
        • Traits
          • Trait
    • 物品(大类) Items
      • 物品 Item
        • 物品组件 ItemComponent
          • 马匹 Horse
            • Materials
              • Material
                • MeshMultipliers
                  • MeshMultiplier
          • 防具 Armor
          • Weapon
            • WeaponFlags
          • 食物 Food
        • 旗帜 Flags
      • CraftedItem
        • Pieces
          • Piece
    • Items (XML)
    • Scenes
      • Scene
        • GameType
        • TerrainType
          • TerrainType
    • SPCultures (XML)
    • SPCultures
      • Culture
        • female_names
          • name
        • male_names
          • name
        • clan_names
          • name
    • Atmosphere (XML)
    • SubModule (XML)
    • Scenes (XML)
    • NPCCharacters (XML)
  • Gauntlet
    • Brush
    • GauntletLayer
    • GauntletMovie
    • SceneLayer
    • Movie (XML)
    • Widget
    • GauntletView
    • ScreenBase
    • ViewModel
    • ScreenManager
  • Introduction
    • 高级用法
    • 开始第一步
    • 文件夹结构
    • Defining custom data
  • Tutorials
    • 将你的mod打包上传至Vortex
    • Making Banners
    • 不需要C#的UI系统Mod入门 #
    • 基本 C# Mod
    • new_settlements
  • ru
    • _intro
      • Начало
      • Структура папок
Powered by GitBook
On this page

Was this helpful?

  1. C# API Documentation
  2. Mount And Blade
  3. MissionBehaviour

MissionLogic

PreviousMissionViewNextMBInitialScreenBase

Last updated 4 years ago

Was this helpful?

MissionLogic is an abstract class that inherits . In addition to several additional callbacks, mission logics also have overridable methods that affect the logic of mission.

Callbacks

  • AccelerateHorseKeyPressAnswer() - Seems to be a deprecated callback. Use of this is not recommended.

  • OnBattleEnded() - Called when player chooses to leave a mission with battle before it ends naturally.

  • OnMissionResultReady(MissionResult) - Called when a mission is complete and MissionResult is created. Note that this is called before ShowBattleResults.

    • MissionResult - Calculated mission result data.

  • OnRetreatMission() - Called when player retreats from a mission. Currently, missions with battle and arena missions seem to be missions where a player can retreat.

  • ShowBattleResults() - Called when a mission is complete and timer for the end mission call starts. This is called before end of mission callbacks.

    Overrides

  • bool IsAgentInteractionAllowed() - Called to determine if agents are interactable. Return true to allow interaction. Note that all mission logics need to return true for the end result to be true.

  • bool IsOrderShoutingAllowed() - Called to determine if order voices are allowed. Return true to allow voices. Note that all mission logics need to return true for the end result to be true.

  • bool MissionEnded(ref MissionResult) - Can be overrided to determine end of a mission. This is called every mission tick in additional to state based checks. Return true to trigger mission end. Note that only one mission logic returning true would be enough and first mission logic returning true would determine the MissionResult.

    • MissionResult - MissionResult instance to store result data. This parameter is passed with ref keyword.

  • InquiryData OnEndMissionRequest(out bool) - Called when player wants to leave the mission. An InquiryData can be returned to show a confirmation box. Note that the first non-null InquiryData returned by a mission logic will be shown and this callback won't be called for the rest.

    • bool - Determines if the player can leave the mission. This parameter is passed with out keyword. Set as true if the player can leave. Note that first mission logic setting it to false will prevent player from leaving and this callback won't be called for the rest.

MissionBehaviour