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

Inherits TaleWorlds.CampaignSystem.Settlements.Fief.

Classes

struct  SellLog
 

Public Member Functions

IEnumerable< PartyBaseGetDefenderParties (MapEvent.BattleTypes battleType)
 
PartyBase GetNextDefenderParty (ref int partyIndex, MapEvent.BattleTypes battleType)
 
int FoodStocksUpperLimit ()
 
 Town ()
 
override void OnInit ()
 
void InitializeWorkshops (int count)
 
float GetEffectOfBuildings (BuildingEffectEnum buildingEffect)
 
int GetWallLevel ()
 
override string ToString ()
 
override void Deserialize (MBObjectManager objectManager, XmlNode node)
 
void SetSoldItems (IEnumerable< SellLog > logList)
 
override int GetItemPrice (ItemObject item, MobileParty tradingParty=null, bool isSelling=false)
 
override int GetItemPrice (EquipmentElement itemRosterElement, MobileParty tradingParty=null, bool isSelling=false)
 
override ProsperityLevel GetProsperityLevel ()
 
float GetItemCategoryPriceIndex (ItemCategory itemCategory)
 
- 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

MatrixFrame[] BesiegerCampPositions1
 
MatrixFrame[] BesiegerCampPositions2
 
bool GarrisonAutoRecruitmentIsEnabled = true
 
MBList< BuildingBuildings
 
Queue< BuildingBuildingsInProgress
 
int BoostBuildingProcess = 0
 
bool InRebelliousState = false
 
- Public Attributes inherited from TaleWorlds.CampaignSystem.Settlements.Fief
GarrisonPartyComponent GarrisonPartyComponent
 

Protected Member Functions

override void PreAfterLoad ()
 
override void AfterLoad ()
 
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

float Prosperity [get, set]
 
CultureObject Culture [get]
 
float ProsperityChange [get]
 
ExplainedNumber ProsperityChangeExplanation [get]
 
int GarrisonChange [get]
 
int GarrisonChangeAutoRecruitment [get]
 
ExplainedNumber GarrisonChangeExplanation [get]
 
float FoodChange [get]
 
float FoodChangeWithoutMarketStocks [get]
 
ExplainedNumber FoodChangeExplanation [get]
 
float LoyaltyChange [get]
 
ExplainedNumber LoyaltyChangeExplanation [get]
 
float SecurityChange [get]
 
ExplainedNumber SecurityChangeExplanation [get]
 
float MilitiaChange [get]
 
ExplainedNumber MilitiaChangeExplanation [get]
 
float Construction [get]
 
ExplainedNumber ConstructionExplanation [get]
 
Clan OwnerClan [get, set]
 
float Security [get, set]
 
float Loyalty [get, set]
 
MBReadOnlyList< VillageTradeBoundVillages [get]
 
Workshop[] Workshops [get, protected set]
 
Building CurrentBuilding [get]
 
Building CurrentDefaultBuilding [get]
 
TownMarketData MarketData [get]
 
int TradeTaxAccumulated [get, set]
 
Hero Governor [get, set]
 
static IEnumerable< TownAllFiefs [get]
 
static MBReadOnlyList< TownAllTowns [get]
 
static MBReadOnlyList< TownAllCastles [get]
 
override bool IsTown [get]
 
override bool IsCastle [get]
 
IReadOnlyCollection< SellLogSoldItems [get]
 
IFaction MapFaction [get]
 
bool IsUnderSiege [get]
 
MBReadOnlyList< VillageVillages [get]
 
Clan LastCapturedBy [get, set]
 
bool HasTournament [get]
 
- Properties inherited from TaleWorlds.CampaignSystem.Settlements.Fief
float FoodStocks [get, set]
 
float Militia [get]
 
MobileParty GarrisonParty [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]
 

Additional Inherited Members

- Public Types inherited from TaleWorlds.CampaignSystem.Settlements.SettlementComponent
enum  ProsperityLevel {
  Low ,
  Mid ,
  High ,
  NumberOfLevels
}
 

Constructor & Destructor Documentation

◆ Town()

TaleWorlds.CampaignSystem.Settlements.Town.Town ( )

Member Function Documentation

◆ GetDefenderParties()

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

◆ GetNextDefenderParty()

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

◆ FoodStocksUpperLimit()

int TaleWorlds.CampaignSystem.Settlements.Town.FoodStocksUpperLimit ( )

◆ OnInit()

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

◆ InitializeWorkshops()

void TaleWorlds.CampaignSystem.Settlements.Town.InitializeWorkshops ( int  count)

◆ PreAfterLoad()

override void TaleWorlds.CampaignSystem.Settlements.Town.PreAfterLoad ( )
protectedvirtual

◆ AfterLoad()

override void TaleWorlds.CampaignSystem.Settlements.Town.AfterLoad ( )
protectedvirtual

◆ GetEffectOfBuildings()

float TaleWorlds.CampaignSystem.Settlements.Town.GetEffectOfBuildings ( BuildingEffectEnum  buildingEffect)

◆ GetWallLevel()

int TaleWorlds.CampaignSystem.Settlements.Town.GetWallLevel ( )

◆ ToString()

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

◆ Deserialize()

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

◆ SetSoldItems()

void TaleWorlds.CampaignSystem.Settlements.Town.SetSoldItems ( IEnumerable< SellLog logList)

◆ GetItemPrice() [1/2]

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

◆ GetItemPrice() [2/2]

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

◆ GetProsperityLevel()

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

◆ OnInventoryUpdated()

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

◆ GetItemCategoryPriceIndex()

float TaleWorlds.CampaignSystem.Settlements.Town.GetItemCategoryPriceIndex ( ItemCategory  itemCategory)

Member Data Documentation

◆ BesiegerCampPositions1

MatrixFrame [] TaleWorlds.CampaignSystem.Settlements.Town.BesiegerCampPositions1

◆ BesiegerCampPositions2

MatrixFrame [] TaleWorlds.CampaignSystem.Settlements.Town.BesiegerCampPositions2

◆ GarrisonAutoRecruitmentIsEnabled

bool TaleWorlds.CampaignSystem.Settlements.Town.GarrisonAutoRecruitmentIsEnabled = true

◆ Buildings

MBList<Building> TaleWorlds.CampaignSystem.Settlements.Town.Buildings

◆ BuildingsInProgress

Queue<Building> TaleWorlds.CampaignSystem.Settlements.Town.BuildingsInProgress

◆ BoostBuildingProcess

int TaleWorlds.CampaignSystem.Settlements.Town.BoostBuildingProcess = 0

◆ InRebelliousState

bool TaleWorlds.CampaignSystem.Settlements.Town.InRebelliousState = false

Property Documentation

◆ Prosperity

float TaleWorlds.CampaignSystem.Settlements.Town.Prosperity
getset

◆ Culture

CultureObject TaleWorlds.CampaignSystem.Settlements.Town.Culture
get

◆ ProsperityChange

float TaleWorlds.CampaignSystem.Settlements.Town.ProsperityChange
get

◆ ProsperityChangeExplanation

ExplainedNumber TaleWorlds.CampaignSystem.Settlements.Town.ProsperityChangeExplanation
get

◆ GarrisonChange

int TaleWorlds.CampaignSystem.Settlements.Town.GarrisonChange
get

◆ GarrisonChangeAutoRecruitment

int TaleWorlds.CampaignSystem.Settlements.Town.GarrisonChangeAutoRecruitment
get

◆ GarrisonChangeExplanation

ExplainedNumber TaleWorlds.CampaignSystem.Settlements.Town.GarrisonChangeExplanation
get

◆ FoodChange

float TaleWorlds.CampaignSystem.Settlements.Town.FoodChange
get

◆ FoodChangeWithoutMarketStocks

float TaleWorlds.CampaignSystem.Settlements.Town.FoodChangeWithoutMarketStocks
get

◆ FoodChangeExplanation

ExplainedNumber TaleWorlds.CampaignSystem.Settlements.Town.FoodChangeExplanation
get

◆ LoyaltyChange

float TaleWorlds.CampaignSystem.Settlements.Town.LoyaltyChange
get

◆ LoyaltyChangeExplanation

ExplainedNumber TaleWorlds.CampaignSystem.Settlements.Town.LoyaltyChangeExplanation
get

◆ SecurityChange

float TaleWorlds.CampaignSystem.Settlements.Town.SecurityChange
get

◆ SecurityChangeExplanation

ExplainedNumber TaleWorlds.CampaignSystem.Settlements.Town.SecurityChangeExplanation
get

◆ MilitiaChange

float TaleWorlds.CampaignSystem.Settlements.Town.MilitiaChange
get

◆ MilitiaChangeExplanation

ExplainedNumber TaleWorlds.CampaignSystem.Settlements.Town.MilitiaChangeExplanation
get

◆ Construction

float TaleWorlds.CampaignSystem.Settlements.Town.Construction
get

◆ ConstructionExplanation

ExplainedNumber TaleWorlds.CampaignSystem.Settlements.Town.ConstructionExplanation
get

◆ OwnerClan

Clan TaleWorlds.CampaignSystem.Settlements.Town.OwnerClan
getset

◆ Security

float TaleWorlds.CampaignSystem.Settlements.Town.Security
getset

◆ Loyalty

float TaleWorlds.CampaignSystem.Settlements.Town.Loyalty
getset

◆ TradeBoundVillages

MBReadOnlyList<Village> TaleWorlds.CampaignSystem.Settlements.Town.TradeBoundVillages
get

◆ Workshops

Workshop [] TaleWorlds.CampaignSystem.Settlements.Town.Workshops
getprotected set

◆ CurrentBuilding

Building TaleWorlds.CampaignSystem.Settlements.Town.CurrentBuilding
get

◆ CurrentDefaultBuilding

Building TaleWorlds.CampaignSystem.Settlements.Town.CurrentDefaultBuilding
get

◆ MarketData

TownMarketData TaleWorlds.CampaignSystem.Settlements.Town.MarketData
get

◆ TradeTaxAccumulated

int TaleWorlds.CampaignSystem.Settlements.Town.TradeTaxAccumulated
getset

◆ Governor

Hero TaleWorlds.CampaignSystem.Settlements.Town.Governor
getset

◆ AllFiefs

IEnumerable<Town> TaleWorlds.CampaignSystem.Settlements.Town.AllFiefs
staticget

◆ AllTowns

MBReadOnlyList<Town> TaleWorlds.CampaignSystem.Settlements.Town.AllTowns
staticget

◆ AllCastles

MBReadOnlyList<Town> TaleWorlds.CampaignSystem.Settlements.Town.AllCastles
staticget

◆ IsTown

override bool TaleWorlds.CampaignSystem.Settlements.Town.IsTown
get

◆ IsCastle

override bool TaleWorlds.CampaignSystem.Settlements.Town.IsCastle
get

◆ SoldItems

IReadOnlyCollection<SellLog> TaleWorlds.CampaignSystem.Settlements.Town.SoldItems
get

◆ MapFaction

IFaction TaleWorlds.CampaignSystem.Settlements.Town.MapFaction
get

◆ IsUnderSiege

bool TaleWorlds.CampaignSystem.Settlements.Town.IsUnderSiege
get

◆ Villages

MBReadOnlyList<Village> TaleWorlds.CampaignSystem.Settlements.Town.Villages
get

◆ LastCapturedBy

Clan TaleWorlds.CampaignSystem.Settlements.Town.LastCapturedBy
getset

◆ HasTournament

bool TaleWorlds.CampaignSystem.Settlements.Town.HasTournament
get