M&B: Bannerlord 1.0.0
The horns sound, the ravens gather.
Loading...
Searching...
No Matches
TaleWorlds.CampaignSystem.MapEvents.MapEvent Class Reference

MapEvent class. An instance of this class is created when a map event starts.

Inherits TaleWorlds.ObjectSystem.MBObjectBase, and TaleWorlds.CampaignSystem.Map.IMapEntity.

Public Types

enum  BattleTypes
 

Public Member Functions

void BeginWait ()
 
MapEventSide GetMapEventSide (BattleSideEnum side)
 
IReadOnlyList< MapEventPartyPartiesOnSide (BattleSideEnum side)
 
void GetBattleRewards (PartyBase party, out float renownChange, out float influenceChange, out float moraleChange, out float goldChange, out float playerEarnedLootPercentage)
 
int GetNumberOfInvolvedMen ()
 
int GetNumberOfInvolvedMen (BattleSideEnum side)
 
void FinishBattleAndKeepSiegeEvent ()
 
void SimulateBattleSetup ()
 
void SimulateBattleForRounds (int simulationRoundsDefender, int simulationRoundsAttacker)
 
void SetOverrideWinner (BattleSideEnum winner)
 
void SetDefenderPulledBack ()
 
void ResetBattleState ()
 
bool IsPlayerSergeant ()
 
override string ToString ()
 
void FinalizeEvent ()
 
bool HasTroopsOnBothSides ()
 
PartyBase GetLeaderParty (BattleSideEnum side)
 
float GetRenownValue (BattleSideEnum side)
 
void RecalculateRenownValue (PartyBase party)
 
void DoSurrender (BattleSideEnum side)
 
void GetMountAndHarnessVisualIdsForPartyIcon (out string mountStringId, out string harnessStringId)
 
- 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 ()
 
bool OnMapClick (bool followModifierUsed)
 
void OnHover ()
 
void OnOpenEncyclopedia ()
 
bool IsMainEntity ()
 
bool IsEnemyOf (IFaction faction)
 
bool IsAllyOf (IFaction faction)
 
void GetMountAndHarnessVisualIdsForPartyIcon (out string mountStringId, out string harnessStringId)
 
void OnPartyInteraction (MobileParty mobileParty)
 

Static Public Member Functions

static MobileParty[] GetNearbyFreeParties (Vec2 battlePosition)
 

Public Attributes

bool DiplomaticallyFinished
 
IMapEventVisual MapEventVisual
 
float[] StrengthOfSide = new float[(int)BattleSideEnum.NumSides]
 

Static Public Attributes

const float SiegeAdvantage = 1.5f
 

Properties

static MapEvent PlayerMapEvent [get]
 
BattleSideEnum PlayerSide [get]
 
MapEventState State [get]
 
MapEventSide AttackerSide [get]
 
MapEventSide DefenderSide [get]
 
IEnumerable< PartyBaseInvolvedParties [get]
 
Settlement MapEventSettlement [get]
 
Vec2 Position [get]
 
BattleTypes EventType [get]
 
bool IsInvulnerable [get, set]
 
float RaidDamage [get]
 
bool IsFieldBattle [get]
 
bool IsRaid [get]
 
bool IsForcingVolunteers [get]
 
bool IsForcingSupplies [get]
 
bool IsSiegeAssault [get]
 
bool IsHideoutBattle [get]
 
bool IsAlleyFight [get]
 
bool IsSallyOut [get]
 
bool IsSiegeOutside [get]
 
bool IsVisible [get]
 
bool IsPlayerMapEvent [get]
 
bool IsFinished [get]
 
BattleState BattleState [get]
 
MapEventSide Winner [get]
 
BattleSideEnum WinningSide [get]
 
BattleSideEnum DefeatedSide [get]
 
MapEventResultExplainer BattleResultExplainers [get]
 
bool IsFinalized [get]
 
CampaignTime BattleStartTime [get]
 
bool HasWinner [get]
 
bool IsPlayerSimulation [get, set]
 
- Properties inherited from TaleWorlds.ObjectSystem.MBObjectBase
string StringId [get, set]
 
MBGUID Id [get, set]
 
bool IsInitialized [get]
 
bool IsReady [get, set]
 
- Properties inherited from TaleWorlds.CampaignSystem.Map.IMapEntity
Vec2 InteractionPosition [get]
 
TextObject Name [get]
 
bool IsMobileEntity [get]
 
IMapEntity AttachedEntity [get]
 
IPartyVisual PartyVisual [get]
 
bool ShowCircleAroundEntity [get]
 

Additional Inherited Members

- Protected Member Functions inherited from TaleWorlds.ObjectSystem.MBObjectBase
virtual void OnBeforeLoad ()
 
virtual void PreAfterLoad ()
 
virtual void AfterLoad ()
 

Member Enumeration Documentation

◆ BattleTypes

Member Function Documentation

◆ BeginWait()

void TaleWorlds.CampaignSystem.MapEvents.MapEvent.BeginWait ( )

◆ GetMapEventSide()

MapEventSide TaleWorlds.CampaignSystem.MapEvents.MapEvent.GetMapEventSide ( BattleSideEnum  side)

◆ PartiesOnSide()

IReadOnlyList< MapEventParty > TaleWorlds.CampaignSystem.MapEvents.MapEvent.PartiesOnSide ( BattleSideEnum  side)

◆ GetBattleRewards()

void TaleWorlds.CampaignSystem.MapEvents.MapEvent.GetBattleRewards ( PartyBase  party,
out float  renownChange,
out float  influenceChange,
out float  moraleChange,
out float  goldChange,
out float  playerEarnedLootPercentage 
)

◆ GetNumberOfInvolvedMen() [1/2]

int TaleWorlds.CampaignSystem.MapEvents.MapEvent.GetNumberOfInvolvedMen ( )

◆ GetNumberOfInvolvedMen() [2/2]

int TaleWorlds.CampaignSystem.MapEvents.MapEvent.GetNumberOfInvolvedMen ( BattleSideEnum  side)

◆ FinishBattleAndKeepSiegeEvent()

void TaleWorlds.CampaignSystem.MapEvents.MapEvent.FinishBattleAndKeepSiegeEvent ( )

◆ SimulateBattleSetup()

void TaleWorlds.CampaignSystem.MapEvents.MapEvent.SimulateBattleSetup ( )

◆ SimulateBattleForRounds()

void TaleWorlds.CampaignSystem.MapEvents.MapEvent.SimulateBattleForRounds ( int  simulationRoundsDefender,
int  simulationRoundsAttacker 
)

◆ SetOverrideWinner()

void TaleWorlds.CampaignSystem.MapEvents.MapEvent.SetOverrideWinner ( BattleSideEnum  winner)

◆ SetDefenderPulledBack()

void TaleWorlds.CampaignSystem.MapEvents.MapEvent.SetDefenderPulledBack ( )

◆ ResetBattleState()

void TaleWorlds.CampaignSystem.MapEvents.MapEvent.ResetBattleState ( )

◆ IsPlayerSergeant()

bool TaleWorlds.CampaignSystem.MapEvents.MapEvent.IsPlayerSergeant ( )

◆ ToString()

override string TaleWorlds.CampaignSystem.MapEvents.MapEvent.ToString ( )

◆ FinalizeEvent()

void TaleWorlds.CampaignSystem.MapEvents.MapEvent.FinalizeEvent ( )

◆ HasTroopsOnBothSides()

bool TaleWorlds.CampaignSystem.MapEvents.MapEvent.HasTroopsOnBothSides ( )

◆ GetLeaderParty()

PartyBase TaleWorlds.CampaignSystem.MapEvents.MapEvent.GetLeaderParty ( BattleSideEnum  side)

◆ GetRenownValue()

float TaleWorlds.CampaignSystem.MapEvents.MapEvent.GetRenownValue ( BattleSideEnum  side)

◆ RecalculateRenownValue()

void TaleWorlds.CampaignSystem.MapEvents.MapEvent.RecalculateRenownValue ( PartyBase  party)

◆ DoSurrender()

void TaleWorlds.CampaignSystem.MapEvents.MapEvent.DoSurrender ( BattleSideEnum  side)

◆ GetNearbyFreeParties()

static MobileParty[] TaleWorlds.CampaignSystem.MapEvents.MapEvent.GetNearbyFreeParties ( Vec2  battlePosition)
static

◆ GetMountAndHarnessVisualIdsForPartyIcon()

void TaleWorlds.CampaignSystem.MapEvents.MapEvent.GetMountAndHarnessVisualIdsForPartyIcon ( out string  mountStringId,
out string  harnessStringId 
)

Member Data Documentation

◆ SiegeAdvantage

const float TaleWorlds.CampaignSystem.MapEvents.MapEvent.SiegeAdvantage = 1.5f
static

◆ DiplomaticallyFinished

bool TaleWorlds.CampaignSystem.MapEvents.MapEvent.DiplomaticallyFinished

◆ MapEventVisual

IMapEventVisual TaleWorlds.CampaignSystem.MapEvents.MapEvent.MapEventVisual

◆ StrengthOfSide

float [] TaleWorlds.CampaignSystem.MapEvents.MapEvent.StrengthOfSide = new float[(int)BattleSideEnum.NumSides]

Property Documentation

◆ PlayerMapEvent

MapEvent TaleWorlds.CampaignSystem.MapEvents.MapEvent.PlayerMapEvent
staticget

◆ PlayerSide

BattleSideEnum TaleWorlds.CampaignSystem.MapEvents.MapEvent.PlayerSide
get

◆ State

MapEventState TaleWorlds.CampaignSystem.MapEvents.MapEvent.State
get

◆ AttackerSide

MapEventSide TaleWorlds.CampaignSystem.MapEvents.MapEvent.AttackerSide
get

◆ DefenderSide

MapEventSide TaleWorlds.CampaignSystem.MapEvents.MapEvent.DefenderSide
get

◆ InvolvedParties

IEnumerable<PartyBase> TaleWorlds.CampaignSystem.MapEvents.MapEvent.InvolvedParties
get

◆ MapEventSettlement

Settlement TaleWorlds.CampaignSystem.MapEvents.MapEvent.MapEventSettlement
get

◆ Position

Vec2 TaleWorlds.CampaignSystem.MapEvents.MapEvent.Position
get

◆ EventType

BattleTypes TaleWorlds.CampaignSystem.MapEvents.MapEvent.EventType
get

◆ IsInvulnerable

bool TaleWorlds.CampaignSystem.MapEvents.MapEvent.IsInvulnerable
getset

◆ RaidDamage

float TaleWorlds.CampaignSystem.MapEvents.MapEvent.RaidDamage
get

◆ IsFieldBattle

bool TaleWorlds.CampaignSystem.MapEvents.MapEvent.IsFieldBattle
get

◆ IsRaid

bool TaleWorlds.CampaignSystem.MapEvents.MapEvent.IsRaid
get

◆ IsForcingVolunteers

bool TaleWorlds.CampaignSystem.MapEvents.MapEvent.IsForcingVolunteers
get

◆ IsForcingSupplies

bool TaleWorlds.CampaignSystem.MapEvents.MapEvent.IsForcingSupplies
get

◆ IsSiegeAssault

bool TaleWorlds.CampaignSystem.MapEvents.MapEvent.IsSiegeAssault
get

◆ IsHideoutBattle

bool TaleWorlds.CampaignSystem.MapEvents.MapEvent.IsHideoutBattle
get

◆ IsAlleyFight

bool TaleWorlds.CampaignSystem.MapEvents.MapEvent.IsAlleyFight
get

◆ IsSallyOut

bool TaleWorlds.CampaignSystem.MapEvents.MapEvent.IsSallyOut
get

◆ IsSiegeOutside

bool TaleWorlds.CampaignSystem.MapEvents.MapEvent.IsSiegeOutside
get

◆ IsVisible

bool TaleWorlds.CampaignSystem.MapEvents.MapEvent.IsVisible
get

◆ IsPlayerMapEvent

bool TaleWorlds.CampaignSystem.MapEvents.MapEvent.IsPlayerMapEvent
get

◆ IsFinished

bool TaleWorlds.CampaignSystem.MapEvents.MapEvent.IsFinished
get

◆ BattleState

BattleState TaleWorlds.CampaignSystem.MapEvents.MapEvent.BattleState
get

◆ Winner

MapEventSide TaleWorlds.CampaignSystem.MapEvents.MapEvent.Winner
get

◆ WinningSide

BattleSideEnum TaleWorlds.CampaignSystem.MapEvents.MapEvent.WinningSide
get

◆ DefeatedSide

BattleSideEnum TaleWorlds.CampaignSystem.MapEvents.MapEvent.DefeatedSide
get

◆ BattleResultExplainers

MapEventResultExplainer TaleWorlds.CampaignSystem.MapEvents.MapEvent.BattleResultExplainers
get

◆ IsFinalized

bool TaleWorlds.CampaignSystem.MapEvents.MapEvent.IsFinalized
get

◆ BattleStartTime

CampaignTime TaleWorlds.CampaignSystem.MapEvents.MapEvent.BattleStartTime
get

◆ HasWinner

bool TaleWorlds.CampaignSystem.MapEvents.MapEvent.HasWinner
get

◆ IsPlayerSimulation

bool TaleWorlds.CampaignSystem.MapEvents.MapEvent.IsPlayerSimulation
getset