Class PlayerEncounter
- Namespace
- TaleWorlds.CampaignSystem.Encounters
- Assembly
- TaleWorlds.CampaignSystem.dll
public class PlayerEncounter
- Inheritance
-
PlayerEncounter
- Inherited Members
Fields
BattleSimulation
public BattleSimulation BattleSimulation
Field Value
EncounteredPartySurrendered
[SaveableField(0)]
public static bool EncounteredPartySurrendered
Field Value
FirstInit
[SaveableField(1)]
public bool FirstInit
Field Value
ForceRaid
[SaveableField(10)]
public bool ForceRaid
Field Value
ForceSallyOut
[SaveableField(11)]
public bool ForceSallyOut
Field Value
ForceSupplies
[SaveableField(33)]
public bool ForceSupplies
Field Value
ForceVolunteers
[SaveableField(32)]
public bool ForceVolunteers
Field Value
IsEnemy
[SaveableField(5)]
public bool IsEnemy
Field Value
JoiningRadius
public const float JoiningRadius = 3
Field Value
PartiesStrengthRatioBeforePlayerJoin
[SaveableField(9)]
public float PartiesStrengthRatioBeforePlayerJoin
Field Value
PlayerPartyInitialStrength
[SaveableField(7)]
public float PlayerPartyInitialStrength
Field Value
Properties
Battle
public static MapEvent Battle { get; }
Property Value
BattleChallenge
public static bool BattleChallenge { get; set; }
Property Value
BattleState
public static BattleState BattleState { get; }
Property Value
CampaignBattleResult
public static CampaignBattleResult CampaignBattleResult { get; set; }
Property Value
Current
public static PlayerEncounter Current { get; }
Property Value
CurrentBattleSimulation
public static BattleSimulation CurrentBattleSimulation { get; }
Property Value
EncounterSettlement
public static Settlement EncounterSettlement { get; }
Property Value
EncounterSettlementAux
[SaveableProperty(28)]
public Settlement EncounterSettlementAux { get; }
Property Value
EncounterState
public PlayerEncounterState EncounterState { get; }
Property Value
EncounteredBattle
public static MapEvent EncounteredBattle { get; }
Property Value
EncounteredMobileParty
public static MobileParty EncounteredMobileParty { get; }
Property Value
EncounteredParty
public static PartyBase EncounteredParty { get; }
Property Value
EnemySurrender
public static bool EnemySurrender { get; set; }
Property Value
InsideSettlement
public static bool InsideSettlement { get; }
Property Value
IsActive
public static bool IsActive { get; }
Property Value
IsJoinedBattle
[SaveableProperty(6)]
public bool IsJoinedBattle { get; }
Property Value
IsPlayerWaiting
[SaveableProperty(50)]
public bool IsPlayerWaiting { get; set; }
Property Value
LeaveEncounter
public static bool LeaveEncounter { get; set; }
Property Value
LocationEncounter
public static LocationEncounter LocationEncounter { get; set; }
Property Value
MeetingDone
public static bool MeetingDone { get; }
Property Value
OpponentSide
[SaveableProperty(2)]
public BattleSideEnum OpponentSide { get; }
Property Value
PlayerIsAttacker
public static bool PlayerIsAttacker { get; }
Property Value
PlayerIsDefender
public static bool PlayerIsDefender { get; }
Property Value
PlayerSide
[SaveableProperty(3)]
public BattleSideEnum PlayerSide { get; }
Property Value
PlayerSurrender
public static bool PlayerSurrender { get; set; }
Property Value
RosterToReceiveLootItems
public ItemRoster RosterToReceiveLootItems { get; }
Property Value
RosterToReceiveLootMembers
public TroopRoster RosterToReceiveLootMembers { get; }
Property Value
RosterToReceiveLootPrisoners
public TroopRoster RosterToReceiveLootPrisoners { get; }
Property Value
WinningSide
public static BattleSideEnum WinningSide { get; }
Property Value
Methods
AutoGeneratedInstanceCollectObjects(List<object>)
protected virtual void AutoGeneratedInstanceCollectObjects(List<object> collectedObjects)
Parameters
CheckIfBattleShouldContinueAfterBattleMission()
public bool CheckIfBattleShouldContinueAfterBattleMission()
Returns
CheckIfLeadingAvaliable()
public static bool CheckIfLeadingAvaliable()
Returns
DoMeeting()
public static void DoMeeting()
EndBattleByCheat(bool)
public static void EndBattleByCheat(bool playerWon)
Parameters
playerWonbool
EnterSettlement()
public static void EnterSettlement()
FinalizeBattle()
public void FinalizeBattle()
FindAllNpcPartiesWhoWillJoinEvent(ref List<MobileParty>, ref List<MobileParty>)
public void FindAllNpcPartiesWhoWillJoinEvent(ref List<MobileParty> partiesToJoinPlayerSide, ref List<MobileParty> partiesToJoinEnemySide)
Parameters
partiesToJoinPlayerSideList<MobileParty>partiesToJoinEnemySideList<MobileParty>
FindNonAttachedNpcPartiesWhoWillJoinEvent(ref List<MobileParty>, ref List<MobileParty>)
public void FindNonAttachedNpcPartiesWhoWillJoinEvent(ref List<MobileParty> partiesToJoinPlayerSide, ref List<MobileParty> partiesToJoinEnemySide)
Parameters
partiesToJoinPlayerSideList<MobileParty>partiesToJoinEnemySideList<MobileParty>
Finish(bool)
public static void Finish(bool forcePlayerOutFromSettlement = true)
Parameters
forcePlayerOutFromSettlementbool
FinishRaid()
public void FinishRaid()
GetBattleRewards(out float, out float, out float, out float, out float, ref ExplainedNumber, ref ExplainedNumber, ref ExplainedNumber)
public static void GetBattleRewards(out float renownChange, out float influenceChange, out float moraleChange, out float goldChange, out float playerEarnedLootPercentage, ref ExplainedNumber renownExplainedNumber, ref ExplainedNumber influenceExplainedNumber, ref ExplainedNumber moraleExplainedNumber)
Parameters
renownChangefloatinfluenceChangefloatmoraleChangefloatgoldChangefloatplayerEarnedLootPercentagefloatrenownExplainedNumberExplainedNumberinfluenceExplainedNumberExplainedNumbermoraleExplainedNumberExplainedNumber
GetBattleSceneForMapPatch(MapPatchData)
public static string GetBattleSceneForMapPatch(MapPatchData mapPatch)
Parameters
mapPatchMapPatchData
Returns
GetConversationSceneForMapPosition(Vec2)
public static string GetConversationSceneForMapPosition(Vec2 position2D)
Parameters
position2DVec2
Returns
GetLeadingHero()
public static Hero GetLeadingHero()
Returns
GetPlayerStrengthRatioInEncounter()
public float GetPlayerStrengthRatioInEncounter()
Returns
Init()
public static void Init()
InitSimulation(FlattenedTroopRoster, FlattenedTroopRoster)
public static void InitSimulation(FlattenedTroopRoster selectedTroopsForPlayerSide, FlattenedTroopRoster selectedTroopsForOtherSide)
Parameters
selectedTroopsForPlayerSideFlattenedTroopRosterselectedTroopsForOtherSideFlattenedTroopRoster
InterruptEncounter(string)
public void InterruptEncounter(string encounterInterrupedType)
Parameters
encounterInterrupedTypestring
JoinBattle(BattleSideEnum)
public static void JoinBattle(BattleSideEnum side)
Parameters
sideBattleSideEnum
LeaveBattle()
public static void LeaveBattle()
LeaveSettlement()
public static void LeaveSettlement()
OnLoad()
public void OnLoad()
ProtectPlayerSide(float)
public static void ProtectPlayerSide(float hoursToProtect = 1)
Parameters
hoursToProtectfloat
RemoveRandomTroops(int, TroopRoster)
public void RemoveRandomTroops(int num, TroopRoster sacrifiedTroops)
Parameters
numintsacrifiedTroopsTroopRoster
RestartPlayerEncounter(PartyBase, PartyBase, bool)
public static void RestartPlayerEncounter(PartyBase defenderParty, PartyBase attackerParty, bool forcePlayerOutFromSettlement = true)
Parameters
SacrificeTroops(int, out TroopRoster, out ItemRoster)
public static void SacrificeTroops(int num, out TroopRoster losses, out ItemRoster lostBaggage)
Parameters
numintlossesTroopRosterlostBaggageItemRoster
SetIsSallyOutAmbush(bool)
public void SetIsSallyOutAmbush(bool value)
Parameters
valuebool
SetMeetingDone()
public static void SetMeetingDone()
SetPlayerSiegeContinueWithDefenderPullBack()
public static void SetPlayerSiegeContinueWithDefenderPullBack()
SetPlayerSiegeInterruptedByEnemyDefection()
public void SetPlayerSiegeInterruptedByEnemyDefection()
SetPlayerVictorious()
public static void SetPlayerVictorious()
SetupFields(PartyBase, PartyBase)
public void SetupFields(PartyBase attackerParty, PartyBase defenderParty)
Parameters
Start()
public static void Start()
StartAttackMission()
public static void StartAttackMission()
StartBattle()
public static MapEvent StartBattle()
Returns
StartCombatMissionWithDialogueInTownCenter(CharacterObject)
public static void StartCombatMissionWithDialogueInTownCenter(CharacterObject characterToTalkTo)
Parameters
characterToTalkToCharacterObject
StartHostileAction()
public static void StartHostileAction()
StartSiegeAmbushMission()
public static void StartSiegeAmbushMission()
StartVillageBattleMission()
public static void StartVillageBattleMission()
Update()
public static void Update()
This page was last modified at 09/01/2024 16:12:00 +00:00 (UTC).