Table of Contents

Class ItemObject

Namespace
TaleWorlds.Core
Assembly
TaleWorlds.Core.dll
public sealed class ItemObject : MBObjectBase
Inheritance
ItemObject
Inherited Members

Constructors

ItemObject()

public ItemObject()

ItemObject(string)

public ItemObject(string stringId)

Parameters

stringId string

ItemObject(ItemObject)

public ItemObject(ItemObject itemToCopy)

Parameters

itemToCopy ItemObject

Fields

DefaultAppearanceValue

public const float DefaultAppearanceValue = 0.5

Field Value

float

MaxHolsterSlotCount

public const int MaxHolsterSlotCount = 4

Field Value

int

Type

public ItemObject.ItemTypeEnum Type

Field Value

ItemObject.ItemTypeEnum

Properties

Appearance

public float Appearance { get; }

Property Value

float

ArmBandMeshName

public string ArmBandMeshName { get; }

Property Value

string

ArmorComponent

public ArmorComponent ArmorComponent { get; }

Property Value

ArmorComponent

BannerComponent

public BannerComponent BannerComponent { get; }

Property Value

BannerComponent

BodyName

public string BodyName { get; }

Property Value

string

CollisionBodyName

public string CollisionBodyName { get; }

Property Value

string

Culture

public BasicCultureObject Culture { get; }

Property Value

BasicCultureObject

Difficulty

public int Difficulty { get; }

Property Value

int

DoesNotHideChest

public bool DoesNotHideChest { get; }

Property Value

bool

Effectiveness

public float Effectiveness { get; }

Property Value

float

FlyingMeshName

public string FlyingMeshName { get; }

Property Value

string

FoodComponent

public TradeItemComponent FoodComponent { get; }

Property Value

TradeItemComponent

HasArmorComponent

public bool HasArmorComponent { get; }

Property Value

bool

HasBannerComponent

public bool HasBannerComponent { get; }

Property Value

bool

HasFoodComponent

public bool HasFoodComponent { get; }

Property Value

bool

HasHorseComponent

public bool HasHorseComponent { get; }

Property Value

bool

HasLowerHolsterPriority

public bool HasLowerHolsterPriority { get; }

Property Value

bool

HasSaddleComponent

public bool HasSaddleComponent { get; }

Property Value

bool

HasWeaponComponent

public bool HasWeaponComponent { get; }

Property Value

bool

HolsterBodyName

public string HolsterBodyName { get; }

Property Value

string

HolsterMeshName

public string HolsterMeshName { get; }

Property Value

string

HolsterPositionShift

public Vec3 HolsterPositionShift { get; }

Property Value

Vec3

HolsterWithWeaponMeshName

public string HolsterWithWeaponMeshName { get; }

Property Value

string

HorseComponent

public HorseComponent HorseComponent { get; }

Property Value

HorseComponent

IsAnimal

public bool IsAnimal { get; }

Property Value

bool

IsBannerItem

public bool IsBannerItem { get; }

Property Value

bool

IsCivilian

public bool IsCivilian { get; }

Property Value

bool

IsCraftedByPlayer

public bool IsCraftedByPlayer { get; }

Property Value

bool

IsCraftedWeapon

public bool IsCraftedWeapon { get; }

Property Value

bool

IsFood

public bool IsFood { get; }

Property Value

bool

IsMountable

public bool IsMountable { get; }

Property Value

bool

IsTradeGood

public bool IsTradeGood { get; }

Property Value

bool

IsUniqueItem

public bool IsUniqueItem { get; }

Property Value

bool

IsUsingTableau

public bool IsUsingTableau { get; }

Property Value

bool

IsUsingTeamColor

public bool IsUsingTeamColor { get; }

Property Value

bool

ItemCategory

public ItemCategory ItemCategory { get; }

Property Value

ItemCategory

ItemComponent

public ItemComponent ItemComponent { get; }

Property Value

ItemComponent

ItemFlags

public ItemFlags ItemFlags { get; }

Property Value

ItemFlags

ItemHolsters

public string[] ItemHolsters { get; }

Property Value

string[]

ItemType

public ItemObject.ItemTypeEnum ItemType { get; }

Property Value

ItemObject.ItemTypeEnum

LodAtlasIndex

public int LodAtlasIndex { get; }

Property Value

int

MultiMeshName

public string MultiMeshName { get; }

Property Value

string

MultiplayerItem

public bool MultiplayerItem { get; }

Property Value

bool

Name

public TextObject Name { get; }

Property Value

TextObject

NotMerchandise

public bool NotMerchandise { get; }

Property Value

bool

PrefabName

public string PrefabName { get; }

Property Value

string

PrerequisiteItem

public ItemObject PrerequisiteItem { get; }

Property Value

ItemObject

PrimaryWeapon

public WeaponComponentData PrimaryWeapon { get; }

Property Value

WeaponComponentData

RecalculateBody

public bool RecalculateBody { get; }

Property Value

bool

RelevantSkill

public SkillObject RelevantSkill { get; }

Property Value

SkillObject

SaddleComponent

public SaddleComponent SaddleComponent { get; }

Property Value

SaddleComponent

ScaleFactor

public float ScaleFactor { get; }

Property Value

float

Tier

public ItemObject.ItemTiers Tier { get; }

Property Value

ItemObject.ItemTiers

Tierf

public float Tierf { get; }

Property Value

float

UsingFacegenScaling

public bool UsingFacegenScaling { get; }

Property Value

bool

Value

public int Value { get; }

Property Value

int

WeaponComponent

public WeaponComponent WeaponComponent { get; }

Property Value

WeaponComponent

WeaponDesign

public WeaponDesign WeaponDesign { get; }

Property Value

WeaponDesign

Weapons

public MBReadOnlyList<WeaponComponentData> Weapons { get; }

Property Value

MBReadOnlyList<WeaponComponentData>

Weight

public float Weight { get; }

Property Value

float

Methods

AddWeapon(WeaponComponentData, ItemModifierGroup)

public void AddWeapon(WeaponComponentData weapon, ItemModifierGroup itemModifierGroup)

Parameters

weapon WeaponComponentData
itemModifierGroup ItemModifierGroup

AutoGeneratedInstanceCollectObjects(List<object>)

protected override void AutoGeneratedInstanceCollectObjects(List<object> collectedObjects)

Parameters

collectedObjects List<object>

Deserialize(MBObjectManager, XmlNode)

public override void Deserialize(MBObjectManager objectManager, XmlNode node)

Parameters

objectManager MBObjectManager
node XmlNode

DetermineItemCategoryForItem()

public void DetermineItemCategoryForItem()

GetAirFrictionConstant(WeaponClass, WeaponFlags)

public static float GetAirFrictionConstant(WeaponClass weaponClass, WeaponFlags weaponFlags)

Parameters

weaponClass WeaponClass
weaponFlags WeaponFlags

Returns

float

GetAmmoTypeForItemType(ItemTypeEnum)

public static ItemObject.ItemTypeEnum GetAmmoTypeForItemType(ItemObject.ItemTypeEnum itemType)

Parameters

itemType ItemObject.ItemTypeEnum

Returns

ItemObject.ItemTypeEnum

GetCraftedItemObjectFromHashedCode(string)

public static ItemObject GetCraftedItemObjectFromHashedCode(string hashedCode)

Parameters

hashedCode string

Returns

ItemObject

GetHashCode()

public override int GetHashCode()

Returns

int

GetItemFromWeaponKind(int)

public static ItemObject GetItemFromWeaponKind(int weaponKind)

Parameters

weaponKind int

Returns

ItemObject

GetWeaponWithUsageIndex(int)

public WeaponComponentData GetWeaponWithUsageIndex(int usageIndex)

Parameters

usageIndex int

Returns

WeaponComponentData

InitAsPlayerCraftedItem(ref ItemObject)

public static void InitAsPlayerCraftedItem(ref ItemObject itemObject)

Parameters

itemObject ItemObject

InitializeTradeGood(ItemObject, TextObject, string, ItemCategory, int, float, ItemTypeEnum, bool)

public static ItemObject InitializeTradeGood(ItemObject item, TextObject name, string meshName, ItemCategory category, int value, float weight, ItemObject.ItemTypeEnum itemType, bool isFood = false)

Parameters

item ItemObject
name TextObject
meshName string
category ItemCategory
value int
weight float
itemType ItemObject.ItemTypeEnum
isFood bool

Returns

ItemObject

SetItemFlagsForCosmetics(ItemFlags)

public void SetItemFlagsForCosmetics(ItemFlags newFlags)

Parameters

newFlags ItemFlags

ToString()

public override string ToString()

Returns

string

This page was last modified at 09/01/2024 16:12:00 +00:00 (UTC).