M&B: Bannerlord 1.1.0
The horns sound, the ravens gather.
Loading...
Searching...
No Matches
TaleWorlds.MountAndBlade.TransposedLineFormation Class Reference

Inherits TaleWorlds.MountAndBlade.LineFormation.

Public Member Functions

 TransposedLineFormation (IFormation owner)
 
override IFormationArrangement Clone (IFormation formation)
 
override void RearrangeFrom (IFormationArrangement arrangement)
 
- Public Member Functions inherited from TaleWorlds.MountAndBlade.LineFormation
int GetFileCountFromWidth (float width)
 
 LineFormation (IFormation ownerFormation, bool isStaggered=true)
 
virtual IFormationArrangement Clone (IFormation formation)
 
virtual void DeepCopyFrom (IFormationArrangement arrangement)
 
void Reset ()
 
bool IsUnitPositionAvailable (int fileIndex, int rankIndex)
 Checks if unit position is a valid point in the scene.
 
Vec2GetLocalPositionOfUnitOrDefault (int unitIndex)
 Gets the local position of unit with index of fill order.
 
Vec2GetLocalDirectionOfUnitOrDefault (int unitIndex)
 
WorldPositionGetWorldPositionOfUnitOrDefault (int unitIndex)
 
IEnumerable< Vec2GetUnavailableUnitPositions ()
 
bool AddUnit (IFormationUnit unit)
 Adding may fail if there is no vacant position and deepening the formation does not create any new vacant positions.
 
void RemoveUnit (IFormationUnit unit)
 
IFormationUnit GetUnit (int fileIndex, int rankIndex)
 Returns the unit at the specified file and rank index Returns null if the specified position is restrained, is not valid or if there is no agent assigned to this position.
 
void OnBatchRemoveStart ()
 Notifies the arrangement that remove operations will be done in batch for performance. Child arrangements should provide their own implementation.
 
void OnBatchRemoveEnd ()
 
List< IFormationUnitGetUnitsToPop (int count)
 
IEnumerable< IFormationUnitGetUnitsToPopWithCondition (int count, Func< IFormationUnit, bool > currentCondition)
 
List< IFormationUnitGetUnitsToPop (int count, Vec3 targetPosition)
 
Vec2GetLocalPositionOfUnitOrDefault (IFormationUnit unit)
 
Vec2GetLocalPositionOfUnitOrDefaultWithAdjustment (IFormationUnit unit, float distanceBetweenAgentsAdjustment)
 
Vec2GetLocalDirectionOfUnitOrDefault (IFormationUnit unit)
 
WorldPositionGetWorldPositionOfUnitOrDefault (IFormationUnit unit)
 
IFormationUnit GetPlayerUnit ()
 
MBList< IFormationUnitGetAllUnits ()
 
MBList< IFormationUnitGetUnpositionedUnits ()
 
Vec2GetLocalDirectionOfRelativeFormationLocation (IFormationUnit unit)
 
Vec2GetLocalWallDirectionOfRelativeFormationLocation (IFormationUnit unit)
 
void GetFormationInfo (out int fileCount, out int rankCount)
 
float GetUnitsDistanceToFrontLine (IFormationUnit unit)
 
IFormationUnit GetNeighborUnitOfLeftSide (IFormationUnit unit)
 
IFormationUnit GetNeighborUnitOfRightSide (IFormationUnit unit)
 
void SwitchUnitLocationsWithUnpositionedUnit (IFormationUnit firstUnit, IFormationUnit secondUnit)
 
void SwitchUnitLocations (IFormationUnit firstUnit, IFormationUnit secondUnit)
 
void SwitchUnitLocationsWithBackMostUnit (IFormationUnit unit)
 
void BeforeFormationFrameChange ()
 
void BatchUnitPositionAvailabilities (bool isUpdatingCachedOrderedLocalPositions=true)
 
void OnFormationFrameChanged ()
 Unit position availabilities may change due to frame change. If so, this method moves units around so every unit position is available and there are no gaps in the formation.
 
void OnFormationDispersed ()
 
void OnUnitLostMount (IFormationUnit unit)
 
bool IsTurnBackwardsNecessary (Vec2 previousPosition, WorldPosition? newPosition, Vec2 previousDirection, bool hasNewDirection, Vec2? newDirection)
 
void TurnBackwards ()
 
float GetOccupationWidth (int unitCount)
 
void InvalidateCacheOfUnitAux (Vec2 roundedLocalPosition)
 
Vec2CreateNewPosition (int unitIndex)
 
virtual void RearrangeFrom (IFormationArrangement arrangement)
 
virtual void RearrangeTo (IFormationArrangement arrangement)
 
virtual void RearrangeTransferUnits (IFormationArrangement arrangement)
 
void FormFromFlankWidth (int unitCountOnLine, bool skipSingleFileChangesForPerformance=false)
 
void ReserveMiddleFrontUnitPosition (IFormationUnit vanguard)
 
void ReleaseMiddleFrontUnitPosition ()
 
Vec2 GetLocalPositionOfReservedUnitPosition ()
 
virtual void OnTickOccasionallyOfUnit (IFormationUnit unit, bool arrangementChangeAllowed)
 
virtual float GetDirectionChangeTendencyOfUnit (IFormationUnit unit)
 
int GetCachedOrderedAndAvailableUnitPositionIndicesCount ()
 Used only for getting troop positions before any formation or troops are present in multiplayer, not to be used for casual formation operations.
 
PositionIndexType GetCachedOrderedAndAvailableUnitPositionIndexAt (int i)
 Used only for getting troop positions before any formation or troops are present in multiplayer, not to be used for casual formation operations.
 
WorldPosition GetGlobalPositionAtIndex (int indexX, int indexY)
 Used only for getting troop positions before any formation or troops are present in multiplayer, not to be used for casual formation operations.
 
IFormationUnit GetPlayerUnit ()
 
MBList< IFormationUnitGetAllUnits ()
 
MBList< IFormationUnitGetUnpositionedUnits ()
 
bool AddUnit (IFormationUnit unit)
 Adding may fail if there is no vacant position and deepening the formation does not create any new vacant positions.
 
void RemoveUnit (IFormationUnit unit)
 
IFormationUnit GetUnit (int fileIndex, int rankIndex)
 Returns the unit at the specified file and rank index Returns null if the specified position is restrained, is not valid or if there is no agent assigned to this position.
 
void OnBatchRemoveStart ()
 Notifies the arrangement that remove operations will be done in batch for performance. Child arrangements should provide their own implementation.
 
void OnBatchRemoveEnd ()
 
Vec2GetLocalPositionOfUnitOrDefault (int unitIndex)
 
Vec2GetLocalPositionOfUnitOrDefault (IFormationUnit unit)
 
Vec2GetLocalPositionOfUnitOrDefaultWithAdjustment (IFormationUnit unit, float distanceBetweenAgentsAdjustment)
 
Vec2GetLocalDirectionOfUnitOrDefault (int unitIndex)
 
Vec2GetLocalDirectionOfUnitOrDefault (IFormationUnit unit)
 
WorldPositionGetWorldPositionOfUnitOrDefault (int unitIndex)
 
WorldPositionGetWorldPositionOfUnitOrDefault (IFormationUnit unit)
 
List< IFormationUnitGetUnitsToPop (int count)
 
List< IFormationUnitGetUnitsToPop (int count, Vec3 targetPosition)
 
IEnumerable< IFormationUnitGetUnitsToPopWithCondition (int count, Func< IFormationUnit, bool > conditionFunction)
 
void SwitchUnitLocations (IFormationUnit firstUnit, IFormationUnit secondUnit)
 
void SwitchUnitLocationsWithUnpositionedUnit (IFormationUnit firstUnit, IFormationUnit secondUnit)
 
void SwitchUnitLocationsWithBackMostUnit (IFormationUnit unit)
 
IFormationUnit GetNeighborUnitOfLeftSide (IFormationUnit unit)
 
IFormationUnit GetNeighborUnitOfRightSide (IFormationUnit unit)
 
Vec2GetLocalWallDirectionOfRelativeFormationLocation (IFormationUnit unit)
 
IEnumerable< Vec2GetUnavailableUnitPositions ()
 
float GetOccupationWidth (int unitCount)
 
Vec2CreateNewPosition (int unitIndex)
 
void BeforeFormationFrameChange ()
 
void OnFormationFrameChanged ()
 
bool IsTurnBackwardsNecessary (Vec2 previousPosition, WorldPosition? newPosition, Vec2 previousDirection, bool hasNewDirection, Vec2? newDirection)
 
void TurnBackwards ()
 
void OnFormationDispersed ()
 
void Reset ()
 
IFormationArrangement Clone (IFormation formation)
 
void DeepCopyFrom (IFormationArrangement arrangement)
 
void RearrangeTo (IFormationArrangement arrangement)
 
void RearrangeFrom (IFormationArrangement arrangement)
 
void RearrangeTransferUnits (IFormationArrangement arrangement)
 
void ReserveMiddleFrontUnitPosition (IFormationUnit vanguard)
 
void ReleaseMiddleFrontUnitPosition ()
 
Vec2 GetLocalPositionOfReservedUnitPosition ()
 
void OnTickOccasionallyOfUnit (IFormationUnit unit, bool arrangementChangeAllowed)
 
void OnUnitLostMount (IFormationUnit unit)
 
float GetDirectionChangeTendencyOfUnit (IFormationUnit unit)
 

Additional Inherited Members

- Static Public Member Functions inherited from TaleWorlds.MountAndBlade.LineFormation
static float CalculateWidth (float interval, float unitDiameter, int unitCountOnLine)
 
- Protected Member Functions inherited from TaleWorlds.MountAndBlade.LineFormation
int GetUnitCountWithOverride ()
 
 LineFormation (IFormation ownerFormation, bool isDeformingOnWidthChange, bool isStaggered=true)
 
virtual bool IsUnitPositionRestrained (int fileIndex, int rankIndex)
 
virtual void MakeRestrainedPositionsUnavailable ()
 
virtual bool TryGetUnitPositionIndexFromLocalPosition (Vec2 localPosition, out int fileIndex, out int rankIndex)
 
virtual Vec2 GetLocalPositionOfUnit (int fileIndex, int rankIndex)
 
virtual Vec2 GetLocalPositionOfUnitWithAdjustment (int fileIndex, int rankIndex, float distanceBetweenAgentsAdjustment)
 
virtual Vec2 GetLocalDirectionOfUnit (int fileIndex, int rankIndex)
 
virtual bool IsDeepenApplicable ()
 
virtual bool IsNarrowApplicable (int amount)
 
- Protected Attributes inherited from TaleWorlds.MountAndBlade.LineFormation
readonly IFormation owner
 
MBList2D< int > UnitPositionAvailabilities
 This table is for caching position availabilities of the units for method IsUnitPositionAvailable
 
bool IsTransforming
 
- Static Protected Attributes inherited from TaleWorlds.MountAndBlade.LineFormation
const int UnitPositionAvailabilityValueOfUnprocessed = 0
 
const int UnitPositionAvailabilityValueOfUnavailable = 1
 
const int UnitPositionAvailabilityValueOfAvailable = 2
 
- Properties inherited from TaleWorlds.MountAndBlade.LineFormation
int FileCount [get]
 
int RankCount [get]
 
bool AreLocalPositionsDirty [protected get, set]
 
float Interval [get]
 The lateral space between units on one same line.
 
float Distance [get]
 Space between units in the direction of depth.
 
float UnitDiameter [get]
 Size of a single unit.
 
virtual float Width [get, set]
 Actual space occupied by the formation, measured from left to right.
 
virtual float Depth [get]
 Actual space occupied by the formation, from front to back.
 
float FlankWidth [get, set]
 The space occupied by the formation, measured from left to right most flank.
 
float RankDepth [get]
 The space occupied by the formation, from front rank to back most rank.
 
float MinimumFlankWidth [get]
 
virtual float MinimumWidth [get]
 Minimum width of the formation. Using current unit count, minimum unit interval and minimum unit distance.
 
virtual float MaximumWidth [get]
 Maximum width of the formation. Using current unit count, maximum unit interval and maximum unit distance.
 
bool IsStaggered [get, set]
 
virtual ? bool IsLoose [get]
 
int UnitCount [get]
 
int PositionedUnitCount [get]
 
- Properties inherited from TaleWorlds.MountAndBlade.IFormationArrangement
float Width [get, set]
 Actual space occupied by the formation along side (x) direction, measured from left to right.
 
float Depth [get]
 Actual space occupied by the formation along forward (y) direction, from front to back.
 
float FlankWidth [get, set]
 Space occupied from the formation's left most flank to right most flank REMARK_ATES: For rectangular formations this matches width. For circular formations (and alike) this matches circumference.
 
float RankDepth [get]
 Space occupied from the formation's front rank to back most rank. REMARK_ATES: For rectangular formations this matches depth. For circular formations (and alike) this matches radius.
 
float MinimumWidth [get]
 Minimum width of the formation. Using current unit count, minimum unit interval and minimum unit distance.
 
float MaximumWidth [get]
 Maximum width of the formation. Using current unit count, maximum unit interval and maximum unit distance.
 
float MinimumFlankWidth [get]
 
bool? IsLoose [get]
 
int UnitCount [get]
 
int RankCount [get]
 
int PositionedUnitCount [get]
 
bool AreLocalPositionsDirty [set]
 
- Events inherited from TaleWorlds.MountAndBlade.LineFormation
Action OnWidthChanged
 
Action OnShapeChanged
 
- Events inherited from TaleWorlds.MountAndBlade.IFormationArrangement
Action OnWidthChanged
 
Action OnShapeChanged
 

Constructor & Destructor Documentation

◆ TransposedLineFormation()

TaleWorlds.MountAndBlade.TransposedLineFormation.TransposedLineFormation ( IFormation  owner)

Member Function Documentation

◆ Clone()

override IFormationArrangement TaleWorlds.MountAndBlade.TransposedLineFormation.Clone ( IFormation  formation)
virtual

◆ RearrangeFrom()

override void TaleWorlds.MountAndBlade.TransposedLineFormation.RearrangeFrom ( IFormationArrangement  arrangement)
virtual