M&B: Bannerlord 1.2.7
The horns sound, the ravens gather.
Loading...
Searching...
No Matches
TaleWorlds.CampaignSystem.Settlements.Village Class Reference

Inherits TaleWorlds.CampaignSystem.Settlements.SettlementComponent.

Public Types

enum  VillageStates {
  Normal ,
  BeingRaided ,
  ForcedForVolunteers ,
  ForcedForSupplies ,
  Looted
}
 
- Public Types inherited from TaleWorlds.CampaignSystem.Settlements.SettlementComponent
enum  ProsperityLevel {
  Low ,
  Mid ,
  High ,
  NumberOfLevels
}
 

Public Member Functions

IEnumerable< PartyBaseGetDefenderParties (MapEvent.BattleTypes battleType)
 
PartyBase GetNextDefenderParty (ref int partyIndex, MapEvent.BattleTypes battleType)
 
 Village ()
 
void DailyTick ()
 
override void OnInit ()
 
int GetWerehouseCapacity ()
 
override int GetItemPrice (ItemObject item, MobileParty tradingParty=null, bool isSelling=false)
 
override int GetItemPrice (EquipmentElement itemRosterElement, MobileParty tradingParty=null, bool isSelling=false)
 
override string ToString ()
 
override void Deserialize (MBObjectManager objectManager, XmlNode node)
 
bool IsProducing (ItemObject item)
 
int GetHearthLevel ()
 
override ProsperityLevel GetProsperityLevel ()
 
- Public Member Functions inherited from TaleWorlds.CampaignSystem.Settlements.SettlementComponent
virtual ProsperityLevel GetProsperityLevel ()
 
virtual void OnPartyEntered (MobileParty mobileParty)
 
virtual void OnPartyLeft (MobileParty mobileParty)
 
virtual void OnInit ()
 
void ChangeGold (int changeAmount)
 
int GetNumberOfTroops ()
 
override void Deserialize (MBObjectManager objectManager, XmlNode node)
 
virtual int GetItemPrice (ItemObject item, MobileParty tradingParty=null, bool isSelling=false)
 
virtual int GetItemPrice (EquipmentElement itemRosterElement, MobileParty tradingParty=null, bool isSelling=false)
 
virtual void OnRelatedPartyRemoved (MobileParty mobileParty)
 
List< CharacterObjectGetPrisonerHeroes ()
 
- Public Member Functions inherited from TaleWorlds.ObjectSystem.MBObjectBase
 MBObjectBase ()
 
 MBObjectBase (MBObjectBase other)
 
 MBObjectBase (string stringId)
 
void AfterInitialized ()
 
virtual void AfterRegister ()
 
virtual void Initialize ()
 
virtual void Deserialize (MBObjectManager objectManager, XmlNode node)
 
override int GetHashCode ()
 
virtual TextObject GetName ()
 
void PreAfterLoadInternal ()
 
void AfterLoadInternal ()
 
void OnRegistered ()
 
void OnUnregistered ()
 

Public Attributes

VillagerPartyComponent VillagerPartyComponent
 
VillageType VillageType
 

Static Public Attributes

const int MidHearthThreshold = 600
 
const int LowHearthThreshold = 200
 
const int NumberOfDaysToFillVillageStocks = 5
 

Protected Member Functions

override void OnInventoryUpdated (ItemRosterElement item, int count)
 
- Protected Member Functions inherited from TaleWorlds.CampaignSystem.Settlements.SettlementComponent
abstract void OnInventoryUpdated (ItemRosterElement item, int count)
 
 SettlementComponent ()
 
- Protected Member Functions inherited from TaleWorlds.ObjectSystem.MBObjectBase
virtual void OnBeforeLoad ()
 
virtual void PreAfterLoad ()
 
virtual void AfterLoad ()
 

Properties

static MBReadOnlyList< VillageAll [get]
 
VillageStates VillageState [get, set]
 
bool IsDeserted [get]
 
float LastDemandSatisfiedTime [get]
 
Settlement Bound [get]
 
Settlement TradeBound [get]
 
VillageMarketData MarketData [get]
 
float Hearth [get, set]
 
int TradeTaxAccumulated [get, set]
 
float HearthChange [get]
 
float Militia [get]
 
float MilitiaChange [get]
 
ExplainedNumber MilitiaChangeExplanation [get]
 
ExplainedNumber HearthChangeExplanation [get]
 
- Properties inherited from TaleWorlds.CampaignSystem.Settlements.SettlementComponent
int Gold [get]
 
float BackgroundCropPosition [get, protected set]
 
string BackgroundMeshName [get, protected set]
 
string WaitMeshName [get, protected set]
 
string CastleBackgroundMeshName [get, protected set]
 
PartyBase Owner [get]
 
Settlement Settlement [get]
 
TextObject Name [get]
 
bool IsOwnerUnassigned [get, set]
 
virtual bool IsTown [get]
 
virtual bool IsCastle [get]
 
- Properties inherited from TaleWorlds.ObjectSystem.MBObjectBase
string StringId [get, set]
 
MBGUID Id [get, set]
 
bool IsInitialized [get]
 
bool IsReady [get, set]
 

Member Enumeration Documentation

◆ VillageStates

Enumerator
Normal 
BeingRaided 
ForcedForVolunteers 
ForcedForSupplies 
Looted 

Constructor & Destructor Documentation

◆ Village()

TaleWorlds.CampaignSystem.Settlements.Village.Village ( )

Member Function Documentation

◆ GetDefenderParties()

IEnumerable< PartyBase > TaleWorlds.CampaignSystem.Settlements.Village.GetDefenderParties ( MapEvent::BattleTypes  battleType)

◆ GetNextDefenderParty()

PartyBase TaleWorlds.CampaignSystem.Settlements.Village.GetNextDefenderParty ( ref int  partyIndex,
MapEvent::BattleTypes  battleType 
)

◆ DailyTick()

void TaleWorlds.CampaignSystem.Settlements.Village.DailyTick ( )

◆ OnInit()

override void TaleWorlds.CampaignSystem.Settlements.Village.OnInit ( )
virtual

◆ GetWerehouseCapacity()

int TaleWorlds.CampaignSystem.Settlements.Village.GetWerehouseCapacity ( )

◆ GetItemPrice() [1/2]

override int TaleWorlds.CampaignSystem.Settlements.Village.GetItemPrice ( ItemObject  item,
MobileParty  tradingParty = null,
bool  isSelling = false 
)
virtual

◆ GetItemPrice() [2/2]

override int TaleWorlds.CampaignSystem.Settlements.Village.GetItemPrice ( EquipmentElement  itemRosterElement,
MobileParty  tradingParty = null,
bool  isSelling = false 
)
virtual

◆ ToString()

override string TaleWorlds.CampaignSystem.Settlements.Village.ToString ( )

◆ Deserialize()

override void TaleWorlds.CampaignSystem.Settlements.Village.Deserialize ( MBObjectManager  objectManager,
XmlNode  node 
)
virtual

◆ IsProducing()

bool TaleWorlds.CampaignSystem.Settlements.Village.IsProducing ( ItemObject  item)

◆ GetHearthLevel()

int TaleWorlds.CampaignSystem.Settlements.Village.GetHearthLevel ( )

◆ GetProsperityLevel()

override ProsperityLevel TaleWorlds.CampaignSystem.Settlements.Village.GetProsperityLevel ( )
virtual

◆ OnInventoryUpdated()

override void TaleWorlds.CampaignSystem.Settlements.Village.OnInventoryUpdated ( ItemRosterElement  item,
int  count 
)
protectedvirtual

Member Data Documentation

◆ MidHearthThreshold

const int TaleWorlds.CampaignSystem.Settlements.Village.MidHearthThreshold = 600
static

◆ LowHearthThreshold

const int TaleWorlds.CampaignSystem.Settlements.Village.LowHearthThreshold = 200
static

◆ NumberOfDaysToFillVillageStocks

const int TaleWorlds.CampaignSystem.Settlements.Village.NumberOfDaysToFillVillageStocks = 5
static

◆ VillagerPartyComponent

VillagerPartyComponent TaleWorlds.CampaignSystem.Settlements.Village.VillagerPartyComponent

◆ VillageType

VillageType TaleWorlds.CampaignSystem.Settlements.Village.VillageType

Property Documentation

◆ All

MBReadOnlyList<Village> TaleWorlds.CampaignSystem.Settlements.Village.All
staticget

◆ VillageState

VillageStates TaleWorlds.CampaignSystem.Settlements.Village.VillageState
getset

◆ IsDeserted

bool TaleWorlds.CampaignSystem.Settlements.Village.IsDeserted
get

◆ LastDemandSatisfiedTime

float TaleWorlds.CampaignSystem.Settlements.Village.LastDemandSatisfiedTime
get

◆ Bound

Settlement TaleWorlds.CampaignSystem.Settlements.Village.Bound
get

◆ TradeBound

Settlement TaleWorlds.CampaignSystem.Settlements.Village.TradeBound
get

◆ MarketData

VillageMarketData TaleWorlds.CampaignSystem.Settlements.Village.MarketData
get

◆ Hearth

float TaleWorlds.CampaignSystem.Settlements.Village.Hearth
getset

◆ TradeTaxAccumulated

int TaleWorlds.CampaignSystem.Settlements.Village.TradeTaxAccumulated
getset

◆ HearthChange

float TaleWorlds.CampaignSystem.Settlements.Village.HearthChange
get

◆ Militia

float TaleWorlds.CampaignSystem.Settlements.Village.Militia
get

◆ MilitiaChange

float TaleWorlds.CampaignSystem.Settlements.Village.MilitiaChange
get

◆ MilitiaChangeExplanation

ExplainedNumber TaleWorlds.CampaignSystem.Settlements.Village.MilitiaChangeExplanation
get

◆ HearthChangeExplanation

ExplainedNumber TaleWorlds.CampaignSystem.Settlements.Village.HearthChangeExplanation
get