找回密码
 点一下
查看: 2664|回复: 4

手动整理了下1.1.0的所有地图编辑器方面的新特性……

[复制链接]
发表于 2010-9-26 21:18:54 | 显示全部楼层 |阅读模式
主要就是讲数据编辑器(xml)方面和Galaxy方面。


Galaxy方面


两个新的AI函数

[codes=galaxy]
native void AIEarlyDefenseEnable (int player, bool enableScouting, bool enableDefending);
native void AIEarlyDefenseProps (int player, fixed scoutRange, fixed peonRange, fixed threatRange);
[/codes]

可以决定AI是否进行早期侦察和早期防御,早期最大侦察范围,威胁范围等等。




下面这三个函数用来获得当前地图执行了多少时间。可以暂停计时器,也可以判断计时器是否处于暂停状态。

[codes=galaxy]
native void GameSetMissionTimePaused (bool inPaused);
native bool GameIsMissionTimePaused ();
native fixed GameGetMissionTime ();
[/codes]


这三个函数对应1.1.0新加入的系统时钟功能,见屏幕左下角。你可以在游戏设置里打开和关闭这个时钟,得知当前地图运行了多久。而上面这3个函数将可以影响这个时钟。获得它的当前值,甚至暂停它。



Screenshot2010-09-26 17_12_49.jpg




下面这个是获得大厅里组成的队伍对对应的玩家组。参数为队伍编号。


[codes=galaxy]
native playergroup GameAttributePlayersForTeam (int team);
[/codes]



不得不说BN2的星战大厅设计倒退,队伍永远显示为队伍1 队伍2 队伍3,也无法给电脑玩家起名字,以前版本竟然无法得知一个组里有哪几个玩家。




新的秘籍判断函数,判断当前地图是否允许某项秘籍。

[codes=galaxy]
native bool GameCheatIsAllowed (int cheat);
[/codes]




一些新的数学函数

[codes=galaxy]

native fixed Floor (fixed x); //向下取整(返回值为实数)
native fixed Ceiling (fixed x); //向上取整(返回值为实数)
native fixed Trunc (fixed x); //截去小数部分(返回值为实数)
native fixed Round (fixed x); //四舍五入(返回值为实数)
native fixed Pow2 (fixed x); //平方
native fixed Log2 (fixed x); //以2为底的对数
native int FloorI (fixed x); //向下取整
native int CeilingI (fixed x); //向上取整
native int TruncI (fixed x); //截去小数部分
native int RoundI (fixed x); //四舍五入
native int SquareRootI (fixed x); 开平方(返回值为整数)
native int Pow2I (fixed x); //平方(返回值为整数)
native int Log2I (fixed x);//以2为底的对数(返回值为整数)
native int PowI (fixed x, fixed power);N次方(返回值为整数)
[/codes]

注:
native fixed SquareRoot (fixed x); 开平方
native fixed Pow (fixed x, fixed power); N次方

这两函数没列出,因为以前就有。



下面这些就是效果事件及其附属函数啦。

我专门有几个帖子介绍,不多讲了。
http://bbs.islga.org/read-htm-tid-45512.html
[codes=galaxy]
native void TriggerAddEventPlayerEffectUsed (trigger t, int player, string inEffect);

// 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;

native string EventPlayerEffectUsed ();
native point EventPlayerEffectUsedPoint (int inLocation);
native unit EventPlayerEffectUsedUnit (int inLocation);
native int EventPlayerEffectUsedUnitOwner (int inLocation);
native string EventPlayerEffectUsedUnitType (int inLocation);
native int EventPlayerEffectUsedAmountInt (int inAmount, bool total);
native fixed EventPlayerEffectUsedAmountFixed (int inAmount, bool total);
[/codes]





玩家属性改变事件,现在可以获得具体改变了多少。
[codes=galaxy]
native int EventPlayerPropertyChangeInt ();
native fixed EventPlayerPropertyChangeFixed ();
[/codes]



新的单位属性常数,用于UnitSetPropertyInt(),UnitSetPropertyFixed (),UnitGetPropertyInt (),UnitGetPropertyFixed ()这些设置和获取单位属性的函数。这些新常数对应补丁说明中提到的单位经验值、等级和奖励资源。

[codes=galaxy]
const int c_unitPropXP = 24;
const int c_unitPropLevel = 25;
const int c_unitPropBountyMinerals = 26;
const int c_unitPropBountyVespene = 27;
const int c_unitPropBountyTerrazine = 28;
const int c_unitPropBountyCustom = 29;
[/codes]




补丁中提到的伤害函数,虽然这个完全可以用效果函数来做到


[codes=galaxy]
native void UnitDamage (unit inAttacker, string inEffect, unit inVictim, fixed inBonus);
[/codes]





单位属性改变事件,现在可以获得具体改变了多少。而且以前竟然无法获得触发改变事件的单位属性,是失误了,所以也补上。

[codes=galaxy]
native int EventUnitProperty ();
native int EventUnitPropertyChangeInt ();
native fixed EventUnitPropertyChangeFixed ();
[/codes]




正如补丁中所言,加入了单位所属玩家改变事件。另外可以获得前任主人和新任主人。

[codes=galaxy]
// Change Owner
native void TriggerAddEventUnitChangeOwner (trigger t, unitref u);
native int EventUnitOwnerOld ();
native int EventUnitOwnerNew ();
[/codes]




增加几个新的同步窗体ID常数
[codes=galaxy]
const int c_syncFrameTypeInventoryPanel = 23;
const int c_syncFrameTypeAllianceButton = 24;
const int c_syncFrameTypeTeamResourceButton = 25;
const int c_syncFrameTypeAchievementMenuButton = 26;
const int c_syncFrameTypeHelpMenuButton = 27;
const int c_syncFrameTypeMissionTimePanel = 28;

// This should always be equivalent to the highest value in the syncFrameType list above
const int c_syncFrameTypeLast = 28;
[/codes]


XML数据编辑器方面


增加新的Actor事件:Effect.XXX.Abort。当导弹没能命中目标时触发。(这点在补丁里提到了)




增加了一个全新的Actor类CActorSiteOpSelectionOffset,在数据编辑器里的名字是Site Operation (Selection Offset)从字面上应该是选择圈为基准的偏移,但是没找到有关偏移量的字段,不过这个东西我目前还没试过。所以有同学试过的话回复下吧。




增加了4个需求节点类:CRequirementOdd,CRequirementDiv,CRequirementMod,CRequirementMul,分别对应奇偶,除,余,乘。




Buff类行为(CBehaviorBuff)增加了2个属性
Replace
ReplaceLocation
其中ReplaceLocation是个结构属性,包含Effect和Value两个子属性。

这两个新增属性我还没测试过,不过应该是用来设定行为替换方案的。




单位类中增加了一个DeathRevealType的属性,用来决定单位死后的视野,是可见还是快照(迷雾中)。这对应了1.1.0的一项更新,对战单位死亡后将不再暂时性打开死亡地点的视野,而是换成快照了。




CActorModel类增加了AutoScaleFromSelectionFactor属性。按照字面应该是按照选择圈自动缩放系数。




CActorSound类增加了SoundFlags属性,用作声音Actor的参数。




CActorUnit增加了AddonIndicator属性,这个东西是用来在主建筑上显示附属建筑的名字的。比如科学实验室就是T,反应炉就是R。中文的话是科和反两个字。不过在1.1.0里,你可以随便改这些字了。


比如,改成红色的"GA2012"。比较小看不清楚是吧?其实本来只有一个字的空间,我硬给挤进了那么多字,当然就小了

Screenshot2010-09-26 20_32_48.jpg


CActorUnit类中还增加了PlaceholderActorModel,作为该单位的占位模用的Actor模型。




CEffect类增加了一个Chance属性。意味着所有效果现在全部可以设定几率了。这个也在1.1.0的补丁说明里有提到。




CSound类增加了DupeHistoryCount属性,我还不知道作用,不过可能是用来决定该声音多少个实例以前的实例全部作古,算作需要被处理的实例。




CUpdate类增加了WebPriority属性,完全不知道是做啥的。反正是啥啥的优先级。




现在SFidget结构增加了一些内容,这个结构是用来决定单位没有收到命令时的闲赋动作的。该结构常见于CUnit类中。


CUnit类的Fidget就是这种结构类型。

该结构的ChanceArray属性数组现在增加了一个索引Move,可以决定单位在闲的时候乱走的几率。1.1.0以前,单位闲的时候会转身,会做各种动作,但是不会乱走,现在如果设置Move的几率的话,单位就会开始闲逛了。

很像行为里的游荡行为吧?不过这里是只有闲的时候才会乱走。

[codes=xml]
<CUnit id="Marine">
<Fidget>
<ChanceArray index="Move" value="33"/>
</Fidget>
</CUnit>
[/codes]

以上xml让机枪兵在闲的时候有33%几率闲逛。


实际效果:

0分17秒的时候

Screenshot2010-09-26 20_54_36.jpg

1分19秒的时候

Screenshot2010-09-26 20_55_29.jpg

除了Move这一枚举索引外,该结构还增加了2个子属性:D
DistanceMax
DistanceMin
显然是控制闲逛时是最大和最小距离。






CUnit类的Flags属性中,增加了一个新的Flag: AI Changeling。这个应该是用来告诉AI,这家伙是变形虫,你可以用它来混进敌人当中。
 楼主| 发表于 2010-9-26 21:27:29 | 显示全部楼层
发现刚才漏了张图,补上。
回复

使用道具 举报

发表于 2010-9-26 21:30:54 | 显示全部楼层
数学方面强化了,War3的时候很多函数没有,比如说四舍五入。

差点就抢到沙发了~~~~~~
回复

使用道具 举报

发表于 2010-9-27 12:54:59 | 显示全部楼层
===========
Buff类行为(CBehaviorBuff)增加了2个属性
Replace
ReplaceLocation
其中ReplaceLocation是个结构属性,包含Effect和Value两个子属性。

这两个新增属性我还没测试过,不过应该是用来设定行为替换方案的。
===========
Replace 這個裏面好像有2個屬性,一個是時間一個是距離。
不知道是什麼作用,隨便試驗了一下沒什麼反映就沒管了~ ~#

===========
CActorUnit增加了AddonIndicator属性,这个东西是用来在主建筑上显示附属建筑的名字的。比如科学实验室就是T,反应炉就是R。中文的话是科和反两个字。不过在1.1.0里,你可以随便改这些字了。
===========
沒怎麼注意過附属建筑的名字是什麼~不知道非附屬建築可以設定不呢?給個兵種之~
回复

使用道具 举报

发表于 2010-9-27 14:20:05 | 显示全部楼层
这些东西很有用哦..
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-5-5 11:27 , Processed in 0.072117 second(s), 21 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

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