Skip to content

H7AdventureArmy

Class in MMH7Game · MMH7Game.H7AdventureArmy · native, config, perobjectconfig

Object › Actor › SkeletalMeshActor › SkeletalMeshCinematicActor › SkeletalMeshActorMAT › H7EditorMapObject › H7EditorArmy › H7AdventureArmy

Implements: H7ITooltipable, H7IGUIListenable, H7IQuestTarget, H7IStackContainer, H7ILocaParamizable

Subclasses: H7AdventureArmySpawnable, H7CaravanArmy

Using it from Lua
h7.find_all("H7AdventureArmy")            -- live instances
h7.find_class("MMH7Game.H7AdventureArmy")   -- the class
h7.hook("MMH7Game.H7AdventureArmy.AddAbilityArchetypeRefs", fn)

Constants

NameValue
ADVENTURE_ARMY_NAME_KEY"mName"
CREATURE_FLAG_OFFSET550.0f
HERO_FLAG_OFFSET550.0f
NEUTRAL_ARMY_KEY"TT_NEUTRAL_ARMY"
NEUTRAL_ARMY_SECTION"H7GFxActorTooltip"

Properties

NameTypeNotes
mAiControlUnitsarray<H7Creature>protected
mAiDisableTradeboolprotected
mAiFollowUpSiteH7VisitableSite
mAiLiberatedSitesarray<H7VisitableSite>
mAiOnIgnoreboolprotected
mAIReplenishResouceStashH7ResourceSetprotected
mAiStayInAoCintprotected
mAiTensionarrayprotected
mCalculatingReachabilityboolprotected
mCellH7AdventureMapCellprotected
mCellCoordsAdventureMapCellCoords
mCustomNameInststringtransient, protected
mDangerCellsarray<H7AdventureMapCell>protected
mDiplomaticDispositionH7StructsAndEnumsNative.EDispositionTypeprotected
mDispositionTowardsPlayersarray<H7StructsAndEnumsNative.EPlayerNumber>protected
mFlagH7Flagprotected
mGarrisonedSiteH7VisitableSiteprotected
mGrowthOverwriteintprotected
mHeroH7AdventureHeroprotected
mHeroAbilityArchetypesarray<H7BaseAbility>
mHeroAbilityIDsarray
mHeroArchetypeReferencestringprotected
mHeroEventParamH7HeroEventParamprotected
mHeroSpellArchetypesarray<H7BaseAbility>
mHeroSpellIDsarray
mHeroStructSavegameHeroStructprotected
mHeroVolatileSpellArchetypesarray<H7BaseAbility>
mHeroVolatileSpellIDsarray
mIndexInArmiesListint
mIsAttackerboolprotected
mIsBeingRemovedboolprotected
mIsChillingboolprotected
mIsCustomNameAvailablebooltransient, editconst, private
mIsDeadboolprotected
mIsDefenderboolprotected
mIsHiddenboolprotected
mIsInCombatboolprotected
mLockedboolprotected
mMergePoolsarray<H7MergePool>protected
mNamestringconst, localized, protected
mNegotiatedArmiesarray<NegotiationData>protected
mNumTimesAlreadyRetreatedintprotected
mPathfinderH7AdventureMapPathfinderprotected
mPlayerEventParamH7PlayerEventParamprotected
mQuestFlagH7Flagprotected
mReachabilityCheckDoneboolprotected
mReachableArmiesarray<H7AdventureArmy>protected
mReachableArmiesDistancesarrayprotectedwrite
mReachableSitesarray<H7VisitableSite>protected
mReachableSitesDistancesarrayprotectedwrite
mSaveRotationRotatorprotected
mShipH7Shipprotected
mSuppressCritterGrowthbool
mTempStackArrayarray<H7BaseCreatureStack>protected
mTimeOutintprotected
mUseCustomNameboolprotected
mVisitableSiteH7VisitableSiteprotected
mVisitedAdventureCellsintprotected

Functions

NameDeclaration
AddAbilityArchetypeRefsnative function AddAbilityArchetypeRefs(H7BaseAbility Ability, string ref, int Id)
AddAiControlUnitfunction AddAiControlUnit(H7Creature Creature)
AddAiLiberatedSitefunction AddAiLiberatedSite(H7VisitableSite S)
AddNegotiatedArmyfunction AddNegotiatedArmy(NegotiationData Data)
AddQuestFlagfunction AddQuestFlag()
AddRestUnitsfunction AddRestUnits(H7BaseCreatureStack Stack, optional int Value)
AddSpellArchetypeRefsnative function AddSpellArchetypeRefs(H7BaseAbility Ability, string ref, int Id)
AddStackfunction AddStack(int Index, H7BaseCreatureStack Stack)
AddStackToMergePoolfunction AddStackToMergePool(H7BaseCreatureStack addedStack, string PoolKey)
AddVolatileSpellArchetypeRefsnative function AddVolatileSpellArchetypeRefs(H7BaseAbility Ability, string ref, int Id)
Attilanative function Attila()
CalculateReachabilityfunction CalculateReachability()
CanMergeArmyfunction bool CanMergeArmy(H7AdventureArmy Army)
CanMergeStacksfunction bool CanMergeStacks(array<H7BaseCreatureStack> stacks)
CanRetreatfunction bool CanRetreat()
ChangeFlagfunction ChangeFlag()
CleanAllCombatMergePoolsfunction CleanAllCombatMergePools()
ClearAiLiberatedSitesfunction ClearAiLiberatedSites(H7VisitableSite S)
ClearNegotiationDatanative function ClearNegotiationData()
ClearQuestFlagfunction ClearQuestFlag()
CreateHerofunction CreateHero(optional SavegameHeroStruct SaveGameData)
CreateMergePoolprivate final function int CreateMergePool(string PoolKey)
DataChangedfunction DataChanged(optional string cause)
DecrementTimeOutfunction DecrementTimeOut()
DeleteMergePoolfunction DeleteMergePool(string PoolKey)
Destroyedsimulated event Destroyed()
DistributeUnitsfunction DistributeUnits(H7BaseCreatureStack Stack)
DumpCurrentStatefunction DumpCurrentState()
EnableAdventureIdleBridgenative function EnableAdventureIdleBridge()
EnqueueInterruptCommandfunction EnqueueInterruptCommand()
GetAiFollowUpSitefunction H7VisitableSite GetAiFollowUpSite()
GetAiOnIgnorefunction bool GetAiOnIgnore()
GetAIReplenishStashfunction H7ResourceSet GetAIReplenishStash()
GetAiStayInAoCfunction int GetAiStayInAoC()
GetAiTensionValuefunction float GetAiTensionValue(H7StructsAndEnumsNative.EAdvActionID aid)
GetAMergePoolfunction H7MergePool GetAMergePool()
GetAreaOfControlIDfunction int GetAreaOfControlID()
GetArmyCostfunction array<H7ResourceQuantity> GetArmyCost(float mod)
GetBaseCreatureStacksAfterCombatfunction array<H7BaseCreatureStack> GetBaseCreatureStacksAfterCombat(H7CombatArmy combatArmy, H7StructsAndEnumsNative.EPlayerNumber enemyPlayer, out array<H7CreatureCounter> creatureLosses, out int Losses, optional bool useDereferencedStack = false)
GetCellfunction H7AdventureMapCell GetCell()
GetCurrentPositionfunction H7AdventureMapCell GetCurrentPosition()
GetDiplomaticDispositionfunction H7StructsAndEnumsNative.EDispositionType GetDiplomaticDisposition()
GetEditorHerofunction H7EditorHero GetEditorHero()
GetEmptySlotIndexfunction int GetEmptySlotIndex()
GetFlagfunction H7Flag GetFlag()
GetFreeSlotCountfunction int GetFreeSlotCount()
GetGarrisonedSitefunction H7VisitableSite GetGarrisonedSite()
GetGarrisonedSiteIconPathfunction string GetGarrisonedSiteIconPath()
GetHerofunction H7AdventureHero GetHero()
GetHeroFlagLocationevent Vector GetHeroFlagLocation()
GetHeroPowerfunction float GetHeroPower()
GetLocalGuardAfterCombatAsStringfunction string GetLocalGuardAfterCombatAsString(H7CombatArmy combatArmy)
GetMergePoolIndexprivate final function int GetMergePoolIndex(string PoolKey)
GetNamefunction string GetName()
GetPathfinderfunction H7AdventureMapPathfinder GetPathfinder()
GetPlayerDispositionsfunction GetPlayerDispositions(out array<H7StructsAndEnumsNative.EPlayerNumber> playerDisposition)
GetPoolCountfunction int GetPoolCount()
GetQuestTargetIDfunction int GetQuestTargetID()
GetReachableArmiesfunction array<H7AdventureArmy> GetReachableArmies()
GetReachableArmiesDistancesfunction array GetReachableArmiesDistances()
GetReachableArmyDistancefunction float GetReachableArmyDistance(H7AdventureArmy Army)
GetReachableSiteDistancefunction float GetReachableSiteDistance(H7VisitableSite Site)
GetReachableSitesfunction array<H7VisitableSite> GetReachableSites()
GetReachableSitesDistancesfunction array GetReachableSitesDistances()
GetShipfunction H7Ship GetShip()
GetStackByIndexfunction H7BaseCreatureStack GetStackByIndex(int Index)
GetStackCountfunction int GetStackCount(H7BaseCreatureStack Stack)
GetStackTypeIndexfunction int GetStackTypeIndex(H7BaseCreatureStack Stack)
GetTooltipDatafunction H7TooltipData GetTooltipData(optional bool extendedVersion)
GetVisitableSitefunction H7VisitableSite GetVisitableSite()
GetVisitedCellCountfunction int GetVisitedCellCount()
GetWarUnitKillListWhenBuyingfunction array<H7EditorWarUnit> GetWarUnitKillListWhenBuying(bool attackHybrid, H7Town Town)
GrowCritterArmyfunction GrowCritterArmy()
GrowEveryCritterArmystatic function GrowEveryCritterArmy()
GUIAddListenerfunction GUIAddListener(GFxObject Data, optional H7StructsAndEnums.H7ListenFocus Focus)
GUIWriteIntofunction GUIWriteInto(GFxObject Data, optional H7StructsAndEnums.H7ListenFocus Focus, optional H7GFxUIContainer flashFactory)
HandleAddToMapfunction HandleAddToMap()
HandleScoutingevent HandleScouting(optional int R = -1, optional H7AdventureMapCell cell, optional bool isInit = false)
HandleVisitSlotLeavingfunction HandleVisitSlotLeaving()
HasCreaturefunction bool HasCreature(optional H7Creature Creature)
HasEmptySlotfunction bool HasEmptySlot()
HasLocalGuardBackingfunction bool HasLocalGuardBacking()
HasNegotiatedWithfunction bool HasNegotiatedWith(H7AdventureArmy Army, out int lastNegotiationResult)
HasShipfunction bool HasShip()
HasStackTypefunction bool HasStackType(H7BaseCreatureStack Stack)
HasUnitsnative function bool HasUnits(optional bool excludeLocalGuard)
HeroMovedevent HeroMoved(bool isInit)
HideArmynative function HideArmy(optional bool noHero)
IncNumTimesAlreadyRetreatedfunction IncNumTimesAlreadyRetreated()
Initevent Init(H7Player PlayerOwner, optional H7AdventureMapCell StartPos, optional Vector garrisonLocation, optional bool pruneStacks = true)
IsACaravanevent bool IsACaravan()
IsAiLiberatedSitefunction bool IsAiLiberatedSite(H7VisitableSite S)
IsAITimeOutfunction bool IsAITimeOut()
IsAITradeDisabledfunction bool IsAITradeDisabled()
IsAllyOfnative function bool IsAllyOf(H7Player ply)
IsArmyReachablefunction bool IsArmyReachable(H7AdventureArmy Army)
IsAttackerfunction bool IsAttacker()
IsBeingRemovedfunction bool IsBeingRemoved()
IsChillingfunction bool IsChilling()
IsDeadfunction bool IsDead()
IsDefenderfunction bool IsDefender()
IsEnemyOffunction bool IsEnemyOf(H7Player ply)
IsGarrisonednative function bool IsGarrisoned()
IsGarrisonedButOutsidefunction bool IsGarrisonedButOutside()
IsHiddenfunction bool IsHidden()
IsInCombatfunction bool IsInCombat()
IsInScoutingRangeOfLocalPlayerfunction bool IsInScoutingRangeOfLocalPlayer()
IsInShelterfunction bool IsInShelter()
IsLockedfunction bool IsLocked()
IsMovablefunction bool IsMovable()
IsSiteReachablefunction bool IsSiteReachable(H7VisitableSite Site)
IsTheFirstStackOfItsKindfunction bool IsTheFirstStackOfItsKind(H7BaseCreatureStack Stack)
IsUnitControlledByAifunction bool IsUnitControlledByAi(H7Creature Creature)
JoinArmyfunction JoinArmy(H7AdventureArmy armyJoiner, bool join, bool canMerge)
JoinArmyCompletefunction JoinArmyComplete(H7AdventureArmy armyJoiner, bool join, bool canMerge)
LocalizeNamefunction LocalizeName()
MergeArmiesAIfunction MergeArmiesAI(H7AdventureArmy receivingArmy)
MergeArmiesAICompletefunction MergeArmiesAIComplete(H7AdventureArmy receivingArmy, int Threshold)
MergeArmyfunction MergeArmy(H7AdventureArmy Army, optional bool transferOnly)
MergeStacksfunction MergeStacks(array<H7BaseCreatureStack> stacks)
MergeToTargetStackCountfunction MergeToTargetStackCount(int Count)
ModAiTensionValuefunction ModAiTensionValue(H7StructsAndEnumsNative.EAdvActionID aid, H7AiTensionParameter tp)
OnAttackArmyfunction OnAttackArmy(H7SeqAct_AttackArmy Action)
OnInteractWithBuildingfunction OnInteractWithBuilding(H7SeqAct_InteractWithBuilding Action)
OnInterruptActionfunction OnInterruptAction(H7SeqAct_InterruptAction Action)
OnMoveTofunction OnMoveTo(H7AdventureMapCell Target, bool UseMovementPoints, bool Teleport, bool moveNear, bool camFollow)
OnMoveToArmyfunction OnMoveToArmy(H7SeqAct_MoveToArmy Action)
OnMoveToBuildingfunction OnMoveToBuilding(H7SeqAct_MoveToBuilding Action)
OnMoveToTilefunction OnMoveToTile(H7SeqAct_MoveToTile Action)
OnRotateArmyfunction OnRotateArmy(H7SeqAct_RotateArmy Action)
OnStartNpcScenefunction OnStartNpcScene(H7SeqAct_StartNpcScene Action)
OnTeleportsimulated function OnTeleport(SeqAct_Teleport Action)
OnToggleHiddensimulated function OnToggleHidden(SeqAct_ToggleHidden Action)
PackStacksfunction PackStacks()
PostBeginPlaysimulated function PostBeginPlay()
PostCreateHerofunction PostCreateHero()
PostSerializeevent PostSerialize()
RemoveAbilityArchetypeRefsnative function RemoveAbilityArchetypeRefs(H7BaseAbility Ability, string ref, int Id)
RemoveAiLiberatedSitefunction RemoveAiLiberatedSite(H7VisitableSite S)
RemoveAllCreatureStacksfunction RemoveAllCreatureStacks()
RemoveAllCreatureStacksCompletefunction RemoveAllCreatureStacksComplete()
RemoveArmyAfterCombatfunction RemoveArmyAfterCombat()
RemoveCreatureStackByIndexfunction RemoveCreatureStackByIndex(int Index)
RemoveCreatureStackByIndexCompletefunction RemoveCreatureStackByIndexComplete(int Index)
RemoveSpellArchetypeRefsnative function RemoveSpellArchetypeRefs(H7BaseAbility Ability, string ref, int Id)
RemoveVolatileSpellArchetypeRefsnative function RemoveVolatileSpellArchetypeRefs(H7BaseAbility Ability, string ref, int Id)
ResetAIReplenishStashfunction ResetAIReplenishStash()
ResetAllCreatureStackfunction ResetAllCreatureStack()
ResetNumTimesAlreadyRetreatedfunction ResetNumTimesAlreadyRetreated()
RestoreTransformevent RestoreTransform()
SaveTransformevent SaveTransform()
Selectnative function Select(bool doSelect, optional bool doFocus)
SetAiFollowUpSitefunction SetAiFollowUpSite(H7VisitableSite S)
SetAiOnIgnorefunction SetAiOnIgnore(bool val)
SetAiStayInAoCfunction SetAiStayInAoC(int val)
SetAiTensionValuefunction SetAiTensionValue(H7StructsAndEnumsNative.EAdvActionID aid, float val)
SetAITradeDisabledfunction SetAITradeDisabled(bool val)
SetArmyLockedfunction SetArmyLocked(bool Value)
SetCellnative function SetCell(H7AdventureMapCell newCellPos, optional bool updateHeroWorldLocation = true, optional bool registerCell = true, optional bool isInit = false)
SetChillingfunction SetChilling(bool val)
SetDiplomaticDispositionfunction SetDiplomaticDisposition(H7StructsAndEnumsNative.EDispositionType Value)
SetGarrisonedSitefunction SetGarrisonedSite(H7VisitableSite Value)
SetHoverHighlightfunction SetHoverHighlight(bool Active)
SetIndexOfArmyfunction SetIndexOfArmy(int NewIndex)
SetIsAttackerfunction SetIsAttacker(bool Value)
SetIsBeingRemovedfunction SetIsBeingRemoved(bool Value)
SetIsDeadevent SetIsDead(bool newIsDead, optional bool spamEvent = true)
SetIsDefenderfunction SetIsDefender(bool Value)
SetIsInCombatfunction SetIsInCombat(bool Value)
SetNPCfunction SetNPC(bool IsNPC)
SetPlayerfunction SetPlayer(H7Player NewPlayer)
SetReachableArmiesfunction SetReachableArmies(array<H7AdventureArmy> armies)
SetReachableArmiesDistancesfunction SetReachableArmiesDistances(array armies)
SetReachableSitesfunction SetReachableSites(array<H7VisitableSite> sites)
SetReachableSitesDistancesfunction SetReachableSitesDistances(array sites)
SetShipfunction SetShip(H7Ship shippity)
SetTimeOutfunction SetTimeOut(int val)
SetVisibilityfunction SetVisibility(bool show)
SetVisitableSitefunction SetVisitableSite(H7VisitableSite Site)
ShipMovedevent ShipMoved()
ShowArmynative function ShowArmy()
SortArmyListByStrengthstatic native function SortArmyListByStrength(out array<H7AdventureArmy> alist)
SortStackPoolByCreaturePowerfunction int SortStackPoolByCreaturePower(H7BaseCreatureStack A, H7BaseCreatureStack B)
SortStackPoolMergefunction int SortStackPoolMerge(H7BaseCreatureStack A, H7BaseCreatureStack B)
SpawnHeroFlagfunction SpawnHeroFlag()
StartCalculateReachabilityfunction StartCalculateReachability()
StartRemoveEffectfunction StartRemoveEffect()
SwitchToBoatVisualsnative function SwitchToBoatVisuals()
Tickevent Tick(float DeltaTime)
ToggleVisibilityfunction ToggleVisibility()
TransferItemsfunction TransferItems(H7AdventureArmy receivingArmy)
UnGarrisonfunction UnGarrison()
UnifyStacksfunction UnifyStacks()
UnifyStacksCompletefunction UnifyStacksComplete()
UpdateAfterCombatfunction int UpdateAfterCombat(H7CombatArmy combatArmy, H7StructsAndEnumsNative.EPlayerNumber enemyPlayer, optional bool isQuickCombat = false)
UpdateArmyCameraFocusevent UpdateArmyCameraFocus()
UpdateAurasByArmyevent UpdateAurasByArmy(H7AdventureMapCell oldCellPos, H7AdventureMapCell newCellPos)
UpdateLocalGuardAfterCombatfunction UpdateLocalGuardAfterCombat(H7CombatArmy combatArmy)
UpdateLocalGuardAfterCombatByBaseCreatureStacksfunction UpdateLocalGuardAfterCombatByBaseCreatureStacks(H7CombatArmy combatArmy)
UpdateMergePoolfunction UpdateMergePool(string PoolKey, array<H7BaseCreatureStack> PoolStacks)

Default values

mCellCoords=(Coordinates=(X=-1,Y=-1),GridIndex=-1)
mHeroStruct=(HasData=false,Level=0,XP=0,Spirit=0,Magic=0,AttackBase=0,DefenseBase=0,ArcaneKnowledgeBase=0,CurrentMovementPoints=0.0000000,CurrentMana=0,MaxManaBonus=0,ManaRegenBase=0,SkillPoints=0,IsHero=false,PlayerNumber=0,Id=0,HasTearOfAsha=false,HasFinishedTurn=false,HasCastedSpellThisTurn=fa...
mGrowthOverwrite=-1
mAiStayInAoC=-1
mIndexInArmiesList=-1

Inherited

FromMembers
H7EditorArmyProperties: cMaxArmySize, mAiIsBorderControl, mBaseCreatureStacks, mCreatureStackProperties, mCustomizeHeroArchetype, mDeployment, mDisableFleeSurrender, mEmitterPoolParticleComps, mForceManualCombat, mHeroArchetype, mHorseMesh, mIsAmbush, mIsNPC, mIsStarterHero, mIsTalking, mLlamaAnims, mLlamaMesh, mOnlyDynamicLights, mPlayer, mPlayerNumber, mSiegeUnit, mUseXPStrength, mWarUnitTemplates, mWeaponMesh, mWeaponSkMesh, mXPStrength
Functions: AddCreatureStack, AddWarUnit, AddWarUnitTemplate, AllocatePooledEmitter, CacheAnimNodes, CanFleeOrSurrender, CheckFreeArmySlot, CleanComponents, CleanupEmitterPools, ClearCreatureStackProperties, ClearMeshData, CreateBaseCreatureStack, CreateCombatArmy, CreateCombatArmyUsingAdventureArmy, CreateCreatureStackProperies, CreateHero, CreateStackPropertyFromBase, EnsureBaseStackSlotExistence, GetAiIsBorderControl, GetBaseCreatureStackIndex, GetBaseCreatureStackLength, GetBaseCreatureStacks, GetBaseCreatureStacksDereferenced, GetBaseStackBySourceSlotId, GetCreatureAmount, GetCreatureAmountOfTier, GetCreatureAmountTotal, GetCreaturePropertyStrength, GetCreatureStackProperties, GetDeployment, GetEditorHero, GetExperienceForDefeating, GetHeroPower, GetHeroStrengthValue, GetHeroTemplate, GetHeroTemplateSource, GetIndexOfStack, GetMaxArmySize, GetNumberOfFilledSlots, GetNumberOfMeleeStacks, GetPlayer, GetPlayerNumber, GetRandomCreatureStackSize, GetStackByIDString, GetStackByName, GetStrengthValue, GetStrongestCreature, GetStrongestPropertyCreature, GetWarUnitByType, GetWarUnitTemplates, HasHybridWarUnit, HasWarUnitType, Init, InitRandomValues, InsertCreatureStack, IsForcingManualCombat, IsNPC, IsStarterHero, IsTalking, LoadMeshes, OnPooledAttachedParticleSystemFinished, OverrideDeploymentFromBaseStacks, PlayParticleEffect, PostBeginPlay, PostCreateHero, PrintStateToLog, PruneStackProperties, PutCreatureStackToEmptySlot, RecyclePooledEmitter, RemoveWarUnit, SetAiIsBorderControl, SetArmyIsAmbush, SetBaseCreatureStacks, SetBaseCreatureStacksToCopy, SetCell, SetCreatureStackProperties, SetDeployment, SetForcingManualCombat, SetHeroTemplate, SetNPC, SetPlayer, SetStarterHero, SetTalking, SetWarUnitTemplates, SplitCreatureStackToEmptySlot, SplitCreatureStackToEmptySlotComplete, SyncBaseStackStartingSizeToCurrentSize, TransferCreatureStacksByArmy, TransferCreatureStacksByArmyComplete, UpdateMeshes, UpdateWeaponAttachments, UseLlamaMesh
H7EditorMapObjectProperties: AnimNodeSeqComp, mDynamicLightEnv, mFX, mHideMeshAndFX, mMesh, mShouldOutlineSkelMesh, mSnapToGroundType, mSnapType, mTerrainOffset
Functions: GetFX, GetMesh, GetMeshComp, SetMesh, SetShouldHideMeshAndFX, SetVisibility, ToggleVisibility
SkeletalMeshActorMAT1 properties, 13 functions
SkeletalMeshCinematicActor0 properties, 0 functions
SkeletalMeshActor15 properties, 28 functions
Actor156 properties, 262 functions
Object13 properties, 308 functions