Class Hero
- Namespace
- TaleWorlds.CampaignSystem
- Assembly
- TaleWorlds.CampaignSystem.dll
public sealed class Hero : MBObjectBase, ITrackableCampaignObject, ITrackableBase, IRandomOwner
- Inheritance
-
Hero
- Implements
- Inherited Members
- Extension Methods
Constructors
Hero()
public Hero()
Hero(string)
public Hero(string stringID)
Parameters
stringID
string
Fields
BeardTags
[SaveableField(202)]
public string BeardTags
Field Value
Culture
[SaveableField(551)]
public CultureObject Culture
Field Value
HairTags
[SaveableField(201)]
public string HairTags
Field Value
HeroWoundedHealthLevel
public const int HeroWoundedHealthLevel = 20
Field Value
IsPregnant
[SaveableField(760)]
public bool IsPregnant
Field Value
LastTimeStampForActivity
[SaveableField(120)]
public int LastTimeStampForActivity
Field Value
Level
[SaveableField(370)]
public int Level
Field Value
MaximumNumberOfVolunteers
public const int MaximumNumberOfVolunteers = 6
Field Value
SpcDaysInLocation
[SaveableField(420)]
public int SpcDaysInLocation
Field Value
SpecialItems
[SaveableField(590)]
public MBList<ItemObject> SpecialItems
Field Value
TattooTags
[SaveableField(203)]
public string TattooTags
Field Value
VolunteerTypes
[SaveableField(130)]
public CharacterObject[] VolunteerTypes
Field Value
Properties
Age
public float Age { get; }
Property Value
AllAliveHeroes
public static MBReadOnlyList<Hero> AllAliveHeroes { get; }
Property Value
BannerItem
public EquipmentElement BannerItem { get; set; }
Property Value
BattleEquipment
public Equipment BattleEquipment { get; }
Property Value
BirthDay
public CampaignTime BirthDay { get; }
Property Value
BodyProperties
public BodyProperties BodyProperties { get; }
Property Value
BornSettlement
public Settlement BornSettlement { get; set; }
Property Value
Build
[SaveableProperty(112)]
public float Build { get; set; }
Property Value
CanBeCompanion
public bool CanBeCompanion { get; }
Property Value
CanHaveRecruits
public bool CanHaveRecruits { get; }
Property Value
CaptivityStartTime
[SaveableProperty(240)]
public CampaignTime CaptivityStartTime { get; set; }
Property Value
CharacterObject
public CharacterObject CharacterObject { get; }
Property Value
Children
public MBList<Hero> Children { get; }
Property Value
CivilianEquipment
public Equipment CivilianEquipment { get; }
Property Value
Clan
public Clan Clan { get; set; }
Property Value
ClanBanner
public Banner ClanBanner { get; }
Property Value
CompanionOf
public Clan CompanionOf { get; set; }
Property Value
CompanionsInParty
public IEnumerable<Hero> CompanionsInParty { get; }
Property Value
CurrentSettlement
public Settlement CurrentSettlement { get; }
Property Value
DeadOrDisabledHeroes
public static MBReadOnlyList<Hero> DeadOrDisabledHeroes { get; }
Property Value
DeathDay
public CampaignTime DeathDay { get; set; }
Property Value
DeathMark
[SaveableProperty(400)]
public KillCharacterAction.KillCharacterActionDetail DeathMark { get; }
Property Value
DeathMarkKillerHero
[SaveableProperty(401)]
public Hero DeathMarkKillerHero { get; }
Property Value
EncyclopediaLink
public string EncyclopediaLink { get; }
Property Value
EncyclopediaLinkWithName
public TextObject EncyclopediaLinkWithName { get; }
Property Value
EncyclopediaText
[SaveableProperty(190)]
public TextObject EncyclopediaText { get; set; }
Property Value
ExSpouses
public MBReadOnlyList<Hero> ExSpouses { get; }
Property Value
Father
public Hero Father { get; set; }
Property Value
FirstName
public TextObject FirstName { get; }
Property Value
Gold
public int Gold { get; set; }
Property Value
GovernorOf
public Town GovernorOf { get; set; }
Property Value
HasMet
public bool HasMet { get; }
Property Value
HeroDeveloper
public IHeroDeveloper HeroDeveloper { get; }
Property Value
HeroState
public Hero.CharacterStates HeroState { get; }
Property Value
HitPoints
public int HitPoints { get; set; }
Property Value
HomeSettlement
public Settlement HomeSettlement { get; }
Property Value
IsActive
public bool IsActive { get; }
Property Value
IsAlive
public bool IsAlive { get; }
Property Value
IsArtisan
public bool IsArtisan { get; }
Property Value
IsChild
public bool IsChild { get; }
Property Value
IsClanLeader
public bool IsClanLeader { get; }
Property Value
IsCommander
public bool IsCommander { get; }
Property Value
IsDead
public bool IsDead { get; }
Property Value
IsDisabled
public bool IsDisabled { get; }
Property Value
IsFactionLeader
public bool IsFactionLeader { get; }
Property Value
IsFemale
[SaveableProperty(200)]
public bool IsFemale { get; }
Property Value
IsFugitive
public bool IsFugitive { get; }
Property Value
IsGangLeader
public bool IsGangLeader { get; }
Property Value
IsHeadman
public bool IsHeadman { get; }
Property Value
IsHumanPlayerCharacter
public bool IsHumanPlayerCharacter { get; }
Property Value
IsKingdomLeader
public bool IsKingdomLeader { get; }
Property Value
IsKnownToPlayer
public bool IsKnownToPlayer { get; set; }
Property Value
IsLord
public bool IsLord { get; }
Property Value
IsMainHeroIll
public static bool IsMainHeroIll { get; }
Property Value
IsMerchant
public bool IsMerchant { get; }
Property Value
IsMinorFactionHero
[SaveableProperty(320)]
public bool IsMinorFactionHero { get; set; }
Property Value
IsNoncombatant
public bool IsNoncombatant { get; }
Property Value
IsNotSpawned
public bool IsNotSpawned { get; }
Property Value
IsNotable
public bool IsNotable { get; }
Property Value
IsPartyLeader
public bool IsPartyLeader { get; }
Property Value
IsPlayerCompanion
public bool IsPlayerCompanion { get; }
Property Value
IsPreacher
public bool IsPreacher { get; }
Property Value
IsPrisoner
public bool IsPrisoner { get; }
Property Value
IsRebel
public bool IsRebel { get; }
Property Value
IsReleased
public bool IsReleased { get; }
Property Value
IsRuralNotable
public bool IsRuralNotable { get; }
Property Value
IsSpecial
public bool IsSpecial { get; }
Property Value
IsTemplate
public bool IsTemplate { get; }
Property Value
IsTraveling
public bool IsTraveling { get; }
Property Value
IsUrbanNotable
public bool IsUrbanNotable { get; }
Property Value
IsWanderer
public bool IsWanderer { get; }
Property Value
IsWounded
public bool IsWounded { get; }
Property Value
Issue
public IssueBase Issue { get; }
Property Value
LastExaminedLogEntryID
[SaveableProperty(481)]
public long LastExaminedLogEntryID { get; set; }
Property Value
LastKnownClosestSettlement
[SaveableProperty(411)]
public Settlement LastKnownClosestSettlement { get; }
Property Value
LastMeetingTimeWithPlayer
[SaveableProperty(620)]
public CampaignTime LastMeetingTimeWithPlayer { get; set; }
Property Value
MainHero
public static Hero MainHero { get; }
Property Value
MapFaction
public IFaction MapFaction { get; }
Property Value
MaxHitPoints
public int MaxHitPoints { get; }
Property Value
Mother
public Hero Mother { get; set; }
Property Value
Name
public TextObject Name { get; }
Property Value
Occupation
[SaveableProperty(780)]
public Occupation Occupation { get; }
Property Value
OneToOneConversationHero
public static Hero OneToOneConversationHero { get; }
Property Value
OwnedAlleys
public List<Alley> OwnedAlleys { get; }
Property Value
OwnedCaravans
public List<CaravanPartyComponent> OwnedCaravans { get; }
Property Value
OwnedWorkshops
public MBReadOnlyList<Workshop> OwnedWorkshops { get; }
Property Value
PartyBelongedTo
public MobileParty PartyBelongedTo { get; }
Property Value
PartyBelongedToAsPrisoner
[SaveableProperty(570)]
public PartyBase PartyBelongedToAsPrisoner { get; }
Property Value
PassedTimeAtHomeSettlement
public float PassedTimeAtHomeSettlement { get; set; }
Property Value
Power
public float Power { get; }
Property Value
PreferredUpgradeFormation
[SaveableProperty(800)]
public FormationClass PreferredUpgradeFormation { get; set; }
Property Value
ProbabilityOfDeath
public float ProbabilityOfDeath { get; }
Property Value
RandomValue
[SaveableProperty(660)]
public int RandomValue { get; }
Property Value
Siblings
public IEnumerable<Hero> Siblings { get; }
Property Value
Spouse
public Hero Spouse { get; set; }
Property Value
StayingInSettlement
public Settlement StayingInSettlement { get; set; }
Property Value
SupporterOf
public Clan SupporterOf { get; set; }
Property Value
Template
public CharacterObject Template { get; }
Property Value
Weight
[SaveableProperty(111)]
public float Weight { get; set; }
Property Value
Methods
AddDeathMark(Hero, KillCharacterActionDetail)
public void AddDeathMark(Hero killerHero = null, KillCharacterAction.KillCharacterActionDetail deathMarkDetail = KillCharacterActionDetail.None)
Parameters
killerHero
HerodeathMarkDetail
KillCharacterAction.KillCharacterActionDetail
AddInfluenceWithKingdom(float)
public void AddInfluenceWithKingdom(float additionalInfluence)
Parameters
additionalInfluence
float
AddOwnedWorkshop(Workshop)
public void AddOwnedWorkshop(Workshop workshop)
Parameters
workshop
Workshop
AddPower(float)
public void AddPower(float value)
Parameters
value
float
AddSkillXp(SkillObject, float)
public void AddSkillXp(SkillObject skill, float xpAmount)
Parameters
skill
SkillObjectxpAmount
float
AfterLoad()
protected override void AfterLoad()
AssignVoice()
public string AssignVoice()
Returns
AutoGeneratedInstanceCollectObjects(List<object>)
protected override void AutoGeneratedInstanceCollectObjects(List<object> collectedObjects)
Parameters
CanBeGovernorOrHavePartyRole()
public bool CanBeGovernorOrHavePartyRole()
Returns
CanBecomePrisoner()
public bool CanBecomePrisoner()
Returns
CanDie(KillCharacterActionDetail)
public bool CanDie(KillCharacterAction.KillCharacterActionDetail causeOfDeath)
Parameters
causeOfDeath
KillCharacterAction.KillCharacterActionDetail
Returns
CanHaveQuestsOrIssues()
public bool CanHaveQuestsOrIssues()
Returns
CanHeroEquipmentBeChanged()
public bool CanHeroEquipmentBeChanged()
Returns
CanLeadParty()
public bool CanLeadParty()
Returns
CanMarry()
public bool CanMarry()
Returns
CanMoveToSettlement()
public bool CanMoveToSettlement()
Returns
ChangeHeroGold(int)
public void ChangeHeroGold(int changeAmount)
Parameters
changeAmount
int
ChangeState(CharacterStates)
public void ChangeState(Hero.CharacterStates newState)
Parameters
newState
Hero.CharacterStates
CheckInvalidEquipmentsAndReplaceIfNeeded()
public void CheckInvalidEquipmentsAndReplaceIfNeeded()
CheckTracked(BasicCharacterObject)
public bool CheckTracked(BasicCharacterObject basicCharacter)
Parameters
basicCharacter
BasicCharacterObject
Returns
ClearAttributes()
public void ClearAttributes()
ClearPerks()
public void ClearPerks()
ClearSkills()
public void ClearSkills()
ClearTraits()
public void ClearTraits()
CreateHero(string)
public static Hero CreateHero(string stringID)
Parameters
stringID
string
Returns
Deserialize(MBObjectManager, XmlNode)
public override void Deserialize(MBObjectManager objectManager, XmlNode node)
Parameters
objectManager
MBObjectManagernode
XmlNode
FindAll(Func<Hero, bool>)
public static IEnumerable<Hero> FindAll(Func<Hero, bool> predicate)
Parameters
Returns
FindFirst(Func<Hero, bool>)
public static Hero FindFirst(Func<Hero, bool> predicate)
Parameters
Returns
GetAttributeValue(CharacterAttribute)
public int GetAttributeValue(CharacterAttribute charAttribute)
Parameters
charAttribute
CharacterAttribute
Returns
GetBaseHeroRelation(Hero)
public int GetBaseHeroRelation(Hero otherHero)
Parameters
otherHero
Hero
Returns
GetHeroTraits()
public CharacterTraits GetHeroTraits()
Returns
GetMapPoint()
public IMapPoint GetMapPoint()
Returns
GetPerkValue(PerkObject)
public bool GetPerkValue(PerkObject perk)
Parameters
perk
PerkObject
Returns
GetPosition()
public Vec3 GetPosition()
Returns
GetRelation(Hero)
public int GetRelation(Hero otherHero)
Parameters
otherHero
Hero
Returns
GetRelationWithPlayer()
public float GetRelationWithPlayer()
Returns
GetSkillValue(SkillObject)
public int GetSkillValue(SkillObject skill)
Parameters
skill
SkillObject
Returns
GetTrackDistanceToMainAgent()
public float GetTrackDistanceToMainAgent()
Returns
GetTraitLevel(TraitObject)
public int GetTraitLevel(TraitObject trait)
Parameters
trait
TraitObject
Returns
GetUnmodifiedClanLeaderRelationshipWithPlayer()
public float GetUnmodifiedClanLeaderRelationshipWithPlayer()
Returns
Heal(int, bool)
public void Heal(int healAmount, bool addXp = false)
Parameters
Init()
public void Init()
IsEnemy(Hero)
public bool IsEnemy(Hero otherHero)
Parameters
otherHero
Hero
Returns
IsFriend(Hero)
public bool IsFriend(Hero otherHero)
Parameters
otherHero
Hero
Returns
IsHealthFull()
public bool IsHealthFull()
Returns
IsNeutral(Hero)
public bool IsNeutral(Hero otherHero)
Parameters
otherHero
Hero
Returns
MakeWounded(Hero, KillCharacterActionDetail)
public void MakeWounded(Hero killerHero = null, KillCharacterAction.KillCharacterActionDetail deathMarkDetail = KillCharacterActionDetail.None)
Parameters
killerHero
HerodeathMarkDetail
KillCharacterAction.KillCharacterActionDetail
ModifyHair(int, int, int)
public void ModifyHair(int hair, int beard, int tattoo)
Parameters
ModifyPlayersFamilyAppearance(StaticBodyProperties)
public void ModifyPlayersFamilyAppearance(StaticBodyProperties staticBodyProperties)
Parameters
staticBodyProperties
StaticBodyProperties
OnIssueCreatedForHero(IssueBase)
public void OnIssueCreatedForHero(IssueBase issue)
Parameters
issue
IssueBase
OnIssueDeactivatedForHero()
public void OnIssueDeactivatedForHero()
PreAfterLoad()
protected override void PreAfterLoad()
RemoveOwnedWorkshop(Workshop)
public void RemoveOwnedWorkshop(Workshop workshop)
Parameters
workshop
Workshop
ResetEquipments()
public void ResetEquipments()
SetBirthDay(CampaignTime)
public void SetBirthDay(CampaignTime birthday)
Parameters
birthday
CampaignTime
SetCharacterObject(CharacterObject)
public void SetCharacterObject(CharacterObject characterObject)
Parameters
characterObject
CharacterObject
SetHasMet()
public void SetHasMet()
SetHeroEncyclopediaTextAndLinks(Hero)
public static TextObject SetHeroEncyclopediaTextAndLinks(Hero o)
Parameters
o
Hero
Returns
SetName(TextObject, TextObject)
public void SetName(TextObject fullName, TextObject firstName)
Parameters
fullName
TextObjectfirstName
TextObject
SetNewOccupation(Occupation)
public void SetNewOccupation(Occupation occupation)
Parameters
occupation
Occupation
SetPersonalRelation(Hero, int)
public void SetPersonalRelation(Hero otherHero, int value)
Parameters
SetSkillValue(SkillObject, int)
public void SetSkillValue(SkillObject skill, int value)
Parameters
skill
SkillObjectvalue
int
SetTextVariables()
public void SetTextVariables()
SetTraitLevel(TraitObject, int)
public void SetTraitLevel(TraitObject trait, int value)
Parameters
trait
TraitObjectvalue
int
ToString()
public override string ToString()
Returns
UpdateHomeSettlement()
public void UpdateHomeSettlement()
UpdateLastKnownClosestSettlement(Settlement)
public void UpdateLastKnownClosestSettlement(Settlement settlement)
Parameters
settlement
Settlement
UpdatePlayerGender(bool)
public void UpdatePlayerGender(bool isFemale)
Parameters
isFemale
bool
This page was last modified at 09/01/2024 16:12:00 +00:00 (UTC).