Fandom

Demigod Wiki

LUADOC 0.07.0757

269pages on
this wiki
Add New Page
Talk0 Share

Template:Tocright

SimEdit

<Sim.<global>Edit

  • AITarget
INFO: Create a target object
  • AddAnimationEvent
INFO: AddAnimationEvent( animLocalPath, timeSeconds, eventName)
  • AddBuildRestriction
INFO: AddBuildRestriction(army,category) - Add a category to the restricted list
  • AddTowerGraph
INFO: AddTowerGraph(gid)
  • AddTowerNode
INFO: AddTowerNode(gid,nid,radius,position)
  • AddUnitFlag
INFO: AddUnitFlag(unit,bone,flag)
  • ArmyCanDetect
INFO: ReconFlags ArmyCanDetect(army,pos,flags) -- can recon detect the given position with the specified flags? Returns list of flags that passed
  • ArmyGetHandicap
INFO: army
  • ArmyInitializePrebuiltUnits
INFO: army
  • ArmyIsCivilian
INFO: ArmyIsCivilian(army)
  • ArmyIsOutOfGame
INFO: ArmyIsOutOfGame(army) -- return true iff the indicated army has been defeated.
  • AttachBeamEntityToEntity
INFO: AttachBeamEntityToEntity(self, bone, other, bone, army, blueprint)
  • AttachBeamEntityToEntityFromTable
INFO: AttachBeamEntityToEntityFromTable(table[self, bone, other, bone, army, blueprint])
  • AttachBeamToEntity
INFO: AttachBeamToEntity(emitter, entity, tobone, army )
  • AudioSetLanguage
INFO: AudioSetLanguage(name)
  • BuildUnit
INFO: blueprint,creator,position,layer, [heading]
  • ChainTower
INFO: list = ChainTower(gid,nid,maximum)
  • ChangeUnitArmy
INFO: ChangeUnitArmy(unit,armyIndex) Change a unit's army
  • CheatsEnabled
INFO: Return true iff cheats are enabled. Logs the cheat attempt no matter what.
  • ClearTowerDatabase
INFO: ClearTowerDatabase()
  • CreateAimController
INFO: CreateAimController(weapon, label, turretBone, [barrelBone], [muzzleBone])
  • CreateAnimationState
INFO:
  • CreateAttachedBeam
INFO: CreateAttachedBeam(entity, bone, army, length, thickness, texture_filename)
  • CreateAttachedEmitter
INFO: CreateAttachedEmitter(entity, bone, army, emitter_blueprint)
  • CreateAttachedEmitterTable
INFO: CreateAttachedEmitterTable(entity, bone, army, table)
  • CreateBeamEmitter
INFO: emitter = CreateBeamEmitter(blueprint,army)
  • CreateBeamEmitterOnEntity
INFO: emitter = CreateBeamEmitterOnEntity(entity, tobone, army, blueprint )
  • CreateBeamEntityToEntity
INFO: CreateBeamEntityToEntity(entity, bone, other, bone, army, blueprint)
  • CreateBeamToEntityBone
INFO: CreateBeamToEntityBone(entity, bone, other, bone, army, thickness, texture_filename)
  • CreateEconomyEvent
INFO: event = CreateEconomyEvent(unit, energy, mass, timeInSeconds)
  • CreateEmitterAtBone
INFO: CreateEmitterAtBone(entity, bone, army, emitter_blueprint)
  • CreateEmitterAtEntity
INFO: CreateEmitterAtEntity(entity,army,emitter_bp_name)
  • CreateEmitterOnEntity
INFO: CreateEmitterOnEntity(entity,army,emitter_bp_name)
  • CreateEmitterPositionVector
INFO: CreateEmitterPositionVector(position,vector,army,emitter_bp_name)
  • CreateEmitterPositionVectorTable
INFO: CreateEmitterPositionVectorTable(position,vector,army,table)
  • CreateLightParticle
INFO: CreateLightParticle(entity, bone, army, size, lifetime, textureName, rampName)
  • CreateLightParticleIntel
INFO: CreateLightParticle(entity, bone, army, size, lifetime, textureName, rampName)
  • CreateProp
INFO: CreateProp(location,prop_blueprint_id)
  • CreatePropHPR
INFO: blueprint, x, y, z, heading, pitch, roll
  • CreateReconDB
INFO: CreateReconDB(inHasFog). Returns db
  • CreateSlider
INFO: CreateSlider(unit, bone, [goal_x, goal_y, goal_z, [speed, [world_space]]])
  • CreateThreatQuery
INFO: CreateThreatQuery(army): Begin an influence map threat query
  • CreateTrail
INFO: CreateTrail(entity, bone, army, trail_blueprint)
  • CreateUnit
INFO: blueprint, army, tx, ty, tz, qx, qy, qz, qw, [layer]
  • CreateUnit2
INFO: blueprint, army, layer, x, z, heading
  • CreateUnitHPR
INFO: blueprint, army, x, y, z, pitch, yaw, roll
  • DebugGetSelectionCanDesync
INFO: Get DEBUG info for UI selection
  • DesyncLog
INFO: DesyncLog(value)
  • DrawCircle
INFO: DrawCircle(p,n,r,c,s)
  • p = origin
  • n = normal
  • r = radius
  • c = color
  • s = segments
  • DrawCircleUp
INFO: Draw a 3d circle at a with size s and color c
  • DrawLine
INFO: DrawLine(p1,p2,c)
  • Draw a 3d line from p1 to p2 with color c
  • DrawLinePop
INFO: Draw a 3d line from a to b with color c with a circle at the end of the target line
  • EconomyEventIsDone
INFO: bool = EconomyEventIsDone(event)
  • EndGame
INFO: Signal the end of the game. Acts like a permanent pause.
  • EntityCategoryContains
INFO: See if a unit category contains this unit
  • EntityCategoryFilterDown
INFO: Filter a list of units to only those found in the category
  • FilterEntitiesCloserThan
INFO: FilterEntitiesCloserThan(srcPos,entList,cutoff)
  • FilterEntitiesFurtherThan
INFO: FilterEntitiesFurtherThan(srcPos,entList,cutoff)
  • FilterEntitiesMovingAway
INFO: FilterEntitiesMovingAway(srcEnt, entList)
  • FilterUnitsByArmy
INFO: FilterUnitsByArmy(armyIndex, entList)
  • FindSpotAroundCircleToOccupy
INFO: FindSpotToOccupy(unit,spot,radius,segments,spacingOverride=0
  • FindSpotAroundRingToOccupy
INFO: FindSpotAroundRingToOccupy(unit,spot,minRadius,MaxRadius)
  • FindSpotToOccupy
INFO: FindSpotToOccupy(unit,spot,noOccupyRect,spacingOverride=0
  • FlattenMapRect
INFO: FlattenRect(x, z, sizex, sizez, elevation)
  • GenerateRandomOrientation
INFO: rotation = GenerateRandomOrientation()
  • GetAlliance
INFO: GetAlliance(army1,army2)
  • GetArmyBrain
INFO: army
  • GetArmyColor
INFO: GetArmyColor(army)
  • GetArmyUnitCap
INFO: army
  • GetArmyUnitCostTotal
INFO: army
  • GetBlueprint
INFO: blueprint = GetBlueprint(entity)
  • GetCurrentCommandSource
INFO: Return the (1 based) index of the current command source.
  • GetEntitiesInBox
INFO: list = GetEntitiesInBox(group,min,max)
  • GetEntitiesInCylinder
INFO: list = GetEntitiesInCylinder(group,center,radius)
  • GetEntitiesInRect
INFO: list = GetEntitiesInRect(group,rect)
  • GetEntitiesInSphere
INFO: list = GetEntitiesInSphere(group,center,radius)
  • GetEntityById
INFO: Get entity by entity id
  • GetFocusArmy
INFO: GetFocusArmy()
  • GetGameTick
INFO: Get the current game time in ticks. The game time is the simulation time, that stops when the game is paused.
  • GetGameTimeSeconds
INFO: Get the current game time in seconds. The game time is the simulation time, that stops when the game is paused.
  • GetMapSize
INFO: sizeX, sizeZ = GetMapSize()
  • GetProfileTimeSeconds
INFO: float GetProfileTimeSeconds() - returns System time in seconds
  • GetPropsInRect
INFO: Return the props inside the given rectangle
  • GetShields
INFO: list = GetShields()
  • GetSurfaceHeight
INFO: type = GetSurfaceHeight(x,z)
  • GetTerrainHeight
INFO: type = GetTerrainHeight(x,z)
  • GetTerrainType
INFO: type = GetTerrainType(x,z)
  • GetTerrainTypeOffset
INFO: type = GetTerrainTypeOffset(x,z)
  • GetUnitBlueprintByName
INFO: blueprint = GetUnitBlueprintByName(bpName)
  • GetUnitById
INFO: Get entity by entity id
  • GetUnitsInRect
INFO: Return the units inside the given rectangle
  • HasLocalizedVO
INFO: HasLocalizedVO(language)
  • InitializeArmyAI
INFO: army
  • IsAlly
INFO: IsAlly(army1,army2)
  • IsBadSpot
INFO: IsBadSpot(unit,pos)
  • IsBlip
INFO: Blip = IsBlip(entity)
  • IsCollisionBeam
INFO: CollisionBeam = IsCollisionBeam(entity)
  • IsCommandDone
INFO: IsCommandDone
  • IsEnemy
INFO: IsEnemy(army1,army2)
  • IsEntity
INFO: bool = IsEntity(object)
  • IsGameOver
INFO: Return true if the game is over (i.e. EndGame() has been called).
  • IsNeutral
INFO: IsNeutral(army1,army2)
  • IsProjectile
INFO: Projectile = IsProjectile(entity)
  • IsProp
INFO: Prop = IsProp(entity)
  • IsUnit
INFO: Unit = IsUnit(entity)
  • IssueAggressiveMove
INFO: IssueAggressiveMove
  • IssueAttack
INFO: IssueAttack
  • IssueBuildFactory
INFO: IssueBuildFactory
  • IssueBuildMobile
INFO: IssueBuildMobile
  • IssueCapture
INFO: IssueCapture
  • IssueClearCommands
INFO: IssueClearCommands
  • IssueClearFactoryCommands
INFO: IssueClearFactoryCommands
  • IssueDestroySelf
INFO: IssueDestroySelf
  • IssueFactoryRallyPoint
INFO: IssueFactoryRallyPoint
  • IssueFormAggressiveMove
INFO: IssueFormAggressiveMove
  • IssueFormAttack
INFO: IssueFormAttack
  • IssueFormMove
INFO: IssueFormMove
  • IssueFormPatrol
INFO: IssueFormPatrol
  • IssueGuard
INFO: IssueGuard
  • IssueKillSelf
INFO: IssueKillSelf
  • IssueMove
INFO: IssueMove
  • IssueMoveOffFactory
INFO: IssueMoveOffFactory
  • IssuePatrol
INFO: IssuePatrol
  • IssuePause
INFO: IssuePause
  • IssueRepair
INFO: IssueRepair
  • IssueScript
INFO: IssueScript
  • IssueStop
INFO: IssueStop
  • IssueUpgrade
INFO: IssueUpgrade
  • LUnitMove
INFO: ScriptTask.LUnitMove(self,target)
  • LUnitMoveNear
INFO: ScriptTask.LUnitMoveNear(self,target,range)
  • ListArmies
INFO:
  • NotifyUpgrade
INFO: NotifyUpgrade(from,to)
  • OkayToMessWithArmy
INFO: Return true if the current command source is authorized to mess with the given army. Or if cheats are enabled.
  • ParseEntityCategory
INFO: parse a string to generate a new entity category
  • Random
INFO: Random([[min,] max])
  • RemoveBuildRestriction
INFO: RemoveBuildRestriction(army,category) - Remove a category from the restricted list
  • RemoveEconomyEvent
INFO: RemoveEconomyEvent(unit, event)
  • RemoveTowerGraph
INFO: RemoveTowerGraph(gid)
  • RemoveTowerNode
INFO: RemoveTowerNode(gid,nid)
  • SelectedUnit
INFO: unit = SelectedUnit() -- Returns the currently selected unit. For use at the lua console, so you can call Lua methods on a unit.
  • SetAlliance
INFO: SetAlliance(army1,army2,<Neutral|Enemy|Ally>
  • SetAllianceOneWay
INFO: SetAllianceOneWay(army1,army2,<Neutral|Enemy|Ally>
  • SetAlliedArmyColor
INFO: SetArmyAlliedColor(army,index)
  • SetAlliedVictory
INFO: SetAlliedVictory(army,bool)
  • SetAmbientReverb
INFO: SetAmbientReverb(preset name)
  • SetArmyColor
INFO: SetArmyColor(army,r,g,b)
  • SetArmyColorIndex
INFO: SetArmyColorIndex(army,index)
  • SetArmyEconomy
INFO: army, mass, energy
  • SetArmyFactionIndex
INFO: SetArmyFactionIndex(army,index)
  • SetArmyOutOfGame
INFO: SetArmyOutOfGame(army) -- indicate that the supplied army has been defeated.
  • SetArmyPlans
INFO: army, plans
  • SetArmyShowScore
INFO: SetArmyColor(army, bool) - determines if the user should be able to see the army score
  • SetArmyStatsSyncArmy
INFO: Set the army index for which to sync army stats (-1 for none)
  • SetArmyUnitCap
INFO: army, unitCap
  • SetIgnoreArmyUnitCap
INFO: army, flag
  • SetMusicIntensity
INFO: SetMusicIntensity(intensity)
  • SetMusicTrack
INFO: SetMusicTrack(track name)
  • SetTerrainType
INFO: SetTerrainType(x,z,type)
  • SetTerrainTypeRect
INFO: SetTerrainType(rect,type)
  • SimConExecute
INFO: SimConExecute('command string') -- Perform a console command
  • SortEntitiesByDistanceXZ
INFO: SortEntitiesByDistanceXZ(pos,entList)
  • SortEntitiesByHealth
INFO: SortUnitsByHealth(unitList)
  • SplitProp
INFO: SplitProp(original, blueprint_name) -- split a prop into multiple child props, one per bone; returns all the created props
  • SubmitXMLArmyStats
INFO: Request that we submit xml army stats to Impulse.
  • TestOccupy
INFO: test
  • TestRelease
INFO: release
  • TryCopyPose
INFO: TryCopyPose(unitFrom,entityTo,bCopyWorldTransform)
  • UpdateTowerNode
INFO: UpdateTowerNode(gid,nid,radius,position)
  • Warp
INFO: Warp( unit, location, [orientation] )
  • _c_CreateEntity
INFO: _c_CreateEntity(spec)
  • _c_CreateShield
INFO: _c_CreateShield(spec)
  • print
INFO: Print a log message

<Sim.AnimAimController>Edit

  • GetHeadingPitch
INFO: AimManipulator:GetHeadingPitch()
  • OnTarget
INFO: AimManipulator:OnTarget()
  • SetAimHeadingOffset
INFO: AimManipulator:SetAimHeadingOffset( offset )
  • SetEnabled
INFO: AimManipulator:SetEnabled(flag)
  • SetFiringArc
INFO: AimManipulator:SetFiringArc(minHeading, maxHeading, headingMaxSlew, minPitch, maxPitch, pitchMaxSlew)
  • SetHeadingPitch
INFO: AimManipulator:SetHeadingPitch( heading, pitch )
  • SetResetPoseTime
INFO: AimManipulator:SetResetPoseTime(resetTime)
  • base
INFO: derived from IAnimController
  • moho.AnimAimController
INFO:

<Sim.AnimComposition>Edit

  • AddEvent
INFO:
  • Destroy
INFO:
  • FadeToWeight
INFO:
  • GetDuration
INFO:
  • SetAdverb
INFO:
  • SetAnimationFraction
INFO:
  • SetElapsedTime
INFO:
  • SetLooping
INFO:
  • SetPaused
INFO:
  • SetSampleMode
INFO:
  • SetTimeScale
INFO:
  • SetTimeScaleMax
INFO:
  • SetTimeScaleMin
INFO:
  • SetWeight
INFO:
  • moho.animcomposition_methods
INFO:

<Sim.AnimSlideController>Edit

  • Destroy
INFO: Controller:Destroy() -- destroy a controller.
  • SetAcceleration
INFO: AnimSlideController:SetAcceleration(acc)
  • SetDeceleration
INFO: AnimSlideController:SetDeceleration(dec)
  • SetGoal
INFO: AnimSlideController:SetGoal(goal_x, goal_y, goal_z)
  • SetSpeed
INFO: AnimSlideController:SetSpeed(speed)
  • SetWorldUnits
INFO: AnimSlideController:SetWorldUnits(bool)
  • base
INFO: derived from IAnimController
  • moho.SlideController
INFO:

<Sim.AnimState>Edit

  • CopyClocks
INFO:
  • Destroy
INFO:
  • FadeToWeight
INFO:
  • GetDuration
INFO:
  • GetLocalClock
INFO:
  • GetTimeScale
INFO:
  • GetWeight
INFO:
  • MaskBone
INFO:
  • ResetPreviousFrameTime
INFO:
  • SetActive
INFO:
  • SetAdverb
INFO:
  • SetElapsedTime
INFO:
  • SetLocalClock
INFO:
  • SetName
INFO:
  • SetPaused
INFO:
  • SetScaleOnUnitVelocity
INFO:
  • SetTimeScale
INFO:
  • SetWeight
INFO:
  • moho.animstate_methods
INFO:

<Sim.CAiAttackerImpl>Edit

  • AttEventToString
INFO: Returns the string associated with EAiAttackerEvent
  • AttackerWeaponsBusy
INFO: Returns if the attacker has any weapon that is currently attacking any enemies
  • CanAttackTarget
INFO: Loop through the weapons to see if the target can be attacked
  • FindBestEnemy
INFO: Find the best enemy target for a weapon
  • FindParentTarget
INFO: Find the parent target for a weapon if any
  • ForceEngage
INFO: Force to engage enemy target
  • GetDesiredTarget
INFO: Get the desired target
  • GetMaxWeaponRange
INFO: Loop through the weapons to find the weapon with the longest range that is not manual fire
  • GetPrimaryWeapon
INFO: Loop through the weapons to find our primary weapon
  • GetTargetWeapon
INFO: Loop through the weapons to find one that we can use to attack target
  • GetUnit
INFO: Returns the unit this attacker is bound to.
  • GetWeaponCount
INFO: Return the count of weapons
  • HasSlavedTarget
INFO: Check if the attack has a slaved weapon that currently has a target
  • IsTargetExempt
INFO: Check if the target is exempt from being attacked
  • IsTooClose
INFO: Check if the target is too close to our weapons
  • IsWithinAttackRange
INFO: Check if the target is within any weapon range
  • IsWithinAttackRangePos
INFO: Check if the target is within any weapon range
  • RemoveListener
INFO: Remove an attack event listener
  • ResetReportingState
INFO: Reset reporting state
  • SetDesiredTarget
INFO: Set the desired target
  • SetPrimaryWeapon
INFO: Set the primary weapon
  • SetReportingState
INFO: Set reporting state
  • Stop
INFO: Stop the attacker
  • TargetOutsideGuardReturnRadius
INFO: Is the given target outside the guard return radius?
  • moho.attacker_methods
INFO:

<Sim.CAiBrain>Edit

  • AssignThreatAtPosition
INFO: CAiBrain:AssignThreatAtPosition(position, threat, [decay])
  • AssignUnitsToPlatoon
INFO: CAiBrain:AssignUnitsToPlatoon()
  • BuildPlatoon
INFO: brain:BuildPlatoon()
  • BuildStructure
INFO: brain:BuildStructure(builder, structureName, locationInfo)
  • BuildUnit
INFO: brain:BuildUnit()
  • CanBuildPlatoon
INFO: brain:CanBuildPlatoon()
  • CanBuildStructureAt
INFO: brain:CanBuildStructureAt(blueprint, location)
  • ChangePathNodeCost
INFO: CAiBrain:ChangePathNodeCost( treeName, nodeName, newCost )
  • ChangePathNodePosition
INFO: CAiBrain:ChangePathNodePosition( treeName, nodeName, newPos )
  • DecideWhatToBuild
INFO: brain:DecideWhatToBuild(builder, type, buildingTypes)
  • DisbandPlatoon
INFO: CAiBrain:DisbandPlatoon()
  • DisbandPlatoonUniquelyNamed
INFO: CAiBrain:DisbandPlatoonUniquelyNamed()
  • FindClosestArmyWithBase
INFO: CAiBrain:FindClosestArmyWithBase()
  • FindClosestPathNode
INFO: CAiBrain:FindClosestPathNode( treeName, position1 )
  • FindNearestSpotToBuildOn
INFO: brain:FindNearestSpotToBuildOn(builder, blueprint, location, minRange)
  • FindUnit
INFO: brain:FindUnit(unitCategory, needToBeIdle) -- Return an unit that matches the unit name (can specify idle or not)
  • FindUnitConcentration
INFO: CAiBrain:FindUnitConcentration()
  • FindUnitToUpgrade
INFO: brain:FindUnitToUpgrade(upgradeList) -- Return a unit and it's upgrade blueprint
  • FindUpgradeBP
INFO: brain:FindUpgradeBP(unitName, upgradeList) -- Return an upgrade blueprint for the unit passed in
  • GetArmyIndex
INFO: Returns the ArmyIndex of the army represented by this brain
  • GetArmyStat
INFO: brain:GetArmyStat(StatName,defaultValue)
  • GetAttackVectors
INFO: CAiBrain:GetAttackVectors()
  • GetAvailableFactories
INFO: brain:GetAvailableFactories()
  • GetBlipsAroundPoint
INFO: CAiBrain:GetBlipsAroundPoint()
  • GetBlueprintStat
INFO: Return a blueprint stat filtered by category
  • GetCurrentEnemy
INFO: Return this brain's current enemy
  • GetCurrentUnits
INFO: Return how many units of the given categories exist
  • GetEconomyIncome
INFO: CAiBrain:GetEconomyIncome()
  • GetEconomyRequested
INFO: CAiBrain:GetEconomyRequested()
  • GetEconomyStored
INFO: CAiBrain:GetEconomyStored()
  • GetEconomyStoredRatio
INFO: CAiBrain:GetEconomyStoredRatio()
  • GetEconomyTrend
INFO: CAiBrain:GetEconomyTrend()
  • GetEconomyUsage
INFO: CAiBrain:GetEconomyUsage()
  • GetFactionIndex
INFO: Returns the faction of the army represented by this brain
  • GetHighestThreatPosition
INFO: CAiBrain:GetHighestThreatPosition( pos, ring, [threatType], [alliance] )
  • GetListOfUnits
INFO: brain:GetListOfUnits(entityCategory, needToBeIdle, requireBuilt)
  • GetNumPlatoonsTemplateNamed
INFO: GetNumPlatoonsTemplateNamed
  • GetNumPlatoonsWithAI
INFO: GetNumPlatoonsWithAI
  • GetNumUnitsAroundPoint
INFO: CAiBrain:GetNumUnitsAroundPoint()
  • GetPlatoonUniquelyNamed
INFO: CAiBrain:GetPlatoonUniquelyNamed()
  • GetPlatoonsAroundPoint
INFO: CAiBrain:GetPlatoonsAroundPoint(point, radius)
  • GetPlatoonsList
INFO: CAiBrain:GetPlatoonsList()
  • GetThreatAtPosition
INFO: CAiBrain:GetThreatAtPosition(position, ring, [threatType], [alliance] )
  • GetThreatBetweenPositions
INFO: CAiBrain:GetThreatBetweenPositions( position, position, [threatType], [alliance] )
  • GetThreatsAlongLine
INFO: CAiBrain:GetThreatsAlongLine( position1, position2, threatType, armyIndex )
  • GetThreatsAroundPosition
INFO: CAiBrain:GetThreatsAroundPosition( position, ring, [threatType], [alliance] )
  • GetUnitBlueprint
INFO: blueprint = brain:GetUnitBlueprint(bpName)
  • GetUnitsAroundPoint
INFO: CAiBrain:GetUnitsAroundPoint()
  • GiveStorage
INFO: GiveStorage(type,amount)
  • InternalGiveResource
INFO: InternalGiveResource(type,amount)
  • IsOpponentAIRunning
INFO: Returns true if opponent AI should be running
  • LinkPathNode
INFO: CAiBrain:LinkPathNode( treeName, nodeName1, nodeName2 )
  • MakePlatoon
INFO: CAiBrain:MakePlatoon()
  • NumCurrentlyBuilding
INFO: brain:NumCurrentlyBuilding( entityCategoryOfBuildee, entityCategoryOfBuilder )
  • PickBestAttackVector
INFO: CAiBrain:PickBestAttackVector()
  • PlatoonExists
INFO: CAiBrain:PlatoonExists()
  • RemoveArmyStatsTrigger
INFO: Remove an army stats trigger
  • SearchPathLowThreat
INFO: CAiBrain:SearchPathLowThreat( treeName, nodeName1, nodeName2 )
  • SearchPathShortPath
INFO: CAiBrain:SearchPathShortPath( treeName, nodeName1, nodeName2 )
  • SetArmyStat
INFO: SetArmyStat(statname,val)
  • SetArmyStatsTrigger
INFO: Sets an army stat trigger
  • SetCurrentEnemy
INFO: Set the current enemy for this brain to attack
  • SetCurrentPlan
INFO: Set the current plan for this brain to run
  • SetGreaterOf
INFO: SetGreaterOf(statname,val)
  • SetPathThreatMultiplier
INFO: CAiBrain:SetPathThreatMultiplier( multiplier )
  • SetResourceSharing
INFO: SetResourceSharing(bool)
  • SetUpAttackVectorsToArmy
INFO: CAiBrain:SetUpAttackVectorsToArmy()
  • SetUpPathNode
INFO: CAiBrain:SetUpPathNode( treeName, nodeName, position, [cost] )
  • TakeResource
INFO: taken = TakeResource(type,amount)
  • moho.aibrain_methods
INFO:

<Sim.CAiNavigatorImpl>Edit

  • AtGoal
INFO:
  • BroadcastResumeTaskEvent
INFO: Broadcast event to resume any listening task that is currently suspended
  • CanPathToGoal
INFO:
  • FollowingLeader
INFO:
  • GetCurrentTargetPos
INFO: This returns the current navigator target position for the unit
  • GetGoalPos
INFO: This returns the current goal position of our navigator
  • GetStatus
INFO:
  • HasGoodPath
INFO:
  • IgnoreFormation
INFO:
  • IsIgnorningFormation
INFO:
  • SetDestUnit
INFO: Set the navigator's destination as another unit (chase/follow)
  • SetGoal
INFO: Set the navigator's destination as a particular position
  • SetGoalNoPath
INFO: Set the navigator's destination as a particular position, don't use pathfinder
  • SetGoalRect
INFO: Set the navigator's destination by specifying inner/outer rectangle
  • SetSpeedThroughGoal
INFO: Set flag in navigator so the unit will know whether to stop at final goal or speed through it. This would be set to True during a patrol or a series of waypoints in a complex path.
  • moho.navigator_methods
INFO:

<Sim.CAiReconDBImpl>Edit

  • moho.recon_database_methods
INFO:

<Sim.CAiTarget>Edit

  • GetPosition
INFO:
  • GetPositionAir
INFO:
  • GetRealTargetEntity
INFO:
  • GetType
INFO:
  • IsAirEntity
INFO:
  • IsAlive
INFO: Is this a living target?
  • IsDestroyed
INFO: Is this a destroyed target?
  • IsMobileTarget
INFO:
  • IsTheSameAs
INFO:
  • IsValid
INFO:
  • MayBeDead
INFO:
  • PickAimPoint
INFO:
  • PickAimPointAir
INFO:
  • moho.aitarget_methods
INFO:

<Sim.CEconomyEvent>Edit

  • moho.EconomyEvent
INFO:

<Sim.CPlatoon>Edit

  • AttackTarget
INFO: CPlatoon:AttackTarget()
  • CanAttackTarget
INFO: CPlatoon:CanAttackTarget()
  • CanConsiderFormingPlatoon
INFO: CPlatoon:CanConsiderFormingPlatoon()
  • CanFormPlatoon
INFO: CPlatoon:CanFormPlatoon()
  • Destroy
INFO: CPlatoon:Destroy()
  • DisbandOnIdle
INFO: CPlatoon:DisbandOnIdle()
  • FindClosestUnit
INFO: CPlatoon:FindClosestUnit()
  • FindClosestUnitToBase
INFO: CPlatoon:FindClosestUnitToBase()
  • FindFurthestUnit
INFO: CPlatoon:FindFurthestUnit()
  • FindHighestValueUnit
INFO: CPlatoon:FindHighestValueUnit()
  • FindPrioritizedUnit
INFO: CPlatoon:FindPrioritizedUnit()
  • FormPlatoon
INFO: CPlatoon:FormPlatoon()
  • GetAIPlan
INFO: CPlatoon:GetAIPlan()
  • GetBrain
INFO: CPlatoon:GetBrain()
  • GetFactionIndex
INFO: CPlatoon:GetFactionIndex()
  • GetPlatoonLifetimeStats
INFO: CPlatoon:GetPlatoonLifetimeStats()
  • GetPlatoonPosition
INFO: CPlatoon:GetPlatoonPosition()
  • GetPlatoonUniqueName
INFO: CPlatoon:GetPlatoonUniqueName()
  • GetPlatoonUnits
INFO: platoon:GetPlatoonUnits()
  • GetSquadPosition
INFO: CPlatoon:GetSquadPosition()
  • GetSquadUnits
INFO: CPlatoon:GetSquadUnits()
  • GuardTarget
INFO: CPlatoon:GuardTarget()
  • IsAttacking
INFO: CPlatoon:IsAttacking()
  • IsCommandsActive
INFO: CPlatoon:IsCommandsActive()
  • IsMoving
INFO: CPlatoon:IsMoving()
  • IsOpponentAIRunning
INFO: CPlatoon:IsOpponentAIRunning()
  • IsPatrolling
INFO: CPlatoon:IsPatrolling()
  • MoveToLocation
INFO: CPlatoon:MoveToLocation()
  • MoveToTarget
INFO: CPlatoon:MoveToTarget()
  • Patrol
INFO: CPlatoon:Patrol()
  • SetPlatoonFormationOverride
INFO: CPlatoon:SetPlatoonFormationOverride()
  • SetPrioritizedTargetList
INFO: CPlatoon:SetPrioritizedTargetList()
  • Stop
INFO: CPlatoon:Stop()
  • SwitchAIPlan
INFO: CPlatoon:SwitchAIPlan()
  • UniquelyNamePlatoon
INFO: CPlatoon:UniquelyNamePlatoon()
  • moho.platoon_methods
INFO:

<Sim.CUnitCommand>Edit

  • AlwaysRepeatable
INFO:
  • CommandUpdated
INFO:
  • ContainsUnit
INFO:
  • CreateCommandFocusUnit
INFO:
  • FactoryRepeatable
INFO:
  • GetBlueprint
INFO:
  • GetCells
INFO:
  • GetClock
INFO:
  • GetCommandFocusUnit
INFO:
  • GetCurrentCount
INFO:
  • GetId
INFO:
  • GetIsFactoryOrder
INFO:
  • GetLocation
INFO:
  • GetLuaObjectParam
INFO:
  • GetOrientation
INFO:
  • GetPos
INFO:
  • GetRally
INFO:
  • GetTarget
INFO:
  • GetTargetEntity
INFO:
  • GetTargetId
INFO:
  • GetTargetPosition
INFO:
  • GetTargetUnit
INFO:
  • GetTotalCount
INFO:
  • GetType
INFO:
  • GetUnits
INFO:
  • HasFormation
INFO:
  • IsUserIssuedCommand
INFO:
  • RemoveUnit
INFO:
  • SetCells
INFO:
  • SetCurrentCount
INFO:
  • SetDirty
INFO:
  • SetIsFactoryOrder
INFO:
  • SetTarget
INFO:
  • SetTotalCount
INFO:
  • SetType
INFO:
  • moho.unit_command_methods
INFO:

<Sim.CUnitCommandQueue>Edit

  • AddCommandToQueue
INFO: Add a command to the queue
  • ClearCommandQueue
INFO: Clear the entire command queue
  • FindCommandIndex
INFO: scan the queue for a particular command, and return its index or -1 if not found
  • GetCommandCount
INFO: Get/Set the count for a given command. Will remove command if count is 0.
  • GetCommandInQueue
INFO: get command of index from queue if found (NULL if not found)
  • GetCurrentCommand
INFO: get current command (NULL if no command queued)
  • GetLastCommand
INFO: get last command in queue(NULL if 1 or less commands are queued)
  • GetNextCommand
INFO: get next command (NULL if 1 or less commands are queued)
  • GetNumBuildCmds
INFO: Test to see if there is a queue of building units in the queue
  • GetQueue
INFO: Access the command queue directly
  • GetQueueClearingCmdType
INFO:
  • GetQueueSize
INFO: Return the size of the queue
  • InsertCommandToQueue
INFO: Insert a command into the queue at a particular index
  • IsQueueDirty
INFO:
  • IsQueueEmpty
INFO: Return if the queue is currently empty
  • MoveCommandToBackOfQueue
INFO: move a specific command to the back of the queue
  • MoveFirstCommandToBackOfQueue
INFO: Move the first command from the front of the queue to the back of the queue
  • RemoveCommandFromQueue
INFO: remove a command from queue if valid
  • RemoveFirstCommandFromQueue
INFO: remove the first command from queue if valid
  • SetCommandCount
INFO: Get/Set the count for a given command. Will remove command if count is 0.
  • SetQueueClearingCmdType
INFO:
  • SetQueueDirty
INFO:
  • TrimCommandQueue
INFO: Trim the command queue to remove things that are no longer valid
  • UpdateCommandTarget
INFO:
  • moho.unit_command_queue_methods
INFO:

<Sim.CUnitScriptTask>Edit

  • GetSubtaskResult
INFO: Get the result from the subtask
  • GetUnit
INFO: Get the unit performing the task
  • Resume
INFO: Resume(bool interruptSubtasks)
  • SetAIResult
INFO: Set the AI result, success or fail
  • moho.ScriptTask_Methods
INFO:

<Sim.CollisionBeamEntity>Edit

  • Enable
INFO: CollisionBeamEntity:Enable()
  • GetLauncher
INFO: CollisionBeamEntity:GetLauncher()
  • IsEnabled
INFO: bool = CollisionBeamEntity:IsEnabled()
  • SetBeamFx
INFO: CollisionBeamEntity:SetBeamFx(beamEmitter, checkCollision) -- set an emitter to be controlled by this beam. Its length parameter will be set from the beam entity's collision distance.
  • __init
INFO: beam = CreateCollisionBeam(spec)
spec is a table with the following fields defined:
  • spec.Weapon = <weapon to attach to>
  • spec.OtherBone = <bone of weapon's unit to attach to>
  • spec.CollisionCheckInterval = <interval in ticks>
  • spec.BeamBone = <which end of beam to attach>
  • base
INFO: derived from Entity
  • moho.CollisionBeamEntity
INFO:

<Sim.Entity>Edit

  • AddManualScroller
INFO: Entity:AddManualScroller(scrollSpeed1, scrollSpeed2)
  • AddPingPongScroller
INFO: Entity:AddPingPongScroller(ping1, pingSpeed1, pong1, pongSpeed1, ping2, pingSpeed2, pong2, pongSpeed2)
  • AddShooter
INFO: AddShooter(shooter)
  • AddThreadScroller
INFO: Entity:AddThreadScroller(sideDist, scrollMult)
  • AddWorldImpulse
INFO: AddWorldImpulse(self, Ix, Iy, Iz, Px, Py, Pz)
  • AdjustHealth
INFO: Entity:AdjustHealth(delta)
  • AttachBoneTo
INFO: Entity:AttachBoneTo(selfbone, entity, bone)
  • AttachTo
INFO: Entity:AttachTo(entity, bone)
  • BeenDestroyed
INFO: Entity:BeenDestroyed()
  • ContainsPoint
INFO: bool = Entity:ContainsPoint(point)
  • CreateProjectile
INFO: Entity:CreateProjectile(proj_bp, [ox, oy, oz], [dx, dy, dz]
  • CreateProjectileAtBone
INFO: Entity:CreateProjectileAtBone(projectile_blueprint, bone)
  • CreatePropAtBone
INFO: Entity:CreatePropAtBone(boneindex,prop_blueprint_id)
  • Destroy
INFO: Entity:Destroy()
  • DetachAll
INFO: Entity:DetachAll(bone,[skipBallistic])
  • DetachFrom
INFO: Entity:DetachFrom([skipBallistic])
  • DisableIntel
INFO: Intel:DisableIntel(type)
  • EnableIntel
INFO: EnableIntel(type)
  • FallDown
INFO: Entity:FallDown(dx,dy,dz,force) -- start falling down
  • GetAIBrain
INFO: GetAIBrain(self)
  • GetArmy
INFO: GetArmy(self)
  • GetBlueprint
INFO: blueprint = Entity:GetBlueprint()
  • GetBoneCount
INFO: Entity:GetBoneCount() -- returns number of bones in this entity's skeleton
  • GetBoneDirection
INFO: Entity:GetBoneDirection(bone_name)
  • GetBoneName
INFO: Entity:GetBoneName(i) -- return the name of the i'th bone of this entity (counting from 0)
  • GetBonePosition
INFO: Entity:GetPosition([bone_name])
  • GetCollisionExtents
INFO: Entity:GetCollisionExtents()
  • GetCollisionShape
INFO: Entity:GetCollisionShape()
  • GetEntityId
INFO: Entity:GetEntityId()
  • GetFractionComplete
INFO: Entity:GetFractionComplete()
  • GetHeading
INFO: Entity:GetHeading()
  • GetHealth
INFO: Entity:GetHealth()
  • GetIntelRadius
INFO: GetIntelRadius(type)
  • GetMaxHealth
INFO: Entity:GetMaxHealth()
  • GetMeshBox
INFO: {Min=vector,Max=vector} = Entity:GetMeshBox()
  • GetOrientation
INFO: Entity:GetOrientation()
  • GetParent
INFO: Entity:GetParent()
  • GetScale
INFO: Entity:GetScale() -> sx,sy,sz -- return current draw scale of this entity
  • InitIntel
INFO: InitIntel(army,type,<radius>)
  • IntersectsEntity
INFO: bool = Entity:IntersectsEntity(entity)
  • IntersectsSphere
INFO: bool = Entity:IntersectsSphere(sphere)
  • IsBox
INFO: Entity:IsBox()
  • IsIntelEnabled
INFO: IsIntelEnabled(type)
  • IsSphere
INFO: Entity:IsSphere()
  • IsValidBone
INFO: Entity:IsValidBone(nameOrIndex,allowNil=false)
  • Kill
INFO: Entity:Kill()
  • Materialize
INFO: Entity:Materialize(delta)
  • PlaySound
INFO: Entity:PlaySound(eventname)
  • PushOver
INFO: Entity:PushOver(nx, ny, nz, depth)
  • ReachedMaxShooters
INFO: ReachedMaxShooters()
  • RemoveScroller
INFO: Entity:RemoveScroller()
  • RemoveShooter
INFO: RemoveShooter(shooter)
  • RequestRefreshUI
INFO: Entity:RequestRefreshUI()
  • SetAmbientSound
INFO: Entity:SetAmbientSound(eventname, looptag)
  • SetCollisionShape
INFO: Entity:SetCollisionShape(['Box'|'Sphere'|'None'], centerX, Y, Z, size) -- size is radius for sphere, x,y,z extent for box
  • SetDrawScale
INFO: Entity:SetDrawScale(size): Change mesh scale on the fly
  • SetHealth
INFO: Entity:SetHealth(health)
  • SetIntelRadius
INFO: SetRadius(type,radius)
  • SetMaxHealth
INFO: Entity:SetMaxHealth(maxhealth)
  • SetMesh
INFO: Entity:SetMesh(meshBp, bool keepActor): Change mesh on the fly
  • SetOrientation
INFO: Entity:SetOrientation(orientation, immediately )
  • SetParentOffset
INFO: Entity:SetParentOffset(vector)
  • SetPosition
INFO: Entity:SetPosition(vector,[immediate])
  • SetScale
INFO: Entity:SetScale(s) or Entity:SetScale(sx,sy,sz)
  • SetSelectionOffset
INFO: Entity:SetSelectionOffset(vector)
  • SetVizToAllies
INFO: SetVizToAllies(type)
  • SetVizToEnemies
INFO: SetVizToEnemies(type)
  • SetVizToFocusPlayer
INFO: SetVizToFocusPlayer(type)
  • SetVizToNeutrals
INFO: SetVizToNeutrals(type)
  • ShakeCamera
INFO: Entity:ShakeCamera(radius, max, min, duration)
Shake the camera. This is a method of entities rather than a global function
because it takes the position of the entity as the epicenter where it shakes more.
  • radius - distance from epicenter at which shaking falls off to 'min'
  • max - size of shaking in world units, when looking at epicenter
  • min - size of shaking in world units, when at 'radius' distance or farther
  • duration - length of time to shake for, in seconds
  • SinkAway
INFO: Entity:SinkAway(vy) -- sink into the ground
  • moho.entity_methods
INFO:

<Sim.IAnimController>Edit

  • Enable
INFO: Controller:Enable() -- enable a controller. Controllers start out enabled so you only need this after calling Disable().
  • SetPrecedence
INFO: Controller:SetPrecedence(integer) -- change the precedence of this controller. Controllers with higher precedence run first.
  • moho.controller_methods
INFO:

<Sim.IEffect>Edit

  • OffsetEmitter
INFO: Effect:OffsetEmitter(x,y,z)
  • ResizeEmitterCurve
INFO: Effect:ResizeEmitterCurve(parameter, time_in_ticks)Resize the emitter curve to the number of ticks passed in.
This is so if we change the lifetime of the emitter we can rescale some of the curves to match if needed.
Arguably this should happen automatically to all curves but the original design was screwed up.
returns the effect so you can chain calls like:
  • effect:SetEmitterParam('x',1):ScaleEmitter(3.7)
  • ScaleEmitter
INFO: effect:ScaleEmitter(param, scale)
returns the effect so you can chain calls like:
  • effect:SetEmitterParam('x',1):ScaleEmitter(3.7)
  • SetBeamParam
INFO: effect:SetBeamParam('name', value)
  • SetEmitterCurveParam
INFO: Effect:SetEmitterCurveParam(param_name, height, size)
  • SetEmitterParam
INFO: effect:SetEmitterParam('name', value)returns the effect so you can chain calls like:
  • effect:SetEmitterParam('x',1):ScaleEmitter(3.7)
  • moho.IEffect
INFO:

<Sim.MotorFallDown>Edit

  • moho.MotorFallDown
INFO:

<Sim.Projectile>Edit

  • ChangeDetonateBelowHeight
INFO: Change the detonate below height for the projectile
  • ChangeMaxZigZag
INFO: Change the amount of zig zag
  • ChangeZigZagFrequency
INFO: Change the frequency of the zig zag
  • CreateChildProjectile
INFO: Projectile:CreateChildProjectile(blueprint)
  • GetCurrentSpeed
INFO: Projectile:GetCurrentSpeed() -> val
  • GetCurrentTargetPosition
INFO: Projectile:GetCurrentTargetPosition()
  • GetLauncher
INFO: Get who launched this projectile
  • GetTrackingTarget
INFO: Projectile:GetTrackingTarget()
  • GetVelocity
INFO: Projectile:GetVelocity() -> x,y,z
  • GetVelocityVector
INFO: v = Projectile:GetVelocityVector()
  • SetAcceleration
INFO: Projectile:SetAcceleration(accel)
  • SetBallisticAcceleration
INFO: Wrong number of arguments to Projectile:SetAccelerationVector(), expected 1, 2, or 4 but got %d
  • SetCollideEntity
INFO: Projectile:SetCollideEntity(onoff)
  • SetCollideSurface
INFO: Projectile:SetCollideSurface(onoff)
  • SetCollision
INFO: Projectile:SetCollision(onoff)
  • SetDamage
INFO: Projectile:SetDamage(amount, radius) -- change how much damage this projectile will do. Either amount or radius can be nil to leave unchanged.
  • SetLifetime
INFO: Projectile:SetLifetime(seconds)
  • SetLocalAngularVelocity
INFO: Projectile:SetLocalAngularVelocity(x,y,z)
  • SetMaxSpeed
INFO: Projectile:SetMaxSpeed(speed)
  • SetNewTarget
INFO: Projectile:SetNewTarget( entity )
  • SetNewTargetGround
INFO: Projectile:SetNewTargetGround( location )
  • SetScaleVelocity
INFO: Projectile:SetScaleVelocity(vs) or Projectile:SetScaleVelocity(vsx, vsy, vsz)
  • SetStayUpright
INFO: Projectile:SetStayUpright(truefalse)
  • SetTurnRate
INFO: Projectile:SetTurnRate(radians_per_second)
  • SetVelocity
INFO: Projectile:SetVelocity(speed) or Projectile:SetVelocity(vx,vy,vz)
  • SetVelocityAlign
INFO: Projectile:SetVelocityAlign(truefalse)
  • SetVelocityRandomUpVector
INFO: SetVelocityRandomUpVector(self)
  • SetVelocityVector
INFO: Projectile:SetVelocityVector(v)
  • TrackTarget
INFO: Projectile:TrackTarget(onoff)
  • base
INFO: derived from Entity
  • moho.projectile_methods
INFO:

<Sim.Prop>Edit

  • base
INFO: derived from Entity
  • moho.prop_methods
INFO:

<Sim.ReconBlip>Edit

  • GetSource
INFO: unit = ReconBlip:GetSource()
  • IsMaybeDead
INFO: bool = ReconBlip:IsMaybeDead()
  • IsOnOmni
INFO: bool = ReconBlip:IsOnOmni()
  • IsOnRadar
INFO: bool = ReconBlip:IsOnRadar()
  • IsSeenEver
INFO: bool = ReconBlip:IsSeenEver()
  • IsSeenNow
INFO: bool = ReconBlip:IsSeenNow()
  • base
INFO: derived from Entity
  • moho.blip_methods
INFO:

<Sim.Shield>Edit

  • moho.shield_methods
INFO:

<Sim.ThreatQuery>Edit

  • FilterDistanceLessThan
INFO: query:FilterDistanceLessThan(value)
  • FilterThreatGreatherThan
INFO: query:FilterThreatGreaterThan(value)
  • FilterThreatLessThan
INFO: query:FilterThreatLessThan(value)
  • GetResults
INFO: query:GetResults()
  • GetThreatsAroundPoint
INFO: query:GetThreatsAroundPoint(position,ring,[type],[alliance])
  • IsEmpty
INFO: query:IsEmpty()
  • SortClosestToFurthest
INFO: query:SortClosestToFurthest()
  • SortFurthestToClosest
INFO: query:SortFurthestToClosest()
  • SortThreatHighToLow
INFO: query:SortThreatHighToLow()
  • SortThreatLowToHigh
INFO: query:SortThreatLowToHigh()
  • moho.threatQuery_methods
INFO:

<Sim.Unit>Edit

  • AddCommandCap
INFO: unit:AddCommandCap(capName) -- Add a command cap to a unit.
  • AddImpulse
INFO: AddImpulse(self, x, y, z)
  • AddImpulseEx
INFO: AddImpulseEx(self, vector, makeBallistic)
  • AddSparseBone
INFO: AddSparseBone(BoneName)
  • AddToggleCap
INFO: unit:AddToggleCap(capName) -- Add a toggle cap to a unit.
  • CalculateWorldPositionFromRelative
INFO: Calculate the desired world position from the supplied relative vector from the center of the unit
  • CanBuild
INFO: CanBuild(self, blueprint
  • CanPathTo
INFO: See if the unit can path to the goal
  • CanPathToRect
INFO: See if the unit can path to the goal rectangle
  • CanReserveGridPos
INFO: CanReserveGridPos(location)
  • FindAdjacentSpot
INFO: unit:FindAdjacentSpot(target)
  • FindEmptySpotNear
INFO: unit:FindEmptySpotNear(pos)
  • FindEmptySpotNearby
INFO: unit:FindEmptySpotNearby()
  • FindNearbyMeleeTargets
INFO: unit:FindNearbyMeleeTargets()
  • FreeGrid
INFO: FreeGrid()
  • GetAttacker
INFO: GetAttacker() - get the tactical attack manager object of this unit
  • GetBlip
INFO: blip = GetBlip(armyIndex) - returns a blip (if any) that the given army has for the unit
  • GetBuildRate
INFO: unit:GetBuildRate() -- returns the build rate of a unit: what fraction of target unit it builds per second.
  • GetCommandQueue
INFO: unit:GetCommandQueue()
  • GetConsumptionPerSecondEnergy
INFO: Get the consumption of energy of the unit
  • GetConsumptionPerSecondMass
INFO: Get the consumption of mass of the unit
  • GetCurrentLayer
INFO: GetUnitId(self)
  • GetEntityId
INFO: GetEntityId(self)
  • GetFireState
INFO: Get the fire state for retaliation
  • GetFocusEntity
INFO: GetFocusEntity(self)
  • GetGuardedUnit
INFO: Unit:GetGuardedUnit()
  • GetGuards
INFO: Unit:GetGuards()
  • GetNavigator
INFO: GetNavigator() - get the navigator object of this unit
  • GetNumBuildOrders
INFO: Get number of factory build orders that fit in the specified category
  • GetProductionPerSecondEnergy
INFO: Get the production of energy of the unit
  • GetProductionPerSecondMass
INFO: Get the production of mass of the unit
  • GetRallyPoint
INFO: Get the rally point for the factory
  • GetResourceConsumed
INFO: Return the fraction of requested resources this unit consumed last tick. Normally 1, but can be fractional if economy is struggling.
  • GetScriptBit
INFO: Get the current toggle state of the script bit that matches the string
  • GetShieldRatio
INFO: Get the shield ratio
  • GetSpeed
INFO: GetSpeed
  • GetSpeedMult
INFO: Set the speed multiplier of the unit
  • GetStat
INFO: GetStat(Name[,defaultVal])
  • GetTargetEntity
INFO: Return our target unit if we have one
  • GetUnitId
INFO: GetUnitId(self)
  • GetVelocity
INFO: GetVelocity
  • GetWeapon
INFO: GetWeapon(self,index) -- return the index'th weapon of this unit. Index must be between 1 and self:GetWeaponCount(), inclusive.
  • GetWeaponCount
INFO: GetWeaponCount(self) -- return the number of weapons on this unit. Note that dummy weapons are not included in the count, so this may differ from the number of weapons defined in the unit's blueprint.
  • GetWorkProgress
INFO: GetWorkProgress()
  • HideBone
INFO: HideBone(self,bone,affectChildren)
  • IsBeingBuilt
INFO: Unit:IsBeingBuilt()
  • IsCurrentSpotClear
INFO: unit:IsCurrentSpotClear()
  • IsCurrentlyFacing
INFO: IsCurrentlyFacing(vector, threshold)
  • IsDead
INFO: IsDead(unit)
  • IsFootprintDown
INFO: bool IsFootprintDown()
  • IsIdleState
INFO: IsIdleState(unit)
  • IsImmobile
INFO: IsImmobile(unit)
  • IsMobile
INFO: bool IsMobile() - Is this a mobile unit?
  • IsMoving
INFO: bool IsMoving() - Is this unit moving?
  • IsPaused
INFO: Unit:IsPaused()
  • IsStunned
INFO: IsStunned(unit)
  • IsUnitState
INFO: IsUnitState(unit, stateName)
  • IsValidTarget
INFO: bool = IsValidTarget(self)
  • KillManipulator
INFO: Kill a specific manipulator held by a script object
  • KillManipulators
INFO: Unit:KillManipulators([boneName|boneIndex])
  • MeleeWarpAdjacentToTarget
INFO: Unit:MeleeWarpAdjacentToTarget(target)
  • OccupyGround
INFO: OccupyGround(true/false)
  • PrintCommandQueue
INFO: Unit:PrintCommandQueue()
  • RemoveBuildRestriction
INFO: Allow building of categories for this unit
  • RemoveCommandCap
INFO: unit:RemoveCommandCap(capName) -- Remove a command cap to a unit.
  • RemoveToggleCap
INFO: unit:RemoveToggleCap(capName) -- Remove a toggle cap to a unit.
  • ReserveGridPos
INFO: ReserveGridRect(location)
  • RestoreBuildRestrictions
INFO: Restore buildable categories to that as defined in the blueprint
  • RestoreCommandCaps
INFO: Restore the command caps of the unit back to blueprint spec.
  • RestoreToggleCaps
INFO: Restore the toggle caps of the unit back to blueprint spec.
  • RevertCollisionShape
INFO: Revert the collision shape to the blueprint spec
  • RevertElevation
INFO: Revert the elevation of the unit back to the blueperint spec
  • RevertRegenRate
INFO: Restore regen rate of the unit back to blueprint spec.
  • ScaleGetBuiltEmitter
INFO: ScaleGetBuiltEmitter(self, emitter)
  • SetAccMult
INFO: Set the acceleration multiplier of the unit
  • SetAirThreat
INFO: Set the air threat level for this unit for use in Influence map calcs.
  • SetBlockCommandQueue
INFO: SetBlockCommandQueue(unit, flag)
  • SetBreakOffDistanceMult
INFO: Set the break off distance multiplier of the unit
  • SetBreakOffTriggerMult
INFO: Set the break off trigger multiplier of the unit
  • SetBuildRate
INFO: unit:SetBuildRate(frac) -- Set the build rate of a unit: what fraction of target unit it builds per second.
  • SetBusy
INFO: SetBusy(unit, flag)
  • SetCapturable
INFO: Set if this unit can be captured or not.
  • SetConsumptionActive
INFO: Unit:SetConsumptionActive(flag)
  • SetConsumptionPerSecondEnergy
INFO: unit:SetConsumptionPerSecondEnergy(value) -- Set the consumption of energy of a unit
  • SetConsumptionPerSecondMass
INFO: Set the consumption of mass of the unit
  • SetCreator
INFO: Set the creator for this unit
  • SetCustomName
INFO: Unit:SetCustomName(name)
  • SetDoNotTarget
INFO: SetDoNotTarget(unit, flag)
  • SetElevation
INFO: Set the elevation of the unit
  • SetFacing
INFO: SetFacing(vector)
  • SetFireState
INFO: Set a specific fire state for the retaliation state of the unit
  • SetFocusEntity
INFO: SetFocusUnit(self, focus)
  • SetFootprintDown
INFO: SetFootprintDown(bool)
  • SetImmobile
INFO: SetImmobile(unit, flag)
  • SetIsValidTarget
INFO: SetIsValidTarget(self,bool)
  • SetPaused
INFO: Unit:SetPaused()
  • SetProductionActive
INFO: Unit:SetProductionActive(flag)
  • SetProductionPerSecondEnergy
INFO: Set the production of energy of the unit
  • SetProductionPerSecondMass
INFO: Set the production of mass of the unit
  • SetRegenRate
INFO: unit:SetRegenRate(rate) -- Set the regen rate of a unit.
  • SetScriptBit
INFO: Set the script bit that matches the string to the desired state
  • SetShieldRatio
INFO: Set the shield ratio
  • SetSpeedMult
INFO: Set the speed multiplier of the unit
  • SetStat
INFO: SetStat(Name, Value)
  • SetStrategicUnderlay
INFO: SetStrategicUnderlay(icon)
  • SetStunned
INFO: SetStunned(unit, time)
  • SetSurfaceThreat
INFO: Set the surface threat level for this unit for use in Influence map calcs.
  • SetTurnMult
INFO: Set the turn multiplier of the unit
  • SetUnSelectable
INFO: SetUnSelectable(unit, flag)
  • SetUnitState
INFO: SetUnitState(name, bool)
  • SetUpgradedTo
INFO: SetUpgradedTo(unit)
  • SetWorkProgress
INFO: SetWorkProgress(float)
  • ShowBone
INFO: ShowBone(self,bone,affectChildren)
  • TestCommandCaps
INFO: Test if a unit has this specified set to true in the blueprint spec.
  • TestToggleCaps
INFO: Test if a unit has this specified set to true in the blueprint spec.
  • ToggleFireState
INFO: Toggle the fire state for the retaliation state of the unit
  • ToggleScriptBit
INFO: Toggle the script bit that matches the string
  • base
INFO: derived from Entity
  • moho.unit_methods
INFO:

<Sim.UnitWeapon>Edit

  • BeenDestroyed
INFO: UnitWeapon:BeenDestroyed()
  • CanAttackTarget
INFO: Can I attack the given target?
  • ChangeClosingRadius
INFO: UnitWeapon:ChangeClosingRadius(value)
  • ChangeDamage
INFO: UnitWeapon:ChangeDamage(value)
  • ChangeDamageRadius
INFO: UnitWeapon:ChangeDamageRadius(value)
  • ChangeDamageType
INFO: UnitWeapon:ChangeDamageType(typeName)
  • ChangeFiringTolerance
INFO: UnitWeapon:ChangeFiringTolerance(value)
  • ChangeMaxRadius
INFO: UnitWeapon:ChangeMaxRadius(value)
  • ChangeMinRadius
INFO: UnitWeapon:ChangeMinRadius(value)
  • ChangeProjectileBlueprint
INFO: Change the projectile blueprint of a weapon
  • ChangeRateOfFire
INFO: UnitWeapon:ChangeRateOfFire(value)
  • CheckTargetRange
INFO: Check the target range
  • ClearBlackList
INFO: Clear the weapon blacklist
  • CreateProjectile
INFO: UnitWeapon:CreateProjectile(muzzlebone)
  • DoInstaHit
INFO: UnitWeapon:DoInstaHit(bone, r,g,b, glow, width, texture, lifetime)
  • FireWeapon
INFO: bool = UnitWeapon:FireWeapon()
  • GetAttacker
INFO: Get attacker object
  • GetBlueprint
INFO: blueprint = UnitWeapon:GetBlueprint()
  • GetClosingRadius
INFO: UnitWeapon:GetClosingRadius()
  • GetCurrentTargetPos
INFO: UnitWeapon:GetCurrentTargetPos()
  • GetFireClockPct
INFO: Get the firing clock percent (0 - 1)
  • GetFiringRandomness
INFO: Get the firing randomness
  • GetIndex
INFO: Get weapon index in unit
  • GetMaxRadius
INFO: UnitWeapon:GetMaxRadius()
  • GetMinRadius
INFO: UnitWeapon:GetMinRadius()
  • GetProjectileBlueprint
INFO: blueprint = UnitWeapon:GetProjectileBlueprint()
  • GetStayOnTarget
INFO: UnitWeapon:GetStayOnTarget()
  • GetTarget
INFO: UnitWeapon:GetTarget()
  • HasFiringSolution
INFO: Do we have a firing solution?
  • IsEnabled
INFO: bool UnitWeapon:IsEnabled()
  • IsFireControl
INFO: UnitWeapon:IsFireControl(label)
  • IsMelee
INFO: Is this a melee weapon?
  • IsOnTarget
INFO: UnitWeapon:IsOnTarget(target)
  • IsPrimaryWeapon
INFO: Is this the primary weapon?
  • PickNewTargetAimSpot
INFO: Pick a new spot to fire at
  • PlaySound
INFO: UnitWeapon:PlaySound(weapon,eventname)
  • ResetFireClock
INFO: Reset the fire clock
  • ResetTarget
INFO: UnitWeapon:ResetTarget()
  • ResumeAcquisition
INFO: Resume target acquisition
  • SetEnabled
INFO: UnitWeapon:SetEnabled(enabled)
  • SetFireControl
INFO: UnitWeapon:SetFireControl(label)
  • SetFireTargetLayerCaps
INFO: UnitWeapon:SetFireTargetLayerCaps(mask)
  • SetFiringRandomness
INFO: Set the firing randomness
  • SetOldTarget
INFO: UnitWeapon:SetOldTarget(target)
  • SetRelocateTimer
INFO: UnitWeapon:SetRelocateTimer()
  • SetStayOnTarget
INFO: UnitWeapon:SetStayOnTarget()
  • SetTarget
INFO: UnitWeapon:SetTarget(target)
  • SetTargetEntity
INFO: UnitWeapon:SetTarget(entity)
  • SetTargetGround
INFO: UnitWeapon:SetTarget(location)
  • SetTargetingPriorities
INFO: Set the targeting priorities for the unit
  • TransferTarget
INFO: Transfer target from 1 weapon to another
  • WeaponHasTarget
INFO: bool = UnitWeapon:HasTarget()
  • moho.weapon_methods
INFO:

UnsafeEdit

<Unsafe.<global>>Edit

  • SHGetFolderPath
INFO: (name, create?) -- Interface to Win32 SHGetFolderPath api

UserEdit

<User.<global>>Edit

  • AddCommandFeedbackBlip
INFO: AddCommandFeedbackBlip(meshInfoTable, duration)
  • AddConsoleOutputReciever
INFO: handler AddConsoleOutputReciever(func(text))
  • AddInputCapture
INFO: AddInputCapture(control) - set a control as the current capture
  • AddSelectUnits
INFO: Add these units to the currently Selected lists
  • AnyInputCapture
INFO: bool AnyInputCapture() - returns true if there is anything currently on the capture stack
  • AudioSetLanguage
INFO: AudioSetLanguage(name()
  • CVPActive
INFO: bool CVPActive()
  • CVPHost
INFO: bool CVPHost(gameName, scenarioFileName)
  • CVPLogin
INFO: bool CVPLogin()
  • CVPSend
INFO: CVPSend(cmd,args...)
  • ClearBuildTemplates
INFO: clear and disable the build templates.
  • ClearFrame
INFO: ClearFrame(int head) - destroy all controls in frame, nil head will clear all frames
  • ConExecute
INFO: ConExecute('command string') -- Perform a console command
  • ConExecuteSave
INFO: ConExecuteSave('command string') -- Perform a console command, saved to stack
  • ConTextMatches
INFO: strings ContextMatches(string)
  • CopyCurrentReplay
INFO: CopyCurrentReplay(string profile, string newFilename) - copy the current replay to another file
  • CreateCVPLobby
INFO: bool CreateCVPLobby()
  • CreateUnitAtMouse
INFO: CreateUnitAtMouse
  • CurrentTime
INFO: Get the current time in seconds, counting from 0 at application start. This is wall-clock time and is unaffected by gameplay.
  • DebugFacilitiesEnabled
INFO: bool DebugFacilitiesEnabled() - returns true if debug facilities are enabled.
  • DefineRange
INFO: DefineRange(name,outerTexture,outerThickness,innerTexture,innerThickness)
  • DefineReticule
INFO: DefineReticule(name,texture)
  • DeleteCommand
INFO: DeleteCommand(id)
  • DisableRange
INFO: DisableRange()
  • DisableReticule
INFO: DisableReticule()
  • DisableWorldSounds
INFO: DisableWorldSounds
  • EjectSessionClient
INFO: EjectSessionClient(int clientIndex) -- eject another client from your session
  • EnableRange
INFO: EnableRange(name,position,outerRadius,innerRadius)
  • EnableReticule
INFO: EnableReticule(name,position,scale)
  • EnableWorldSounds
INFO: EnableWorldSounds
  • EngineStartFrontEndUI
INFO: EngineStartFrontEndUI() - kill current UI and start main menu from top
  • EngineStartSplashScreens
INFO: EngineStartSplashScreens() - kill current UI and start splash screens
  • EntityCategoryContains
INFO: See if a unit category contains this unit
  • EntityCategoryFilterDown
INFO: Filter a list of units to only those found in the category
  • EntityCategoryFilterOut
INFO: Filter a list of units to exclude those found in the category
  • ExecLuaInSim
INFO: Execute some lua code in the sim
  • ExitApplication
INFO: ExitApplication - request that the application shut down
  • ExitGame
INFO: ExitGame() - Quits the sim, but not the app
  • FlushEvents
INFO: FlushEvents() -- flush mouse/keyboard events
  • FormatTime
INFO: string FormatTime(seconds) - format a string displaying the time specified in seconds
  • GameTick
INFO: Get the current game time in ticks. The game time is the simulation time, that stops when the game is paused.
  • GameTime
INFO: Get the current game time in seconds. The game time is the simulation time, that stops when the game is paused.
  • GenerateBuildTemplateFromSelection
INFO: generate and enable build templates from the current selection.
  • GetActiveBuildTemplate
INFO: get active build template back to lua.
  • GetArmiesTable
INFO: armyInfo GetArmiesTable()
  • GetArmyAvatars
INFO: table GetArmyAvatars() - return a table of avatar units for the army
  • GetArmyScore
INFO: int GetArmyScore(armyIndex)
  • GetAvailableOrders
INFO: orders = GetUnitCommandData(unitSet)
  • GetBlueprint
INFO: blueprint = GetBlueprint()
  • GetBlueprintByEntityId
INFO: bp = GetBlueprintByEntityId(idString)
  • GetBuildableCategories
INFO: buildableCategories = GetBuildableCategories(unit)
  • GetCamera
INFO: GetCamera(name)
  • GetCommandLineArg
INFO: CommandArgTable GetCommandLineArg(option, number)
  • GetCurrentUIState
INFO: state GetCurrentUIState() - returns 'splash', 'frontend' or 'game' depending on the current state of the ui
  • GetCursor
INFO: GetCursor()
  • GetEconomyTotals
INFO: table GetEconomyTotals()
  • GetFireState
INFO: Get the right fire state for the units passed in
  • GetFocusArmy
INFO: GetFocusArmy()
  • GetFrame
INFO: frame GetFrame(int head) - return the root UI frame for a given head
  • GetFrontEndData
INFO: table GetFrontEndData(key)
  • GetGameTime
INFO: string GetGameTime() - returns a formatted string displaying the time the game has been played
  • GetGameTimeSeconds
INFO: float GetGameTimeSeconds() - returns game time in seconds
  • GetIdleFactories
INFO: table GetIdleFactories() - return a table of idle factory units for the army
  • GetInputCapture
INFO: control GetInputCapture() - returns the current capture control, or nil if none
  • GetIsAutoMode
INFO: See if anyone in the list is auto building
  • GetIsPaused
INFO: Is anyone ins this list builder paused?
  • GetMouseScreenPos
INFO: vector GetMouseScreenPos()
  • GetMouseWorldPos
INFO: vector GetMouseWorldPos()
  • GetMouseoverBlueprint
INFO: bp = GetMouseoverBlueprint
  • GetMouseoverEntityId
INFO: id = GetMouseoverEntityId
  • GetMouseoverUnit
INFO: userUnit = GetMouseoverUnit
  • GetMovieVolume
INFO: GetMovieVolume()
  • GetNumRootFrames
INFO: int GetNumRootFrames() - returns the current number of root frames (typically one per head
  • GetPreference
INFO: obj GetPreference(string, [default])
  • GetResourceSharing
INFO: bool GetResourceSharing()
  • GetRolloverInfo
INFO: rolloverInfo GetRolloverInfo()
  • GetScriptBit
INFO: Get the state for the script big
  • GetSelectedUnits
INFO: table GetSelectedUnits() - return a table of the currently selected units
  • GetSessionClients
INFO: GetSessionClients() -- return a table of the various clients in the current session.
  • GetSimRate
INFO: number GetSimRate()
  • GetSimTicksPerSecond
INFO: int GetSimTicksPerSecond()
  • GetSpecialFileInfo
INFO: table GetSpecialFileInfo(string profileName, string basename, string type) - get information on a profile based file, nil if unable to find
  • GetSpecialFilePath
INFO: string GetSpecialFilePath(string profilename, string filename, string type) - Given the base name of a special file, retuns the complete path
  • GetSpecialFiles
INFO: table GetSpecialFiles(string type)- returns a table of strings which are the names of files in special locations (currently SaveFile, Replay)
  • GetSpecialFolder
INFO: string GetSpecialFolder(string type)
  • GetSystemTime
INFO: string GetSystemTime() - returns a formatted string displaying the System time
  • GetSystemTimeSeconds
INFO: float GetSystemTimeSeconds() - returns System time in seconds
  • GetTextureDimensions
INFO: width, height GetTextureDimensions(filename, border = 1)
  • GetUIControlsAlpha
INFO: float GetUIControlsAlpha() -- get the alpha multiplier for 2d UI controls
  • GetUnitById
INFO: GetUnitById(id)
  • GetUnitCommandData
INFO: orders, buildableCategories, GetUnitCommandData(unitSet) -- given a set of units, gets the union of orders and unit categories (for determining builds)
  • GetUnitCommandFromCommandCap
INFO: string GetUnitCommandFromCommandCap(string) - given a RULEUCC type command, return the equivalent UNITCOMMAND command
  • GetUnitInfo
INFO: info GetEntityInfo()
  • GetValidAttackingUnits
INFO: table GetValidAttackingUnits() - return a table of the currently selected units
  • GetVolume
INFO: float GetVolume(category)
  • HasCommandLineArg
INFO: HasCommandLineArg(option)
  • HasLocalizedVO
INFO: HasLocalizedVO(languageCode)
  • IN_AddKeyMapTable
INFO: IN_AddKeyMapTable(keyMapTable) - add a set of key mappings
  • IN_ClearKeyMap
INFO: IN_ClearKeyMap() - clears all key mappings
  • IN_RemoveKeyMapTable
INFO: IN_RemoveKeyMapTable(keyMapTable) - removes the keys from the key map
  • InternalCreateBitmap
INFO: InternalCreateBitmap(luaobj,parent) -- for internal use by CreateBitmap()
  • InternalCreateBorder
INFO: InternalCreateBorder(luaobj,parent) -- for internal use by CreateBorder()
  • InternalCreateDiscoveryService
INFO: InternalCreateDiscoveryService(class)
  • InternalCreateDragger
INFO: InternalCreateDragger(luaobj) -- for internal use by CreateDragger()
  • InternalCreateEdit
INFO: InternalCreateEdit(luaobj,parent)
  • InternalCreateFrame
INFO: InternalCreateFrame(luaobj) -- For internal use by CreateFrame()
  • InternalCreateGroup
INFO: InternalCreateGroup(luaobj,parent) -- For internal use by CreateGroup()
  • InternalCreateHistogram
INFO: InternalCreateHistogram(luaobj,parent) -- For internal use by CreateHistogram()
  • InternalCreateImpulseDiscoveryService
INFO: InternalCreateImpulseDiscoveryService(class)
  • InternalCreateItemList
INFO: InternalCreateItemList(luaobj,parent) -- for internal use by CreateItemList()
  • InternalCreateMapPreview
INFO: InternalCreateMapPreview(luaobj,parent)
  • InternalCreateMesh
INFO: InternalCreateMesh(luaobj,parent) -- for internal use by CreateMesh()
  • InternalCreateMovie
INFO: InternalCreateMovie(luaobj,parent) -- for internal use by CreateMovie()
  • InternalCreateScrollbar
INFO: InternalCreateScrollbar(luaobj,parent,axis) -- for internal use by CreateScrollBar()
  • InternalCreateText
INFO: InternalCreateText(luaobj,parent)
  • InternalCreateWldUIProvider
INFO: InternalCreateWldUIProvider(luaobj) - create the C++ script object
  • InternalCreateWorldMesh
INFO: InternalCreateWorldMesh(luaobj) -- for internal use by WorldMesh()
  • InternalSaveGame
INFO: InternalSaveGame(filename, friendlyname, oncompletion) -- save the current session.
  • IsAlly
INFO: IsAlly(army1,army2)
  • IsEnemy
INFO: IsEnemy(army1,army2)
  • IsEntity
INFO: bool = IsEntity(object)
  • IsKeyDown
INFO: IsKeyDown(keyCode)
  • IsNeutral
INFO: IsNeutral(army1,army2)
  • IsObserver
INFO: IsObserver()
  • IssueBlueprintCommand
INFO: IssueBlueprintCommand(command, blueprintid, count, clear = false)
  • IssueUnitBlueprintCommand
INFO: IssueBlueprintCommand(unitList, command, blueprintid, count, clear = false)
  • IssueUnitCommand
INFO: IssueUnitCommand(unitList,command,[string],[clear])
  • KeycodeMSWToMaui
INFO: int KeycodeMSWToMaui(int) - given a MS Windows char code, returns the Maui char code
  • KeycodeMauiToMSW
INFO: int KeycodeMauiToMSW(int) - given a char code from a key event, returns the MS Windows char code
  • LaunchCVP
INFO: LaunchCVP()
  • LaunchReplaySession
INFO: bool LaunchReplaySession(filename) - starts a replay of a given file, returns false if unable to launch
  • LaunchSession
INFO: LaunchSession(sessionInfo) -- launch a session. Session info must be from either SetupSinglePlayerSession() or LobbyComm:SetupSession()
  • LoadSavedGame
INFO: bool LoadSavedGame(filename)
  • OpenURL
INFO: OpenURL(string) - open the default browser window to the specified URL
  • ParseEntityCategory
INFO: parse a string to generate a new entity category
  • PauseSound
INFO: PauseSound(categoryString,bPause)
  • PauseVoice
INFO: PauseVoice(categoryString,bPause)
  • PlaySound
INFO: handle = PlaySound(eventname)
  • PlayVoice
INFO: PlayVoice(params,duck)
  • PostDragger
INFO: PostDragger(originFrame, keycode, dragger)
Make 'dragger' the active dragger from a particular frame. You can pass nil to cancel the current dragger.
  • PrefetchSession
INFO: PrefetchSession(mapname, mods, hipri) -- start a background load with the given map and mods. If hipri is true, this will interrupt any previous loads in progress.
  • Random
INFO: Random([[min,] max])
  • RemoveConsoleOutputReciever
INFO: RemoveConsoleOutputReciever(handler)
  • RemoveInputCapture
INFO: RemoveInputCapture(control) - remove the control from the capture array (always first from back)
  • RemoveProfileDirectories
INFO: RemoveProfileDirectories(string profile) - Removes the profile directory and all special files
  • RemoveSpecialFile
INFO: RemoveSpecialFile(string profilename, string basename, string type) - remove a profile based file from the disc
  • RenderOverlayEconomy
INFO: RenderOverlayEconomy(bool)
  • RenderOverlayIntel
INFO: RenderOverlayIntel(bool)
  • RenderOverlayMilitary
INFO: RenderOverlayMilitary(bool)
  • RestartSession
INFO: RestartSession() - Restart the current mission/skirmish/etc
  • SavePreferences
INFO: SavePreferences()
  • SelectUnits
INFO: Select the specified units
  • SessionCanRestart
INFO: Return true iff the active session can be restarted.
  • SessionEndGame
INFO: End the current game session. The session says active, we just disconnect from everyone else and freeze play.
  • SessionGetCommandSourceNames
INFO: Return a table of command sources.
  • SessionGetLocalCommandSource
INFO: Return the local command source. Returns 0 if the local client can't issue commands.
  • SessionGetScenarioInfo
INFO: Return the table of scenario info that was originally passed to the sim on launch.
  • SessionIsActive
INFO: Return true iff there is a session currently running
  • SessionIsBeingRecorded
INFO: Return true iff the active session is a being recorded.
  • SessionIsGameOver
INFO: Return true iff the session has been won or lost yet.
  • SessionIsMultiplayer
INFO: Return true iff the active session is a multiplayer session.
  • SessionIsObservingAllowed
INFO: Return true iff observing is allowed in the active session.
  • SessionIsPaused
INFO: Return true iff the session is paused.
  • SessionIsReplay
INFO: Return true iff the active session is a replay session.
  • SessionRequestPause
INFO: Pause the world simulation.
  • SessionResume
INFO: Resume the world simulation.
  • SessionSendChatMessage
INFO: SessionSendChatMessage([client-or-clients,] message)
  • SetActiveBuildTemplate
INFO: set this as an active build template.
  • SetAmbientReverb
INFO: SetAmbientReverb(reverbName)
  • SetArmyColorMode
INFO: Sets how units are rendered with respect to team color; 0 = TeamColor, 1 = Ally Color
  • SetAutoMode
INFO: See if anyone in the list is auto building
  • SetCursor
INFO: SetCursor(cursor)
  • SetFireState
INFO: Set the specific fire state for the units passed in
  • SetFocusArmy
INFO: SetFocusArmy(armyIndex or -1)
  • SetFrontEndData
INFO: SetFrontEndData(key, data)
  • SetMovieVolume
INFO: SetMovieVolume(volume): 0.0 - 2.0
  • SetMusicTrack
INFO: SetMusicTrack(eventName)
  • SetOverlayFilter
INFO: SetOverlayFilter(name,color,category)
  • SetOverlayFilters
INFO: SetOverlayFilters(list)
  • SetPaused
INFO: Pause builders in this list
  • SetPreference
INFO: SetPreference(string, obj)
  • SetUIControlsAlpha
INFO: SetUIControlsAlpha(float alpha) -- set the alpha multiplier for 2d UI controls
  • SetVolume
INFO: SetVolume(category, volume)
  • SetupSinglePlayerSession
INFO: SetupSinglePlayerSession(sessionInfoTable) -- create a single player session info that can be passed to StartSession
  • SimCallback
INFO: SimCallback(callback[,bool]): Execute a lua function in sim
callback = {
  • Func function name (in the SimCallbacks.lua module) to call
  • Args Arguments as a lua object
}
If bool is specified and true, sends the current selection with the command
  • StopSound
INFO: StopSound(handle,[immediate=false])
  • TeamColorMode
INFO: TeamColorMode(bool)
  • ToggleFireState
INFO: Set the right fire state for the units passed in
  • ToggleScriptBit
INFO: Set the right fire state for the units passed in
  • UISelectAndZoomTo
INFO: UISelectAndZoomTo(userunit,[seconds])
  • UISelectionByCategory
INFO: UISelectionByCategory(expression, addToCurSel, inViewFrustum, nearestToMouse, mustBeIdle) - selects units based on a category expression
  • UIZoomTo
INFO: UIZoomTo(units,[seconds])
  • UIZoomToByCategory
INFO: UIZoomTo(categoryExpression,[seconds])
  • UpdateRangeData
INFO: UpdateRangeData(position,outerRadius,innerRadius)
  • UpdateRangePosition
INFO: UpdateRangePosition(position)
  • UpdateReticulePosition
INFO: UpdateReticulePosition(position)
  • UpdateReticuleScale
INFO: UpdateReticuleScale(scale)
  • ValidateIPAddress
INFO: str = ValidateIPAddress(ipaddr)
  • ValidateUnitsList
INFO: Validate a list of units
  • WorldIsLoading
INFO: bool = WorldIsLoading()
  • _c_CreateCursor
INFO: _c_CreateCursor(luaobj,spec)
  • _c_CreatePathDebugger
INFO: _c_CreatePathDebugger(luaobj,spec)
  • _c_CreateSimpleWorldView
INFO: CreateSimpleWorldView() - Create a simple world view
  • print
INFO: Print a log message

<User.CDiscoveryService>Edit

  • GetGameCount
INFO: CDiscoveryService.GetCount(self)
  • Reset
INFO: CDiscoveryService.Reset(self)
  • moho.discovery_service_methods
INFO:

<User.CLobby>Edit

  • ConnectToPeer
INFO: void CLobby.ConnectToPeer(self,address,name,uid
  • DebugDump
INFO: void CLobby.DebugDump()
  • Destroy
INFO: CLobby.Destroy(self)
  • DisconnectFromPeer
INFO: void CLobby.DisconnectFromPeer(self,uid
  • EjectPeer
INFO: void CLobby.EjectPeer(self,targetID,reason)
  • GetLocalPlayerID
INFO: int CLobby.GetLocalPlayerID(self)
  • GetLocalPlayerName
INFO: string CLobby.GetLocalPlayerName(self)
  • GetLocalPort
INFO: int-or-nil CLobby.GetLocalPort(self)
  • GetPeer
INFO: table CLobby.GetPeer(self,uid)
  • GetPeers
INFO: table CLobby.GetPeers(self)
  • HostGame
INFO: void CLobby.HostGame(self)
  • IsHost
INFO: bool CLobby.IsHost(self)
  • JoinGame
INFO: void CLobby.JoinGame(self, string-or-boxedInt32 address, string-or-nil remotePlayerName, string remotePlayerUID)
  • MakeValidGameName
INFO: string CLobby.MakeValidGameName(self,origName)
  • MakeValidPlayerName
INFO: string CLobby.MakeValidPlayerName(self,uid,origName)
  • SendData
INFO: void CLobby.SendData(self,targetID,table)
  • SetupSession
INFO: void CLobby.SetupSession(self,gameConfig)
  • __init
INFO: __init(self, string protocol, int localPort, int maxConnections, string playerName, string playerUID, Boxed<weak_ptr<INetNATTraversalProvider> > natTraversalProvider)
  • moho.lobby_methods
INFO:

<User.CLuaWldUIProvider>Edit

  • moho.WldUIProvider_methods
INFO:

<User.CMauiBitmap>Edit

  • GetFrame
INFO: int GetFrame()
  • GetNumFrames
INFO: GetNumFrames()
  • Loop
INFO: Loop(bool)
  • Play
INFO: Play()
  • SetBackwardPattern
INFO: SetBackwardPattern()
  • SetForwardPattern
INFO: SetForwardPattern()
  • SetFrame
INFO: SetFrame(int)
  • SetFramePattern
INFO: SetFramePattern(pattern)
  • SetFrameRate
INFO: SetFrameRate(float)
  • SetLoopPingPongPattern
INFO: SetLoopPingPongPattern()
  • SetNewTexture
INFO: Bitmap:SetNewTexture(filename(s), border=1)
  • SetPingPongPattern
INFO: SetPingPongPattern()
  • SetSolidColor
INFO: Bitmap:SetSolidColor(color)
  • SetTiled
INFO: SetTiled(bool)
  • SetUV
INFO: Bitmap:SetUV(float u0, float v0, float u1, float v1)
  • SetVerticies
INFO: SetVerticies(vert, vert, vert, vert) - overrides vertex data for this bitmap
  • ShareTextures
INFO: ShareTextures(bitmap) - allows two bitmaps to use the same textures
  • Stop
INFO: Stop()
  • UseAlphaHitTest
INFO: UseAlphaHitTest(bool)
  • base
INFO: derived from CMauiControl
  • moho.bitmap_methods
INFO:

<User.CMauiBorder>Edit

  • SetSolidColor
INFO: SetSolidColor(color)
  • base
INFO: derived from CMauiControl
  • moho.border_methods
INFO:

<User.CMauiControl>Edit

  • AcquireKeyboardFocus
INFO: AcquireKeyboardFocus(bool blocksKeyDown)
  • ApplyFunction
INFO: ApplyFunction(func) - applys a function to this control and all children, function will recieve the control object as the only parameter
  • ClearChildren
INFO: ClearChildren()
  • Destroy
INFO: Control:Destroy() -- destroy a control.
  • DisableHitTest
INFO: Control:DisableHitTest([recursive], [allowMouseOver]) -- hit testing will be skipped for this control
  • Dump
INFO: Dump
  • EnableHitTest
INFO: Control:EnableHitTest([recursive]) -- hit testing will be checked for this control
  • GetAlpha
INFO: float GetAlpha()
  • GetName
INFO: string GetName()
  • GetParent
INFO: Control:GetParent() -- return the parent of this control, or nil if it doesn't have one.
  • GetRenderPass
INFO: int GetRenderPass()
  • GetRootFrame
INFO: Frame GetRootFrame()
  • Hide
INFO: Control:Hide() -- stop rendering and hit testing the control
  • HitTest
INFO: bool HitTest(x, y) - given x,y coordinates, tells you if the control is under the coordinates
  • IsHidden
INFO: Control:IsHidden() -- determine if the control is hidden
  • IsHitTestDisabled
INFO: Control:IsHitTestDisabled() -- determine if hit testing is disabled
  • NeedsFrameUpdate
INFO: bool NeedsFrameUpdate()
  • SetAlpha
INFO: SetAlpha(float, children) - Set the alpha of a given control, if children is true, also sets childrens alpha
  • SetHidden
INFO: Control:SetHidden() -- set the hidden state of the control
  • SetName
INFO: SetName(string)
  • SetNeedsFrameUpdate
INFO: SetNeedsFrameUpdate(bool needsIt)
  • SetParent
INFO: Control:SetParent(newParentControl) -- change the control's parent
  • SetRenderPass
INFO: int SetRenderPass()
  • Show
INFO: Control:Show() -- start rendering and hit testing the control
  • moho.control_methods
INFO:

<User.CMauiCursor>Edit

  • ResetToDefault
INFO: Cursor:ResetToDefault()
  • SetDefaultTexture
INFO: Cursor:SetDefaultTexture(filename, hotspotX, hotspotY)
  • SetNewTexture
INFO: Cursor:SetTexture(filename, hotspotX, hotspotY)
  • Show
INFO: Cursor:Show()
  • moho.cursor_methods
INFO:

<User.CMauiEdit>Edit

  • AcquireFocus
INFO: AcquireFocus()
  • ClearText
INFO: Edit:ClearText()
  • DisableInput
INFO: Edit:Disable()
  • EnableInput
INFO: Edit:EnableInput()
  • GetBackgroundColor
INFO: color Edit:GetBackgroundColor()
  • GetCaretColor
INFO: color Edit:GetCaretColor()
  • GetCaretPosition
INFO: int GetCaretPosition
  • GetFontHeight
INFO: int GetFontHeight()
  • GetForegroundColor
INFO: color Edit:GetForegroundColor()
  • GetHighlightBackgroundColor
INFO: color GetHighlightBackgroundColor()
  • GetHighlightForegroundColor
INFO: color GetHighlightForegroundColor()
  • GetMaxChars
INFO: int Edit:GetMaxChars()
  • GetStringAdvance
INFO: number Edit:GetAdvance(string) - get the advance of a string using the same font as the control
  • GetText
INFO: string Edit:GetText()
  • IsBackgroundVisible
INFO: bool Edit:IsBackgroundVisible()
  • IsCaretVisible
INFO: bool Edit:IsCaretVisible()
  • IsEnabled
INFO: bool Edit:IsEnabled()
  • SetCaretCycle
INFO: edit:SetCaretCycle(float seconds, uint32 minAlpha, uint32 maxAlpha)
  • SetCaretPosition
INFO: SetCaretPosition(int)
  • SetDropShadow
INFO: SetDropShadow(bool)
  • SetMaxChars
INFO: Edit:SetMaxChars(int size)
  • SetNewBackgroundColor
INFO: Edit:SetNewBackgroundColor(color)
  • SetNewCaretColor
INFO: Edit:SetNewCaretColor(color)
  • SetNewFont
INFO: Edit:SetNewFont(family, pointsize)
  • SetNewForegroundColor
INFO: Edit:SetNewForegroundColor(color)
  • SetNewHighlightBackgroundColor
INFO: SetNewHighlightBackgroundColor(color)
  • SetNewHighlightForegroundColor
INFO: SetNewHightlightForegroundColor(color)
  • SetText
INFO: Edit:SetText(string text)
  • ShowBackground
INFO: Edit:ShowBackground(bool)
  • ShowCaret
INFO: Edit:ShowCaret(bool)
  • base
INFO: derived from CMauiControl
  • moho.edit_methods
INFO:

<User.CMauiFrame>Edit

  • GetTopmostDepth
INFO: float GetTopmostDepth()
  • SetTargetHead
INFO: SetTargetHead(int)
  • base
INFO: derived from CMauiControl
  • moho.frame_methods
INFO:

<User.CMauiGroup>Edit

  • moho.group_methods
INFO:

<User.CMauiHistogram>Edit

  • SetXIncrement
INFO: SetXIncrement(int)
  • SetYIncrement
INFO: SetYIncrement(int)
  • base
INFO: derived from CMauiControl
  • moho.histogram_methods
INFO:

<User.CMauiItemList>Edit

  • DeleteAllItems
INFO: itemlist = ItemList:DeleteAllItems()
  • DeleteItem
INFO: itemlist = ItemList:DeleteItem(index)
  • Empty
INFO: bool ItemList:Empty()
  • GetItem
INFO: item = ItemList:GetItem(index)
  • GetItemCount
INFO: int ItemList:GetItemCount()
  • GetRowHeight
INFO: float ItemList:GetRowHeight()
  • GetSelection
INFO: index = ItemList:GetSelection()
  • GetStringAdvance
INFO: number ItemList:GetAdvance(string) - get the advance of a string using the same font as the control
  • ModifyItem
INFO: itemlist = ItemList:ModifyItem(index, string)
  • ScrollToBottom
INFO: ItemList:ScrollToBottom()
  • ScrollToTop
INFO: ItemList:ScrollToTop()
  • SetNewColors
INFO: ItemList:SetNewColors(foreground, background, selected_foreground, selected_background)
  • SetNewFont
INFO: ItemList:SetNewFont(family, pointsize) -- set the font to use in this ItemList control
  • SetSelection
INFO: ItemList:SetSelection(index)
  • ShowItem
INFO: ItemList:ShowItem(index)
  • ShowMouseoverItem
INFO: ShowMouseoverItem(bool) - enable or disable the showing of the mouseover item
  • ShowSelection
INFO: ShowSelection(bool) - enable or disable the highlighting of the selected item
  • base
INFO: derived from CMauiControl
  • moho.item_list_methods
INFO:

<User.CMauiLuaDragger>Edit

  • moho.dragger_methods
INFO:

<User.CMauiMesh>Edit

  • SetOrientation
INFO: SetOrientation(quaternion)
  • base
INFO: derived from CMauiControl
  • moho.mesh_methods
INFO:

<User.CMauiMovie>Edit

  • GetNumFrames
INFO: int GetNumFrames() - returns the number of frames in the movie
  • InternalSet
INFO: bool Movie:InternalSet(filename)
  • IsLoaded
INFO: IsLoaded()
  • Loop
INFO: Loop(bool)
  • Play
INFO: Play()
  • Stop
INFO: Stop()
  • base
INFO: derived from CMauiControl
  • moho.movie_methods
INFO:

<User.CMauiScrollbar>Edit

  • DoScrollPages
INFO: DoScrollPages(float)
  • SetNewTextures
INFO: Scrollbar:SetTextures(background, thumbMiddle, thumbTop, thumbBottom)
  • SetScrollable
INFO: Scrollbar:SetScrollable(scrollable) -- set the scrollable object connected to this scrollbar
  • base
INFO: derived from CMauiControl
  • moho.scrollbar_methods
INFO:

<User.CMauiText>Edit

  • GetText
INFO: string Text:GetText()
  • SetCenteredHorizontally
INFO: Text:SetCenteredHorizontally(bool)
  • SetCenteredVertically
INFO: Text:SetCenteredVertically(bool)
  • SetDropShadow
INFO: Text:SetDropShadow(bool)
  • SetNewClipToWidth
INFO: SetNewClipToWidth(bool) - will cause the control to only render as many charachters as fit in its width
  • SetNewColor
INFO: Text:SetNewColor(color)
  • SetNewFont
INFO: Text:SetNewFont(family, pointsize)
  • SetText
INFO: Text:SetText(text)
  • base
INFO: derived from CMauiControl
  • moho.text_methods
INFO:

<User.CPathDebugger>Edit

  • moho.PathDebugger_methods
INFO:

<User.CUIMapPreview>Edit

  • SetTexture
INFO: CUIMapPreview:SetTexture(texture_name)
  • SetTextureFromMap
INFO: CUIMapPreview:SetTextureFromMap(map_name)
  • base
INFO: derived from CMauiControl
  • moho.ui_map_preview_methods
INFO:

<User.CUIWorldMesh>Edit

  • Frame
INFO: Manipulator WorldMesh:Frame()
  • GetAxisAlignedBox
INFO: min,max = Mesh:GetAxisAlignedBox()
  • GetInterpolatedPosition
INFO: Vector WorldMesh:GetInterpolatedPosition()
  • GetInterpolatedScroll
INFO: Vector WorldMesh:GetInterpolatedScroll()
  • GetInterpolatedSphere
INFO: Vector WorldMesh:GetInterpolatedSphere()
  • GetOrientedBox
INFO: Vector WorldMesh:GetOrientedBox()
  • IsHidden
INFO: bool WorldMesh:IsHidden()
  • SetAuxiliaryParameter
INFO: WorldMesh:SetAuxiliaryParameter(float param)
  • SetColor
INFO: WorldMesh:SetColor(bool hidden)
  • SetFractionCompleteParameter
INFO: WorldMesh:SetFractionCompleteParameter(float param)
  • SetFractionHealthParameter
INFO: WorldMesh:SetFractionHealthParameter(float param)
  • SetHidden
INFO: WorldMesh:SetHidden(bool hidden)
  • SetLifetimeParameter
INFO: WorldMesh:SetLifetimeParameter(float param)
  • SetMesh
INFO: WorldMesh:SetMesh(meshDesc)
  • SetScale
INFO: WorldMesh:SetScale(vector scale)
  • SetStance
INFO: WorldMesh:SetStance(vector position, [quaternion orientation])
  • moho.world_mesh_methods
INFO:

<User.CUIWorldView>Edit

  • GetLeftMouseButtonOrder
INFO: string moho.UIWorldView:GetLeftMouseButtonOrder()
  • GetRightMouseButtonOrder
INFO: string moho.UIWorldView:GetRightMouseButtonOrder()
  • GetScreenPos
INFO: (vector2f|nil) = GetScreenPos(unit)
  • GetsGlobalCameraCommands
INFO: moho.UIWorldView:GetsGlobalCameraCommands(bool getsCommands)
  • HasHighlightCommand
INFO: bool moho.UIWorldView:HasHighlightCommand()
  • IsInputLocked
INFO: IsInputLocked(camera)
  • LockInput
INFO: LockInput(camera)
  • Project
INFO: VECTOR2 Project(self,VECTOR3) - given a point in world space, projects the point to control space
  • SetHighlightMode
INFO: SetHighlightMode(mode)
  • ShowConvertToPatrolCursor
INFO: bool moho.UIWorldView:ShowConvertToPatrolCursor()
  • UnProject
INFO: VECTOR3 UnProject(self,VECTOR2)
  • UnlockInput
INFO: UnlockInput(camera)
  • ZoomScale
INFO: ZoomScale(x, y, wheelRot, wheelDelta) - cause the world to zoom based on wheel rotation event
  • __init
INFO: moho.UIWorldView:__init(parent_control, cameraName, depth, isMiniMap, trackCamera)
  • base
INFO: derived from CMauiControl
  • moho.UIWorldView
INFO:

<User.CameraImpl>Edit

  • DisableEaseInOut
INFO: Camera:DisableEaseInOut()
  • EnableEaseInOut
INFO: Camera:EnableEaseInOut()
  • GetFocusPosition
INFO: Camera:GetFocusPosition()
  • GetMaxZoom
INFO: Camera:GetMaxZoom()
  • GetMinZoom
INFO: Camera:GetMinZoom()
  • GetTargetZoom
INFO: Camera:GetTargetZoom()
  • GetZoom
INFO: Camera:GetZoom()
  • HoldRotation
INFO: Camera:HoldRotation()
  • MoveTo
INFO: Camera:MoveTo(position, orientationHPR, zoom, seconds)
  • MoveToBox
INFO: Camera:MoveToBox(position, boxSize, seconds)
  • MoveToRegion
INFO: Camera:MoveTo(region[,seconds])
  • MoveToWithDefaultHeading
INFO: Camera:MoveToWithDefaultHeading(position, zoom, seconds)
  • NoseCam
INFO: Camera:NoseCam(ent,pitchAdjust,zoom,seconds,transition)
  • RemoveCameraTarget
INFO: Camera:RemoveCameraTarget()
  • Reset
INFO: Camera:Reset()
  • RestoreSettings
INFO: Camera:RestoreSettings(settings)
  • RevertRotation
INFO: Camera:RevertRotation()
  • SaveSettings
INFO: Camera:SaveSettings()
  • SetAccMode
INFO: Camera:SetAccMode(accTypeName)
  • SetClampToResetPosition
INFO: Camera:SetClampToResetPosition()
  • SetMaximumZoom
INFO: Camera:SetMaximumZoom()
  • SetResetPosition
INFO: Camera:SetResetPosition()
  • SetTargetZoom
INFO: Camera:SetTargetZoom(zoom)
  • SetZoom
INFO: Camera:SetZoom(zoom,seconds)
  • SetZoomModeThresholds
INFO: Camera:SetZoomModeThresholds()
  • SnapTo
INFO: Camera:SnapTo(position, orientationHPR, zoom)
  • Spin
INFO: Camera:Spin(headingRate[,zoomRate])
  • TargetEntities
INFO: Camera:TargetEntities(ents,zoom,seconds)
  • TrackEntities
INFO: Camera:TrackEntities(ents,zoom,seconds)
  • UseGameClock
INFO: Camera:UseGameClock()
  • UseSystemClock
INFO: Camera:UseSystemClock()

<User.SimpleWorldView>Edit

  • SetHidden
INFO: SetHidden(bool)
  • SetWorldSize
INFO: SetWorldSize(sx,sz)
  • moho.simple_world_view
INFO:

<User.UserUnit>Edit

  • AddSelectionSet
INFO: AddSelectionSet(string) -- add a selection set name to a unit
  • CanAttackTarget
INFO: UserUnit:CanAttackTarget(target, rangeCheck)
  • GetArmy
INFO: GetArmy() -- returns the army index
  • GetBlueprint
INFO: blueprint = UserUnit:GetBlueprint()
  • GetBuildRate
INFO: GetBuildRate() -- return current unit build rate
  • GetCommandQueue
INFO: table GetCommandQueue() - returns table of commands
  • GetCreator
INFO: GetCreator() -- returns the units creator, or nil
  • GetCustomName
INFO: string GetCustomName() -- get the current custom name, nil if none
  • GetEconData
INFO: GetEconData() - returns a table of economy data
  • GetEntityId
INFO: Entity:GetEntityId()
  • GetFocus
INFO: GetFocus() -- returns the unit this unit is currently focused on, or nil
  • GetFootPrintSize
INFO: UserUnit:GetFootPrintSize()
  • GetGuardedEntity
INFO: GetGuardedEntity() -- returns the units guard target, or nil
  • GetHealth
INFO: GetHealth() -- return current health
  • GetMaxHealth
INFO: GetMaxHealth() -- return max health
  • GetMeshBox
INFO: {Min=vector,Max=vector} = Entity:GetMeshBox()
  • GetPosition
INFO: VECTOR3 GetPosition() - returns the current world posititon of the unit
  • GetSelectionSets
INFO: table GetSelectionSets() -- get table of all selection sets unit belongs to
  • GetShieldRatio
INFO: GetShieldRatio()
  • GetStat
INFO: GetStat(Name[,defaultVal])
  • GetUnitId
INFO: UserUnit:GetUnitId()
  • GetWorkProgress
INFO: GetWorkProgress()
  • HasSelectionSet
INFO: bool HasSelectionSet(string) -- see if a unit belongs to a given selection set
  • IsAutoMode
INFO: bool = UserUnit:IsAutoMode()
  • IsDead
INFO: IsDead() -- return true if the unit has been destroyed
  • IsIdle
INFO: IsIdle() -- return true if the unit is idle
  • IsImmobile
INFO: Is this unit immobile
  • IsInCategory
INFO: bool = UserUnit:IsInCategory(category)
  • IsRepeatQueue
INFO: bool = UserUnit:IsRepeatQueue()
  • IsStunned
INFO: flag = UserUnit:IsStunned()
  • IsTargetable
INFO: Is this unit Targetable
  • ProcessInfo
INFO: UserUnit:ProcessInfoPair()
  • RemoveSelectionSet
INFO: RemoveSelectionSet(string) -- remove a selection set name from a unit
  • SetCustomName
INFO: SetCustomName(string) -- Set a custom name for the unit

CoreEdit

<Core.<global>>Edit

  • Basename
INFO: base = Basename(fullPath,stripExtension?) -- return the last component of a path
  • BeginLoggingStats
INFO: Begin logging stats
  • CreateCamera
INFO: Create a camera
  • CreateProfileTimer
INFO: CreateProfileTimer()
  • CurrentThread
INFO: thread=CurrentThread() -- get a handle to the running thread for later use with ResumeThread() or KillThread()
  • Dirname
INFO: base = Dirname(fullPath) -- return a path with trailing filename removed
  • DiskFindFiles
INFO: files = DiskFindFiles(directory, pattern)
returns a list of files in a directory
  • DiskFindFolders
INFO: files = DiskFindFolders(directory)
returns a list of folders in a directory
  • DiskGetFileInfo
INFO: info = DiskGetFileInfo(filename)
returns a table describing the given file, or false if the file doesn't exist.
  • info.IsFolder -- true if the filename refers to a folder
  • info.IsReadOnly -- true if file is read-only
  • info.SizeBytes -- size of file in bytes
  • info.LastWriteTime -- timestamp of last write to file
  • DiskToLocal
INFO: localPath = DiskToLocal(SysOrLocalPath)
Converts a system path to a local path. Leaves
path alone if already local.
  • DistancePoint2Segment2
INFO: dist = DistancePointSegment(vector2 point, vector2 segmentA, vector2 segmentB)
  • DistancePoint3Segment3
INFO: dist = DistancePointSegment(vector3 point, vector3 segmentA, vector3 segmentB)
  • ElapsedMilliseconds
INFO: ElapsedMilliseconds(timer)
  • EndLoggingStats
INFO: EndLoggingStats(bool exit) - End logging stats and optionally exit app
  • EntityCategoryEmpty
INFO: Test for an empty category
  • EntityCategoryGetUnitList
INFO: Get a list of units blueprint names from a category
  • EnumColorNames
INFO: table EnumColorNames() - returns a table containing strings of all the color names
  • EulerToQuaternion
INFO: quaternion EulerToQuaternion(float roll, float pitch, float yaw) - converts euler angles to a quaternion
  • FileCollapsePath
INFO: path = FileCollapsePath(fullPath) -- collapse out any intermediate /./ or /../ directory names from a path
  • ForkThread
INFO: thread = ForkThread(function, ...)
Spawns a new thread running the given function with the given args.
  • ForwardVector
INFO: vector ForwardVector(quat)
  • GetBranch
INFO: GetBranch() -> string
  • GetGrannyAnimationResource
INFO: GetGrannyAnimationResource(name) -> handle
  • GetGrannyMeshResource
INFO: GetGrannyMeshResource(name) -> handle
  • GetMovieDuration
INFO: GetMovieDuration(localFileName)
  • GetTextureResource
INFO: GetTextureResource(name) -> handle
  • GetVersion
INFO: GetVersion() -> string
  • GrannyCache
INFO: Generate cached version of resource if necessary
  • IsDestroyed
INFO: Has the c++ object been destroyed?
  • KillThread
INFO: KillThread(thread) -- destroy a thread started with ForkThread()
  • LOG
INFO: Print a log message
  • MATH_IRound
INFO: Round a number to the nearest integer
  • MATH_Lerp
INFO: MATH_Lerp(s, a, b) or MATH_Lerp(s, sMin, sMax, a, b) -> number -- linear interpolation from a (at s=0 or s=sMin) to b (at s=1 or s=sMax)
  • MinLerp
INFO: quaternion MinLerp(float alpha, quaternion L, quaternion R) - returns minimal lerp between L and R
  • MinSlerp
INFO: quaternion MinSlerp(float alpha, quaternion L, quaternion R) - returns minimal slerp between L and R
  • OrientFromDir
INFO: quaternion OrientFromDir(vector)
  • PointInSphere
INFO: bool = PointInSphere(point,sphere)
  • PointVector
INFO: Create a point vector(px,py,pz, vx,vy,vz)
  • QRotate
INFO: Rotate a vector by quat
  • Quaternion
INFO: Create a quaternion (axis,angle)
  • Rect
INFO: Create a 2d Rectangle (x0,y0,x1,y1)
  • ResumeThread
INFO: ResumeThread(thread) -- resume a thread that had been suspended with SuspendCurrentThread(). Does nothing if the thread wasn't suspended.
  • SPEW
INFO: Spew to log
  • STR_GetTokens
INFO: table STR_GetTokens(string,delimiter)
  • STR_Utf8Len
INFO: int STR_Utf8Len(string) - return the number of characters in a UTF-8 string
  • STR_Utf8SubString
INFO: string STR_Utf8SubString(string, start, count) - return a substring from start to count
  • STR_itox
INFO: string STR_itox(int) - converts an integer into a hexidecimal string
  • STR_xtoi
INFO: int STR_xtoi(string) - converts a hexidecimal string to an integer
  • SecondsPerTick
INFO: SecondsPerTick() - Return how many seconds in a tick
  • Sound
INFO: Sound( {cue,bank} ) - Make a sound parameters object
  • Sphere
INFO: Create a Sphere (center,radius)
  • StatSetFloat
INFO: StatSetFloat(name,val)
  • StatSetInt
INFO: StatSetFloat(name,val)
  • SuspendCurrentThread
INFO: SuspendCurrentThread() -- suspend this thread indefinitely. Some external event must eventually call ResumeThread() to resume it.
  • TickStatAdd
INFO: TickStatAdd(name,[amt=1])
  • TickStatAddFloat
INFO: TickStatAddFloat(name,val)
  • TickStatAddInt
INFO: TickStatAddInt(name,val)
  • TickStatSetFloat
INFO: TickStatSetFloat(name,val)
  • TickStatSetInt
INFO: TickStatSetInt(name,val)
  • Trace
INFO: Trace(true) -- turns on debug tracing
Trace(false) -- turns it off again
  • VAdd
INFO: Addition of two vectors
  • VDiff
INFO: Difference of two vectors
  • VDist2
INFO: Distance between two 2d points (x1,y1,x2,y2)
  • VDist2Sq
INFO: Square of Distance between two 2d points (x1,y1,x2,y2)
  • VDist3
INFO: Distance between two 3d points (v1,v2)
  • VDist3Sq
INFO: Square of Distance between two 3d points (v1,v2)
  • VDist3XZ
INFO: Distance between two 3d points exluding Y distance (v1,v2)
  • VDot
INFO: Dot product of two vectors
  • VEquals
INFO: VEquals(v1,v2)
  • VLength
INFO: Get the magnitude/length of a vector
  • VLengthSq
INFO: Get the squared magnitude/length of a vector
  • VLengthXZ
INFO: Get the magnitude/length of the XZ vector components
  • VLengthXZSq
INFO: Get the squared magnitude/length of the XZ vector components
  • VMult
INFO: Multiplication of vector with scalar
  • VNormal
INFO: Normalization of vector
  • VPerpDot
INFO: Perp dot product of two vectors
  • VRotateX
INFO: Get 'side' direction of quat
  • VRotateY
INFO: Get 'up' direction of quat
  • VRotateZ
INFO: Get 'forward' direction of quat
  • VSetMagnitude
INFO: Set the magnitude of a vector
  • Vector
INFO: Create a vector (x,y,z)
  • Vector2
INFO: Create a vector (x,y)
  • WARN
INFO: Pop up a warning dialog
  • WaitFor
INFO: WaitFor(event) -- suspend this thread until the event is set
  • doscript
INFO: doscript(script, [env]) -- run another script. The environment table, if given, will be used for the script's global variables.
  • exists
INFO: exists(name) -> bool -- returns true if the given resource file exists

<Core.EntityCategory>Edit

  • __mul
INFO: Generate a category list that is an intersection of cat1 and cat2
  • __sub
INFO: Generate a category list of units that is of cat1 but not of cat2
  • moho.EntityCategory
INFO:

<Core.GeomCamera3>Edit

  • LookAt
INFO: LookAt(pos,target,up)
  • Move
INFO: Move(t,r)
  • SetViewport
INFO: SetViewport(x,y,dx,dy)

<Core.Quaternionf>Edit

  • __newindex
INFO: __newindex

<Core.Vector2f>Edit

  • __newindex
INFO: __index func

<Core.Vector3f>Edit

  • __bor
INFO: __bor
  • __div
INFO: __div
  • __eq
INFO: __eq
  • __index
INFO: __index
  • __mul
INFO: __mul
  • __newindex
INFO: __newindex
  • __pow
INFO: __pow
  • __sub
INFO: __sub
  • __unm
INFO: __unm

<Core.shared_ptr_GrannyMesh>Edit

  • Release
INFO: GrannyMeshResourceHandle:Release()

RuleEdit

<Rule.<global>>Edit

  • ParseEntityCategory
INFO: parse a string to generate a new entity category
  • RegisterBeamBlueprint
INFO: BeamBlueprint { spec } - define a beam effect
  • RegisterEmitterBlueprint
INFO: EmitterBlueprint { spec } - define a particle emitter
  • RegisterMeshBlueprint
INFO: MeshBlueprint { spec } - define mesh properties
  • RegisterProjectileBlueprint
INFO: ProjectileBlueprint { spec } - define a type of projectile
  • RegisterPropBlueprint
INFO: PropBlueprint { spec } - define a type of prop
  • RegisterTrailEmitterBlueprint
INFO: TrailEmitterBlueprint { spec } - define a polytrail emitter
  • RegisterUnitBlueprint
INFO: UnitBlueprint { spec } - define a type of unit

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.