📂
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
  • Agent [Type]
  • Relevant methods and properties
  • Relevant boolean properties
  • Tips
  • Agent [Class]
  • Nested Enums

Was this helpful?

  1. C# API Documentation
  2. Mount And Blade

agent

Work In Progress by Watikita, V1.1

Agent [Type]

你可以把媒介(agent)想象成游戏里任何能走动的实体。

比方说可以是玩家,NPC,甚至是一匹马。

Relevant methods and properties

Syntax

Return Type

Does What?

Available Values/Extensions

Example

unit.Age

public float

Get/Set the age of the agent

N/A

float age = unit.Age

unit.AgentRole

public AgentRole

Get/Set the role of the agent

I have no idea.

I have no idea.

unit.Scale

public float

Get the scaling factor of the agent

N/A

float scale = unit.Scale

unit.AIStateFlags

public AIStateFlag

Get or sets the [state flag] of the AI

Alarmed, Cautious, Guard, None, Paused

unit.AIStateFlags = Agent.AIStateFlag.Alarmed

unit.AttackDirection

public AttackDirection

Get the direction the Agent is attacking towards

Top, Left, Down, Right

unit.Character

public BasicCharacterObject

Used to link between Hero.MainHero and the player Agent

[unit.Character]

unit.ClearAttachedWeapons

public void

Clears the weapons attached to the Agent

N/A

Method

unit.ClearAttachedEquipment

public void

Clears the equipment attached to the Agent

N/A

Method

unit.ClothingColor1

public Color

Gets the clothing color of the agent

N/A

I have no idea.

unit.Controller

public Contorller

Get/Set the controller of the agent

Player, AI

I have no idea.

unit.CrouchMode

public bool

Returns true if the agent is crouched

N/A

bool crouch = unit.CrouchMode;

Relevant boolean properties

Tips

  • You can get the player agent through the Agent.Main property (assuming they are alive).

Agent [Class]

The agent class is the class used to access the universal types of properties that all Agents have.

Nested Enums

Name

Type

Contains / Does

Arguments/Enum listings

Tips

Agent.AiStateFlag

Enum

A set of all available State Flags

Alarmed, Cautious, Guard, None, Paused, UseObjectMoving, UseObjectUsing, UseObjectWaiting

Agent.ControllerType

Enum

A set of all available Control Types, if control type is player the agent is player-controlled

AI, Count, None, Player

Can be also use with Agent.Main.ControllerType to set to player controller

Agent.CreationType

Enum

A set of all available Creation Types, only use is finding Horses afaik

FromCharacterObj, FromHorseObj, FromRooster, Invalid

Agent.KillInfo

Enum

A set of information related to how an Agent was killed, should dedicate an entire section

ALL weapon types, each has their own listings that return strings/ints

Agent.GuardMode

Enum

A set of all the defensive directions one could guard from

Top, Left, Down, Right

Agent.UsageDirection

Enum

A set of all directions and actions one could use do any held item.

AttackAny, AttackTop, AttackLeft, AttackCenter, AttackDown, AttackRight, DefendAny, DefendTop, DefendLeft, DefendCenter, DefendDown, DefendRight

PreviousMBSubModuleBaseNextTeam

Last updated 4 years ago

Was this helpful?