// - Automation // - Effect History //-------------------------------------------------------------------------------------------------- // Actor //-------------------------------------------------------------------------------------------------- const int c_animBracketStartFlagFullMatch = (1 << 5); const int c_animBracketStartFlagNoMismatchQueryProps= (1 << 6); const int c_animFlagDontResetOnUnhide = (1 << 5); const int c_animFlagNoMismatchQueryProps = (1 << 6); const int c_animFlagVariationMatch = (1 << 7); //-------------------------------------------------------------------------------------------------- // Animation //-------------------------------------------------------------------------------------------------- const int c_animationOffsetStart = 0; const int c_animationOffsetEnd = 1; native void AnimLengthQueryByName (actor a, string animName, bool scaledTime); native void AnimLengthQueryByProps (actor a, string animProps); native generichandle AnimLengthQueryLastCreated (); native void AnimLengthQueryWait (); native fixed AnimLengthSync (generichandle h); native fixed AnimLengthRemainingSync (generichandle h); native void AnimWait (actor a, string animName, fixed offset, int offsetType); //-------------------------------------------------------------------------------------------------- // Automation //-------------------------------------------------------------------------------------------------- native string AutomationLuaGlobalGetAsString (string name); //-------------------------------------------------------------------------------------------------- // Bank //-------------------------------------------------------------------------------------------------- native text BankSizeAsText (string name, int player); native text BankSectionSizeAsText (bank b, string section); native text BankKeySizeAsText (bank b, string section, string key); //-------------------------------------------------------------------------------------------------- // Camera //-------------------------------------------------------------------------------------------------- native fixed CameraGetDistance (int player); native unitgroup CameraFollowUnitGroupGet (int player); // Toggle the forced follow state. If off, it will defer to the user option. // native void CameraForceFollowUnitGroup (int player, bool forced); //-------------------------------------------------------------------------------------------------- // Catalogs //-------------------------------------------------------------------------------------------------- native int CatalogFieldValueGetFlagsAsInt (int catalog, string entry, string fieldPath, int player); native bool CatalogFieldValueModify (int catalog, string entry, string fieldPath, int player, string value, int operation); native bool CatalogReferenceModify (string reference, int player, string value, int operation); //-------------------------------------------------------------------------------------------------- // Conversations //-------------------------------------------------------------------------------------------------- // ConversationDataGetSpeaker returns the character id for the speaker of the given line, if any. native string ConversationDataGetSpeaker (string convLine); //-------------------------------------------------------------------------------------------------- // Data Table //-------------------------------------------------------------------------------------------------- const int c_dataTypeGenericHandle = 15; (All other values were incremented by 1) // - c_dataTypeGenericHandle native void DataTableSetGenericHandle (bool global, string name, generichandle val); native generichandle DataTableGetGenericHandle (bool global, string name); //-------------------------------------------------------------------------------------------------- // Dialogs //-------------------------------------------------------------------------------------------------- const int c_triggerControlTypeCommandPanel = 23; const int c_triggerControlTypeHeroCutscene = 24; const int c_triggerControlTypeCountdownLabel = 25; const int c_triggerControlTypeUnitStatusLabel = 26; const int c_triggerControlPropertyAnimIndex = 68; // int const int c_triggerControlPropertyUseAspectUncorrection = 69; // bool const int c_triggerControlPropertyHandle = 70; // string const int c_triggerControlPropertyBorderColor = 71; // color const int c_triggerControlPropertyFillColor = 72; // color const int c_triggerControlPropertySubmenu = 73; // string const int c_triggerControlPropertyUnitGroup = 74; // unitgroup const int c_triggerControlPropertyPlayerId = 75; // int native void DialogControlSetPropertyAsUnitGroup (int control, int property, playergroup players, unitgroup value); native unitgroup DialogControlGetPropertyAsUnitGroup (int control, int property, int player); native void DialogControlSendAnimationEvent (int control, playergroup players, string eventName); native void DialogControlSetAnimationSpeed (int control, playergroup players, string animationName, fixed speed); native void DialogControlSetAnimationTime (int control, playergroup players, string animationName, fixed speed); native void DialogControlAdvanceAnimation (int control, playergroup players, string animationName, fixed speed); native void DialogControlRequestFocus (int control, playergroup players); //-------------------------------------------------------------------------------------------------- // Effect History //-------------------------------------------------------------------------------------------------- native int EffectHistoryCount (effecthistory inHistory); const int c_effectHistoryEffectRoot = 0; const int c_effectHistoryEffectCurrent = 1; native string EffectHistoryGetAbil (effecthistory inHistory, int inIndex); native fixed EffectHistoryGetAmountFixed (effecthistory inHistory, int inIndex, int inAmount, bool inTotal); native int EffectHistoryGetAmountInt (effecthistory inHistory, int inIndex, int inAmount, bool inTotal); native string EffectHistoryGetEffect (effecthistory inHistory, int inIndex, int inEffect); native fixed EffectHistoryGetTime (effecthistory inHistory, int inIndex); native int EffectHistoryGetType (effecthistory inHistory, int inIndex); native unit EffectHistoryGetUnitByLocation (effecthistory inHistory, int inIndex, int inLocation); native string EffectHistoryGetWeapon (effecthistory inHistory, int inIndex); //-------------------------------------------------------------------------------------------------- // Environment //-------------------------------------------------------------------------------------------------- // Shrub native bool InShrub (point inPos); //-------------------------------------------------------------------------------------------------- // Game //-------------------------------------------------------------------------------------------------- native string GameMapPath (); native void GameAddChargeRegenRemaining (string inCharge, fixed inVal); native void GameAddChargeRegenFull (string inCharge, fixed inVal); native fixed GameGetChargeRegenFull (string inCharge, bool adjustmentOnly); native int GameTestConfigType (); native bool GameIsPractice (); native bool GameIsCooperative (); native void GameSetPauseable (bool pauseable); //-------------------------------------------------------------------------------------------------- // Misc //-------------------------------------------------------------------------------------------------- native void StartProfileRun (text name); native void StopProfileRun (); //-------------------------------------------------------------------------------------------------- // Path //-------------------------------------------------------------------------------------------------- native void PathSetSourceUnit (int inPathId, unit inUnit); native unit PathGetSourceUnit (int inPathId); native void PathClearWayPoints (int inPathId); native void PathAddWayPoint (int inPathId, point inWayPoint); //-------------------------------------------------------------------------------------------------- // Ping //-------------------------------------------------------------------------------------------------- native int PingCreateFromData ( playergroup players, string pingLink, point position ); //-------------------------------------------------------------------------------------------------- // Hero Talent Tree //-------------------------------------------------------------------------------------------------- native string TalentTreeGetHeroTalentLink (int inPlayer, int inIndex); native int TalentTreeGetSelectedHeroTalentTree (int inPlayer, int inTier); native int TalentTreeGetSelectedHeroTalentTreeColumn (int inPlayer, int inTier); native void TalentTreeClearTier (int inPlayer, int inTier); native void SetTalentUpgradeRequired (bool inRequired); native void SetTalentTreeHeroLevel (int inPlayer, int inLevel); native void SetTalentsEnabled (bool inRequired); native void TriggerAddEventHeroTalentTreeSelected (trigger t, int player); //-------------------------------------------------------------------------------------------------- // Help //-------------------------------------------------------------------------------------------------- native void HelpPanelAddMessage (playergroup players, text speakerText, text subtitleText, string modelLink, soundlink soundId); //-------------------------------------------------------------------------------------------------- // Players //-------------------------------------------------------------------------------------------------- const int c_playerAny = 16; native string PlayerRace (int inPlayer); native string PlayerHero (int inPlayer); native string PlayerSkin (int inPlayer); native string PlayerMount (int inPlayer); native void PlayerSetToDLighting (int inPlayer, string inLight); native bool PlayerAIControlAllowed (int player); native void PlayerSetAllowAIControl (int player, bool allow); native bool PlayerHasReward (int inPlayer, string inReward); native void PlayerAddTalent (int inPlayer, string inTalent); native void PlayerRemoveTalent (int inPlayer, string inTalent); native bool PlayerHasTalent (int inPlayer, string inTalent); // Unlike RegionPlayableMapSet, this does not affect pathing. // Passing a null region will reset to global playable bounds. native void PlayerSetBounds (int inPlayer, region inRegion); const int c_playerStateCameraFollow = 18; // Read-only native void PlayerSetHero (int inPlayer, string inHero); native void PlayerSetSkin (int inPlayer, string inSkin); native void PlayerSetMount (int inPlayer, string inMount); // PlayerApplySkin may be used to apply multiple skin replacements simultaneously. // These are not automatically removed when applying new ones like PlayerSetSkin does. native void PlayerApplySkin (int inPlayer, string inSkin, bool apply); native string PlayerGetHotkeyProfile (int inPlayer); native void PlayerAddChargeRegenRemaining (int inPlayer, string inCharge, fixed inVal); native void PlayerAddChargeRegenFull (int inPlayer, string inCharge, fixed inVal); native fixed PlayerGetChargeRegenFull (int inPlayer, string inCharge, bool adjustmentOnly); native void TriggerAddEventPlayerJoin (trigger inTrigger, int player); native void TriggerAddEventPlayerEffectUsedFromScope (trigger t, int player, string inScope); native string EventPlayerEffectUsedSourceBehavior (); //-------------------------------------------------------------------------------------------------- // Sound //-------------------------------------------------------------------------------------------------- // Sound (These are all the same, however, all have a new parameter to specify the owning player) native void SoundPlayForPlayer ( soundlink link, int inOwningPlayer, playergroup audibleMask, fixed volume, fixed offset ); native void SoundPlayAtPointForPlayer ( soundlink link, int inOwningPlayer, playergroup audibleMask, point inPoint, fixed height, fixed volume, fixed offset ); native void SoundPlayOnUnitForPlayer ( soundlink link, int inOwningPlayer, playergroup audibleMask, unit inUnit, fixed height, fixed volume, fixed offset ); // - SoundPlayScene attempts to synchronize unit animations with the sound duration native void SoundPlaySceneForPlayer ( soundlink link, int inOwningPlayer, playergroup audibleMask, unitgroup units, string animProps ); native void SoundSetReverbForPlayers (playergroup players, string inReverbLink, fixed inDuration, bool inAmbient, bool inGlobal); //-------------------------------------------------------------------------------------------------- // String //-------------------------------------------------------------------------------------------------- native int StringCompare (string s1, string s2, bool caseSens); //-------------------------------------------------------------------------------------------------- // Tech Tree //-------------------------------------------------------------------------------------------------- const int c_techCountRevivableOnly = 6 //-------------------------------------------------------------------------------------------------- // Text Tags //-------------------------------------------------------------------------------------------------- native void TextTagSetGravity (int inTag, fixed inGravity); //-------------------------------------------------------------------------------------------------- // Transmission //-------------------------------------------------------------------------------------------------- native void TransmissionSourceSetBypassMessageLog (transmissionsource source, bool bypass); (This replaces Transmission Send and Transmission Send Advanced) native int TransmissionSendForPlayer ( playergroup players, transmissionsource source, int targetPortrait, string actorLink, string targetAnim, soundlink soundLink, text speaker, text subtitle, fixed duration, int durationType, bool waitUntilDone, int owningPlayer ); native bool TransmissionPlayerHasActiveTransmission (int inPlayerId); //-------------------------------------------------------------------------------------------------- // Trigger //-------------------------------------------------------------------------------------------------- // - Arbitrary data may be associated with the event via data tables. This works using special // value names for event parameters, which can be determined using TriggerEventParamName. // // 1) To set parameter values, store them in the local data table using DataTableSet* // with names from TriggerEventParamName. This must be done before calling TriggerSendEvent. // // 2) To access values when responding to the event, simply call DataTableGet* on the local // table using the same name from TriggerEventParamName. // native string TriggerEventParamName (string eventName, string paramName); native void TriggerDebugOutputEnable (bool inEnable); //-------------------------------------------------------------------------------------------------- // Units //-------------------------------------------------------------------------------------------------- native point UnitGetGoalPosition (unit inUnit); const int c_unitStateResistant = 33; const int c_unitStateSilenced = 34; const int c_unitPropEnergyArmor = 37; const int c_unitPropMovementSpeedCurrent= 42; native void UnitAddChargeRegenRemaining (unit inUnit, string inCharge, fixed inVal); native void UnitAddChargeRegenFull (unit inUnit, string inCharge, fixed inVal); native fixed UnitGetChargeRegenFull (unit inUnit, string inCharge, bool adjustmentOnly); native void UnitModifyCooldown (unit inUnit, string inCooldown, fixed inVal, int inOperation); native void UnitClearCooldowns (unit inUnit, bool inReset); native effecthistory UnitEffectHistory (unit inUnit, int inMaxCount); native void UnitAbilitySpendExplicit (unit inUnit, abilcmd inAbilCmd, int inLocation, fixed inVitalsFactor, fixed inResourcesFactor, fixed inChargesFactor, fixed inCooldownFactor); native void UnitAbilityAddChargeRegenRemaining (unit inUnit, string inAbil, string inCharge, fixed inVal); native fixed UnitAbilityGetChargeRegen (unit inUnit, string inAbil, string inCharge); native void UnitAbilityAddChargeRegenFull (unit inUnit, string inAbil, string inCharge, fixed inVal); native fixed UnitAbilityGetChargeRegenFull (unit inUnit, string inAbil, string inCharge, bool adjustmentOnly); native void UnitAbilityAddChargeUsed (unit inUnit, string inAbil, string inCharge, fixed inVal); native fixed UnitAbilityGetChargeUsed (unit inUnit, string inAbil, string inCharge); native unitgroup UnitConjoinedGroup (unit inUnit, string inConjoinedBehavior); // Unit behaviors // Behavior categories const int c_unitBehaviorFlagCloak = 3; const int c_unitBehaviorFlagInvulnerable = 4; const int c_unitBehaviorFlagSlow = 5; const int c_unitBehaviorFlagFast = 6; const int c_unitBehaviorFlagStun = 7; const int c_unitBehaviorFlagReveal = 8; const int c_unitBehaviorFlagUser1 = 9; const int c_unitBehaviorFlagUser2 = 10; const int c_unitBehaviorFlagUser3 = 11; const int c_unitBehaviorFlagUser4 = 12; const int c_unitBehaviorFlagUser5 = 13; const int c_unitBehaviorFlagUser6 = 14; const int c_unitBehaviorFlagUser7 = 15; const int c_unitBehaviorFlagUser8 = 16; const int c_unitBehaviorFlagUser9 = 17; const int c_unitBehaviorFlagUser10 = 18; native bool UnitHasBehavior2 (unit inUnit, string inBehavior); native void UnitBehaviorAddChargeRegenRemaining (unit inUnit, string inAbil, string inCharge, fixed inVal); native fixed UnitBehaviorGetChargeRegen (unit inUnit, string inAbil, string inCharge); native void UnitBehaviorAddChargeRegenFull (unit inUnit, string inAbil, string inCharge, fixed inVal); native fixed UnitBehaviorGetChargeRegenFull (unit inUnit, string inAbil, string inCharge, bool adjustmentOnly); native fixed UnitBehaviorDamageModifyRemaining (unit inUnit, string inBehavior); native fixed UnitBehaviorDamageModifyLimit (unit inUnit, string inBehavior); native void UnitWeaponSetPeriodRemaining (unit inUnit, int inIndex, fixed inRemaining); // Unit experience native fixed UnitXPGetCurrentXP (unit inUnit, string inVeterancyBehavior); native void UnitXPAddXP (unit inUnit, string inVeterancyBehavior, fixed inXP); native void UnitXPSetCurrentXP (unit inUnit, string inVeterancyBehavior, fixed inXP); native int UnitXPGetXPForLevel (unit inUnit, string inVeterancyBehavior, int inLevel); native void UnitXPSetXPForLevel (unit inUnit, string inVeterancyBehavior, int inLevel, int inXp); native int UnitXPGetCurrentLevel (unit inUnit, string inVeterancyBehavior); native void UnitXPSetCurrentLevel (unit inUnit, string inVeterancyBehavior, int inLevel); native int UnitXPGetNumLevels (unit inUnit, string inVeterancyBehavior); native bool UnitPathableToPoint (unit u, point inTarget, fixed inRange, fixed inMaxDistance); native bool UnitPathableToUnit (unit u, unit inTarget, fixed inRange, fixed inMaxDistance); native void TriggerAddEventUnitDamageAbsorbed (trigger inTrigger, unitref inUnit, string inBehavior); native fixed EventUnitDamageAttempted (); native fixed EventUnitDamageAttemptedVitals (); native fixed EventUnitDamageBehaviorShield (); native unit EventUnitAbilityOtherUnit (); // - c_unitEventGainExperience // - c_unitEventGainLevel native unit EventUnitVictimUnit (); native unit EventUnitItemUsed (); native string EventUnitEffectUsed (); //-------------------------------------------------------------------------------------------------- // User Interface //-------------------------------------------------------------------------------------------------- native void UISetHotkeyProfile (playergroup players, string profileName); native text UIHotKeyString (int hotKey, int count, bool abbreviate, bool addTags); native void UISetHotkeyAllowed (playergroup players, int hotkey, bool allow); native void UIMessageLogPanelSetVisible (playergroup inPlayers, bool inVisible); native void UISetTargetingOrder (playergroup inPlayers, unitgroup inUnits, order inOrder, bool inSticky); native void TriggerAddEventHotkeyPressed (trigger t, int player, int hotkey, bool down); //-------------------------------------------------------------------------------------------------- // Visibility //-------------------------------------------------------------------------------------------------- // these need to match the values in VisionUI.h const int c_fillTypeFogged = 0; const int c_fillTypeMasked = 1; const int c_fillTypeHidden = 2; const int c_fillTypeUnexplored = 3; native void VisFillArea (int player, region area, int fillType, bool checkCliffLevel);