Skip to content

H7AdventureHero

Class in MMH7Game · MMH7Game.H7AdventureHero · native, perobjectconfig

Object › Actor › SkeletalMeshActor › SkeletalMeshCinematicActor › SkeletalMeshActorMAT › H7Unit › H7EditorHero › H7AdventureHero

Implements: H7ITooltipable, H7IGUIListenable

Subclasses: H7Caravan

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

Properties

NameTypeNotes
mAiClaimedSiteH7VisitableSiteprotected
mAiDesiredTradeResourceH7Resourceprotected
mAiHasTradedTodayboolprotected
mAiLastScoreActionH7AiActionBaseprotected
mAiLastScoreActionCounterintprotected
mAiLastScoreParamsH7AiActionParamprotected
mCanScoutboolprotected
mCurrentPatharray<H7AdventureMapCell>protected
mFakeCellH7AdventureMapCellprotected
mGovernedTownH7Townprotected
mGovernorAbilitiesarray<H7BaseAbility>protected
mHasCastedSpellThisTurnboolprotected
mHasFinishedCurrentTurnboolprotected
mHasTearOfAshaboolprotected
mIsAlliedWithEverybodyboolprotected
mIsInCombatboolprotected
mLastCellMovementH7AdventureMapCellprotected
mMinimapColorColortransient, protected
mMinimapHiddenbooltransient, protected
mMoveControlH7CreatureStackMovementControlprotected
mScoutingRadiusintprotected
mTerrainCostModifierfloatprotected

Functions

NameDeclaration
AddGovernorAbilityevent AddGovernorAbility(H7BaseAbility newAbility)
AddSelfToMinimapfunction AddSelfToMinimap()
AssignMaterialsevent AssignMaterials()
CanBuildCaravanOutpostfunction bool CanBuildCaravanOutpost(optional out string blockReason)
CanScoutfunction bool CanScout()
Convertfunction H7CombatHero Convert(optional H7CombatArmy Army, optional name herotag, optional Vector heroLocation, optional Rotator heroRotation)
DataChangedfunction DataChanged(optional string cause)
DebugLogSelfprotected function DebugLogSelf()
DecreaseBaseStatByIDfunction DecreaseBaseStatByID(H7StructsAndEnumsNative.EStat desiredStat, optional int Amount = 1)
DelayedPostLearnAbilityExplorefunction DelayedPostLearnAbilityExplore()
DelayedTearOfAshaRevealMessageFailfunction DelayedTearOfAshaRevealMessageFail()
DelayedTearOfAshaRevealMessageSuccessfunction DelayedTearOfAshaRevealMessageSuccess()
Deserializefunction Deserialize(JsonObject Data)
DeserializeReferencesfunction DeserializeReferences(JsonObject Data, SaveGameState Savegame)
Destroyedsimulated event Destroyed()
DestroyTearOfAshafunction DestroyTearOfAsha()
DumpCurrentStatefunction DumpCurrentState()
EndMovingfunction EndMoving(optional bool ignoreTargetNotReachedMessage = true)
ForceReapplyPlayerChangedfunction ForceReapplyPlayerChanged()
GetAiLastScoreActionfunction H7AiActionBase GetAiLastScoreAction()
GetAiLastScoreActionCounterfunction int GetAiLastScoreActionCounter()
GetAiLastScoreParamfunction H7AiActionParam GetAiLastScoreParam()
GetCellfunction H7AdventureMapCell GetCell()
GetClaimedSitefunction H7VisitableSite GetClaimedSite()
GetCurrentPathfunction array<H7AdventureMapCell> GetCurrentPath()
GetDesiredTradeResourcefunction H7Resource GetDesiredTradeResource()
GetFakeCellfunction H7AdventureMapCell GetFakeCell()
GetGovernedTownfunction H7Town GetGovernedTown()
GetGovernorAbilitiesfunction array<H7BaseAbility> GetGovernorAbilities()
GetGridPositionfunction IntPoint GetGridPosition()
GetHasTradedTodayfunction bool GetHasTradedToday()
GetLastCellMovementfunction H7AdventureMapCell GetLastCellMovement()
GetMinimapColorfunction Color GetMinimapColor()
GetMinimapHiddenfunction bool GetMinimapHidden()
GetMoveControlfunction H7CreatureStackMovementControl GetMoveControl()
GetScoutingRadiusfunction int GetScoutingRadius()
GetScoutingRadiusBasefunction int GetScoutingRadiusBase()
GetSelectionFXfunction H7HeroFX GetSelectionFX()
GetTerrainCostModifierfunction float GetTerrainCostModifier()
GetTerrainCostModifierBasefunction float GetTerrainCostModifierBase()
GetTooltipDatafunction H7TooltipData GetTooltipData(optional bool extendedVersion)
GUIAddListenerfunction GUIAddListener(GFxObject Data, optional H7StructsAndEnums.H7ListenFocus Focus)
HasCastedSpellThisTurnfunction bool HasCastedSpellThisTurn()
HasFinishedCurrentTurnfunction bool HasFinishedCurrentTurn()
HasGovernorEffectfunction bool HasGovernorEffect()
HasTearOfAshafunction bool HasTearOfAsha()
IncreaseBaseStatByIDfunction float IncreaseBaseStatByID(H7StructsAndEnumsNative.EStat desiredStat, optional int Amount = 1)
Initfunction Init(optional bool fromSave)
IsAlliedWithEverybodyfunction bool IsAlliedWithEverybody()
IsAttackerfunction bool IsAttacker()
IsGovernourOfTownevent bool IsGovernourOfTown()
IsInCombatfunction bool IsInCombat()
IsMovingfunction bool IsMoving()
MoveHerofunction MoveHero(array<H7BaseCell> Path, optional H7Unit targetUnit, optional bool followCam = true)
QuerySpellInstantRecallfunction H7HeroAbility QuerySpellInstantRecall()
RecalculateAggressivenessfunction RecalculateAggressiveness()
RemoveGovernorAbilityfunction RemoveGovernorAbility(H7BaseAbility Ability)
RestoreSavedPathfunction RestoreSavedPath(SavegameHeroStruct SaveGameData)
RestoreStatefunction RestoreState(SavegameHeroStruct SaveGameData)
RotateHerofunction RotateHero(int targetYaw)
Selectevent Select(bool doSelect, optional bool doFocus = true)
Serializefunction JsonObject Serialize()
SetAiLastScoreActionfunction SetAiLastScoreAction(H7AiActionBase ab)
SetAiLastScoreActionCounterfunction SetAiLastScoreActionCounter(int ap)
SetAiLastScoreParamfunction SetAiLastScoreParam(H7AiActionParam ap)
SetBaseStatByIDfunction SetBaseStatByID(H7StructsAndEnumsNative.EStat desiredStat, int NewValue)
SetCanScoutfunction SetCanScout(bool val)
SetCastedSpellThisTurnfunction SetCastedSpellThisTurn(bool hasCasted)
SetClaimedSitefunction SetClaimedSite(H7VisitableSite Site)
SetCurrentPathfunction SetCurrentPath(array<H7AdventureMapCell> newPath)
SetDeadfunction SetDead(optional bool unequipItems = false)
SetDesiredTradeResourcefunction SetDesiredTradeResource(H7Resource res)
SetFakeCellfunction SetFakeCell(H7AdventureMapCell cell)
SetFinishedCurrentTurnfunction SetFinishedCurrentTurn(bool hasFinished)
SetGovernedTownfunction SetGovernedTown(H7Town Town)
SetHasTearOfAshafunction SetHasTearOfAsha(bool val)
SetHasTradedTodayfunction SetHasTradedToday(bool hasTraded)
SetIsAlliedWithEverybodyfunction SetIsAlliedWithEverybody(bool val)
SetIsInCombatfunction SetIsInCombat(bool IsInCombat)
SetLastCellMovementfunction SetLastCellMovement(H7AdventureMapCell newCell)
SetMinimapColorfunction SetMinimapColor(Color val)
SetMinimapHiddenfunction SetMinimapHidden(bool val)
SetPlayerfunction SetPlayer(H7Player NewPlayer)
SetScoutingRadiusfunction SetScoutingRadius(int NewRadius)
StopMovingfunction StopMoving()
UpdatePathfunction bool UpdatePath()
UpdateSelectionFXevent UpdateSelectionFX()
UpdateSpellsfunction UpdateSpells()

Default values

mScoutingRadius=12
mTerrainCostModifier=1.0000000
mMinimapHidden=true

Inherited

FromMembers
H7EditorHeroProperties: HeroMaterials, mAiAggressiveness, mAiControlType, mAiHomeRadius, mAiHomeSite, mAiInHibernation, mAiObjectiveArmy, mAiObjectiveSite, mAiOnPatrol, mAiPatrolController, mAiPreferedRole, mAiRole, mAiRolePriority, mAnimControl, mArcaneKnowledgeBase, mBattleRage, mBoardShipSounds, mCampaignTransitionHeroArchetype, mClass, mColor, mCombatPopUpScreenStartSounds, mCurrentMana, mCurrentMovementPoints, mCurrentPreviewAbility, mEndMountedIdleSound_Magic, mEndMountedIdleSound_Might, mEndMountedRandomMoveSounds, mEndShipIdleSounds, mEndShipRandomMoveSounds, mEngageManuallySounds, mEngageQuickCombatSounds, mEquipment, mFactionBGHeroWindow, mFactionSpecializationFrame, mFX, mGlobalName, mHeroBioData, mHeroEventParam, mHeroPediaOverwrite, mHeroSkeletalMesh, mHoHDefaultArmy, mHorseSkeletalMesh, mImage, mImageXOffset, mImageYOffset, mInventory, mIsHero, mIsPendingLevelUp, mIsPowerLeveling, mLevel, mLevelUpSounds, mMagic, mManaRegenBase, mMaxDamagePerLevel, mMaxDeploymentNumber, mMaxDeploymentRows, mMaxManaBonus, mMetamagic, mMinDamagePerLevel, mMountedAbilitySound_Magic, mMountedAbilitySound_Might, mMountedAttackSound_Magic, mMountedAttackSound_Might, mMountedCommandSound_Magic, mMountedCommandSound_Might, mMountedDefeatSound_Magic, mMountedDefeatSound_Might, mMountedRangeAttackSound_Magic, mMountedRangeAttackSound_Might, mMountedTurnLeftSounds, mMountedTurnRightSounds, mMountedVictorySound_Magic, mMountedVictorySound_Might, mOriginArchetype, mOverrideHeroClassSkills, mOverwriteIcon, mOwningPlayer, mPreLearnedSkills, mQuickBarAdventure, mQuickBarCombat, mSaveHeroProgress, mSaveMovementPoints, mScriptedBehaviour, mShipTurningSounds, mSkillManager, mSkillPoints, mSpirit, mStartingAbility, mStartingSpellArchetypes, mStartMountedIdleSound_Magic, mStartMountedIdleSound_Might, mStartMountedRandomMoveSounds, mStartShipIdleSounds, mStartShipRandomMoveSounds, mStartSkills, mTransientName, mVisuals, mWarfareSiege, mWeaponMesh, mXp, mXpProgress
Functions: AddBuffsToDataObject, AddItemBoniToDataObject, AddMana, AddMaxManaBonus, AddSkillPoint, AddXp, BeginTurn, CheckQuickBar, ClampCurrentMana, ClampCurrentMovementPoints, ClearHeroMeshData, ClearScriptedBehaviour, CreateHero, DecreaseBaseStatByID, DeleteImage, Deserialize, DeserializeReferences, Destroyed, EnableAdventureIdleBridge, EndTurn, GetAbilities, GetAiAggressivness, GetAiControlType, GetAiHibernationState, GetAiHomeRadius, GetAiHomeSite, GetAiObjectiveArmy, GetAiObjectiveSite, GetAiOnPatrol, GetAiPatrolController, GetAiPreferedRole, GetAiRole, GetAiRolePriority, GetAmountOfWarcries, GetAnimControl, GetArcaneKnowledge, GetArcaneKnowledgeAsInt, GetArcaneKnowledgeBaseAsInt, GetArcangeKnowlageBase, GetArchetypeID, GetAttackBase, GetAttackRange, GetBaseStatByID, GetBattleRage, GetBoniFromItemSet, GetCampaignTransitionHeroArchetype, GetClampedCurrentMana, GetColor, GetCurrentMana, GetCurrentMovementPoints, GetCurrentXPForNextLevel, GetDamageRangeBase, GetDefenseBase, GetDiplomacyMod, GetEntityType, GetEquipment, GetExperiencePoints, GetFactionAuraInnerDecalTexture, GetFactionAuraOuterDecalTexture, GetFactionBGHeroWindow, GetFactionSpecializationFrame, GetFlashImagePath, GetFlashMinimapPath, GetHeightPos, GetHeroBioData, GetHeroClass, GetHeroFX, GetHeropediaOverwrite, GetHoHDefaultArmy, GetHorseRiderOffset, GetHPArchetypeID, GetIcon, GetInventory, GetIsOverrideHeroClass, GetIsScripted, GetLevel, GetLevelXPRange, GetLvl30XPNeeded, GetMagic, GetMagicBase, GetManaCostForSpell, GetManaRegen, GetManaRegenBase, GetMaxDeploymentNumber, GetMaxDeploymentRow, GetMaximumDamage, GetMaximumDamageBase, GetMaximumDamagePerLevel, GetMaxMana, GetMaxManaBase, GetMaxManaBonus, GetMeshCenter, GetMetamagic, GetMinimumDamage, GetMinimumDamageBase, GetMinimumDamagePerLevel, GetModifierByContainer, GetModifiersByID, GetMoveCostForTerrainType, GetMovementPoints, GetName, GetNextLevelXp, GetOriginArchetype, GetPlayer, GetPreLearnedHeroSkills, GetPrevLevelXp, GetProductionEffects, GetQuickBarSpells, GetQuickCombatSubstituteImpact, GetRelativeHeightPos, GetSaveProgress, GetSiegeWarUnitTemplate, GetSkillManager, GetSkillPoints, GetSkillsArchetype, GetSocketLocation, GetSourceArchetype, GetSpecialization, GetSpells, GetSpirit, GetSpiritBase, GetVisuals, GUIWriteInto, HandleLevelUpMessage, HasBuffFromAbility, HasPendingLevelUp, IncreaseBaseStatByID, Init, InitFX, InitSkillsAndAbilities, InvokeLevelUp, IsHero, IsMagicHero, IsMightHero, LearnItemAbilities, LevelUpStats, OverrideAbilityManager, OverrideBuffManager, OverrideSkillManager, PlayHeroSound, PlayParticleEffect, RegenMana, RestoreSavedMovementPoints, Serialize, SetAiAggressivness, SetAiControlType, SetAiHibernationState, SetAiHomeRadius, SetAiHomeSite, SetAiPreferedRole, SetAiRole, SetAiRolePriority, SetArcangeKnowlageBase, SetAttack, SetBaseStatByID, SetBattleRage, SetCampaignTransitionHeroArchetype, SetClass, SetCurrentMana, SetCurrentMovementPoints, SetCurrentPreviewAbility, SetDefense, SetDestiny, SetEquipment, SetFaction, SetFactionBGHeroWindow, SetFactionSpecializationFrame, SetHeropediaOverwrite, SetHoHDefaultArmy, SetIcon, SetImage, SetImageXOffset, SetImageYOffset, SetInitiative, SetInventory, SetIsHero, SetLeadership, SetLevel, SetMagic, SetManaRegeneration, SetMaximumDamage, SetMaxManaBonus, SetMaxMovementPoints, SetMeshes, SetMinimumDamage, SetMovementAudioType, SetOriginArchetype, SetOverrideHeroClass, SetPendingLevelUp, SetPlayer, SetPreLearnedSkills, SetQuickBarSpells, SetSaveProgress, SetScriptedBehaviour, SetSiegeWarUnitTemplate, SetSkillPoints, SetSpecialization, SetSpirit, SetStartingSpellArchetypes, SetStartSkills, SetTransientName, SetVisuals, SetXp, SpawnAnimControl, SpendSkillPoint, TriggerEvents, UpdateOutline, UseMana, UseMovementPoints
H7UnitProperties: mAbilityManager, mAnimSoundSpeedManipulator, mArmy, mArmyAdventure, mArtwork, mAttack, mAttackCount, mAttackCountMod, mBuffManager, mCasualtyStacks, mCollider, mColliderHeight, mColliderRadius, mCombatCtrl, mCurrentWave, mDefense, mDestiny, mDoStatusCheck, mEffectManager, mEmitterPoolParticleComps, mEventManager, mFaction, mFactionSymbol, mFinishedCommand, mFlankingBonus, mGhostWalkParticles, mGridPos, mHasBadMoral, mIcon, Mid, mIgnoreAllegiances, mInitiative, mIsAdditionalTurn, mIsDoneForAI, mIsMoralTurn, mIsWaiting, mIsWaitTurn, mKillsOnCurrentTurn, mLastPath, mLastQueuePosition, mLeadership, mLore, mLoreInst, mLuckAbility, mLuckType, mMagicAbs, mMarkForSkipTurn, mMaximumDamage, mMeleeAttackAbilityTemplate, mMinimumDamage, mMoveCount, mMovementPoints, mName, mNameInst, mNeedsPrivileg, mNewCreaturePosition, mOverrideAutoCollider, mOverrideWithAI, mPrivilegID, mProjectileStartSocket, mRange, mRangedAttackAbilityTemplate, mRotateRandom, mSchoolType, mSkipTurn, mSkirmishAttack, mSkirmishDefense, mSkirmishDestiny, mSkirmishInitiative, mSkirmishLeadership, mSkirmishMaximumDamage, mSkirmishMinimumDamage, mSkirmishMovementPoints, mSkirmishSchoolType, mSkirmishUnitCost, mStatCache, mStatModSourceBuffer, mSubstituteLuckAbility, mTeleportationEndSound, mTeleportationStartSound, mTeleportEndEffect, mTeleportStartEffect, mTriggerTurnEndEvents, mTriggerTurnStartEvents, mTsunamiCasterValues, mUnitCost, mWaitAbility, mWaitClicked, mWaveSource
Functions: AllocatePooledEmitter, ApplyDamage, BeforeEndTurn, BeginAction, BeginTurn, CanAttack, CanDefend, CanMakeAction, CanMove, ChangeUnitAnimationSoundSpeed, CleanupEmitterPools, ClearStatCache, ClearTurns, DataChanged, DecreaseBaseStatByID, Defend, DeleteImage, Deserialize, DeserializeReferences, Destroyed, DisplayStatChangeFloat, DisplayStatChangeLog, DoDeathMaterialEffectFading, DoLuckRoll, DumpModifiers, EnableUnitMoveSound, EnableUnitSound, EndAction, EndMoving, EndTurn, FinishedCommand, GetAbilityManager, GetActionID, GetAddBoniOnStatByID, GetAdventureArmy, GetAllShieldEffects, GetAnimSoundSpeedManipulator, GetArmy, GetAttack, GetAttackCount, GetAttackType, GetBaseStatByID, GetBuffManager, GetColliderHeight, GetColliderRadius, GetCombatArmy, GetCurrentLuckType, GetDefense, GetDefenseBase, GetDestiny, GetDestinyBase, GetDoneForAI, GetEffectContainerForStat, GetEffectManager, GetEndTeleportFXSound, GetEntityType, GetEventManager, GetFaction, GetFlashArtworkPath, GetFlashIconPath, GetForeignMoralePenaltyModifier, GetGhostWalkParticleFX, GetGridPosition, GetHeightPos, GetHitPoints, GetIcon, GetID, GetIDString, GetIgnoreAllegiances, GetInitiative, GetKillsOnCurrentTurn, GetLastQueuePosition, GetLastWalkedPath, GetLastWalkedPathLength, GetLeadership, GetLeadershipBase, GetLocation, GetLore, GetLuckAbility, GetLuckDestiny, GetMagic, GetMaximumDamage, GetMaximumDamageBase, GetMeleeAttackAbility, GetMeshCenter, GetMeshComponent, GetMinimumDamage, GetMinimumDamageBase, GetModifiedStatByID, GetModifiersByID, GetMoveCount, GetMovementPoints, GetMovementPointsBase, GetMultiBoniOnStatByID, GetName, GetNegotiationChance, GetNextInitiative, GetOriginal, GetPlayer, GetPreparedAbility, GetProjectileStartSocketName, GetRangedAttackAbility, GetResistanceModifierFor, GetResistanceModifierForTag, GetSchool, GetSkipTurnAbility, GetSocketLocation, GetStackSize, GetStartTeleportFXSound, GetStatModSourceList, GetSurrenderCostModifier, GetTeleportEndParticleFX, GetTeleportStartParticleFX, GetUnitBaseSize, GetUnitBaseSizeInt, GetUnitCost, GetUnitName, GetWaitAbility, HasBadMoral, HasFullAction, HasPreparedAbility, HasPreparedAbilityId, HasTeleportEndFX, HasTeleportStartFX, HasWaitClicked, HitUnit, IncreaseBaseStatByID, Init, InitCurrentWave, IsAdditionalTurn, IsAttacker, IsAutoColliderOverridden, IsCasting, IsControlledByAI, IsDead, IsDefaultAttackActive, IsMarkedForTurnSkip, IsMoralTurn, IsMoving, IsMyDefaultAbility, IsOverridenByAI, IsRanged, IsUnderAttack, IsWaiting, IsWaitTurn, LoadIcon, MakeTurn, MarkForTurnSkip, MPIsYourTurn, NextWaveStep, OnGetBuffed, OnPooledAttachedParticleSystemFinished, PlayParticleEffect, PostBeginPlay, PrepareAbility, PrepareDefaultAbility, RecalculatePostAnimInput, RecyclePooledEmitter, ResetLuckType, ResetPreparedAbility, ResetTurnCount, Serialize, SetAdditionalTurn, SetArmy, SetBaseStatByID, SetCommandFinished, SetCurrentLuckType, SetDoneForAI, SetIgnoreAllegiances, SetInitiative, SetKillsOnCurrentTurn, SetLastQueuePosition, SetLastWalkedPath, SetMeleeAttackAbility, SetMoralTurn, SetNewCreaturePosition, SetOverrideByAI, SetRangedAttackAbility, SetSchoolType, SetSkipTurn, SetSubstituteLuckAbilty, SetTriggerStartTurnEvents, SetUnitCosts, SetWaitAbility, SetWaitClick, SetWaiting, ShowFloatingText, StatusChanged, Think, TriggerEvents, TriggerStartTurnEvents, UndoDeathMaterialFX, UpdateParticleTranslucency, UseAttack, UseMove, UsePreparedAbility, Wait, WaveCatchCreatureStack
SkeletalMeshActorMAT1 properties, 13 functions
SkeletalMeshCinematicActor0 properties, 0 functions
SkeletalMeshActor15 properties, 28 functions
Actor156 properties, 262 functions
Object13 properties, 308 functions