找回密码
 点一下
查看: 1392|回复: 1

《风暴英雄》技术测试2.5.0.29369的Galaxy API函数列表(Native.galaxy)

[复制链接]
发表于 2014-3-14 22:17:37 | 显示全部楼层 |阅读模式
相比起目前的SC2 2.0版本,2.5版本的风暴英雄增加了许多有用的新API函数

这是客户端中的Galaxy函数声明文件:Native.galaxy和AI.galaxy.喜欢使用galaxy脚本的同学必看。

AI.galaxy

47 KB, 下载次数: 17

Native.galaxy

242.38 KB, 下载次数: 23

发表于 2014-3-15 15:22:44 | 显示全部楼层
整理了一下目前版本与头目给的文件的差异

基础版本 2.5.0.29369
比较版本 2.1.1.29261
添加函数:2.5.0(行号)
24.新增一类函数
// - Effect History
375~376.
const int c_animationOffsetStart        = 0;
const int c_animationOffsetEnd          = 1;
382~388.
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);
722~724.
// Toggle the forced follow state. If off, it will defer to the user option.
//
native void         CameraForceFollowUnitGroup (int player, bool forced);
806~807.
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);
813.
native bool CatalogReferenceModify (string reference, int player, string value, int operation);
1017~1018.
// ConversationDataGetSpeaker returns the character id for the speaker of the given line, if any.
native string       ConversationDataGetSpeaker (string convLine);
1094.DataTable相关常量修改,1095~1121修改,使用值的地图需要修正
const int c_dataTypeGenericHandle       = 15;
1192~1194.
// - c_dataTypeGenericHandle
native void          DataTableSetGenericHandle (bool global, string name, generichandle val);
native generichandle DataTableGetGenericHandle (bool global, string name);
1383~1386.新对话框项类型,估计为UI上部分,如命令面板,的控制相关使用。
const int c_triggerControlTypeCommandPanel              = 23;
const int c_triggerControlTypeHeroCutscene              = 24;
const int c_triggerControlTypeCountdownLabel            = 25;
const int c_triggerControlTypeUnitStatusLabel           = 26;
1456~1457.新对话框项参数类型
const int c_triggerControlPropertyAnimIndex             = 68;       // int
const int c_triggerControlPropertyUseAspectUncorrection = 69;       // bool
1459~1463.
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
1538.单位组相关的对话框项参数
native void     DialogControlSetPropertyAsUnitGroup (int control, int property, playergroup players, unitgroup value);
1548.
native unitgroup DialogControlGetPropertyAsUnitGroup (int control, int property, int player);
1562.
native void     DialogControlRequestFocus (int control, playergroup players);
1587~1601.效果历史相关新函数
// 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);
1652~1653.
// Shrub
native bool     InShrub (point inPos);
1783.
native void     GameAddChargeRegenRemaining (string inCharge, fixed inVal);
1785~1786.
native void     GameAddChargeRegenFull (string inCharge, fixed inVal);
native fixed    GameGetChargeRegenFull (string inCharge, bool adjustmentOnly);
1795.
native int      GameTestConfigType ();
1819.
native void     GameSetPauseable (bool pauseable);
2153~2154.
native void         PathSetSourceUnit (int inPathId, unit inUnit);
native unit         PathGetSourceUnit (int inPathId);
2174~2175.
native void         PathClearWayPoints (int inPathId);
native void         PathAddWayPoint (int inPathId, point inWayPoint);
2231.
native int          EventPingOption ();
2312~2317.天赋相关
// Hero Talent Tree
//--------------------------------------------------------------------------------------------------
native string       TalentTreeGetHeroTalentLink (int inPlayer, int inIndex);
native string       TalentTreeGetHeroTalentHeroLink (int inPlayer, int inIndex);
native int          TalentTreeGetHeroTalentTier (int inPlayer, int inIndex);
native int          TalentTreeGetHeroTalentCount (int inPlayer);
2360.
native void         HelpPanelAddMessage (playergroup players, text speakerText, text subtitleText, string modelLink, soundlink soundId);
2427~2429.
native string   PlayerHero (int inPlayer);
native string   PlayerSkin (int inPlayer);
native string   PlayerMount (int inPlayer);
2436~2437.
native bool     PlayerAIControlAllowed (int player);
native void     PlayerSetAllowAIControl (int player, bool allow);
2442~2450.
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);
2485~2487.
native void PlayerSetHero (int inPlayer, string inHero);
native void PlayerSetSkin (int inPlayer, string inSkin);
native void PlayerSetMount (int inPlayer, string inMount);
2525.
native void PlayerAddChargeRegenRemaining (int inPlayer, string inCharge, fixed inVal);
2527~2528.
native void PlayerAddChargeRegenFull (int inPlayer, string inCharge, fixed inVal);
native fixed PlayerGetChargeRegenFull (int inPlayer, string inCharge, bool adjustmentOnly);
2555.
native void TriggerAddEventPlayerJoin (trigger inTrigger, int player);
2560.
native void TriggerAddEventPlayerEffectUsedFromScope (trigger t, int player, string inScope);
3021.
native void     SoundSetReverbForPlayers (playergroup players, string inReverbLink, fixed inDuration, bool inAmbient, bool inGlobal);
3027~3034.
// Deprecated
native void SoundPlaySceneFile (
    soundlink link,
    playergroup players,
    string sceneFile,
    string camera
);
3071.文本比较函数
native int      StringCompare (string s1, string s2, bool caseSens);
3231.
native void     TextTagSetGravity (int inTag, fixed inGravity);
3398.
native void TransmissionSourceSetBypassMessageLog (transmissionsource source, bool bypass);
3490~3499.
// - 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);
3507.输出布尔值
native void     TriggerDebugOutputEnable (bool inEnable);
3567.获取移动目标点坐标
native point UnitGetGoalPosition (unit inUnit);
3700.
native void     UnitAddChargeRegenRemaining (unit inUnit, string inCharge, fixed inVal);
3702~3703.
native void     UnitAddChargeRegenFull (unit inUnit, string inCharge, fixed inVal);
native fixed    UnitGetChargeRegenFull (unit inUnit, string inCharge, bool adjustmentOnly);
3710~3711.
native void     UnitModifyCooldown (unit inUnit, string inCooldown, fixed inVal, int inOperation);
native void     UnitClearCooldowns (unit inUnit, bool inReset);
3722.
native effecthistory UnitEffectHistory (unit inUnit, int inMaxCount);
3742.
native void     UnitAbilitySpendExplicit (unit inUnit, abilcmd inAbilCmd, int inLocation, fixed inVitalsFactor, fixed inResourcesFactor, fixed inChargesFactor, fixed inCooldownFactor);
3811.
native unitgroup    UnitConjoinedGroup (unit inUnit, string inConjoinedBehavior);
3868~3883.修改3886~3895常量值
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;
3909.
native bool     UnitHasBehavior2 (unit inUnit, string inBehavior);
3922.
native void     UnitBehaviorAddChargeRegenRemaining (unit inUnit, string inAbil, string inCharge, fixed inVal);
3924~3925.
native void     UnitBehaviorAddChargeRegenFull      (unit inUnit, string inAbil, string inCharge, fixed inVal);
native fixed    UnitBehaviorGetChargeRegenFull      (unit inUnit, string inAbil, string inCharge, bool adjustmentOnly);
3934~3935.
native fixed    UnitBehaviorDamageModifyRemaining (unit inUnit, string inBehavior);
native fixed    UnitBehaviorDamageModifyLimit     (unit inUnit, string inBehavior);
3998.
native void         UnitWeaponSetPeriodRemaining (unit inUnit, int inIndex, fixed inRemaining);
4009~4017.
// 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);
4060~4061.
native bool UnitPathableToPoint (unit u, point inTarget, fixed inRange, fixed inMaxDistance);
native bool UnitPathableToUnit (unit u, unit inTarget, fixed inRange, fixed inMaxDistance);
4106.
native void     TriggerAddEventUnitDamageAbsorbed (trigger inTrigger, unitref inUnit, string inBehavior);
4125~4126.
native fixed    EventUnitDamageAttempted ();
native fixed    EventUnitDamageAttemptedVitals ();
4129.
native fixed    EventUnitDamageBehaviorShield ();
4207.
native unit     EventUnitAbilityOtherUnit ();
4231~4233.
native unit     EventUnitVictimUnit ();
native unit     EventUnitItemUsed ();
native string   EventUnitEffectUsed ();
4641.
const int c_syncFrameTypeTextTag                = 37;
4647.从36改为37
const int c_syncFrameTypeLast                   = 37;
4727~4729.
native void         UISetHotkeyProfile (playergroup players, string profileName);
native text         UIHotKeyString (int hotKey, int count, bool abbreviate, bool addTags);
4772.
native void         UISetGameMenuItemShortcut (playergroup inPlayers, int inMenuItemType, text inShortcut);
4797.
native void         UISetHotkeyAllowed (playergroup players, int hotkey, bool allow);
4818.
native void         UISetTargetingOrder (playergroup inPlayers, unitgroup inUnits, order inOrder, bool inSticky);
4867~4871.
// 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;
4878.
native void     VisFillArea (int player, region area, int fillType, bool checkCliffLevel);
删除内容:2.1.1(行号)
2450~2461
// Effect amounts
const int c_effectAmountAbsorbed        = 0;
const int c_effectAmountDamaged         = 1;
const int c_effectAmountDodged          = 2;
const int c_effectAmountFound           = 3;
const int c_effectAmountHealed          = 4;
const int c_effectAmountKilled          = 5;
const int c_effectAmountSplashed        = 6;
const int c_effectAmountLifeChanged     = 7;
const int c_effectAmountShieldsChanged  = 8;
const int c_effectAmo0untEnergyChanged   = 9;

修改内容:2.1.1 (2.5.0)(行号)
2842~2878.(2.1.1原始)
// Sound
native void SoundPlay (
    soundlink link,
    playergroup players,
    fixed volume,
    fixed offset
);
native void SoundPlayAtPoint (
    soundlink link,
    playergroup players,
    point inPoint,
    fixed height,
    fixed volume,
    fixed offset
);
native void SoundPlayOnUnit (
    soundlink link,
    playergroup players,
    unit inUnit,
    fixed height,
    fixed volume,
    fixed offset
);
// - SoundPlayScene attempts to synchronize unit animations with the sound duration
native void SoundPlayScene (
    soundlink link,
    playergroup players,
    unitgroup units,
    string animProps
);
native void SoundPlaySceneFile (
    soundlink link,
    playergroup players,
    string sceneFile,
    string camera
);
2942~2975.(2.5.0修改为)
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
);
3290~3314.(2.1.1原始)
native int                  TransmissionSend (
                                playergroup players,
                                transmissionsource source,
                                int targetPortrait,
                                string targetAnim,
                                soundlink soundLink,
                                text speaker,
                                text subtitle,
                                fixed duration,
                                int durationType,
                                bool waitUntilDone
                            );
native int                  TransmissionSendAdvanced (
                                playergroup players,
                                transmissionsource source,
                                int targetPortrait,
                                string actorLink,
                                string targetAnim,
                                soundlink soundLink,
                                text speaker,
                                text subtitle,
                                fixed duration,
                                int durationType,
                                bool waitUntilDone
                            );
3400~3413.(2.5.0修改为)
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
                            );
      
3630~3633.(2.1.1原始)
native void     UnitAbilityAddChargeRegen (unit inUnit, string inAbil, string inCharge, fixed inVal);
native fixed    UnitAbilityGetChargeRegen (unit inUnit, string inAbil, string inCharge);
native void     UnitAbilityAddChargeUsed (unit inUnit, string inAbil, string inCharge, fixed inVal);
native fixed    UnitAbilityGetChargeUsed (unit inUnit, string inAbil, string inCharge);
3756~3764.(2.5.0修改为)
// deprecated
native void     UnitAbilityAddChargeRegen          (unit inUnit, string inAbil, string inCharge, fixed inVal);
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);
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 点一下

本版积分规则

Archiver|移动端|小黑屋|地精研究院

GMT+8, 2024-11-24 09:18 , Processed in 0.097501 second(s), 27 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表