diff --git a/CODE_NDT/test.java b/CODE_NDT/test.java
index 71afce8..8b72295 100644
--- a/CODE_NDT/test.java
+++ b/CODE_NDT/test.java
@@ -16,9 +16,18 @@ public static void main(String[] args) throws Exception {
/*
https://products.aspose.app/cells/zh/conversion/xlsx-to-json
NDT-1.15.json xlxs2json
+ {
+ "Column2": "代码",
+ "Column3": "代码翻译",
+ "Column4": "描述",
+ "Column5": "例子",
+ "Column6": "值类型",
+ "键注意事项": "注意事项"
+ },
*/
public static void outfromdata() throws Exception {
JSONObject js=pare(new File("sdcard/a"));
+ //git文件没更新数据集,自己换个
BufferedWriter index=new BufferedWriter(new FileWriter(new File(outPath, "index.md")));
index.write("# index");
JSONArray list= js.getJSONArray("单位代码");
@@ -32,9 +41,9 @@ public static void outfromdata() throws Exception {
}
continue;
}
- String str=obj.optString("key翻译");
+ String str=obj.optString("Column3");
if (str == null)continue;
- String key=obj.optString("key描述解释");
+ String key=obj.optString("Column4");
boolean isSection=key == null ?false: key.startsWith("[") && key.endsWith("]");
if (isSection || str.matches("[a-zA-Z]{2,}")) {
if (buff != null)buff.close();
@@ -59,13 +68,13 @@ public static void outfromdata() throws Exception {
index.write(str);
index.write(".md");
index.write(")\n");
- index.write(obj.optString("key代码"));
+ index.write(obj.optString("Column2"));
buff = new BufferedWriter(new FileWriter(new File(outPath, str + ".md")));
buff.write("# ");
buff.write(rstr);
buff.write("\n");
} else if (buff != null) {
- key = obj.optString("key代码");
+ key = obj.optString("Column2");
if (key == null || key.length() == 0)continue;
char c=key.charAt(0);
if (Character.isLowerCase(c) || Character.isUpperCase(c) || c == '@') {
@@ -74,16 +83,14 @@ public static void outfromdata() throws Exception {
buff.write("\ntranslation:");
buff.write(str.replaceFirst(":$", ""));
buff.write("\n
type:");
- String type=obj.optString("key值类型", "string");
+ String type=obj.optString("Column6", "string");
buff.write(type);
- String type2=obj.optString("Column8");
- if (type2 != null && type2.length() > 0) {
- if (!type.equals(type2)) {
- buff.write('/');
- buff.write(type2);
- }
+ String type2 = obj.optString("Column5");
+ if (type2 != null ){
+ buff.write("\n
example:");
+ buff.write(type2);
}
- str = obj.optString("key描述解释");
+ str = obj.optString("Column4");
if (str != null) {
buff.write("\n
");
buff.write(str);
@@ -103,4 +110,3 @@ public static JSONObject pare(File f) throws Exception {
return new JSONObject(new String(by));
}
}
-
diff --git a/rustedwarfareapicode/src/UnitNDT/action.md b/rustedwarfareapicode/src/UnitNDT/action.md
index bf744f6..88ccdef 100644
--- a/rustedwarfareapicode/src/UnitNDT/action.md
+++ b/rustedwarfareapicode/src/UnitNDT/action.md
@@ -2,342 +2,440 @@
## text
translation:文本
type:string
+
example:text:chemms
界面中显示的文字
## textPostFix
translation:文本后缀
type:string
+
example:text: [
+textPostFix: ]
+textAddUnitName: unitRef self.attachment(slot="${slotId}")
显示为后缀的文本,与textAddUnitName一起用于创建文本UI
## text_[Language]
translation:文字多语言
type:string
+
example:text_zh:chemms
界面中显示的文字,多语言
## description
translation:描述
type:string
+
example:description:chemms翻译
选中时显示的文本,用于解释其用途。
## description_[Language]
translation:描述
type:string
+
example:description_en:shibainu
描述多语言。
## displayType
translation:显示类型
type:string
+
example:displayType:infoOnly
行动的显示类型正常模式为无(绿色)、集结(白色R)、升级(蓝色U)、单位队列(绿色)、建筑(绿色)、行为(蓝色)、仅信息(灰色)、无框信息、仅信息库存(灰色)
none, rally, upgrade, queueUnit, building, action, infoOnly, infoOnlyNoBox,infoOnlyStockpile
## displayRemainingStockpile
translation:显示剩余库存
-
type:bool
+
type:boolean
+
example:displayRemainingStockpile:true
显示剩余库存,显示为根据资源计算可以触发操作的次数。
## pos
translation:位置
type:float
+
example:pos:0
此动作在用户界面排序。
## iconImage
translation:图标
-
type:image
+
type:file
+
example:iconImage:shiba.png
使用图像作为此动作图标。
## iconExtraImage
translation:额外图标图像
-
type:image
+
type:file
+
example:iconExtraImage:shibaUPD.png
使用图像作为此动作图标。和上一个一致,但显示更靠上。绘制在图标图像上方。对升级图标等有用
## iconExtraColor
translation:额外图标颜色
type:color
+
example:iconExtraColor:#FFAAAAAA
将图标叠加上额外的颜色。默认为#64FFFFFF
## iconExtraIsVisible
translation:额外图标显示条件
-
type:LogicBoolean
+
type:Logicbooleanean
+
example:iconExtraIsVisible:if self.hasFlag(id=${slotid})
设置图标什么时候可显示。
## unitShownInUI
translation:UI中显示的单位
-
type:unit
+
type:unit name/unit ref
+
example:unitShownInUI: unitRef self.transporting(slot=0)
+unitShownInUI:shibainu
使用此单位作为动作图标。
## setBuilt
translation:设置完成度
type:float
+
example:setBuilt:1
默认为1。填0-1之间的数字,将指定单位建造完成度。比如填0.5,执行完操作后单位自身建造完成度就成了50%
## guiBuildUnit
translation:界面显示单位
-
type:unit
+
type:unit name
+
example:guiBuildUnit:turret_artillery
将action图标和鼠标指针改为指定单位,这就像您用建造者去造建筑,会受地形影响,可为action或路径点提供坐标。
## tags
translation:标签
type:string(s)
+
example:tags:customTag1,customTag2
(在使用队列大小时可以用withActionTag=x来获取数量)
Used with queueSize(withActionTag=x) and queueItemAdded(withActionTag=x)
## id
translation:编号
type:string
+
example:id:1
允许在单位之间转换时更容易的连接动作(action的id,应该有对应的引用词)
## aiTags
translation:AI的标签
type:string(s)
+
example:aiTags:doge
随便填一个得了(专门给AI用的)
## textAddUnitName
translation:从单元添加名称
-
type:unit ref/unit
+
type:unit name/unit ref
+
example:textAddUnitName:${section.convertTo}
从指定单位添加名称。
## descriptionAddFromUnit
translation:从单元添加描述
-
type:unit ref/unit
+
type:unit name/unit ref
+
example:descriptionAddFromUnit:unitRef self.attachment(slot="unitSlot${slotId}")
从指定单位添加单位描述。
## descriptionAddUnitStats
translation:从单元添加属性
-
type:unit ref/unit
+
type:unit name/unit ref
+
example:descriptionAddUnitStats:unitRef self.attachment(slot="unitSlot${slotId}")
从指定单位添加详细信息描述,比如攻击力,攻击范围。
## unitShownInUIWithHpBar
translation:单元在UI显示Hp条
-
type:bool
+
type:boolean
+
example:unitShownInUIWithHpBar:true
在ui中显示单位血条。默认true,仅当unitShownInUI是unitRef时使用
## unitShownInUIWithProgressBar
translation:单元在UI显示进度条
-
type:bool
+
type:boolean
+
example:unitShownInUIWithProgressBar:true
在ui中显示单位进度条。默认true,仅当unitShownInUI是unitRef时使用。如果激活,则替换HP bar
## price
translation:价格
-
type:resources
+
type:price(s)
+
example:price: credits=5, energy=5, hp=100, shield=5, ammo=1
此行为需要的价格,可以是多种资源或自定义资源。如果不满足则行为不可用。如果没设定资源类型则默认为资金。如果价格为0,AI可能很少甚至不会使用。
## isActive
translation:可用
-
type:LogicBoolean
+
type:Logicbooleanean
+
example:isActive:true
默认为true。如果为false,则会禁用操作,并在用户界面中以红色显示。
## isVisible
translation:可见
-
type:LogicBoolean
+
type:Logicbooleanean
+
example:isVisible:true
默认为true。如果false则从UI中隐藏并被禁用。
## isLocked
translation:锁定
-
type:LogicBoolean
+
type:Logicbooleanean
+
example:isLocked:true
默认为false。如果true则禁用操作,则会显示一个锁定文本。可用作禁核或者科技树,或是条件限制。
## isLockedMessage
translation:锁定消息
type:string
+
example:isLockedMessage:您不够可爱
显示锁定的原因。
## isLockedAlt
translation:更多锁定
-
type:LogicBoolean
+
type:Logicbooleanean
+
example:isLockedAlt:if not self.isFlying()
另一个原因被锁定。用于显示不同的消息。
## isLockedAltMessage
translation:更多锁定消息
type:string
+
example:isLockedAltMessage:上天才给您施展。
显示更多锁定的原因。
## isLockedAlt2
translation:更多锁定2
-
type:LogicBoolean
+
type:Logicbooleanean
+
example:isLockedAlt2:if self.isInWater()
另一个原因被锁定。用于显示更多锁定的原因。
## isLockedAlt2Message
translation:更多锁定消息2
type:string
+
example:isLockedAlt2Message:水中自然要划水了~
显示更多锁定的原因。
## allowMultipleInQueue
translation:允许多个队列
-
type:bool
+
type:boolean
+
example:allowMultipleInQueue:true
允许多次点击此行为形成队列,false时则只能点一次,不能累加。
## onlyOneUnitAtATime
translation:一次只有一个单位
-
type:bool
+
type:boolean
+
example:onlyOneUnitAtATime:true
填true时选中多个同类单位时,只有一个执行此行为。
## isGuiBlinking
translation:界面闪烁
-
type:LogicBoolean
+
type:Logicbooleanean
+
example:isGuiBlinking:true
此行为在界面中闪烁。
## alwaysSinglePress
translation:总是按一次
-
type:bool
+
type:boolean
+
example:alwaysSinglePress
点击就执行,不需要确认。默认false,不需要在手机上确认,使用canPlayerCancel: false和allowMultipleInQueue: false也隐藏队列接口。
## isAlsoViewableByAllies
translation:显示给盟友
-
type:bool
+
type:boolean
+
example:isAlsoViewableByAllies:false
允许盟友玩家看到这个单位的动作,对显示其他玩家有用(例如导抛射体数量,收集的物品)
## isAlsoViewableByEnemies
translation:显示给敌人
-
type:bool
+
type:boolean
+
example:isAlsoViewableByEnemies:false
允许敌方玩家看到这个单位的动作,对显示其他玩家有用(例如导抛射体数量,收集的物品)
## extraLagHidingInUI
translation:消除ui额外延迟
-
type:bool
+
type:boolean
+
example:extraLagHidingInUI:true
用于联机,在UI中立即更新而不需要从服务器确认的等待时间。
## streamingCost
translation:流式造价
-
type:integer(price)
+
type:price(s)
+
example:streamingCos:100
就像价格,但在建造时逐渐消耗资金,如果在构建过程中资源耗尽,建造或生产队列将暂停。就像是红警中那样。铁锈默认是预先扣除资金。
## switchPriceWithStreamingCost
translation:切换价格为流造价
-
type:bool
+
type:boolean
+
example:switchPriceWithStreamingCost:true
快捷设置为默认资金消耗方式或为流式建造方式。建议使用模板快速将一个模组为所有单位切换流资源。
## aiUse
translation:AI对该行动的使用方式
-
type:use type
+
type:enum
+
example:aiUse:launch
可填:auto(自动),launch(发射),launchAmmo(发射弹药),disabled(残缺),upGrade(升级),movementChange(运动改变),sameAsBuilding(与建筑物相同)
## ai_isDisabled
translation:AI被禁用
-
type:LogicBoolean
+
type:Logicbooleanean
+
example:ai_isDisabled:true
默认为false。使用此操作停止AI使用此动作。
## ai_isHighPriority
translation:AI高优先级
-
type:LogicBoolean
+
type:Logicbooleanean
+
example:ai_isHighPriority:true
AI将优先执行此动作。
## ai_considerSameAsBuilding
translation:AI作为建筑
-
type:unit
+
type:unit name
+
example:ai_considerSameAsBuilding:BU_cq
填建筑。考虑动作的优先级将会跟建筑物建优先级一样。
## autoTriggerOnEvent
translation:自动触发事件
-
type:event type
+
type:enum(s)
+
example:autoTriggerOnEvent:destroyed
满足此条件则自动触发。参数表:
创建,完成且激活,销毁,杀死任何单位,队列中单位完成,队列添加项目,队列项目取消,传送,接触目标成功,玩家指定路径,队伍变更,运输新单位,卸载或移除单位,受到伤害[支持可选的(withTag=x)],进入载具,离开载具,新消息(withTag=x),移除附属,无
created, completeAndActive, destroyed, killedAnyUnit, queuedUnitFinished, queueItemAdded(1,15p9中添加了withActionTag和queueItemCancelled两个参数,用于触发动作时检测标签.), queueItemCancelled, teleported, touchTargetSuccess, newWaypointGivenByPlayer, teamChanged, transportingNewUnit,transportUnloadedOrRemovedUnit,tookDamage[支持可选的(withTag=x)],enteredTransport,leftTransport,newMessage(withTag=x),attachmentRemoved,NONE
## alsoTriggerOrQueueActionWithTarget
translation:也可以使用单位参考触发或队列操作
type:unit ref
+
example:alsoTriggerOrQueueActionWithTarget:nearestUnit()
更改其他触发动作的目标,默认为当前动作的目标。影响诸如 fireTurretXAtGround、spawnUnits、thisActionTarget()等。
## autoTriggerOnEventRecursionLimit
translation:自动触发事件递归限制(默认为1)
type:integer
+
example:autoTriggerOnEventRecursionLimit:1
自己触发自己的限制次数,默认为1
## autoTrigger
translation:自动触发
-
type:LogicBoolean
+
type:Logicbooleanean
+
example:autoTrigger: if self.overWater()
如果为true,则立即触发此操作的效果(忽略价格,isActive,isVisible,buildSpeed等)
+## autoTriggerCheckRate
+translation:自动触发检查率
+
type:enum
+
example:autoTriggerCheckRate:everyFrame
+
选项:everyFrame(默认),every4Frames, every8Frames。
+注意:所有触发器无论检查率都是在第一次创建和自动触发冷却之后检查的。
+注:使用模板添加[core]autoTriggerCheckRate:every8Frames到所有单位。可以使使用了复杂autoTriggers的mod有巨大的性能提升。
## buildSpeed
translation:建造速度
type:time
+
example:buildSpeed:1s
建造此动作所需要的时间,这个读条过程下面称之为准备以区分建造,机翻或是多个动作称之为队列。完成时的效果称为结果。
## buildSpeed_ignoreFactorySpeedModifiers
translation:建造速度忽略工厂乘数
-
type:bool
+
type:boolean
+
example:buildSpeed_ignoreFactorySpeedModifiers:true
建造此动作所需要的时间忽略[core]的工厂速度乘数以及工厂倍数
## refundAllQueuedItems
translation:取消所有队列项目
-
type:bool
+
type:boolean
+
example:refundAllQueuedItems:true
并返还资源
## removeAllQueuedItemsWithoutRefund
translation:移除所有未建造完成的队列项目
-
type:bool
+
type:boolean
+
example:removeAllQueuedItemsWithoutRefund:true
不返还资源
## highPriorityQueue
translation:高优先级队列
-
type:bool
+
type:boolean
+
example:highPriorityQueue:true
默认为false。如果为true,则此操作将跳过队列中的所有其他低优先级操作。适用于fireTurret类动作。
## canPlayerCancel
translation:玩家可以取消
-
type:bool
+
type:boolean
+
example:canPlayerCancel:true
玩家可以取消此动作。
## whenBuilding_cannotMove
translation:建造时无法移动
-
type:bool
+
type:boolean
+
example:whenBuilding_cannotMove:true
执行操作准备时停止单位移动。适用于类似部署类动作。
## whenBuilding_playAnimation
translation:建造时播放动画
-
type:animation ref
+
type:animation(s) code name
+
example:whenBuilding_playAnimation:AM_shiba
准备此动作时,播放[animation]中自定义的动画。
## whenBuilding_rotateTo
translation:建造时旋转
type:float
+
example:whenBuilding_rotateTo:-180
准备此动作时,将单位主体旋转到该方向
## whenBuilding_rotateTo_orBackwards
translation:建造时旋转或反转
-
type:bool
+
type:boolean
+
example:whenBuilding_rotateTo_orBackwards:true
如果为true,则当角度较小时,允许从whenBuilding_rotateTo旋转180度。
## whenBuilding_rotateTo_waitTillRotated
translation:建造时需等待旋转完成
-
type:bool
+
type:boolean
+
example:whenBuilding_rotateTo_waitTillRotated:true
暂停准备的行为,直到旋转完成再继续。
## whenBuilding_temporarilyConvertTo
translation:建造时临时转换为
type:unit ref
+
example:whenBuilding_temporarilyConvertTo:TEM_shiba
准备此操作时临时转换为另一个单位。原始单位的操作将保留。
## whenBuilding_temporarilyConvertTo_keepFields
translation:建造时保留字段
-
type:fields
+
type:enum(s)
+
example:whenBuilding_temporarilyConvertTo_keepFields:maxHp
不要在使用whenbuilding_temporaryconvertto时更改这些字段(无论是从或到),这对setUnitStats很有用
## whenBuilding_triggerAction
translation:建造时触发动作
-
type:action
+
type:(hidden) action(s) code name
+
example:whenBuilding_triggerAction:ACT_shiba
准备时触发另一个动作
## whenBuilding_rotateTo_aimAtActionTarget
translation:建造时转向直至瞄准目标
-
type:bool
+
type:boolean
+
example:whenBuilding_rotateTo_aimAtActionTarget:true
准备时转向瞄准目标,luke:测试版注意:在某些情况下是坏的
## whenBuilding_rotateTo_rotateTurretX
translation:建造时转向指定炮塔
-
type:turret ref
+
type:turret code name
+
example:whenBuilding_rotateTo_rotateTurretX:shi
准备此操作时转向指定炮塔。
## spawnEffectsOnQueue
translation:队列产生效果
-
type:effect ref
+
type:effect(s) code name
+
example:spawnEffectsOnQueue:custom:shiba
动作准备开始时产生的效果。
## playSoundToPlayerOnQueue
translation:队列播放声音
-
type:file(s) (ogg/wav)
+
type:file(s)
+
example:playSoundToPlayerOnQueue:shiba.ogg
动作准备时播放给玩家的声音。
## requireConditional
translation:需要条件
-
type:LogicBoolean
+
type:Logicbooleanean
+
example:requireConditional:if not numberOfUnitsInTeam(withTag='shiba',withinRange=233,greaterThan=0)
如果结果为false,则跳过此操作所有结果。
## convertTo
translation:转换成
-
type:unit
+
type:unit name
+
example:convertTo:SC_shiba
将您的单位转换为另一个单位。许多属性被保留。
## convertTo_keepCurrentTags
translation:转换时保留标签
-
type:bool
+
type:boolean
+
example:convertTo_keepCurrentTags:true
将单位转换为另一个单位。并且保留拥有的标签。
## convertTo_keepCurrentFields
translation:转换时保留字段
-
type:fields
+
type:enum(s)
+
example:convertTo_keepCurrentFields:maxHp
转换时不要更改这些字段,这在setUnitStats中很有用
## addEnergy
translation:增加能量
type:float
+
example:addEnergy:1
为单位增加能量。需要设置了energyMax,否则不起作用。(与addResources相同:energy = X)
## addResources
translation:添加资源
-
type:resources
+
type:(global) resource code name setting(s)
+
example:addResources: credits=5, energy=-5, hp=-100, shield=5, ammo=1
操作完成后,添加这些资源。
## addResourcesScaledByAIHandicaps
-translation:根据AI难度添加资源。
-
type:bool/resource
+translation:根据AI难度添加资源
+
type:boolean/(global) resource(s) code name
+
example:addResourcesScaledByAIHandicaps:true/[resource]
与addResources类似,但根据AI难度级别增加或减少。比例:最简单40%、简单70%、中等100%、困难140%、很困难180%、不可能370%
## addResourcesWithLogic
translation:用逻辑添加资源
-
type:LogicOperation
+
type:(global) resource code name setting(s)
+
example:addResourcesWithLogic: hp = select( self.parent.energy>5, 10, 20 )
与addResources类似,但允许对资源值使用逻辑
## setResourcesWithLogic
translation:用逻辑设置资源
-
type:LogicOperation
+
type:(global) resource code name setting(s)
+
example:setResourcesWithLogic: hp=self.parent.hp - 10, energy = self.energy / 2
将目标资源设置为此值,而不是添加。小心对全局资源使用。
## deleteSelf
translation:删除自身
-
type:bool
+
type:boolean
+
example:deleteSelf:true
删除执行此操作的单位,没有死亡效果,不执行死亡触发。
## resetCustomTimer
translation:重置自定义计时器
-
type:LogicBoolean
+
type:Logicbooleanean
+
example:resetCustomTimer:if self.customTimer(laterThanSeconds=5)
重置自定义计时器,与self.customTimer()
## setBodyRotation
translation:设置躯干旋转
type:LogicNumber
+
example:setBodyRotation:memory.dir
设置单位旋转度数。单位朝右为0度。因为是结果而不是准备过程,所以很突然。(支持动态数字比如memory)
## setHeight
translation:设置高度
type:LogicNumber
+
example:setHeight:self.hp
新增设置高度,可以使用逻辑
## setUnitStats
translation:设置单位状态
-
type:fields values
+
type:enum setting(s)
+
example:setUnitStats: maxHp+=self.energy+100, hp+=50, shieldRegen=0.5
字段值。允许在不转换的情况下动态更改选定的字段数量。支持=/+=/-=,动态数学/逻辑。可以改变的领域:maxHp(血量上限),hp(血量),selfRegenRate(自身回血速度),maxShield(护盾上限),shield(护盾),shieldRegen(护盾恢复速度),maxEnergy(能量上限),energy(能量),armour(装甲),mass(质量),shootDelayMultiplier(开火间隔倍数),shootDamageMultiplier(开火伤害倍数),movespeed(最大移动速度),maxTurnSpeed(最大转弯速度),maxAttackRange(最大攻击距离),nanoRange(修复范围),fogOfWarSightRange(迷雾视野),nanoFactorySpeed(工厂制造速度倍数),targetHeight(单位最终高度)
## resetUnitStats
translation:重置单位状态
-
type:bool
+
type:boolean
+
example:resetUnitStats:true
将setUnitStats所做的更改重置为基本值
## shrinkArrays
translation:简化数组
-
type:array memory name
+
type:array memory name(s)
+
example:shrinkArrays:arrays
去掉null项或死亡单位项还有为零的项,然后向前压缩
## setUnitMemory
translation:设置单位内存
-
type:key value pairs
+
type:memory setting(s)
+
example:setUnitMemory: """
+customText=memory.customText+'hello',
+nukeActive=true,
+nextTarget=self.attacking.nearestUnit(withinRange=300, withTag='x', relation='enemy')
+"""
键值对。改变此单元的内存,值可以用逻辑设定。内存必须首先用defineUnitMemory或@memory定义。
注:
设置内存时 需要加上数组下标
@@ -345,319 +443,397 @@ eg. setUnitMemory: numArray[0]=2
数组下标从0开始
## alsoTriggerAction
translation:也执行动作
-
type:action ref
+
type:action(s) code name
+
example:alsoTriggerAction: addCredits, playSound
触发其他动作的结果。忽略行动的要求。
## alsoTriggerActionRepeat
translation:重复"也触发行动(alsoTriggerAction)"调用
type:logicNumber
+
example:alsoTriggerActionRepeat:self.hp
logic number (Repeats the alsoTriggerAction call, index changed on each repeat) - Useful to create loops or work with arrays
(动态数字)(每次重复时改变索引 用于创建循环或处理数组)
## alsoQueueAction
translation:也添加进队列
-
type:action ref
+
type:action(s) code name
+
example:alsoQueueAction
将另一个动作添加到序列中。忽略行动的要求
## alsoTriggerOrQueueActionConditional
translation:也执行队列或需执行条件
-
type:LogicBoolean
+
type:Logicbooleanean
+
example:alsoTriggerOrQueueActionConditional:if not self.isFlying()
将此操作添加到序列。如果条件不满足(false)则忽略alsoQueueAction。默认true.
## playSoundAtUnit
translation:播放声音至单位
-
type:file(s) (ogg/wav)
+
type:file(s)
+
example:playSoundAtUnit:shiba.ogg
动作结束时在当前位置播放声音。
## playSoundGlobally
translation:播放声音至全图
-
type:file(s) (ogg/wav)
+
type:file(s)
+
example:playSoundGlobally:shiba.ogg:0.5
播放全局声音,所有玩家都能听到。
## playSoundToPlayer
translation:播放声音至玩家
-
type:file(s) (ogg/wav)
+
type:file(s)
+
example:playSoundToPlayer:shiba.ogg:999
播放声音,只有自己能听到。
## fireTurretXAtGround
translation:指定攻击地面炮塔
-
type:turret ref
+
type:turret code name
+
example:fireTurretXAtGround: nukeSilo
使用此炮塔攻击玩家所指定的地面。
## fireTurretXAtGround_withOffset
translation:指定攻击地面坐标
-
type:pointeger
+
type:integer(s)
+
example:fireTurretXAtGround_withOffset: 0,0
攻击指定坐标所在地面,不需要手动选择,
## fireTurretXAtGround_withProjectile
translation:指定攻击地面抛射体
-
type:projectile ref
+
type:projectile code name
+
example:fireTurretXAtGround_withProjectile:PRO_1
设定使用的抛射体,如果不设置则为炮塔默认的抛射体。
## fireTurretXAtGround_showGuideDecals
translation:指定攻击地面时显示贴花
-
type:decal name(贴花名称)
+
type:decal code name
+
example:fireTurretXAtGround_showGuideDecals:guide
当选择发射位置时显示贴花(参考核抛射体选择发射地点时长按显示)
## fireTurretXAtGround_withTarget
translation:指定攻击目标
-
type:unitref
+
type:unit ref
+
example:fireTurretXAtGround_withTarget:self.lastDamagedBy
炮塔瞄准指示的单位或标记的位置发射
## fireTurretXAtGround_count
translation:指定攻击地面数量
type:integer
+
example:fireTurretXAtGround_count:9
设置发射的抛射体数量,默认为1
## fireTurretXAtGround_onlyOverPassableTileOf
translation:指定攻击地面类型
-
type:string
+
type:enum
+
example:fireTurretXAtGround_onlyOverPassableTileOf:LAND
设置手动选择的地面需要满足这种运动方式。列表:无,陆地,建筑,空军,水。两栖,跨悬崖,跨悬崖和度水。
NONE LAND BUILDING AIR WATER HOVER OVER_CLIFF OVER_CLIFF_WATER
## spawnUnits
translation:产生单位
-
type:units
+
type:unit name(s)
+
example:eg: spawnUnits: heavyTank, tank*5, hoverTank(offsetX=10)
产生指定单位,可用是多种。
## spawnEffects
translation:产生效果
-
type:effect ref
+
type:effect(s) code name
+
example:spawnEffects:custom:shiba
产生指定效果
## produceUnits
translation:生产单位
-
type:units
+
type:unit name(s)
+
example:produceUnits:bigshibainu
类似spawnUnits,但是单位像正常生产一样,并获得路径的移动。1.13只对非建筑物生成的单位有效。
## offsetSelfAbsolute
translation:自身位置偏移
-
type:integer list
+
type:integers
+
example:offsetSelfAbsolute: 0, 0, 40 [x,y,height]
使用时将修改单位当前位置,以单位为中心的绝对坐标。
## teleportTo
translation:传送到
type:unit ref
+
example:teleportTo:nearestUnit
传送到(填单位参考)
## transportTargetNow
translation:主动装运目标
type:unit ref
-
主动装运目标(填单位参考)
+
example:transportTargetNow:nearestUnit
+
主动装运目标(填单位参考)(luke考虑在1.16p1及以后版本删除该代码)
## addUnitsIntoTransport
translation:添加单位到载具
-
type:unit list
+
type:unit name(s)
+
example:addUnitsIntoTransport: tank*3, heavyTank
将单位添加到运输槽中,在添加之前会检查空间是否够。
## deleteNumUnitsFromTransport
translation:从载具中删除单位数
type:integer
+
example:deleteNumUnitsFromTransport:3
从载具中删除指定数量单位。
## deleteNumUnitsFromTransport_onlyWithTags
translation:从载具删除带标签单位
-
type:string
+
type:string(s)
+
example:deleteNumUnitsFromTransport_onlyWithTags:cat
从载具中删除具有此标签的指定数量单位。
## startUnloadingTransport
translation:开始卸载单位
-
type:bool
+
type:boolean
+
example:startUnloadingTransport:true
开始卸载单位
## forceUnloadTransportNow
translation:强制卸载单位
-
type:bool
+
type:boolean
+
example:forceUnloadTransportNow:true
立即强制卸载单位
## forceUnloadTransportNow_onlyOnSlot
translation:强制卸载指定槽位单位
type:integer
+
example:forceUnloadTransportNow_onlyOnSlot:1
强制卸载指定槽位单位
## clearAllWaypoints
translation:清除所有路径点
-
type:bool
+
type:boolean
+
example:clearAllWaypoints:true
清除当前所有路径。
## clearActiveWaypoint
translation:清除当前路径点
-
type:bool
+
type:boolean
+
example:clearActiveWaypoint:true
清除当前路径,也就是停止当前动作,执行下一个路径点。
## addWaypoint_type
translation:添加路径点类型
-
type:waypostatic type
+
type:enum
+
example:addWaypoint_type:move
添加的路径点类型。值列表:移动,移动攻击,防守,进入载具,主动装载,攻击,回收,维修,靠近目标,建造,跟随,设置被动目标,卸载至,巡逻,防守至,触发行动,在范围内时触发行动
move, attackMove, guard, loadInto, loadUp, attack, reclaim, repair, touchTarget, build, follow,setPassiveTarget,unloadAt,patrol,guardAt,triggerAction,triggerActionWhenInRange
## addWaypoint_unitType
translation:添加路径点所建造的单位类型
-
type:unit
+
type:unit name
+
example:addWaypoint_unitType:BU_shiba
用于让当前单位去建造指定单位。仅用于addWaypoint_type:build
## addWaypoint_prepend
translation:添加路径点序列位置
-
type:bool
+
type:boolean
+
example:addWaypoint_prepend:true
添加到路径点的开头或结尾
## addWaypoint_triggerActionIfFailed
translation:添加路径点失败触发
-
type:actions
+
type:(hidden) action(s) code name
+
example:addWaypoint_triggerActionIfFailed:act_fail
如果target_nearestUnit找不到匹配项,因此无法添加路径点,则触发此操作
## addWaypoint_triggerActionIfMatched
translation:添加路径点匹配触发
-
type:actions
+
type:(hidden) action(s) code name
+
example:addWaypoint_triggerActionIfMatched:act_suc
如果操作添加的路径点是有效的,则执行指定操作。
## addWaypoint_maxTime
translation:添加路径点检索时间
type:time
+
example:addWaypoint_maxTime:10s
如果此路径点这么久还无法执行完成,则取消。
## addWaypoint_target_nearestUnit_tagged
translation:添加路径点检索标签
-
type:tags
+
type:string(s)
+
example:addWaypoint_target_nearestUnit_tagged:tag_shiba
添加的路径点目标为靠近有此标签的单位。
## addWaypoint_target_nearestUnit_team
translation:添加路径点靠近队伍
-
type:relation
+
type:enum
+
example:addWaypoint_target_nearestUnit_team:own
添加的路径点目标需要的所属方:己方|除自己外任何|中立|除自己外盟友|盟友|敌人|任何,own|notOwn|neutral|allyNotOwn|ally|enemy|any
## addWaypoint_target_nearestUnit_maxRange
translation:添加路径点检索范围
type:float
+
example:addWaypoint_target_nearestUnit_maxRange:999
添加的路径点靠近某目标时考虑的最大范围。
## addWaypoint_target_mapMustBeReachable
translation:添加路径点路径可达
-
type:bool
+
type:boolean
+
example:addWaypoint_target_mapMustBeReachable:true
添加的路径点靠近某目标时必须是有可到达路径的。
## addWaypoint_target_fromReference
translation:添加路径点来自参考
type:unit ref
+
example:addWaypoint_target_fromReference: memory.lastDock
添加路径点来自单位信息引用。
## addWaypoint_position_offsetFromSelf
translation:添加路径点坐标偏移
-
type:pointeger
+
type:integer(s)
+
example:addWaypoint_position_offsetFromSelf:10,10
添加的路径点相对于自身偏移的坐标。
## addWaypoint_position_fromAction
translation:添加路径点动作坐标
-
type:bool
+
type:boolean
+
example:addWaypoint_position_fromAction:true
将当前动作指定的坐标添加进路径序列中。
## addWaypoint_position_randomOffsetFromSelf
translation:添加路径点随机偏移
type:integer(s)
+
example:addWaypoint_position_randomOffsetFromSelf:5,5
添加坐标进路径点时的随机值。
## addWaypoint_position_relativeOffsetFromSelf
translation:添加路径点相对偏移
type:integer(s)
+
example:addWaypoint_position_relativeOffsetFromSelf:10,10
添加路径点位置相对自身偏移量。
## addWaypoint_target_randomUnit_tagged
translation:添加指定标签的随机单位
-
type:unit
+
type:unit name
+
example:addWaypoint_target_randomUnit_tagged:shibaInu
添加路径点单位为指定标签的随机单位
## addWaypoint_target_randomUnit_team
translation:添加指定队伍的随机单位
-
type:string
+
type:enum
+
example:addWaypoint_target_randomUnit_team:own
添加路径点单位为指定队伍的随机单位
## addWaypoint_target_randomUnit_maxRange
translation:添加指定范围的随机单位
type:integer
+
example:addWaypoint_target_randomUnit_maxRange:999
添加路径点单位为指定范围的随机单位
## addAllActionCooldownsTime
translation:增加所有动作冷却时间
type:time
+
example:addAllActionCooldownsTime:10s
增加所有action的冷却时间。
## addAllActionCooldownsFor
translation:对于所有动作而言增加冷却时间
type:time
+
example:addAllActionCooldownsFor:10s
增加所有action的冷却时间。
## addActionCooldownTime
translation:增加动作冷却时间
type:time
+
example:addActionCooldownTime:10s
增加动作冷却时间,制作先充能再使用的action更加容易了。
## addActionCooldownFor
translation:对于动作而言增加冷却时间
type:time
+
example:addActionCooldownFor:10s
增加动作冷却时间,制作先充能再使用的action更加容易了。
## addActionCooldownsFor
translation:对于动作而言增加冷却时间
type:time
+
example:addActionCooldownsFor:10s
增加动作冷却时间,制作先充能再使用的action更加容易了。
## addActionCooldownApplyToActions
translation:添加指定动作冷却时间
-
type:action ref
+
type:(hidden) action(s) code name
+
example:addActionCooldownApplyToActions:hello
action id,设置addActionCooldownTime的目标。默认情况下是当前操作本身。
## clearAllActionCooldowns
translation:清除所有动作冷却时间
-
type:bool
+
type:boolean
+
example:clearAllActionCooldowns:true
清除所有动作冷却时间,使其立即可用。
## playAnimation
translation:播放动画
-
type:animation ref
+
type:animation(s) code name
+
example:playAnimation:shiba
播放[animation_xx]类型动画。
## playAnimationIfNotPlaying
translation:如果未播放动画则播放动画
-
type:animation ref
+
type:animation(s) code name
+
example:playAnimationIfNotPlaying:shiba
如果没有播放该动画,就播放该动画
## finishPlayingLastAnimation
translation:完成最后一个动画
-
type:bool
+
type:boolean
+
example:finishPlayingLastAnimation:true
完成最后一个动画,包括融合
## stopLastAnimation
translation:停止最后一个动画
-
type:bool
+
type:boolean
+
example:stopLastAnimation:true
停止最后一个动画,跳过融合
## switchToNeutralTeam
translation:切换至中立队伍
-
type:bool
+
type:boolean
+
example:switchToNeutralTeam:true
将队伍更改为中立。该队伍与其他所有队伍结盟。除非使用[core]stayNeutral:true,否则它将被附近的单位捕获。
## switchToAggressiveTeam
translation:切换至侵略性队伍
-
type:bool
+
type:boolean
+
example:switchToAggressiveTeam:true
将此单位队伍更改为侵略性的内置队伍。不能被其它单位捕获。
## switchToTeam
translation:切换至特定队伍
-
type:Logicinteger
+
type:LogicInteger
+
example:switchtoteam:-1
切换到小队id。从0开始。(中立-1,敌对中立-2)
## takeResources
translation:提取资源
-
type:customPrice
+
type:price(s)
+
example:takeResources: hp=5, gold=10
提取资源,至少写一种资源。
## takeResources_includeUnitsInTransport
translation:提取资源包括载具内
-
type:bool
+
type:boolean
+
example:takeResources_includeUnitsInTransport:true
提取资源,包括载具内单位。
## takeResources_includeParent
translation:提取资源包括父单位或载具
-
type:bool
+
type:boolean
+
example:takeResources_includeParent:true
提取资源,包括父单位和运输载具。
## takeResources_includeReference
translation:提取资源包括引用
type:unit ref
+
example:[action]takeResources_includeReference: self.lastDamagedBy
提取资源包括指定单位。
## takeResources_triggerActionForEach
translation:每找到一个提取目标触发行动
-
type:action name(行动名称)
+
type:(hidden) action(s) code name
+
example:takeResources_triggerActionForEach:go
引用动作(找到带有资源的目标单位并提取时)
## takeResources_includeUnitsWithinRange
translation:提取资源范围
type:float
+
example:takeResources_includeUnitsWithinRange:350
提取资源,在此范围内。
## takeResources_includeUnitsWithinRange_team
translation:提取资源队伍
-
type:TeamRelation
+
type:enum
+
example:takeResources_includeUnitsWithinRange_team:own
提取在此范围内队伍的资源。与“includeUnitsWithinRange”一起使用,默认为own。可以是:
己方|除自己外任何|中立|除自己外盟友|盟友|敌人|任何,own|notOwn|neutral|allyNotOwn|ally|enemy|any
## takeResources_excludeUnitsWithoutTags
translation:提取资源需要标签
-
type:tags
+
type:string(s)
+
example:takeResources_excludeUnitsWithoutTags:TAG_shiba
提取资源,但只提取有此标签的单位
## takeResources_excludeUnitsWithoutCustomTarget1EqualTo
translation:仅提取自定义目标一为
type:unit ref
+
example:takeResources_excludeUnitsWithoutCustomTarget1EqualTo:self
提取资源,但仅提取自定义目标一为此代码所填值的单位
## takeResources_excludeUnitsWithTheseResources
translation:提取资源排除资源
-
type:customPrice
+
type:(global) resource(s) code name
+
example:takeResources_excludeUnitsWithTheseResources:CP_shiba
提取资源,不包括拥有这些资源的单位。
## takeResources_excludeUnitsWithoutAllResources
translation:提取资源排除不足
-
type:bool
+
type:boolean
+
example:takeResources_excludeUnitsWithoutAllResources:true
提取资源,排除缺乏资源者。默认为true.
## takeResources_triggerActionIfAnyCollected
translation:提取资源成功触发
-
type:action ref
+
type:(hidden) action(s) code name
+
example:takeResources_triggerActionIfAnyCollected:ACT_shiba
如果有任何收集,则触发动作。
## takeResources_triggerActionIfNoneCollected
translation:提取资源失败触发
-
type:action ref
+
type:(hidden) action(s) code name
+
example:takeResources_triggerActionIfNoneCollected:act_shibainu
如果没有收集,则触发操作。
## takeResources_discardCollected
translation:提取资源删除
-
type:bool
+
type:boolean
+
example:takeResources_discardCollected:true
从目标中获取资源,但不向自身添加也就是删除。
## takeResources_keepResourcesOnTarget
translation:提取资源克隆
-
type:bool
+
type:boolean
+
example:takeResources_keepResourcesOnTarget:true
不从目标添加或删除资源。但克隆资源。与takeResources_discardCollected和takeResources_triggerActionIfAnyCollected一起使用以创建资源检测器。
## takeResources_maxUnits
translation:提取资源目标量
type:integer
+
example:takeResources_maxUnits:1
最多从多少单位提取资源,默认为1。
## takeResources_directTransferStoppingAtZero
translation:提取资源直接转换至零
-
type:bool
+
type:boolean
+
example:takeResources_directTransferStoppingAtZero:true
提取资源直接转换至0,用于完全转换。如果目标上的资源少于转帐金额,则只有剩余的资源将被转帐。不支持使用其他一些takeResources_*代码
## takeResources_searchOnly
translation:获取资源仅供搜索
-
type:bool
+
type:boolean
+
example:takeResources_searchOnly:true
#新增快捷方式 eg. (
takeResources_maxUnits=200
takeResources_discardCollected=true
@@ -667,141 +843,177 @@ takeResources_keepResourcesOnTarget=true
takeResources_includeUnitsWithinRange:#
## takeResources_saveFirstUnitToCustomTarget1
translation:提取资源保存第一个单元自定义目标1
-
type:bool
+
type:boolean
+
example:takeResources_saveFirstUnitToCustomTarget1:true
提取资源保存第一个单元一定是自定义目标1
## takeResources_saveFirstUnitToCustomTarget2
translation:提取资源保存第一个单元自定义目标2
-
type:bool
+
type:boolean
+
example:takeResources_saveFirstUnitToCustomTarget2:true
提取资源保存第一个单元一定是自定义目标2
## convertResource_from
translation:转换资源来源
-
type:customResource
+
type:(global) resource code name
+
example:convertResource_from:SP_cat
将此资源转换资源为别的资源。
## convertResource_to
translation:转换资源至
-
type:customResource
+
type:(global) resource code name
+
example:convertResource_to:SP_shiba
将资源转后为此资源,要提供的自定义资源的名称
## convertResource_minAmount
translation:转换资源至少
type:integer
+
example:convertResource_minAmount:0
如果来源中资源小于该数量,则跳过。默认为0。在大多数情况下可能不需要。
## convertResource_maxAmount
translation:转换资源至多
type:integer
+
example:convertResource_maxAmount:999
“来源资源”和“转换后资源”之间的最大转化量
## convertResource_multiplyAmountBy
translation:转换资源倍率
type:float
+
example:convertResource_multiplyAmountBy:0.1
资源转换倍率,不影响提取的数量。默认值为1。
## resourceAmount
translation:资源类型
-
type:customResource
+
type:(global) resource code name
+
example:resourceAmount:SP_cat
自定义资源的名称,使用以下3个键进行设置。所有键都是可选的,可以一起使用。
## resourceAmount_setValue
translation:资源类型设置数值
type:float
+
example:resourceAmount_setValue:99
设置此资源的绝对值,忽略资源的当前值。默认忽略。
## resourceAmount_addOtherResource
translation:资源类型添加至
-
type:customResource
+
type:(global) resource code name
+
example:resourceAmount_addOtherResource:SP_shiba
添加到其中的另一个自定义资源的名称。可以不使用resourceAmount_setValue,只是添加资源。或者使用resourceAmount_setValue:0复制一个资源值。
## resourceAmount_multiplyBy
translation:资源类型乘数
type:float
+
example:resourceAmount_multiplyBy:1
默认值为1。将当前资源值乘上此值。
## attachments_addNewUnits
translation:附属添加单位
-
type:unit
+
type:unit name(s)
+
example:attachments_addNewUnits:shiba
添加单位作为其子单位,需要定义附属位置。
## attachments_deleteNumUnits
translation:附属删除单位数
type:integer
+
example:attachments_deleteNumUnits:1
删除单位数量
## attachments_onlyOnSlots
translation:附属添加于槽位
-
type:string
+
type:attachment code name
+
example:attachments_onlyOnSlots:SL_shiba
只将附属物添加于特定的槽位
## disconnectFromParent
translation:脱离父单位
-
type:bool
+
type:boolean
+
example:disconnectFromParent:true
用于子单位脱离父单位
## attachments_unload
translation:卸载附属
-
type:bool
+
type:boolean
+
example:attachments_unload:true
卸载所有附属。可以与attachments_onlyonslot一起使用。与运输单位卸载相同
## attachments_disconnect
translation:附属断开连接
-
type:bool
+
type:boolean
+
example:attachments_disconnect:true
断开所有现在所在位置的附属。可以与attachments_onlyonslot一起使用。
## temporarilyAddTags
translation:临时标签添加
-
type:tags
+
type:string(s)
+
example:temporarilyAddTags:TEM_PD_shiba
将标签添加到单位,直到转换或重置。
## temporarilyRemoveTags
translation:临时标签删除
-
type:tags
+
type:string(s)
+
example:temporarilyRemoveTags:TEM_PD_shiba
从单位上删除标签,直到将其转换或重置。
## resetToDefaultTags
translation:标签重置
-
type:bool
+
type:boolean
+
example:resetToDefaultTags:true
重置为默认标签。
## addGlobalTeamTags
translation:添加全局标签
-
type:tags
+
type:string(s)
+
example:addGlobalTeamTags:TEM_UP_shiba
为玩家的团队添加此全局标签。与self.globalTeamTags()一起使用可创建解锁和升级。
## removeGlobalTeamTags
translation:移除全局标签
-
type:tags
+
type:string(s)
+
example:removeGlobalTeamTags:TEM_UP_shiba
从玩家队伍中删除此全局标签。
## showMessageToPlayer
translation:发送消息至玩家
type:string
+
example:showMessageToPlayer:对面傻蛋,您看不到!
向玩家个人发送信息。自己发给自己。
## showMessageToPlayer_[Language]
translation:发送消息至玩家
type:string
+
example:showMessageToPlayer_es:text test shiba
+showMessageToPlayer_zh:文本测试chemms
向玩家个人发送信息。自己发给自己。多语言版。注意:这种格式是支持几乎所有字符串显示给玩家,即使当引用不显示它
## showMessageToAllPlayers
translation:发送消息至所有
type:string
+
example:showMessageToAllPlayers:对面傻猫,队友说是不是?
向所有玩家发送消息。
## showMessageToAllEnemyPlayers
translation:发送消息给所有敌人
type:string
+
example:showMessageToAllEnemyPlayers:我投靠,收不?
发送消息给所有敌人。
## showQuickWarLogToPlayer
translation:发送战争快报至玩家
type:string
+
example:showQuickWarLogToPlayer:对面制杖,您看不到。
向玩家个人发送战争快报。(在左下角)
## showQuickWarLogToAllPlayers
translation:发送战争快报至所有
type:string
+
example:showQuickWarLogToAllPlayers:这是单位全局嘲讽。
向所有玩家发送战争快报。(在左下角)
## debugMessage
translation:调试信息
type:string
+
example:debugMessage:[string]
仅在启用调试模式的沙盒模式中显示。
## sendMessageTo
translation:发送信息至
type:unit ref
+
example:sendMessageTo:self.lastDamagedBy
填单位/单位引用
## sendMessageWithData
translation:发送信息与数据
-
type:variable List(变量菜单)
+
type:eventData(s)
+
example:sendMessageWithData:XXX=XXX
填变量=XXX
## sendMessageWithTags
translation:发送标签
-
type:tag List(标签菜单)
+
type:string(s)
+
example:sendMessageWithTags:cheems
填指定标签
## setCustomTarget1
translation:设置自定义目标1
-
type:unit ref/unit
+
type:unit name/unit ref
+
example:setCustomTarget1:self
建议填单位引用
## setCustomTarget2
translation:设置自定义目标2
-
type:unit ref/unit
+
type:unit name/unit ref
+
example:setCustomTarget2:self
建议填单位引用
## swapCustomTarget1And2
translation:交换自定义目标1和2
-
type:bool
+
type:boolean
+
example:swapCustomTarget1And2:true
填布尔值
diff --git a/rustedwarfareapicode/src/UnitNDT/ai.md b/rustedwarfareapicode/src/UnitNDT/ai.md
index ca229ed..6e68528 100644
--- a/rustedwarfareapicode/src/UnitNDT/ai.md
+++ b/rustedwarfareapicode/src/UnitNDT/ai.md
@@ -1,93 +1,116 @@
# ai
## useAsBuilder
translation:用作建造者
-
type:bool
+
type:boolean
+
example:useAsBuilder:true
作为建造者。如果单位可以建造或维修建筑物,则设置为true。 默认为[core] isBuilder。
## useAsTransport
translation:用作运输
-
type:bool
+
type:boolean
+
example:useAsTransport:true
作为载具。如果单位可以运输单位,则默认为true.如果您的单位可以运输又能攻击,则AI可能囤积起来而不攻击,则需要设置false.
## useAsAttacker
translation:用作攻击者
-
type:bool
+
type:boolean
+
example:useAsAttacker:true
是否作为攻击者。
## useAsHarvester
translation:用作采集
-
type:bool
+
type:boolean
+
example:useAsHarvester:true
作为采集者。如果单位可以回收资源,则默认为true
## disableUse
translation:禁用
-
type:bool
+
type:boolean
+
example:disableUse:true
禁止AI建立这个单位或建筑物
## ai_upgradePriority
translation:AI升级优先级
type:float
+
example:ai_upgradePriority:0.1
升级优先级。默认值为0.06。 设置在0-1之间,越高,表示AI更有可能先于其他升级该单位。
## buildPriority
translation:建造优先级
type:float
+
example:buildPriority:0.6
建造优先级,填0-1。 越大越AI越可能造。Luke的的第一座土地工厂使用0.8,空中工厂使用0.48,第一炮塔使用0.47。
## noneInBaseExtraPriority
translation:基地内没有时优先级
type:float
+
example:noneInBaseExtraPriority:0.2
如果AI基地中不存在此单位,则增加其优先级。
## noneGlobalExtraPriority
translation:全图没有时优先级
type:float
+
example:noneGlobalExtraPriority:0.4
如果此单位在地图上的任何位置都不存在,则增加其优先级。
## nonInBaseExtraPriority
translation:基地内没有时的优先级
type:float
+
example:noneInBaseExtraPriority:0.2
基地内没有时的优先级
## nonGlobalExtraPriority
translation:全图没有时的优先级
type:float
+
example:noneGlobalExtraPriority:0.4
如果此单位在地图上的任何位置都不存在,则增加其优先级。
## recommendedInEachBaseNum
translation:推荐在每个基地的数量
type:integer
+
example:recommendedInEachBaseNum:5
推荐在每个基地中的数量。
## recommendedInEachBasePriorityIfUnmet
translation:推荐条件不满足时优先级
type:float
+
example:recommendedInEachBasePriorityIfUnmet:0.2
如果未满足,推荐在基地中的优先级。
## upgradedFrom
translation:升级自
type:string
+
example:upgradedFrom:炮塔
创建到另一个单位的链接,用于保留同一单位已升级和未升级的计数。
## maxGlobal
translation:全图最大数量
type:integer
+
example:maxGlobal:10
全图最多拥有的数量。
## maxEachBase
translation:每个基地最大数量
type:integer
+
example:maxEachBase:1
每个基地最多拥有的数量。
## notPassivelyTargetedByOtherUnits
translation:不被动地被其他单位瞄准
-
type:bool
+
type:boolean
+
example:notPassivelyTargetedByOtherUnits:true
允许更好的墙壁建筑物,默认情况下,这些建筑物不会瞄准目标。用于围墙(当canAttack=true时使用这条代码会报错)
## lowPriorityTargetForOtherUnits
translation:低优先级目标
-
type:bool
+
type:boolean
+
example:lowPriorityTargetForOtherUnits:true
其它单位不优先考虑此单位。用于围墙
## aiTags
translation:ai标签
type:string
+
example:
采集
## whenUsingAsHarvester_recommendedInEachBase
translation:每个基地此采集者数量
type:integer
+
example:whenUsingAsHarvester_recommendedInEachBase:10
当此单位用作采集者时,每个基地推荐的采集者数量。
## whenUsingAsHarvester_recommendedGlobal
translation:全地图推荐采集者数量
type:integer
+
example:whenUsingAsHarvester_recommendedGlobal:20
当此单位用作采集者时,全图推荐的采集者数量。
## whenUsingAsHarvester_includeOtherHarvesterCounts
translation:是否算在采集者计数中
-
type:bool
+
type:boolean
+
example:whenUsingAsHarvester_includeOtherHarvesterCounts:false
当此单位用作采集者时,是否算在其它采集者统计中。
## onlyUseAsHarvester_ifBaseHasUnitTagged
translation:有此标签才作为采集者
type:string
+
example:onlyUseAsHarvester_ifBaseHasUnitTagged:maplace
只有当基地有单位标记时才可以作为采集者使用.
diff --git a/rustedwarfareapicode/src/UnitNDT/animation.md b/rustedwarfareapicode/src/UnitNDT/animation.md
index b98eb6e..9ce692f 100644
--- a/rustedwarfareapicode/src/UnitNDT/animation.md
+++ b/rustedwarfareapicode/src/UnitNDT/animation.md
@@ -1,90 +1,113 @@
# animation
## onActions
translation:动画条件
-
type:string
+
type:enum(s)
+
example:onActions : Unknown
+onActions : queuedUnits
动画触发条件:移动、攻击、闲置、在建造中、建造中并将动画拉伸至建造时长、生产中、未知、修复、回收、创建时
move, attack, idle, underConstruction, underConstructionWithLinkedBuiltTime, queuedUnits、Unknown, repair, reclaim, created
## onActionsQueuedUnitPlayAt
translation:在队列中有单位播放
type:float
+
example:onActionsQueuedUnitPlayAt :1
当使用onAction:queueedUnits时,动画开始之前需要达到值,设置为0-1之间
## blendIn
translation:融入时间
type:time
+
example:blendIn : time
与上一个动画融合时间。
## blendOut
translation:融出时间
type:time
+
example:blendOut : time
与下一个动画融合时间。
## pingPong
-translation:缩放效果
-
type:bool
+translation:反复播放
+
type:boolean
+
example:pingPong:true
结束后反向播放动画,它一般用来做生物的呼吸效果。
## playbackRate
translation:重复播放频率
type:integer
+
example:playbackRate:1
重复播放该动画的频率
## KeyframeTimeScale
translation:帧时长缩放
type:float
+
example:KeyframeTimeScale : float
缩放所有关键帧时间,这有助于在不更改所有内容的情况下更快/更慢地制作动画
## arm#_[time]
translation:胳膊关键帧
type:list
+
example:arm1_5s: {x: 5, dir: 90, y: 20, alpha:0.4, height:50}
添加一个关键帧。用来创建多个动作的动画。
## leg#_[time]
translation:腿关键帧
type:list
+
example:leg1_5s: {x: 5, dir: 90, y: 20, alpha:0.4, height:50}
添加一个关键帧。用来创建多个动作的动画。
## body_[time]
translation:主体关键帧
type:list
+
example:body_4s: {frame: 4, scale: 0.5}
随时为主体添加关键帧。身体仅允许使用frame和scale
-## effect_[time]
+## effect#_[time](#处可以为空)
translation:效果关键帧
type:list
+
example:eg: effect_2s: {x: 0,y: 5, name: explode}
在播放动画时产生效果
## turret#_[time]
translation:炮塔关键帧
type:list
+
example:turret1_5s: {x: 5, y: 90 }
添加一个关键帧。用来创建多个动作的动画。(没有明显效果)
## direction_useMainTurret
translation:多向动画使用主炮塔
-
type:bool
+
type:boolean
+
example:direction_useMainTurret:true
覆盖[graphics] animation_direction_useMainTurret,多向动画的执行将以单位主炮塔的角度为基准
## direction_units
translation:多向动画度数
type:float
-
播放此动画时,覆盖[graphics] animation_direction_units。多向动画度数 45个代表8个方向,90个代表4个方向的动画。
+
example:direction_units:45
+
## direction_strideX
translation:多向动画x向
type:integer
+
example:direction_strideX:0
覆盖[graphics] animation_direction_strideX,动画帧取值在方向改变时偏移。一般填0
## direction_strideY
translation:多向动画y向
type:integer
+
example:direction_strideY:1
覆盖[graphics] animation_direction_strideY,动画帧在方向改变Y轴偏移偏移。与frame_height一起使用。一般填1
## direction_starting
translation:多向动画朝向
type:float
+
example:direction_starting:90
覆盖[graphics] animation_direction_starting,第一帧的方向,取决于您的素材。
## start
translation:开始
type:integer
+
example:start:1
开始图像框。不推荐使用,用于类似此形式的动画。animation_TYPE_pingPong
## end
translation:结束
type:integer
+
example:end:3
结束图像帧。不推荐使用
## scale_start
translation:缩放开始
type:float
+
example:scale_start:2
开始规模。不推荐使用,而是使用主体关键帧。
## scale_end
translation:缩放结束
type:float
+
example:scale_end:2
最终规模。不推荐使用,而是使用主体关键帧。
## speed
translation:速度
type:float
+
example:speed:1
速度越小越快。仅效果开始,结束,scale_start,scale_end
diff --git a/rustedwarfareapicode/src/UnitNDT/attachment.md b/rustedwarfareapicode/src/UnitNDT/attachment.md
index a2775a0..374c416 100644
--- a/rustedwarfareapicode/src/UnitNDT/attachment.md
+++ b/rustedwarfareapicode/src/UnitNDT/attachment.md
@@ -1,149 +1,186 @@
# attachment
## x
-translation:x
+translation:X坐标
type:float
+
example:x:10
子单位x轴位置
## y
-translation:y
+translation:Y坐标
type:float
+
example:y:15
子单位Y轴位置
## height
translation:高度
type:float
+
example:height:3
子单位高度。
## lockDir
translation:锁定角度
-
type:bool
+
type:boolean
+
example:lockDir:true
是否锁定角度
## idleDir
translation:闲置方向
type:integer
+
example:idleDir:45
闲置时角度。
## idleDirReversing
translation:闲置方向反转
type:float
+
example:idleDirReversing:1
允许朝向反转,比如重坦倒退移动时炮塔反转,而不需要整个单位转向。
## isVisible
translation:是可见
-
type:bool
+
type:boolean
+
example:isVisible:true
是可见的。
## onCreateSpawnUnitOf
translation:创建时生成单位
-
type:units
+
type:unit name
+
example:onCreateSpawnUnitOf:flydog
此创造时也产生此子单位。
## canBeAttackedAndDamaged
translation:可被攻击或损坏
-
type:bool
+
type:boolean
+
example:canBeAttackedAndDamaged:true
可以被攻击或受到伤害。
## isUnselectable
translation:不可选择
-
type:bool
+
type:boolean
+
example:isUnselectable:true
是不可选择的。
## isUnselectableAsTarget
translation:禁止选择和作为目标
-
type:bool
+
type:boolean
+
example:isUnselectableAsTarget:true
默认效果为isUnselectable。可以用来创造不能被选择但是可以被攻击,回收的单位
## lockLegMovement
translation:锁定腿脚运动
-
type:bool
+
type:boolean
+
example:lockLegMovement:true
锁定腿脚防止乱动。
## freezeLegMovement
translation:冻结腿脚运动
-
type:bool
+
type:boolean
+
example:freezeLegMovement:true
冻结腿脚防止乱动。
## showMiniHp
translation:显示迷你血条
-
type:bool
+
type:boolean
+
example:showMiniHp:false
指附属单位下面那个又小又细的血条栏
## hideHp
translation:隐藏血量
-
type:bool
+
type:boolean
+
example:hideHp:true
隐藏单位的血量并不显示
## hidden
translation:隐藏
-
type:bool
+
type:boolean
+
example:hidden:true
隐藏整个单位
## keepAliveWhenParentDies
translation:保持子存活
-
type:bool
+
type:boolean
+
example:keepAliveWhenParentDies:true
当此单位死亡时,子单位保持存活。
## setDrawLayerOnTop
translation:绘制于顶层
-
type:bool
+
type:boolean
+
example:setDrawLayerOnTop:true
此子单位绘制于顶层。
## setDrawLayerOnBottom
translation:绘制于底层
-
type:bool
+
type:boolean
+
example:setDrawLayerOnBottom:true
此子单位绘制于底层。
## addTransportedUnits
translation:增加被运输单位
-
type:bool
+
type:boolean
+
example:addTransportedUnits:true
添加到运输单位槽中。
## lockRotation
translation:锁定旋转
-
type:bool
+
type:boolean
+
example:lockRotation:true
锁定方向,禁止旋转。
## rotateWithParent
translation:子单位一同旋转
-
type:bool
+
type:boolean
+
example:rotateWithParent:true
旋转时子单位是否一同旋转。
## resetRotationWhenNotAttacking
translation:不攻击时重置角度
-
type:bool
+
type:boolean
+
example:resetRotationWhenNotAttacking:true
不攻击时恢复到自身默认角度
## deattachIfWantingToMove
translation:移动时脱离
-
type:bool
+
type:boolean
+
example:deattachIfWantingToMove:true
若收到移动命令,子单位将自动分离。这包括来自action的路径点。可以用来制作机场。
## unloadInCurrentPosition
translation:卸载于此位置
-
type:bool
+
type:boolean
+
example:unloadInCurrentPosition:true
卸载单位时在这个位置进行卸载
## prioritizeParentsMainTarget
translation:优先考虑父单位的主要目标
-
type:bool
+
type:boolean
+
example:prioritizeParentsMainTarget:true
子单位优先考虑父单位当前的目标。
## alwaysAllowedToAttackParentsMainTarget
translation:总是攻击父单位的主要目标
-
type:bool
+
type:boolean
+
example:alwaysAllowedToAttackParentsMainTarget:true
子单位总是跟随攻击父单位的主要目标。
## onlyAttackParentsMainTarget
translation:只攻击父单位的主要目标
-
type:bool
+
type:boolean
+
example:onlyAttackParentsMainTarget:true
子单位只会攻击父单位的攻击目标。
## canAttack
translation:可攻击
-
type:bool
+
type:boolean
+
example:canAttack:true
默认值为true。设置为false以阻止子单位自动攻击。
## onParentTeamChangeKeepCurrentTeam
translation:改变队伍时子单位保持原队伍
-
type:bool
+
type:boolean
+
example:onParentTeamChangeKeepCurrentTeam:true
默认值为false。如果为true则父单位改变队伍时子单位不改变队伍。
## smoothlyBlendPositionWhenExistingUnitAdded
translation:补充时平滑移动
-
type:bool
+
type:boolean
+
example:smoothlyBlendPositionWhenExistingUnitAdded:true
补充所装载单位至槽位时平滑移动。
## keepWaypointsNeedingMovement
translation:保持需要移动路径点
-
type:bool
+
type:boolean
+
example:keepWaypointsNeedingMovement:false
默认值为false。当为false时,队列中任何需要移动才能完成的队列路径点都会被移除。
## showAllActionsFrom
translation:显示所有操作来源
-
type:LogicBoolean
+
type:Logicbooleanean
+
example:showAllActionsFrom:if self.hasFlag(id=1)
当被选中时,在父单元列表中显示所有附加单位的动作
## createIncompleteIfParentIs
translation:创建随父单位
-
type:bool
+
type:boolean
+
example:createIncompleteIfParentIs:false
如果父节单位不完整,则创建子单位不完整
## onConvertKeepExistingUnitInSameSlot
translation:转换时附属仍然在同一槽位中
-
type:bool
+
type:boolean
+
example:onConvertKeepExistingUnitInSameSlot:true
转换单位时如果有相同ID的附属槽位则子单位就会在那个槽位中
## redirectDamageToParent
translation:重定向伤害到父单位
-
type:bool
+
type:boolean
+
example:redirectDamageToParent:true
将对附属造成的伤害重定向到父单位,而不是伤害子单位自身。
## redirectDamageToParent_shieldOnly
translation:重定向伤害到父单位护盾
-
type:bool
+
type:boolean
+
example:redirectDamageToParent_shieldOnly:true
只将对附属造成的伤害重定向到父单位的护盾,而不是伤害子单位自身。如果盾没了那就伤害自身,如模块蜘蛛。
diff --git a/rustedwarfareapicode/src/UnitNDT/attack.md b/rustedwarfareapicode/src/UnitNDT/attack.md
index ecb110d..c561c05 100644
--- a/rustedwarfareapicode/src/UnitNDT/attack.md
+++ b/rustedwarfareapicode/src/UnitNDT/attack.md
@@ -2,104 +2,141 @@
## maxAttackRange
translation:攻击距离
type:float
+
example:maxAttackRange:999
最大攻击距离。(会乘以globalScale,但不建议使用globalScale)
## canAttack
translation:可以攻击
-
type:bool
+
type:boolean
+
example:canAttack:true
如果设置为false,则不能攻击任何单位。其他canAttack选项将无效。
## canAttackFlyingUnits
translation:可攻击空中单位
-
type:LogicBoolean
+
type:Logicbooleanean
+
example:canAttackFlyingUnits:true
可以攻击空中单位,下面的攻击条件代码可于任意炮塔单独设置。
## canAttackLandUnits
translation:可攻击表面单位
-
type:LogicBoolean
+
type:Logicbooleanean
+
example:canAttackLandUnits:true
可以攻击表面单位(包括陆地和水面)
## canAttackUnderwaterUnits
translation:可攻击水下单位
-
type:LogicBoolean
+
type:Logicbooleanean
+
example:canAttackUnderwaterUnits:true
可以攻击水下单位
## canAttackNotTouchingWaterUnits
translation:可以攻击非接触水单位
-
type:LogicBoolean
+
type:Logicbooleanean
+
example:canAttackNotTouchingWaterUnits:true
可以攻击非接触水单位,默认为true。如果是false,则只能攻击与水接触的单位,不能攻击岸上。用于鱼雷逻辑。也可以根据炮塔需要设置。
## canOnlyAttackUnitsWithTags
translation:只攻击带特定标签单位
-
type:tags
+
type:string(s)
+
example:canOnlyAttackUnitsWithTags:sp_spy
只能攻击带特定标签的单位
## canOnlyAttackUnitsWithoutTags
translation:不攻击带特定标签单位
-
type:tags
+
type:string(s)
+
example:canOnlyAttackUnitsWithoutTags:sp_tm
不能攻击带特定标签的单位
## setMainTurretAs
translation:设置主炮塔
-
type:turret ref
+
type:turret code name
+
example:setMainTurretAs:1
设置主炮塔,有些代码要锁定主炮塔,对其有用。
## turretMultiTargeting
translation:每个炮塔向不同目标射击
-
type:bool
+
type:boolean
+
example:turretMultiTargeting:true
允许每个炮塔同时向不同的目标射击。如果使用[turretlimitingAngle(限制角度)非常有用
## isMelee
translation:近战
-
type:bool
+
type:boolean
+
example:isMelee:true
近战单位。与低攻击范围配合使用(例如maxAttackRange:9)可使自身和目标半径添加到范围内,并影响AI。
## meleeEngangementDistance
translation:近战索敌距离
type:integer
-
使部队游猎,自动移动以攻击附近的敌方部队。近战默认为250,非近战默认为0(即使非近战也可以使用。)
+
example:meleeEngangementDistance:255
+
(必须要有isMelee:true否则使用该key会报错)使部队游猎,自动移动以攻击附近的敌方部队。近战默认为250,非近战默认为0(即使非近战也可以使用)
## turretRotateWithBody
translation:炮塔随主体旋转
-
type:bool
+
type:boolean
+
example:turretRotateWithBody:true
炮塔随主体旋转。默认true
## attackMovement
translation:攻击移动类型
type:string
+
example:attackMovement:%<>?!
+attackMovement:bomber
移动攻击类型。实际上,这条代码内可以任意填写值,但enum值例如normal/bomber。能量耗尽时,轰炸机攻击运动将后退。可填moveaway,strafing但无效。
## dieOnAttack
translation:自杀攻击
-
type:bool
+
type:boolean
+
example:dieOnAttack:true
攻击时自毁。
## removeOnAttack
translation:移除攻击
-
type:bool
+
type:boolean
+
example:removeOnAttack:true
攻击时移除自身.
## isFixedFiring
translation:固定射击
-
type:bool
+
type:boolean
+
example:isFixedFiring:true
必须将身体对准目标射击。通常会使得部队需要停下来才能瞄准和射击。比如火炮。
## aimOffsetSpread
translation:瞄准偏移
type:float
+
example:aimOffsetSpread:0
将每次攻击时的偏移量乘以目标半径。默认为0.6。设为0则不偏移,对范围武器影响较大。
## stopTargetingAfterFiring
translation:自动停火
-
type:bool
+
type:boolean
+
example:stopTargetingAfterFiring:true
单位射击后停止瞄准。很少使用或需要。如用于您不希望胡乱攻击浪费弹药的单位。
## disablePassiveTargeting
translation:不能主动攻击
-
type:bool
+
type:boolean
+
example:disablePassiveTargetingg:true
单位只攻击手动选择的目标。很少使用或需要。如用于自爆卡车守家,如果自动攻击敌人就太蠢了。
## showRangeUIGuide
translation:显示范围UI
-
type:bool
-
显示攻击范围的白圈。默认true.
+
type:boolean
+
example:showRangeUIGuide:false
+
showRangeUIGuide只在选中单位时有效,在放置单位时无效。显示攻击范围的白圈,默认true。
## shootDelayMultiplier
translation:开火间隔乘数
type:float
+
example:shootDelayMultiplier:1
默认为1。可以在setUnitStats动态改变
## shootDamageMultiplier
translation:开火伤害乘数
type:float
+
example:shootDamageMultiplier:1
默认为1。可以在setUnitStats动态改变
## turretSize
translation:炮塔大小
type:float
+
example:turretSize:10
设置所有炮塔大小。填数值,按像素计算,不决定素材大小,而是以此为半径的开火位置。
## turretTurnSpeed
translation:炮塔转速
type:float
+
example:turretTurnSpeed:1
炮塔转速,单位是每帧旋转角度。
## shootDelay
translation:攻击间隔
type:float
+
example:shootDelay:233
开火间隔,也可以在每个转塔上使用延迟
+## attackMovementSpeed
+translation:攻击时移动速度
+
type:float
+
example:attackMovementSpeed:0
+
几乎无影响
+## attackMovementSpread
+translation:攻击时移动散布
+
type:float
+
example:attackMovementSpread:0
+
几乎无影响
diff --git a/rustedwarfareapicode/src/UnitNDT/canBuild.md b/rustedwarfareapicode/src/UnitNDT/canBuild.md
index e6fdf7e..911bb94 100644
--- a/rustedwarfareapicode/src/UnitNDT/canBuild.md
+++ b/rustedwarfareapicode/src/UnitNDT/canBuild.md
@@ -2,69 +2,86 @@
## name
translation:名字
type:string(s)
+
example:name: tank, hoverTank, heavyTank
该单位可以创建的单位名列表。可以是建筑物或单位。
## pos
translation:排序
type:float
+
example:pos: 0.1
此单位在用户界面中排序,越小越靠上。
## tech
translation:科技
type:integer
+
example:tech: 2
没啥用。科技等级。通常只会影响此单位界面中的颜色。默认为1,只能填1、2、3。
## forceNano
translation:建造方式
-
type:bool
+
type:boolean
+
example:forceNano: true
如果为true,则将目标当作是建筑物建造。 (即使是一个单位)
## isVisible
translation:可见条件
-
type:LogicBoolean
+
type:Logicbooleanean
+
example:isVisible: if not self.energy(greaterThan=100)
如果满足条件,则从界面中显示此单位。比如用于科技树。
## isLocked
translation:锁定
-
type:LogicBoolean
+
type:Logicbooleanean
+
example:isLocked: if self.hp(lessThan=100)
如果满足条件,则从界面中锁定此单位。比如用于科技树,或是限造单位。
## isLockedMessage
translation:锁定原因描述
type:string
+
example:isLockedMessage: -Needs 2 Barracks
告知玩家单位为何被锁定。
## isLockedMessage_[Language]
translation:锁定文本多语言
type:string
+
example:isLockedMessage_es: -Necesita 2 Cuarteles
设置锁定文本在不同语言下显示的内容。语言代码点击此处。
## isLockedAlt
translation:更多锁定原因
-
type:LogicBoolean
+
type:Logicbooleanean
+
example:isLockedAlt: if self.energy(greaterThan=90)
另一个被锁定原因。只是允许显示不同的消息。
## isLockedAltMessage
translation:锁定原因描述
type:string
+
example:isLockedAltMessage: -Needs less energy
另一个被锁定原因描述。
## isLockedAlt2
translation:更多锁定原因2
-
type:LogicBoolean
+
type:Logicbooleanean
+
example:isLockedAlt2: if self.isMoving()
更多的锁定原因…
## isLockedAlt2Message
translation:锁定文本2描述
type:string
+
example:isLockedAlt2Message: -Needs to be quiet
更多的锁定描述…
## addResources
translation:增加资源
type:price(s)
+
example:addResources: ammo=5, setFlag=1
在放置建筑物或生产单位时,将这些资源添加到自身中。
## price
translation:价格
type:price(s)
+
example:price: credits=1000, ammo=5
覆盖单位/建筑物的价格。 默认为单位内置的价格。
用处如建造一个建筑时候附送一个单位。此代码可用设定为两者价钱之和,矿场600,送矿车1400,而建造时花2000,送1400,卖600,可避免玩家生成钱。
## isGuiBlinking
translation:界面闪烁
-
type:LogicBoolean
+
type:Logicbooleanean
+
example:isGuiBlinking: true
如果为true,则在UI中生成闪烁效果。
## extraLagHidingInUI
translation:消除ui额外延迟
-
type:bool
+
type:boolean
+
example:extraLagHidingInUI:true
用于联机,在UI中立即更新而不需要从服务器确认的等待时间。
## type
translation:显示类型
type:string
+
example:type:action
与行动节的displayType用法相同
diff --git a/rustedwarfareapicode/src/UnitNDT/core.md b/rustedwarfareapicode/src/UnitNDT/core.md
index faaf427..9448356 100644
--- a/rustedwarfareapicode/src/UnitNDT/core.md
+++ b/rustedwarfareapicode/src/UnitNDT/core.md
@@ -2,263 +2,334 @@
## name
translation:名字
type:string
+
example:name:customTank1
+name:自定义坦克
+name:shibainu
定义单位原始名称,可以是中文。游戏使用它区分其它单位。如果没有在displayText或者语言文件设置显示名称,那么它也将作为单位的显示名称。
具体描述文件位置:assets/translationsStrings_zh.properties格式:units.单位名称.name=写单位显示的名称
units.单位名称.description= [[填单位显示的描述]]
## altNames
translation:别名
type:string(s)
+
example:altNames:custTank1,customTank1,cTank1
以逗号分隔的名称列表。像名称一样,但优先级较低,对于启用多个自定义mod有用。
## class
translation:类
type:string
+
example:class: CustomUnitMetadata
无实际用处,可以删除。Luke说:保留供将来使用,默认情况下最好为CustomUnitMetadata。
## strictLevel
translation:严格级别
-
type:float
+
type:integer
+
example:strictLevel:1
默认值为0,忽略代码重复。设为1时如果当前单位内有重复代码,则报错。建议添加到"all-units.template"以应用于所有单位,进行统一查错。
## price
translation:价格
-
type:integer(price)
+
type:price(s)
+
example:price: 500
设定单位造价,可以是负数,负数时提直接供资金。
## mass
translation:质量
type:integer
+
example:mass: 3000
单位的“重量”定义了它与其他单位的碰撞方式,值越大,推动就越困难。
## techLevel
translation:科技等级
type:integer
+
example:techLevel: 1
设置单位的科技等级,共有3个级别,1级GUI显示为绿色,2、3级显示为黄色。
## buildSpeed
translation:建造速度
type:time
+
example:buildSpeed: 3s
建造此单位需要的时间,填秒。以前的计算方式为:此处所填时间=1÷(60x您需要的秒)如果定义了工厂速率则需要乘以建造乘数。
## radius
translation:半径
type:integer
+
example:radius: 20
单位的实际碰擦体积,也是实际的可选择范围。其光圈在displayRadius覆盖时真实体积不变。
## isBio
translation:是生物
-
type:bool
+
type:boolean
+
example:isBio: true
此单位是否为生物,为生物则影响死亡声音和血迹(图像在drawable/blood_mark.png,hideScorchMark:true时可以隐藏)非生物则为黑色爆炸效果。
## isBug
translation:是虫子
-
type:bool
+
type:boolean
+
example:isBug: false
是否为虫子,用于沙盒中的单独分类。
## isBuilder
translation:是建造者
-
type:bool
+
type:boolean
+
example:isBuilder: true
若需要此单位建造建筑物,则通常需要此代码。并且默认设为[ai] useAsBuilder。
## streamingCost
translation:流式造价
-
type:integer(price)
+
type:price(s)
+
example:streamingCos:100
就像价格,但在建造时逐渐消耗资金,如果在构建过程中资源耗尽,建造或生产队列将暂停。就像是红警中那样。铁锈默认是预先扣除资金。
## switchPriceWithStreamingCost
translation:切换价格为流式造价
-
type:bool
+
type:boolean
+
example:switchPriceWithStreamingCost:true
快捷设置为默认资金消耗方式或为流式建造方式。建议使用模板快速将一个模组为所有单位切换流资源。
## maxHp
translation:生命值
type:integer
+
example:maxHp: 200
单位最大生命值,默认生成时即为此值。
## selfRegenRate
translation:生命恢复速度
type:float
+
example:selfRegenRate: 0.01
此数值决定每帧增加血量。游戏内默认速度下,一秒为60逻辑帧,而您看到的FPS帧数为渲染帧,所以电脑上几百帧和手机上60帧和省电模式下30帧并不影响计算。所以不要写太大。可以写负值用于自毁。
## maxShield
translation:护盾值
type:integer
+
example:maxShield: 500
单位最大护盾值,默认生成时即为此值。如果设置了startShieldAtZero:true,则初始为0.
## startShieldAtZero
translation:护盾初始为0
-
type:bool
+
type:boolean
+
example:startShieldAtZero: true
如果为true,则单位护盾值从0开始增加。
## shieldRegen
translation:护盾恢复速度
type:float
+
example:shieldRegen: 0.15
此数值决定每帧增加护盾值,游戏内一秒为60帧,所以不要写太大。可以写负值。(默认值为0.25)
## energyMax
translation:能量值
type:float
+
example:energyMax: 1
默认值为0。可以用作炮塔,激光防御和行动的弹药的能量。
## startEnergyAtZero
translation:能量初始为0
-
type:bool
+
type:boolean
+
example:startEnergyAtZero: true
如果为true,则单位能量值从0开始增加。
## energyRegen
translation:能量恢复速度
type:float
+
example:energyRegen: 0.01
能量每帧恢复速度,游戏内一秒为60帧,所以不要写太大。可以写负值。
## energyRegenWhenRecharging
translation:充能时能量恢复速度
type:float
+
example:energyRegenWhenRecharging:0.1
能量恢复是持续的,如果您设置了energyNeedsToRechargeToFull,那么攻击时按energyRegen恢复,耗尽时的灰条按此处设定值恢复。
## energyStartingPercentage
translation:能量初始百分比
type:float
+
example:energyStartingPercentage: 0.5
单位生成时所携带的能量百分比。
## energyNeedsToRechargeToFull
translation:能量需要充满
-
type:bool
+
type:boolean
+
example:energyNeedsToRechargeToFull: true
若果能量耗尽,则需要完全充能才能进行攻击。
## energyDisplayName
translation:能量显示名称
type:string
+
example:energyDisplayName:chemms
能量显示名称,目前似乎无效.1.15
## armour
translation:装甲
-
type:integer
+
type:float
+
example:armour: 6
抵消敌方攻击所造成的伤害。
## armourMinDamageToKeep
translation:装甲最低伤害
type:integer
+
example:armourMinDamageToKeep: 2
至少造成多少点伤害,默认为1.防止护甲太高完全打不动。
## borrowResourcesWhileAlive
translation:资源活着时借用
-
type:price
+
type:price(s)
+
example:borrowResourcesWhileAlive: gold=10
创建时获取这些资源,删除或销毁时将其返回。例如用于电力逻辑,负数供电和正数耗电。
## borrowResourcesWhileBuilt
translation:资源在单位建成后借用
-
type:price
+
type:price(s)
+
example:borrowResourcesWhileBuilt:gold=100
类似于[core]borrowResourcesWhileAlive但在单位建成后才会生效。主要对房屋之类的建筑有用,这些建筑有负的资源,可以加到单位上限等
## generation_resources
translation:资源获取
-
type:price
+
type:price(s)
+
example:generation_resources: credits=5, gold=20
单位定时获得的资源,可自定义资源。
## generation_active
translation:资源取得条件
-
type:logicBoolean
+
type:logicbooleanean
+
example:generation_active: if not self.hp(lessThan=100)
获取资源条件。可用于受损时无法产出。
## generation_credits
translation:资金获取
type:integer
+
example:generation_credits: 2
生成资源,仅用于默认的资金,也就是铁锈默认的金钱。
## generation_delay
translation:资金获取时间
type:integer
+
example:generation_delay: 40
多久帧添加添加一次资源(generation_creditsvi指定数值)。默认值为40,一秒为60帧。Luke不建议使用。
## showInEditor
translation:显示在沙盒中
-
type:bool
+
type:boolean
+
example:showInEditor: false
设置为false可在沙箱编辑器中隐藏此单位。 (默认为true)
## displayText
translation:界面显示名称
-
type:LocaleString
+
type:string
+
example:displayText: Custom Tank
默认单位显示给玩家的单位名称。不填则显示core下的单位name。此条目依据语言设定不同会被下一条覆盖。
## displayText_[Language]
translation:界面显示文本多语言
type:string
+
example:displayText_es: Tanque Personalizado
+displayText_zh:中文名
为单位名称添加多语言支持。此方法并不方便,不如设置游戏内部语言文件,建议催luke改。zh(中文通用) zh-cn(简体) zh-tw(台湾) zh-hk中文(香港) en(英语通用) ru(俄语) 其它自查(此列表并不全),不过您应该不会闲着支持这么多语言。西班牙语(西班牙)es-ES、葡萄牙语(葡萄牙)pt-PT、日语ja、阿姆哈拉语am、爱沙尼亚语et、保加利亚语bg、冰岛语is、波兰语pl、丹麦语da、德语de、法语(法国)fr-FR、法语(加拿大)fr-CA、菲律宾语fil、芬兰语fi、韩语ko、荷兰语nl、加泰罗尼亚语ca、捷克语cs、克罗地亚语hr、拉脱维亚语lv、立陶宛语lt、罗马尼亚语ro、马来语ms、南非荷兰语af、挪威语no、葡萄牙语(巴西)pt-BR、瑞典语sv、塞尔维亚语sr、斯洛伐克语sk、斯洛文尼亚语sl、斯瓦希里语sw、泰语th、土耳其语tr、乌克兰语uk、西班牙语(拉丁美洲)es-419、希伯来语he、希腊语el、匈牙利语hu、意大利语it、印地语hi、印度尼西亚语id in、英语(美国)en-US、英语(英国)en-GB、越南语vi、祖鲁语zu
## displayDescription
translation:界面显示描述
-
type:LocaleString
+
type:string
+
example:displayDescription:-Fast movement\n炮灰
单位显示给玩家的单位描述。
## displayDescription_[Language]
translation:界面显示描述_其它语言
type:string
+
example:displayDescription_es: -Movimiento rápido\n-Daño ligero
为单位描述添加多语言支持。此方法并不方便,不如设置游戏内部语言文件,建议催luke改。地区码见上。
## displayLocaleKey
translation:界面显示内部调用
-
type:string
+
type:location
+
example:displayLocaleKey: units.mechArtillery
调用内部语言文件的单位名称和说明的翻译文件。
## displayRadius
translation:单位选择时显示圆圈
type:integer
+
example:displayRadius: 20
修改选择单位时显示的绿色圆圈,不更改实际碰撞(radius)和可选择范围。
## uiTargetRadius
-translation:单位选择半径
+translation:为目标时半径
type:integer
-
单位的被选择半径,在此范围内选择这个单位
+
example:uiTargetRadius:20
+
默认值为displayRadius。当攻击/回收/等等这个单位使用半径
## shieldRenderRadius
translation:单位护盾显示半径
type:integer
+
example:shieldRenderRadius: 12
护盾绘制半径,默认值比半径大一点。可以设置在单位上显示更大或更小的护盾圈。
## shieldDisplayOnlyDeflection
translation:护盾只在受攻击时显示
-
type:bool
+
type:boolean
+
example:shieldDisplayOnlyDeflection: true
隐藏护盾,只在受到攻击时显示。
## shieldDeflectionDisplayRate
translation:护盾消失速度
type:float
+
example:shieldDeflectionDisplayRate: 3
默认值为4。数值越大消失越快。
## showOnMinimap
translation:显示在小地图上
-
type:bool
+
type:boolean
+
example:showOnMinimap: false
默认为true。如果为false,则在小地图上不显示此单位。
## showOnMinimapToEnemies
translation:显示于敌人小地图
-
type:bool
+
type:boolean
+
example:showOnMinimapToEnemies:false
是否在敌人小地图上显示。目前不支持逻辑。
## showActionsWithMixedSelectionIfOtherUnitsHaveTag
translation:混合所选单位所显示的行为(标签)
type:tags
+
example:showActionsWithMixedSelectionIfOtherUnitsHaveTag:tag_联系
如果选择的单位都包含此处使用的标签,则合并“行为(action)”。比如您的步单位通过部署转化成另一个单位,在混合时可以当作同一个单位处理,不再是默认的谁都无法执行操作。例子如红警的盟军大单位在混合选中后依旧可执行部署或解除。
## isBuilding
translation:是建筑
-
type:bool
+
type:boolean
+
example:isBuilding: true
定义单位是否为建筑物。
## footprint
translation:建筑碰撞范围
type:integers
+
example:(1x1)footprint: 0,0,0,0
+(2X2)footprint: 0,0,1,1
+(3X3)footprint: -1,-1,1,1
填四个数值(左,上,右,下),单位是格子,建筑默认占一格,向左和向上需要填负数,填整数在选择时有偏移。
四个数值可以完全颠倒,这样不会阻碍单位移动。
决定建筑单位碰撞体积,此区域内单位不能通过,如果在单位运动途中单位则会绕过。单位实际可选择面积使用的是radius。
## constructionFootprint
translation:建筑覆盖范围
type:integers
+
example:constructionFootprint: -1,-1,1,3
基础规则同上,这个区域内不能建造建筑,但是单位可以通过。一般需要设定比上一个面积大。好处是即使建造的密密麻麻,单位也有路可走
## displayFootprint
translation:建筑选择UI
type:integers
+
example:displayFootprint: 0,0,1,1
基础规则同上,用于选择单位时UI显示。不设定则默认为建筑覆盖区域。
## buildingSelectionOffset
translation:建筑UI调整
type:integer
+
example:buildingSelectionOffset: 4
默认值为0。以像素为单位对选框额外设定。
## buildingToFootprintOffsetX
translation:建筑X轴偏移
type:float
+
example:buildingToFootprintOffsetX: 4
设置X轴位置偏移,默认10.若设置非对称的建筑,单位会根据覆盖范围会挤在角上,这时如果要准确显示就需要额外偏移。与直接使用图像偏移的区别:
由于铁锈判断选中单位是根据单位体积(radius),因此图像偏移实际上单位的位置不变,会容易造成点击时的误差。而当前代码实际上是移动单位,则不会造成这个问题。
## buildingToFootprintOffsetY
translation:建筑Y轴偏移
type:float
+
example:buildingToFootprintOffsetY: 6
设置Y轴位置偏移,默认10.其它参上条
## placeOnlyOnResPool
translation:建筑只能建造在资源池上
-
type:bool
+
type:boolean
+
example:placeOnlyOnResPool: true
通常用于提取器,会强制在资源池中进行建筑物构造。可以用于在自定义战役中限制某单位只能在某地建造。
## selfBuildRate
translation:自动建造速度
type:float
+
example:selfBuildRate: 0.0008
此单位自动构造所需要的时间,目前用于虫族。计算方式为:此处所填时间=1÷(60x您需要的秒)。
## ignoreInUnitCapCalculation
translation:不计入单位数量统计
-
type:bool
+
type:boolean
+
example:ignoreInUnitCapCalculation:true
铁锈中有单位数量上限设定,填true时不计入统计,多用于辅助单位,建筑物的默认值为true。
## copyFrom
translation:复制数据自
-
type:file(s) (ini)
+
type:file(s)
+
example:copyFrom: ROOT:defaultTanks.template, tankT1.ini
加载其它文件的单位数据作为该单位的默认值,支持多个文件。无后缀名限制,可不写dont_load,用于模块化。
## dont_load
translation:禁止加载
-
type:bool
+
type:boolean
+
example:dont_load: true
不加载此单位,缺失数据时不会出错。与copyFrom一起使用时很有用。
## overrideAndReplace
translation:覆盖单位
type:string(s)
+
example:overrideAndReplace: builder, combatEngineer
用此单位覆盖另一个单位,地图上所有单位也将被替换,可以用来替换dex内无法修改的单位。
## overrideResourceLoadPath
translation:覆盖资源加载路径
-
type:bool
+
type:boolean
+
example:overrideResourceLoadPath:false
覆盖掉该单位的资源加载路径
## logIfCreditResourceUsed
translation:记录是否使用资源
-
type:bool
+
type:boolean
+
example:logIfCreditResourceUsed:false
记录该单位是否使用了资源
## onNewMapSpawn
translation:地图位置产生指定单位
type:string
+
example:[core]
+name:钻矿机
+onNewMapSpawn:emptyResourcePools_asNeutral
在地图上添加此单位。可以用于覆盖铁锈默认的资源逻辑。参数:
emptyResourcePools_asNeutral 产生位置于空资源池,并且为中立所属
emptyOrOccupiedResourcePools_asNeutral 空的或者已经占用的资源池,并且为中立所属
@@ -268,452 +339,562 @@ spawnPoint_eachActiveTeam 玩家初始位置,给与每个玩家
## globalScale
translation:全局缩放
type:float
+
example:globalScale: 2
废弃代码,不要用。将一个单位按比例放大,但不放大攻击力。默认值为1。不建议更改。
## isLocked
translation:锁定
-
type:bool
+
type:boolean
+
example:isLocked: true
禁止建造该单位。可以与overrideAndReplace一起使用,以限制玩家可以建造的单位。
## isLockedIfGameModeNoNuke
translation:禁核模式锁定
-
type:bool
+
type:boolean
+
example:isLockedIfGameModeNoNuke: true
如果在游戏开始前选择了禁用核武器,禁止建造此单位。
## experimental
translation:实验单位标志
-
type:bool
+
type:boolean
+
example:experimental: true
标记单位为实验单位。影响缩小图标和游戏结束统计。
## stayNeutral
translation:保持中立
-
type:bool
+
type:boolean
+
example:stayNeutral: false
设置为true时,单位处于中立队伍情况下,禁止靠近时更改为玩家所属。仍然有其它方式获得。
## createNeutral
translation:创建时中立
-
type:bool
+
type:boolean
+
example:createNeutral: true
设置为true时,产生该单位总是自动转变为中立队伍。创建时中立,但不妨碍玩家捕获。
## createOnAggressiveTeam
translation:创建为敌对中立
-
type:bool
+
type:boolean
+
example:createOnAggressiveTeam: true
设置为true时,此中立单位对所有玩家有敌意。
## tags
translation:标签
type:string(s)
+
example:tags: tank, smallTank, piercingDamage
标签,用于对单位进行分类,用于实现各种各样的特殊作。比如单位数量限制,伤害修正,增益损益,触发条件等等
## defineUnitMemory
translation:定义单位内存
type:memories
-
为每个单元创建唯一的自定义存储变量。允许的类型:boolean, float/number, unit, string
+
example:defineUnitMemory:unit attackunit
+
为每个单元创建唯一的自定义存储变量。允许的类型:boolean/bool, float/number, unit, string/text
格式:defineUnitMemory:类型 变量名称
-"defineUnitMemory: boolean nukeActive,boolean laserReady, float experience, unit nextTarget, unit homeBase, string customText
-"
+defineUnitMemory: boolean nukeActive,boolean laserReady, float experience, unit nextTarget, unit homeBase, string customText
## @memory
translation:@定义内存
-
type:string
+
type:memory
+
example:@memory datas:unit[]
定义单个内存,但可以打多行此代码,与上方代码相反
## updateUnitMemory
translation:更新单位内存
type:memories
+
example:updateUnitMemory:hp=self.hp/5
(类似[action]setUnitMemory但是性能更好)works like [action]setUnitMemory but with better performance and easier timing than triggering an action
## updateUnitMemoryRate
translation:更新单位内存频率
-
type:memories
+
type:time
+
example:updateUnitMemoryRate:0
(默认1s,填写0则为每帧)How often to call updateUnitMemory, defaults to 1s. At zero would trigger every frame.
## fogOfWarSightRange
translation:视野
type:integer
+
example:fogOfWarSightRange: 18
设置单位视野,在战争迷雾中可以看到的瓷砖数量。默认为15。
## fogOfWarSightRangeWhileNotBuilt
translation:未完成时视野
type:integer
+
example:fogOfWarSightRangeWhileNotBuilt:3
填数值,当建筑或单位没有建造完成时,它的视野范围
## softCollisionOnAll
translation:碰撞体积软化
type:integer
+
example:softCollisionOnAll: 3
与其他单位碰撞时产生柔和的碰撞效果,填负数会导致单位相互吸引。
## disableAllUnitCollisions
translation:禁用碰撞
-
type:bool
+
type:boolean
+
example:disableAllUnitCollisions: true
如果为true,则该单位无视与其它单位碰撞。无碰撞体积单位可以用于固定位置制造效果,或是用于一些不影响单位通行的场景。
## availableInDemo
translation:在演示版中可用
-
type:bool
+
type:boolean
+
example:availableInDemo:true
是否能在演示中使用
## isUnrepairableUnit
translation:禁止被修复
-
type:bool
+
type:boolean
+
example:isUnrepairableUnit: true
如果为true,则任何单位都无法修复此单位。但负伤害仍然可以维修。
## isUnselectable
translation:禁止选择
-
type:bool
+
type:boolean
+
example:isUnselectable: true
如果为true,则无法选择单位。 (包括AI)可用于效果单位,禁止被玩家选择。
## isUnselectableAsTarget
translation:禁止选择和作为目标
-
type:bool
+
type:boolean
+
example:isUnselectableAsTarget:true
默认效果为isUnselectable。可以用来创造不能被选择但是可以被攻击,回收的单位
## isPickableStartingUnit
translation:为可选初始单位
-
type:bool
+
type:boolean
+
example:isPickableStartingUnit:true
如果为true,则将单位添加到游戏高级设置菜单中,用于可选初始单位菜单。
## startFallingWhenStartingUnit
translation:为可选单位开局后从天而降
-
type:bool
+
type:boolean
+
example:startFallingWhenStartingUnit: true
如果为true,则游戏开始时,此单位会从从天而降。
## soundOnAttackOrder
translation:攻击指令音效
-
type:audios
+
type:file(s)
+
example:soundOnAttackOrder: tankAttackOrder1.ogg:0.6, tankAttackOrder2.ogg
填音效名称列表。用,隔开。每次下达攻击指令时只播放其中一个。仅支持.ogg和.wav格式,注意如果您mod用于pc端,则不要直接修改后缀名,要转换格式。
## soundOnMoveOrder
translation:移动指令音效
-
type:audios
+
type:file(s)
+
example:soundOnMoveOrder: tankMoveOrder1.ogg, tankMoveOrder2.ogg
填声音名称列表。用,隔开。每次下达移动指令时只播放其中一个。仅支持.ogg和.wav格式,注意不要直接修改后缀名,要转换格式。
## soundOnNewSelection
translation:选择指令音效
-
type:audios
+
type:file(s)
+
example:soundOnNewSelection: tankSelection1.ogg, tankSelection2.ogg
填声音名称列表。用,隔开。每次下达选择指令时只播放其中一个。仅支持.ogg和.wav格式,注意不要直接修改后缀名,要转换格式。
## canNotBeDirectlyAttacked
translation:禁止直接攻击
-
type:bool
+
type:boolean
+
example:canNotBeDirectlyAttacked: true
无敌,如果为true,任何单位都不能直接瞄准此单位,也不会受到范围武器伤害。则还将在胜利/失败检查中跳过检查。
注:如果初始单位有这个属性且可能会导致游戏开局就秒输时,Mod作者会看到警告消息
## canNotBeDamaged
translation:禁止受到伤害
-
type:bool
+
type:boolean
+
example:canNotBeDamaged:true
无敌,可被敌方攻击,但不造成实质伤害。如果canNotBeDirectlyAttacked为true,此语句为false,则不可被直接攻击但受到范围伤害。
## canNotBeGivenOrdersByPlayer
translation:禁止接受指令
-
type:bool
+
type:boolean
+
example:canNotBeGivenOrdersByPlayer: true
如果为true,则单位不会接受玩家或AI的命令。可以选中查看信息。
## canOnlyBeAttackedByUnitsWithTags
translation:仅许带此标签单位攻击
type:strings(s)
+
example:canOnlyBeAttackedByUnitsWithTags: piercingTank, powerfulTank
填标签,只有带有这些标签的单位才能直接定位到该单位。
## allowCaptureWhenNeutralByAI
translation:允许中立时被AI俘虏
-
type:bool
+
type:boolean
+
example:allowCaptureWhenNeutralByAI:true
(推测,以前人机不能捕获中立单位)
## transportSlotsNeeded
translation:运输占用位置
type:integer
+
example:transportSlotsNeeded: 2
默认值为1。此单位在运输载具中占据的格子数。
## maxTransportingUnits
translation:运输槽位数量
type:integer
+
example:maxTransportingUnits: 5
该单位载员格子数量。
## transportUnitsRequireTag
translation:被运输单位需要标签
type:string(s)
+
example:transportUnitsRequireTag: smallTank, soldier
仅允许运输具有这些标签之一的单位。可以用于运输类型分类,如人运物资,步单位车运人,气垫船运车辆。或是子机限制,如航母飞机只能降落到航母。
## transportUnitsRequireMovementType
translation:被运输单位类型限制
-
type:movementTypes
+
type:enum(s)
+
example:transportUnitsRequireMovementType: AIR, WATER
仅允许运输具有这些移动类型之一的单位。默认陆地。比如可以设定某单位可以运输空军以实现停机坪,只运输海军等。
## transportUnitsBlockAirAndWaterUnits
translation:禁止运输空军和海军
-
type:bool
+
type:boolean
+
example:transportUnitsBlockAirAndWaterUnits: false
禁止运输空军和海军,默认为true。如果为true,则此单位只能运输LAND单位。
## transportUnitsKeepBuiltUnits
translation:单位建造完成时保留在载具内
-
type:LogicBoolean
+
type:Logicbooleanean
+
example:transportUnitsKeepBuiltUnits: true
使建造的单位留在运输者中,而不是造完直接从载具中出来。
## transportUnitsCanUnloadUnits
translation:载具可以卸载单位
-
type:LogicBoolean
+
type:Logicbooleanean
+
example:transportUnitsCanUnloadUnits: false
载具卸载单位需要满足条件,默认为“ if not self.isOverLiquid() and not self.isMoving()”(不在液体上且没有移动)
## transportUnitsAddUnloadOption
translation:载具显示卸载按钮
-
type:LogicBoolean
+
type:Logicbooleanean
+
example:transportUnitsAddUnloadOption: false
是否显示卸载按钮
## transportUnitsUnloadDelayBetweenEachUnit
translation:载具卸载时间间隔
type:time
+
example:transportUnitsUnloadDelayBetweenEachUnit: 12
卸载单位之间的延迟时间。
## transportUnitsKillOnDeath
translation:载具内单位和载具一同死亡
-
type:LogicBoolean
+
type:Logicbooleanean
+
example:transportUnitsKillOnDeath: if self.isOverLiquid()
默认为true。如果载具死亡,则其中单位也死亡。
## transportUnitsHealBy
translation:载具治疗内部单位速度
type:float
+
example:transportUnitsHealBy: 0.1
填数值,以帧为单位。自动治疗载具内部单位。
## transportUnitsBlockOtherTransports
translation:载具禁止装载其它载具
-
type:bool
+
type:boolean
+
example:transportUnitsBlockOtherTransports: false
默认值为true,如果为false,则此载具可以装载其它载具。比如步单位装物资,载具装步单位,运输船装载具。
## whileNeutralTransportAnyTeam
translation:中立时可装载任意所属单位
-
type:bool
+
type:boolean
+
example:whileNeutralTransportAnyTeam: true
如果是中立的,则这个部队可以装载任何队伍的部队。可用于占领中立单位,比如坦克需要驾驶员,步单位建筑平民建筑。
## whileNeutralConvertToTransportedTeam
translation:中立时转换为载员队伍
-
type:bool
+
type:boolean
+
example:whileNeutralConvertToTransportedTeam: true
中立时将其转换为载员队伍。与whileNeutralTransportAnyTeam一起使用,用于占领中立单位。
## convertToNeutralIfNotTransporting
translation:卸载所有单位时恢复为中立
-
type:bool
+
type:boolean
+
example:convertToNeutralIfNotTransporting: true
卸载单位时将其恢复为中立队伍。与whileNeutralTransportAnyTeam一起使用。
## transportUnitsOnTeamChangeKeepCurrentTeam
translation:转换所属时保留内部单位所属
-
type:bool
+
type:boolean
+
example:transportUnitsOnTeamChangeKeepCurrentTeam: true
如果为true,则单位转换阵营时仍然将运输的单位保留在其原始队伍中。
## transportUnitsEachUnitAlwaysUsesSingleSlot
translation:载员只占用一个槽位
-
type:bool
+
type:boolean
+
example:transportUnitsEachUnitAlwaysUsesSingleSlot:true
所有载员无论体积只占用一个运输槽。但体积大于载员数时仍然不能进入。
## transportUnitsKeepWaypoints
translation:载员保持路径点
-
type:bool
+
type:boolean
+
example:transportUnitsKeepWaypoints:true
目前无效
## resourceRate
translation:回收速率
type:float
+
example:resourceRate:1
回收速度。每帧回收血量。与canReclaimResources一起使用。允许其他队伍回收该单位。通常与中立队伍配合使用。使用价格来设置获取哪些资源。
## similarResourcesHaveTag
translation:像用于此标签的单位
type:string(s)
+
example:similarResourcesHaveTag: goldResource
有这些标签时,资源采集单位将视为同一种资源
## resourceMaxConcurrentReclaimingThis
translation:可同时被此数目单位回收
type:integer
+
example:resourceMaxConcurrentReclaimingThis: 3
默认为无限制。限制有多少单位可以同时回收此资源。
## reclaimPrice
translation:回收价格
-
type:integer
+
type:price(s)
+
example:reclaimPrice: gold=1000
自定义资源,类似价格。对于自定义资源很有用。
## canReclaimResources
translation:可以回收资源
-
type:bool
+
type:boolean
+
example:canReclaimResources: true
如果为true,则此单位可以收集资源,这对于resourceRate很有用。
## canReclaimResourcesNextSearchRange
translation:搜寻资源范围
type:integer
+
example:canReclaimResourcesNextSearchRange: 100
当一处资源采集完后,搜寻更多资源的范围。
## canReclaimResourcesOnlyWithTags
translation:仅允许回收特定标签资源
type:string(s)
+
example:canReclaimResourcesOnlyWithTags: foodResource, goldResource
仅允许回收有此标签的单位。
## resourceReclaimMultiplier
translation:建造单位回收资源的乘数
type:float
+
example:resourceReclaimMultiplier:1
默认为1
## nanoUnbuildSpeed
translation:建造单位回收未完成单位速度
type:float
+
example:nanoUnbuildSpeed:1
(俗称"蓝影",默认为1)
## canRepairBuildings
translation:可以修建筑
-
type:bool
+
type:boolean
+
example:canRepairBuildings: true
如果为true,该单位可以修复建筑。 (isBuilder:true是必需的)
## canRepairUnits
translation:可以修单位
-
type:bool
+
type:boolean
+
example:canRepairUnits: true
如果为true,此单位可以修复单位。 (isBuilder:true是必需的)
## autoRepair
translation:可以自动修
-
type:bool
+
type:boolean
+
example:autoRepair: true
自动维修附近单位,范围为nanoRange。 (isBuilder:true是必需的)
## canReclaimUnitsOnlyWithTags
translation:仅允许回收特定标签单位
type:tags
+
example:canReclaimUnitsOnlyWithTags:shibaInu
仅允许此单位回收具有特定标签单位。
## canRepairUnitsOnlyWithTags
translation:仅允许维修特定标签单位
type:tags
+
example:canRepairUnitsOnlyWithTags:cat
仅允许此单位维修具有特定标签单位。
## nanoRange
translation:维修或建造范围
type:integer
+
example:nanoRange: 110
默认值为85。定义单位的构建/修复/回收范围。
## nanoRepairSpeed
translation:维修速度
type:float
+
example:nanoRepairSpeed: 0.01
默认值为0.2。定义单位修复速度。
## nanoBuildSpeed
translation:建造速度
type:float
+
example:nanoBuildSpeed: 0.9
默认值为1。定义单位建造速度。 (可能与目标的buildSpeed相乘)
## nanoReclaimSpeed
translation:回收速度
type:float
+
example:nanoReclaimSpeed:5.1
默认为nanoRepairSpeed*5.1)以符合旧版本的行为
## nanoRangeForRepairIsMelee
translation:维修范围按近战逻辑
-
type:bool
+
type:boolean
+
example:nanoRangeForRepairIsMelee: true
定义此单位维修时是否为近战算法,默认计算是从自身中心到目标中心,如果单位过大运动又受到阻碍,则虽然看起来很近,然而实际太远无法建造。
近战类算法则是算上其半径,由中心计算改为从边缘计算。
## nanoRangeForReclaimIsMelee
translation:回收范围按近战逻辑
-
type:bool
+
type:boolean
+
example:nanoRangeForReclaimIsMelee: true
与上条类似,本条定义其回收范围是否为近战算法。
## nanoRangeForRepair
translation:维修距离
type:integer
+
example:nanoRangeForRepair: 60
此单位维修距离。
## nanoRangeForReclaim
translation:回收距离
type:integer
+
example:nanoRangeForReclaim: 60
此单位回收距离。
## nanoFactorySpeed
translation:工厂速度乘数
type:float
+
example:nanoFactorySpeed: 1.2
默认值为1。如果此单位是工厂,则乘以创建单位的buildSpeed值。用于加速或者减速建造。
## extraBuildRangeWhenBuildingThis
translation:额外建造距离
type:integer
+
example:extraBuildRangeWhenBuildingThis: 90
此单位额外的建造距离,可以使建造者在更远的地方建造它,多用于水上建筑。
## builtFrom_#_name
translation:从此单位建造
type:string(s)
+
example:builtFrom_1_name: landFactory, airFactory
除非您向原版工厂添加单位,否则不建议使用。将该单位添加到目标建筑物中。
## builtFrom_#_pos
translation:从此单位建造排序
type:float
+
example:builtFrom_1_pos: 0.1
在列表中的排序,越小越靠前。
## builtFrom_#_forceNano
translation:从此单位像建筑一样建造
-
type:bool
+
type:boolean
+
example:builtFrom_1_forceNano: true
如果为true,则像构建建筑一样造此单位。 (即使是一个单位)
## builtFrom_#_isLocked
translation:从此单位建造条件
-
type:LogicBoolean
+
type:Logicbooleanean
+
example:builtFrom_1_isLocked: if self.hp(lessThan=100)
如果为true,则无法在目标中构建此单位。 (逻辑布尔值,设置建造条件)
## builtFrom_#_isLockedMessage
translation:从此单位建造锁定信息
-
type:LocaleString
+
type:string
+
example:builtFrom_1_isLockedMessage: -Needs more population
无法建造时显示的信息。
## exit_x
translation:离开x轴
type:float
+
example:exit_x: 0
从载具卸载或者工厂生产完成时,单位出现的位置,默认为0
## exit_y
translation:离开y轴
type:float
+
example:exit_x: 5
从载具卸载或者工厂生产完成时,单位出现的位置,默认为5,正数向下。
## exit_dirOffset
translation:离开旋转角度
type:float
+
example:exit_dirOffset: 140
单位默认为180(朝下),建筑物默认为0(朝右)。定义已创建或卸载单位的退出方向。
## exit_heightOffset
translation:离开高度
type:float
+
example:exit_heightOffset: 16
默认值为0。定义创建或卸载的单位出现的高度。
## exit_moveAwayAmount
translation:离开距离
type:float
+
example:exit_moveAwayAmount: 10
默认值为70。定义创建或卸载的单位与该单位的距离。
## exitHeightIgnoreParent
translation:离开高度忽略父单位
-
type:bool
+
type:boolean
+
example:exitHeightIgnoreParent:true
离开时的高度不考虑父高度;用于与父单位一起建造时分离附件
## dieOnConstruct
translation:构建时死亡
-
type:bool
+
type:boolean
+
example:dieOnConstruct: true
如果为true,则创建建筑时删除自身。(目标建筑物/单位需要selfBuildRate以自动建造完成)
## dieOnZeroEnergy
translation:无能量时死亡
-
type:bool
+
type:boolean
+
example:dieOnZeroEnergy: true
如果能量值为零,该单位死亡。
## numBitsOnDeath
translation:死亡产生碎片
type:integer
+
example:numBitsOnDeath: 20
定义该单位死亡时散落的碎片的数量。
## fireOnDeath
-translation:死亡产生火焰
-
type:bool
-
填写布尔值,单位死亡后是否有火焰残留
+translation:死亡发射武器
+
type:integer
+
example:fireOnDeath:1
+
填整数,应该是炮塔的ID
## nukeOnDeath
translation:死亡核爆
-
type:bool
+
type:boolean
+
example:nukeOnDeath: true
不推荐使用。建议使用死亡武器代替,其拥有更丰富的设定选项。如果为true,单位死亡时会生成一个内置的核抛射体爆炸效果。
## nukeOnDeathRange
translation:死亡核爆范围
type:float
+
example:nukeOnDeathRange: 140
不推荐使用。定义使用nukeOnDeath时的核抛射体效果范围。
## nukeOnDeathDamage
translation:死亡核爆伤害
type:float
+
example:nukeOnDeathDamage: 2000
不推荐使用。定义使用nukeOnDeath时的核武器效果区域伤害。
## nukeOnDeathDisableWhenNoNuke
translation:死亡核爆条件
-
type:bool
+
type:boolean
+
example:nukeOnDeathDisableWhenNoNuke: true
不推荐使用。默认为false。如果为true,则禁用核武器时,该单位死亡时不会产生核爆炸。
## fireTurretXAtSelfOnDeath
translation:死亡武器
-
type:turret ref
+
type:turret code name
+
example:fireTurretXAtSelfOnDeath: turret_1
死亡武器。单位死后,使用指定炮塔攻击自身所在位置。
## explodeOnDeath
translation:死亡爆炸
-
type:bool
+
type:boolean
+
example:explodeOnDeath: false
默认为true。如果为false,则禁用单位死亡时的内置爆炸效果。
## explodeOnDeathGroundCollision
translation:死亡撞击地面爆炸
-
type:bool
+
type:boolean
+
example:explodeOnDeathGroundCollision: false
默认为true。如果为false,则禁用接触地面时内置爆炸效果。
## effectOnDeath
translation:死亡效果
-
type:effect(s) ref
+
type:effect(s) code name
+
example:effectOnDeath: shockwave, CUSTOM:pieces*3, CUSTOM:deathSound
单位死亡时产生内置或自定义效果。
## effectOnDeathGroundCollision
translation:死亡撞击地面效果
-
type:effect(s) ref
+
type:effect(s) code name
+
example:effectOnDeathGroundCollision: CUSTOM:bigExplosion
类似于effectOnDeath,但当单位接触地面时。对飞行单位有用。
## explodeOnDeathGroundCollosion
translation:死亡撞击未地面爆炸
-
type:bool
+
type:boolean
+
example:explodeOnDeathGroundCollosion: true
默认为true。如果为false,则使用接触地面时内置爆炸效果。
## effectOnDeathGroundCollosion
translation:死亡未撞击地面效果
-
type:effect(s) ref
+
type:effect(s) code name
+
example:effectOnDeathGroundCollision: CUSTOM:bigExplosion
类似于effectOnDeath,但当未单位接触地面时。对飞行单位有用。
## unitsSpawnedOnDeath
translation:死亡产生单位
type:string(s)
+
example:unitsSpawnedOnDeath: tank*5, hoverTank
死亡时产生这些单位。逗号分隔的单位标识符。
## unitsSpawnedOnDeath_setToTeamOfLastAttacker
translation:死亡产生单位所属
-
type:bool
+
type:boolean
+
example:unitsSpawnedOnDeath_setToTeamOfLastAttacker: true
如果为true,死亡时产生的单位将更改归属为最后一个攻击者的队伍。
## hideScorchMark
translation:死亡痕迹
-
type:bool
+
type:boolean
+
example:hideScorchMark: true
如果为true,则禁止单位死亡时留下焦痕。
## soundOnDeath
translation:死亡音效
-
type:audios
+
type:file(s)
+
example:soundOnDeath: tankExplosion1.ogg, tankExplosion2.ogg
为该单位设置自定义死亡声音。
## explodeTypeOnDeath
translation:死亡时爆炸类型
-
type:preset effects
+
type:enum
+
example:explodeTypeOnDeath:small
options: verysmall, small, normal, large, largeUnit, building, buildingNoShockwaveOrSmoke, verylargeBuilding
添加内置死亡效果关键字,选项:非常小,很小,正常,大,大单位,建筑物,没有冲击波和烟雾的建筑物,非常大建筑
## effectOnDeathIfUnbuilt
translation:没建造完成时死亡效果
-
type:effect(s) ref
+
type:effect(s) code name
+
example:effectOnDeathIfUnbuilt: CUSTOM:implode
如果这个单位没建造完成就被毁了,则播放此效果
## disableDeathOnZeroHp
translation:禁用零血死亡
-
type:bool
+
type:boolean
+
example:disableDeathOnZeroHp:true
如果为true,允许单位在0血量的情况下仍然存活,单位不会自然死亡。对自定义“死亡”动作很有用
## autoTriggerCooldownTime
translation:自动触发间隔
type:time
+
example:autoTriggerCooldownTime:0.1s
设置自动触发动作间隔。默认为1s。警告:对于许多设备,将此值设置得太低可能会影响性能,具体取决于操作效果。
## autoTriggerCooldownTime_allowDangerousHighCPU
translation:允许超高频触发
-
type:bool
+
type:boolean
+
example:autoTriggerCooldownTime_allowDangerousHighCPU:true
自动触发冷却时间,允许高CPU占用,也就是可以使用非常高频的触发,但不建议这么做。
## autoTriggerCheckWhileNotBuilt
translation:在未建造完成时依然自动触发
-
type:bool
+
type:boolean
+
example:autoTriggerCheckWhileNotBuilt:true
- 默认为 false - 当 true 时,即使单位未完成建造,所有自动触发器仍在运行
## autoTriggerCheckRate
translation:自动触发检查率
type:enum
+
example:autoTriggerCheckRate:everyFrame
选项:everyFrame(默认),every4Frames, every8Frames。
注意:所有触发器无论检查率都是在第一次创建和自动触发冷却之后检查的。
注:使用模板添加[core]autoTriggerCheckRate:every8Frames到所有单位。可以使使用了复杂autoTriggers的mod有巨大的性能提升。
## action_#_[actionKey]
-translation:action_#_[actionKey]
-
type:special value
+translation:行动_#_[行动节代码]
+
type:special
+
example:action_1_setUnitMemory:xxx="xxx"
不建议使用,请改用[action_x]节
## canBuild_#_[canBuildKey]
-translation:canBuild_#_name/pos/isLocked
-
type:special value
+translation:可建造_#_[可建造节代码]
+
type:special
+
example:canBuild_1_name: tank
请改用canBuild部分。
diff --git a/rustedwarfareapicode/src/UnitNDT/decal.md b/rustedwarfareapicode/src/UnitNDT/decal.md
index 44861d7..c0ef9e4 100644
--- a/rustedwarfareapicode/src/UnitNDT/decal.md
+++ b/rustedwarfareapicode/src/UnitNDT/decal.md
@@ -1,218 +1,272 @@
# decal
## layer
translation:绘制图层
-
type:layer type
-
可以填入的值:shadow(阴影), beforeBody(在主体之下), afterBody(在主体之上), onTop(在最顶端), beforeUI(在显示界面之上),inactive(无效)
+
type:enum
+
example:layer:beforeUI
+
可以填入的值:shadow(阴影), beforeBody(在主体之下), afterBody(在主体之上), onTop(在最顶端), beforeUI(在显示界面之下),inactive(失活层)
## order
translation:排序(默认为0并且按照ini里的顺序)
type:float
+
example:order:1
Order with other decals, defaults 0 and uses order it appears in ini(使用其他贴花排序,默认为0,并使用其在ini中显示的顺序)
## onlyWhenSelectedByOwnPlayer
translation:仅在被拥有者选中时绘制
-
type:bool
+
type:boolean
+
example:onlyWhenSelectedByOwnPlayer:true
Only draw if the viewing player is the same as this unit.(只有当玩家查看本单位时,才可绘制贴花。)
## onlyWhenSelectedByEnemyPlayer
translation:被敌方玩家选中时绘制
-
type:bool
+
type:boolean
+
example:onlyWhenSelectedByEnemyPlayer:true
被敌方玩家选中时绘制
## onlyWhenSelectedByAllyNotOwnPlayer
translation:非自身队伍的盟友选中时绘制
-
type:bool
+
type:boolean
+
example:onlyWhenSelectedByAllyNotOwnPlayer:false
非自身队伍的盟友选中时绘制
## onlyWhenSelectedByAnyPlayer
translation:被任意玩家选中时绘制
-
type:bool
+
type:boolean
+
example:onlyWhenSelectedByAnyPlayer:false
Show when any player selects this unit.(在任何玩家选中本单位值绘制贴花)
## includeParentsSelection
translation:包括被父单位选中
-
type:bool
+
type:boolean
+
example:includeParentsSelection:true
onlyWhenSelected*also check parents selection(仅当选定时*还检查父项选择)
## onlyPlayersWithUnitControl
translation:仅在查看者能够控制此单位时绘制
-
type:bool
+
type:boolean
+
example:onlyPlayersWithUnitControl:false
Only draw if viewing player could control this unit(仅当观看者可以控制此单元时才绘制贴花)
## onlyTeam
translation:仅在查看者为特定队伍时显示
-
type:TeamRelation
+
type:enum
+
example:onlyTeam:any
Only draw when this relation between unit and viewing player,Can be filled in:own|notOwn|neutral|allyNotOwn|ally|enemy|any (仅当单位和查看玩家之间的关系时绘制,可以填写:己方|非己方|中立方|除自己外盟友|盟友|敌方|任意)
## onlyWithZoomLevelOrMore
translation:仅当缩放到当前大小或更大时绘制
type:float
+
example:onlyWithZoomLevelOrMore:2.5
onscreen. Recommended to be set on decals for 3d voxel style units, small details or small shadows.Would hide decal when zoomed out a bit. Useful to reduce draw calls for performance when a lot of units might be
(屏幕上。建议设置在三维立体体积元素样式单位、小细节或小阴影的贴花上。缩小一点时会隐藏贴花。当许多单元可能需要时,有助于减少性能的调用)
## onlyWhileActive
translation:仅在单位建造完成时绘制
-
type:bool
+
type:boolean
+
example:onlyWhileActive:true
Only draw when unit has been completed(仅在单位完成时绘制,比如建造者建造一般的建筑就不算)
## onlyOnBodyFrameOf
translation:只在主体关键帧时绘制
type:integer
+
example:onlyOnBodyFrameOf:1
只有在主体到某个关键帧时绘制
## onlyWhileAlive
translation:仅在存活时绘制
-
type:bool
+
type:boolean
+
example:onlyWhileActive:false
(If beforeUI layer default true, else default false)(如果图层(layer)为beforeUI默认为true,否则false,为ture死后消失)
## onlyInPreview
translation:仅在侧边栏和建筑放置预览中显示
-
type:bool
+
type:boolean
+
example:onlyInPreview:true
Only show in sidebar, and building placement preview(仅在侧边栏中显示,以及建筑布局预览)
## onlyOnNonPreview
translation:仅在非预览中显示(与上一条相反)
-
type:bool
+
type:boolean
+
example:onlyOnNonPreview:true
Only show on real unit, not action sidebar, etc(仅在真实单元上显示,而不是动作侧边栏等)
## imageScale
translation:图像缩放(倍数)
-
type:LogicFloat
+
type:LogicNumber
+
example:imageScale:self.hp
图像缩放(倍数)
## imageScaleX
translation:图像X缩放
-
type:LogicFloat
+
type:LogicNumber
+
example:imageScaleX:self.shield
图像X缩放
## imageScaleY
translation:图像Y缩放
-
type:LogicFloat
+
type:LogicNumber
+
example:imageScaleY:self.energy
图像Y缩放
## image
translation:图像
-
type:file(image)
+
type:file
+
example:image:XXX.png
图像
## teamColors
translation:阵营色
-
type:bool
+
type:boolean
+
example:teamColors:true
bool. Enable team coloring on image and imageStack(布尔值。在图像和图像堆栈上启用队伍色)
## imageStack
-translation:图像列表
-
type:file(image)
+translation:图像堆栈
+
type:file
+
example:imageStack:XXX.png
list of images recommended for 3d voxel style units as images can be batch drawn when using the same sprite sheet.(推荐用于三维立体体积元素样式单位的图像列表,因为当使用相同的子画面时,可以批量绘制图像。)(目前没有实例所以不清楚,但确定是用于3d单位)
## stack_hOffset
translation:列表图像高度偏移
type:float
+
example:stack_hOffset:1
for 3d voxel style units.(用于三维立体体积元素样式单位。)
## stack_frameOffset
translation:列表图像帧偏移
type:integer
+
example:stack_frameOffset:2
for 3d voxel style units.(用于三维立体体积元素样式单位。)
## stack_drawInReverseOrder
translation:列表图像绘图顺序
type:integer
+
example:stack_drawInReverseOrder:0
列表图像绘图顺序
## stack_indexStart
translation:列表图像起始图像
-
type:logic integer
+
type:LogicNumber
+
example:stack_indexStart:self.x
logic int (Starting image of the image stack)(动态整数(图像堆栈的起始图像))
## stack_indexCount
translation:列表图像数量
-
type:logic integer
+
type:LogicNumber
+
example:stack_indexCount:self.y
logic int (Number of images to draw. Could be set to 1 to use stack_indexStart as an image picker)(动态整数(要绘制的图像数。可以设置为1以使用堆栈索引开始作为图像选择器))
## total_frames
translation:总帧数(跟后面两个二选一使用)
type:integer
+
example:total_frames:12
Use total_frames or frame_width/frame_height(使用 总帧数 或者 帧宽度/帧高度)
## frame_verticalOrdering
translation:帧清单
-
type:bool
+
type:boolean
+
example:frame_verticalOrdering:true
是否列出帧清单
## frame_width
translation:帧宽度
type:integer
+
example:frame_width:2
帧宽度(不可与总帧数一起设置)
## frame_height
translation:帧高度
type:integer
+
example:frame_height:2
帧高度
## frame
translation:帧
-
type:logic integer
+
type:LogicNumber
+
example:frame:self.maxHp
(与total_frames相比,frame是动值,可以改变内存来修改第几帧)
## addBodyFrameMultipliedBy
translation:添加主体帧乘数
type:float
+
example:addBodyFrameMultipliedBy:1.2
添加主体帧时的乘数
## isVisible
translation:可见
-
type:LogicBoolean
+
type:Logicbooleanean
+
example:isVisible:if self.isMoving
表明该帖花是否可以被我们看见(可以使用逻辑)
## xOffsetRelative
translation:X相对偏移
type:float
+
example:xOffsetRelative:200
(note use basePosition with createMarker/etc for logic use)(请注意,动态使用base Position(基本位置)和create Marker(创建标记)/ect(等))
## yOffsetRelative
translation:Y相对偏移
type:float
+
example:yOffsetRelative:200
(note use basePosition with createMarker/etc for logic use)(请注意,动态使用base Position(基本位置)和create Marker(创建标记)/ect(等))
## xOffsetAbsolute
translation:X绝对偏移
-
type:LogicFloat
+
type:LogicNumber
+
example:xOffsetAbsolute:self.hp
(note use basePosition with createMarker/etc for logic use)(请注意,动态使用base Position(基本位置)和create Marker(创建标记)/ect(等))
## yOffsetAbsolute
translation:Y绝对偏移
-
type:LogicFloat
+
type:LogicNumber
+
example:yOffsetAbsolute:self.hp
(note use basePosition with createMarker/etc for logic use)(请注意,动态使用base Position(基本位置)和create Marker(创建标记)/ect(等))
## hOffset
translation:高度偏移
type:float
+
example:hOffset:2
height offset(高度偏移)
## dirOffset
translation:角度偏移
type:float
+
example:dirOffset:25
角度偏移
## pivotOffset
translation:坐标系旋转
-
type:float (180>X>-180)
+
type:float
+
example:pivotOffset:125
(相当于把单位定位的直角坐标系旋转该角度,然后重新确定xy) 只影响X/Y相对偏移,不旋转图像-----only effects xOffsetRelative/yOffsetRelative without rotating image
## alwaysStartDirAtZero
translation:总是固定角度为零(总是朝上)
-
type:bool
+
type:boolean
+
example:alwaysStartDirAtZero:true
Useful for UI(对UI有用)
## alwayStartDirAtZero
translation:总是角度为零(总是朝上)
-
type:bool
+
type:boolean
+
example:alwayStartDirAtZero:true
Useful for UI(对UI有用)
## alwaysStartHeightAtZero
translation:总是固定高度为零
-
type:bool
+
type:boolean
+
example:alwaysStartHeightAtZero:false
Useful for UI on air and hover units(对空中和两栖单位的UI有用)
## basePosition
translation:中心位置(填单位参考)
type:unit ref
+
example:basePosition:nearestUnit
unit or marker to draw from as the base(作为基础绘制的单位或标记)
## basePositionFromLeg
translation:以脚为中心位置
-
type:leg ref
+
type:leg code name
+
example:basePositionFromLeg:1
Use a leg/arm position instead of unit body as base(使用 腿/脚 位置而不是单位身体作为基础)
## basePositionFromTurret
translation:以炮塔为中心位置
-
type:turret ref
+
type:turret code name
+
example:basePositionFromTurret:5
Use a turret position instead of unit body as base(使用炮塔位置而不是单元主体作为底座)
## basePositionFromLegEnd
translation:以腿为中心位置
-
type:leg/arm ref
+
type:leg/arm code name
+
example:basePositionFromLegEnd:leg_1
填腿脚/胳膊节
## drawLineTo
translation:绘制线条到(受到颜色和宽度影响)
-
type:unit or marker
+
type:unit ref
+
example:drawLineTo:nearestUnit
Draws a line to this location affected by color and width(在此位置绘制一条受颜色和宽度影响的线)
## image_shadow
translation:阴影图像
-
type:image
+
type:file
+
example:image_shadow:XXX.png
阴影图像
## shadowOffsetX
translation:阴影偏移X
type:float
+
example:shadowOffsetX:12
阴影偏移X
## shadowOffsetY
translation:阴影偏移Y
type:float
+
example:shadowOffsetY:21
阴影偏移Y
## color
translation:颜色(影像图像和线条)
type:color
+
example:color:#acefdb
affects image and line.(影响图像和线条。)
## alpha
translation:不透明度(影像颜色和线条)
-
type:LogicFloat (0-1)
+
type:LogicNumber
+
example:alpha:self.shield
LogicFloat (0-1). Stacks with alpha in color. affects image and line.(动态浮点值(0-1)。以颜色堆叠透明度。影响图像和线条。)
## lineWidth
translation:线宽度
type:float
+
example:lineWidth:21.564
表明这条线的宽度
diff --git a/rustedwarfareapicode/src/UnitNDT/effect.md b/rustedwarfareapicode/src/UnitNDT/effect.md
index deb431d..2756500 100644
--- a/rustedwarfareapicode/src/UnitNDT/effect.md
+++ b/rustedwarfareapicode/src/UnitNDT/effect.md
@@ -2,297 +2,371 @@
## life
translation:效果存在时间
type:float
+
example:effect:custom:doge
默认值为200。到时间效果消失。 设置得尽可能低以减少效果开销。
## lifeRandom
translation:效果存在时间随机值
type:float
+
example:lifeRandom: 12
效果存在时间的随机范围。
## alsoEmitEffectsOnDeath
translation:死亡时创建效果
-
type:effect ref
+
type:effect(s) code name
+
example:alsoEmitEffectsOnDeath:shibadie
在生命耗尽的时候创造这些效果。
## alsoEmitEffects
translation:也创造效果
-
type:effect ref
+
type:effect(s) code name
+
example:alsoEmitEffects:custom:doge2
创建时创建更多效果,对于多效果很有用。 注意:创建的效果上的其他“ alsoEmitEffects”将被忽略,禁止套娃。
## ifSpawnFailsEmitEffects
translation:如果失败则创建效果
-
type:effect ref
+
type:effect(s) code name
+
example:ifSpawnFailsEmitEffects:custom:doge3
如果此效果的“spawnChance”失败,则产生这些效果。
## alsoPlaySound
translation:也播放音效
-
type:file(s) (ogg/wav)
+
type:file(s)
+
example:alsoPlaySound:ao.ogg
播放音效,填文件名或内置。
## createWhenOffscreen
translation:可创建于画面之外
-
type:bool
+
type:boolean
+
example:createWhenOffscreen:true
允许在画面之外产生此效果,默认为false。
## createWhenZoomedOut
translation:缩小时可产生效果
-
type:bool
+
type:boolean
+
example:createWhenZoomedOut:true
允许缩小时产生此效果,默认值为true
## createWhenOverLiquid
translation:创建于液体上
-
type:bool
+
type:boolean
+
example:createWhenOverLiquid:true
允许在液体上方产生此效果,默认值为true
## createWhenOverLand
translation:创建于陆地上
-
type:bool
+
type:boolean
+
example:createWhenOverLand:true
允许在陆地上方产生此效果,默认值为true
## spawnChance
translation:产生几率
type:float
+
example:spawnChance:0.9
默认值1.如果小于1,则效果随机被创建
## showInFog
translation:在雾中显示
-
type:bool
+
type:boolean
+
example:showInFog:true
默认为false
## delayedStartTimer
translation:延迟创建
type:float
+
example:delayedStartTimer:10
等待这么久再播放此动画,单位为帧。
## delayedStartTimerRandom
translation:延迟创建随机时间
type:float
+
example:delayedStartTimerRandom:10
等待时间随机变化
## liveAfterAttachedDies
translation:目标死后存活
-
type:bool
+
type:boolean
+
example:liveAfterAttachedDies:true
目标死后动画继续存活,使用AttachedToUnit时默认为false.
## priority
translation:优先级
-
type:string
+
type:enum
+
example:priority:low
默认为high,填不同的值对应不同的效果数量上限,并且通用。verylow/low/high/veryhigh/critical(很低,低,高,很高,至关重要)(上限分别是311,321,331,341,350)
## attachedToUnit
translation:附着在单位上
-
type:bool
+
type:boolean
+
example:attachedToUnit:true
此效果产生时吸附到目标单位或抛射体。将与之一起移动。
## alwayStartDirAtZero
translation:初始角度总是为零
-
type:bool
+
type:boolean
+
example:alwayStartDirAtZero:true
忽略附属单位或者产者的角度。
## atmospheric
translation:空气效果
-
type:bool
+
type:boolean
+
example:atmospheric:true
添加阻力使此效果减慢速度,并添加随机移动。用于模拟尾焰。
## physics
translation:物理效果
-
type:bool
+
type:boolean
+
example:physics:true
撞击地面时反抛射体。需要高度才能生效。
## physicsGravity
translation:物理重力
type:float
+
example:physicsGravity:1
默认为1。physics:true时的垂直方向加速度。
## xOffsetRelative
translation:X相对偏移量
type:float
+
example:xOffsetRelative:0
效果起始时相对于炮塔,抛射体,单位的偏移的方向位置。正数向右,负数向左。
## yOffsetRelative
translation:Y相对偏移量
type:float
+
example:yOffsetRelative:-25
效果起始时相对于炮塔,抛射体,单位的偏移的方向位置。正数向前,负数向后。
## xOffsetRelativeRandom
translation:X相对随机偏移量
type:float
+
example:xOffsetRelativeRandom:1
X相对目标随机偏移量。随机增加或减少此值,用于偏移像素。
## yOffsetRelativeRandom
translation:Y相对随机偏移量
type:float
+
example:yOffsetRelativeRandom:10
Y相对目标随机偏移量。随机增加或减少此值,用于偏移像素。
## xOffsetAbsolute
translation:X绝对偏移量
type:float
+
example:xOffsetAbsolute:0
Absolute类为绝对偏移,它不像Relative那样考虑单位的方向。比如设置x向速度为1,绝对偏移则始终向右移动,相对偏移可以向任意方向移动。
## yOffsetAbsolute
translation:Y绝对偏移量
type:float
+
example:yOffsetAbsolute:10
按位置偏移起动效果,忽略附加炮塔单位等的方向。
## xOffsetAbsoluteRandom
translation:X绝对随机偏移量
type:float
+
example:xOffsetAbsoluteRandom:2
随机增加或减少此值,用于偏移像素。
## yOffsetAbsoluteRandom
translation:Y绝对随机偏移量
type:float
+
example:yOffsetAbsoluteRandom:2
随机增加或减少此值,用于偏移像素。
## xSpeedRelative
translation:X相对速度
type:float
+
example:xSpeedRelative:1
X轴相对于目标的移动速度。,正数向右,负数向左。
## ySpeedRelative
translation:Y相对速度
type:float
+
example:ySpeedRelative:1
Y轴相对于目标的移动速度。正数向前,负数向后。
## xSpeedRelativeRandom
translation:X随机相对速度
type:float
+
example:xSpeedRelativeRandom:0.1
随机增加或减少此值,用于偏移像素。
## ySpeedRelativeRandom
translation:Y随机相对速度
type:float
+
example:ySpeedRelativeRandom:0.1
随机增加或减少此值,用于偏移像素。
## xSpeedAbsolute
translation:X绝对速度
type:float
+
example:xSpeedAbsolute:0.1
X轴相对于起点的绝对移动速度。
## ySpeedAbsolute
translation:Y绝对速度
type:float
+
example:ySpeedAbsolute:0.6
Y轴相对于起点的绝对移动速度。
## xSpeedAbsoluteRandom
translation:X随机绝对速度
type:float
+
example:xSpeedAbsoluteRandom:0.1
按此值随机更改初始值。
## ySpeedAbsoluteRandom
translation:Y随机绝对速度
type:float
+
example:ySpeedAbsoluteRandom:0.4
按此值随机更改初始值。
## hOffset
translation:高度偏移
type:float
+
example:hOffset:5
距目标的高度偏移。正数向上,负数向下。
## hOffsetRandom
translation:随机高度偏移
type:float
+
example:hOffsetRandom:3
按此值随机更改初始值。
## hSpeed
translation:高度速度
type:float
+
example:hSpeed:1
高度移动速度。正数向上,负数向下。
## hSpeedRandom
translation:随机高度速度偏移
type:float
+
example:hSpeedRandom:0.1
按此值随机更改初始值。
## dirOffset
translation:角度偏移
type:float
+
example:dirOffset:180
角度偏移,修改初始朝向。注意,0度可能存在朝向问题。
## dirOffsetRandom
translation:随机角度偏移量
type:float
+
example:dirOffsetRandom:180
按此值随机更改偏移角度。
## dirSpeed
translation:转速
type:float
+
example:dirSpeed:5
修改效果的旋转速度。
## dirSpeedRandom
translation:随机转速
type:float
+
example:dirSpeedRandom:2
按此值随机更改旋转速度。
## pivotOffset
translation:枢轴偏移
type:float
+
example:pivotOffset:1.2
整个效果的朝向偏移
## pivotOffsetRandom
translation:枢轴偏移随机
type:float
+
example:pivotOffsetRandom:1.2
按此值随机更改朝向。
## frameIndex
translation:帧索引
type:integer
+
example:frameIndex:1
使用内置效果时所取用的帧编号,0取第一帧。
## frameIndexRandom
translation:帧随机
type:integer
+
example:frameIndexRandom:1
随机增减索引值,用于随机使用同组内不同的图像。
## stripIndex
translation:图像集
-
type:integer/string
+
type:integer/enum
+
example:stripIndex:shockwave
要使用的内置图像集。不能与自定义图像一起使用。如effects 效果1对应res内文件effects.png,以此类推。
explode_big爆炸效果图、light_50闪光贴花、flame开火图火焰、dust灰尘贴花、smoke_black黑烟、smoke_white白烟、shockwave冲击波、fire火焰图、lava_bubble岩浆泡、effects2效果2、plasma_shot等离子、shockwave2冲击波2、shockwave_large大冲击波、explode_bits碎片、explode_big2大爆炸、explode_bits_bug虫碎片、projectiles抛射体、projectiles2抛射体2、effects3效果3
## image
translation:图像
-
type:image
+
type:file
+
example:Image:shibaing.png
要使用的自定义图像文件。不能与stripIndex一起使用。
## imageShadow
translation:阴影图像
-
type:image
+
type:file
+
example:imageShadow:SHADOW:shibaing.png
用于自定义阴影的图像
## scaleTo
translation:结束缩放倍数
type:float
+
example:scaleTo:2
效果结束时缩放倍数。
## scaleFrom
translation:初始缩放倍数
type:float
+
example:scaleFrom:0.5
效果初始时缩放倍数,用于效果从小到大缩放,或者反向缩放。
## color
translation:颜色
type:color
+
example:color:#FFFF0000
填16进制颜色值,给图像上叠加颜色。一般建议图像使用灰度图,然后叠加颜色。注意彩色图是无法叠加白色变白的。
## teamColorRatio
translation:队伍色相
type:float
+
example:teamColorRatio:0.5
填0-1在图像上叠加阵营色,1为完全为阵营色。
## drawType
translation:绘制类型
-
type:draw type
+
type:enum
+
example:drawType:displacement/normal
效果的绘制类型
## drawUnderUnits
translation:绘制在单位下方
-
type:bool
+
type:boolean
+
example:drawUnderUnits:true
将此效果绘制在单位下方。
## fadeInTime
translation:淡入时间
type:float
+
example:fadeInTime:15
设置淡入效果时间,从透明到不透明。透明度值从0%到100%。
## fadeOut
translation:淡出
-
type:bool
+
type:boolean
+
example:fadeOut:true
设置淡入效果时间,透明度从100%淡出到%0。把alpha设置为高于1可以延长淡出。
## alpha
translation:不透明度
type:float
+
example:alpha:1
介于0-1之间。可以设置为大于1以延迟淡出效果
## trailEffect
translation:尾焰效果
-
type:effect ref
+
type:effect(s) code name
+
example:trailEffect:custom:trails
类似于抛射体的尾焰
## trailEffectRate
translation:尾焰效果频率
type:float
+
example:trailEffectRate:0
产生频率
## shadow
translation:阴影
-
type:bool
+
type:boolean
+
example:shadow:true
true时绘制阴影。如果使用imageShadow则强制为true
## frame_width
translation:单帧宽度
type:integer
+
example:frame_width:1000
规定单帧的宽度像素,如果值小于图像本体宽度则选取帧时采用换列方式进行处理。
## frame_height
translation:单帧高度
type:integer
+
example:frame_height:1000
规定单帧的高度像素,如果值小于图像本体高度则选取帧时采用换行方式进行处理。
## total_frames
translation:动画总帧数
type:integer
+
example:total_frames:15
动画的总帧数,与图像(image)或frameIndex一起使用。
## animateFrameStart
translation:动画开始帧
type:integer
+
example:animateFrameStart:0
动画从哪一帧开始,第一帧编号为0
## animateFrameEnd
translation:动画结束帧
type:integer
+
example:animateFrameEnd:14
动画在哪一帧结束。
## animateFramePingPong
translation:动画帧重放
-
type:bool
+
type:boolean
+
example:animateFramePingPong:true
动画正序播放完毕后再倒序播放一次。
## animateFrameSpeed
translation:动画帧速度
type:time
+
example:animateFrameSpeed:0.2
动画播放速度,单位位游戏帧,一般动画帧数也不高,所以设置一般为0.x
## animateFrameSpeedRandom
translation:动画帧随机速度
type:time
+
example:animateFrameSpeedRandom0.1
按此值随机更改动画速度。
## animateFrameLooping
translation:动画帧循环
-
type:bool
+
type:boolean
+
example:animateFrameLooping:false
默认false。当为false时,效果被移除时,动画结束
## animateFrameStartRandomAdd
-translation:动画帧随机开始添加
+translation:动画开始帧随机偏移
type:integer
+
example:animateFrameStartRandomAdd:10
以动画起始帧为基准,按照+/-所填数字内随机选取数字进行帧随机偏移(似乎无用)
diff --git a/rustedwarfareapicode/src/UnitNDT/global.md b/rustedwarfareapicode/src/UnitNDT/global.md
index cc4377c..bf6ce08 100644
--- a/rustedwarfareapicode/src/UnitNDT/global.md
+++ b/rustedwarfareapicode/src/UnitNDT/global.md
@@ -1,109 +1,136 @@
# global_resource
## stackHorizontal
translation:堆叠水平
-
type:bool
+
type:boolean
+
example:stackHorizontal:true
定义与玩家所有单位共享的新资源,其工作方式类似于内置的资金。添加到"all-units.template"(位于mod根目录)
## displayName
translation:显示名称
type:string
+
example:displayName:资金
用户界面中此资源的名称
## displayNameShort
translation:显示短名称
type:string
+
example:displayNameShort:¥
在较小的UI上显示的文本(如action的悬浮文本)默认为displayName
## hidden
translation:隐藏
-
type:bool
+
type:boolean
+
example:hidden:true
向玩家隐藏此资源
## priority
translation:优先级
type:float
+
example:priority:1
如果多个mod单元中定义了同名的资源,则使用具有最高优先级的displayName/displayColor
## displayColor
translation:显示颜色
type:color
+
example:displayColor:#FF0000
颜色,可以是十六进制,带有可选的alpha
## displayRoundedDown
translation:显示为整数
-
type:bool
+
type:boolean
+
example:displayRoundedDown:true
对资源进行舍入显示为整数。
## displayWhenZero
translation:为零时显示
-
type:bool
+
type:boolean
+
example:displayWhenZero:true
资源为零时也显示。
## iconImageUseInText
translation:在动作(action)的描述中显示资源图标
-
type:bool
+
type:boolean
+
example:iconImageUseInText:false
默认为true
## iconImage
translation:图标
-
type:image
+
type:file
+
example:iconImage:chemms.png
自定义该资源的象征图像
## displayNameHideWhenIconShownInText
translation:显示名称在文本中显示图标时隐藏
-
type:bool
+
type:boolean
+
example:displayNameHideWhenIconShownInText:true
(默认为false) - 有助于缩短说明文本
## displayNameHideWhenIconShownInHUD
translation:文本显示名称在HUD中显示图标时隐藏
-
type:bool
+
type:boolean
+
example:displayNameHideWhenIconShownInHUD:true
默认为false
## displayColorUseInText
translation:在动作(action)的描述中显示资源颜色
-
type:bool
+
type:boolean
+
example:displayColorUseInText:false
默认为true
## appendResourceInHUD
translation:在HUD中追加资源
-
type:resource ref
+
type:(global) resource code name
+
example:appendResourceInHUD: `resources:name`
使用后,在游戏界面中这个资源值将会叠在目标资源值的后面,并且继承目标资源的颜色和图标。这个资源值后面也能继续叠加其它资源值
## displayPrefixInHUD
translation:在HUD中显示前缀
type:string
+
example:displayPrefixInHUD:321
在资源数值前显示的文本,会替换掉资源原本的名称以及冒号,和appendResourceInHUD一同使用时可以用来显示资源限制之类的内容
## displayPostfixInHUD
translation:在HUD中显示后缀
type:string
+
example:displayPostfixInHUD:123
在资源数值之后显示的文本
## displayTextAppendResourceWithGap
translation:显示具有间隙的附加资源文本
-
type:bool
+
type:boolean
+
example:displayTextAppendResourceWithGap:true
默认为false。将不相关的资源放在同一行时,在资源之间添加空格。
## appendResourceInHUD_whenThisZero
translation:在此为零时在HUD中追加资源
-
type:bool
+
type:boolean
+
example:appendResourceInHUD_whenThisZero:false
默认为true。为false时附加资源(如用于显示最大值的资源)与父资源一起隐藏。
## includeInStats
translation:包括值
-
type:bool
+
type:boolean
+
example:includeInStats:true
包括该资源,与valueInStats类似
## valueInStats
translation:统计值
-
type:bool/integer
+
type:integer
+
example:valueInStats:true
(如果全局且未隐藏,则默认为 1(true),否则默认为 0(false)) - 用于游戏后的统计和回放的排行榜
## displayInHud
translation:在HUD里显示
-
type:bool
+
type:boolean
+
example:displayInHud:true
- 用于 appendResourceInHUD(在HUD中追加资源) 中的资源,而不会隐藏它们,这有其他副作用
## displayDigitGrouping
translation:资源数字分组
-
type:display type
+
type:enum
+
example:displayDigitGrouping:none
none/comma/space--(空,逗号,空格)(例如资源数量10000,空格分组就是10 000)
## displayTextAppendResource
translation:显示文本里添加资源
-
type:resource ref
+
type:(global) resource code name
+
example:displayTextAppendResource:
往文本里添加一个资源
## displayPos
translation:显示排序
type:integer
+
example:displayPos:1
显示优先级,越小越居上
## displayWithRounding
translation:四舍五入取整
-
type:bool
+
type:boolean
+
example:displayWithRounding:true
将资源的小数部分用四舍五入法变成整数,此代码为真后,该资源数字一定是整数
## displayTextPrefix
translation:显示文本前缀
type:string
+
example:displayTextPrefix:321
与displayPrefixInHUD有着相同的作用,而且它俩不能共存
## displayTextPostfix
translation:显示文本后缀
type:string
+
example:displayTextPostfix:123
与displayPostfixInHUD有着相同的作用,而且它俩不能共存
diff --git a/rustedwarfareapicode/src/UnitNDT/graphics.md b/rustedwarfareapicode/src/UnitNDT/graphics.md
index cecaa9a..2f1b685 100644
--- a/rustedwarfareapicode/src/UnitNDT/graphics.md
+++ b/rustedwarfareapicode/src/UnitNDT/graphics.md
@@ -1,265 +1,341 @@
# graphics
## image
translation:主体图像
-
type:image
+
type:file
+
example:image:base.png
填图片名称,格式为png。
## image_back
translation:背景图像
-
type:image
+
type:file
+
example:image_back:back.png
可选的在单位后面绘制图像,不随单位转动。可用于工厂底图,单位角标等。
## image_back_always_use_full_image
translation:图像背景总是使用完整的图像
-
type:bool
+
type:boolean
+
example:image_back_always_use_full_image:true
默认会裁剪或拉伸或平铺到和主体图像一致.
## image_wreak
translation:死亡图像
-
type:image
+
type:file
+
example:image_wreak:wreak.png
可选的单位死亡时使用的图像。
## image_shield
translation:护盾图像
-
type:image
+
type:file
+
example:image_shield:shibe.png
自定义护盾所使用的图像。
## image_offsetX
translation:图像X轴偏移
type:integer
+
example:image_offsetX:10
图像在X轴偏移,用于不对称图像,比如您的单位有个吊臂,这样中心不在正中间。
## image_offsetY
translation:图像Y轴偏移
type:integer
+
example:image_offsetY:-20
图像在Y轴偏移,用于比较高的单位。
## image_offsetH
translation:图像高度偏移
type:float
+
example:image_offsetH:1.2
图像在高度上的偏移
## isVisible
translation:可见
-
type:logicBoolean
+
type:logicbooleanean
+
example:isVisible: if self.hasFlag(id=1)
默认为true,如果为false将隐藏单位。
## isVisibleToEnemies
translation:对敌人可见
-
type:bool
+
type:boolean
+
example:isVisibleToEnemies:false
与showOnMinimapToEnemies,canOnlyBeAttackedByUnitsWithTags一起使用时,可以创建隐形系统。
## teamColorsUseHue
translation:阵营色色相
-
type:bool
+
type:boolean
+
example:teamColorsUseHue:true
luke不建议使用。单位上的绿色像素转换为团队颜色。 若为true整个单位都带有团队色彩。 默认为false,挺难看的。
## teamColoringMode
translation:阵营色模式
-
type:string
+
type:enum
+
example:teamColoringMode:hueAdd
设置单位着色逻辑,默认是纯绿。有四个值disabled,hueShift,hueAdd,pureGreen。(禁用,色相偏移,色相添加,纯绿)
## scaleImagesTo
translation:缩放图像到
type:float
+
example:scaleImagesTo:15
单位像素。调整图像大小以使其适合像素值。同时影响腿部和阴影图像。
## imageScale
translation:图像缩放比例
type:float
+
example:imageScale:0.9
调整图像大小。默认值为1。也可以影响腿部和阴影图像。
## drawLayer
translation:绘制图层
-
type:string
+
type:enum
+
example:drawLayer:ground
陆上单位通常默认为ground或ground2。运输船为ground2。wreaks, underwater, bottom, ground, ground2, experimentals, air, top
## whenBeingBuiltMakeTransparentTill
translation:建造时透明度
type:float
+
example:whenBeingBuiltMakeTransparentTill:0.5
设为0则一开始便完全不透明,设为1则直到建造完成时才不透明。
## icon_zoomed_out
translation:缩放图标
-
type:image
+
type:file
+
example:icon_zoomed_out:tank_zoomed.png
缩放时显示的图标
## icon_zoomed_out_neverShow
translation:缩放图标永不显示
-
type:bool
+
type:boolean
+
example:icon_zoomed_out_neverShow:false
缩放图标永不显示。
## icon_build
translation:建造图标
-
type:image
+
type:file
+
example:icon_build:icon_shiba.pmg
填文件名,指定图像作为单位在列表中显示的图像.
## image_floatingPointSize
translation:对奇数大小的图像进行一个像素的调整
-
type:bool
+
type:boolean
+
example:image_floatingPointSize:true
(填写0/1,无直观区别,有说法是把x-1来改变单位坐标系使其更方便使用)--Fixes off by 1 pixel sizing for odd sized images -
## showSelectionIndicator
translation:显示选择指示
-
type:bool
+
type:boolean
+
example:showSelectionIndicator:false
(单位的选择框)
## image_turret
translation:炮塔图像
-
type:image
+
type:file
+
example:image_turret:tank_turret.png
所有炮塔的默认图像,也可以为每个炮塔设置专用图像。
## turretImageScale
translation:炮塔图像缩放
type:float
+
example:turretImageScale:2
按比例缩放炮塔图像
## teamColorsOnTurret
translation:炮塔使用队伍色
-
type:bool
+
type:boolean
+
example:teamColorsOnTurret:true
默认为false。在转塔上也应用团队颜色。
## scaleTurretImagesTo
translation:炮塔图像缩放
type:float
+
example:scaleTurretImagesTo:112.6
单位像素。缩放炮塔图像至指定像素,只用填宽度
## lock_body_rotation_with_main_turret
translation:锁定主体旋转随主炮塔
-
type:bool
+
type:boolean
+
example:lock_body_rotation_with_main_turret:true
锁定主体图像旋转追随主炮塔
## lock_leg_rotation_with_main_turret
translation:锁定腿脚旋转随主炮塔
-
type:bool
+
type:boolean
+
example:lock_leg_rotation_with_main_turret:true
锁定腿脚图像旋转追随主炮塔
## image_shadow
translation:阴影图像
-
type:image
+
type:file/enum
+
example:image_shadow:AUTO
填NONE或AUTO又或者是AUTO_ANIMATED,图像文件。
## shadowOffsetX
translation:阴影图像偏移X轴
type:float
+
example:shadowOffsetX:1
阴影x轴偏移值,正数往右
## shadowOffsetY
translation:阴影图像偏移Y轴
type:float
+
example:shadowOffsetY:2
阴影y轴偏移值,正数往下
## image_shadow_frames
translation:阴影图像指定
-
type:bool
+
type:boolean
+
example:image_shadow_frames:true
true时阴影不随单位移动而改变方向。
## lock_shadow_rotation_with_main_turret
translation:阴影锁定为主炮塔方向
-
type:bool
+
type:boolean
+
example:lock_shadow_rotation_with_main_turret:true
将身体图像阴影锁定到主炮塔的方向
## total_frames
translation:图像帧数
type:integer
+
example:total_frames:15
默认值为1。将图像分割为指定分数,用于动画。第一帧编号为0
## default_frame
translation:默认帧
type:integer
+
example:default_frame:1
指定默认显示为第几帧,默认为0即第一帧
## frame_width
translation:图像宽度
type:integer
+
example:frame_width:35
设置单帧宽度,自动计算并覆盖总帧数。
## frame_height
translation:图像高度
type:integer
+
example:frame_height:35
默认为图像高度
## splastEffect
translation:水波效果
-
type:bool
+
type:boolean
+
example:splastEffect:true
在水上时创建水波效果。默认为false
## dustEffect
translation:灰尘效果
-
type:bool
+
type:boolean
+
example:dustEffect:true
在地面上产生灰尘效果。默认为false
## splastEffectReverse
translation:逆向水波效果
-
type:bool
+
type:boolean
+
example:splastEffectReverse:true
填true时,在倒车时也能产生效果
## dustEffectReverse
translation:逆向灰尘效果
-
type:bool
+
type:boolean
+
example:dustEffectReverse:true
填true时,在倒车时也能产生效果
## movementEffect
translation:运动效果
-
type:effect
+
type:effect(s) code name
+
example:movementEffect:smoke, CUSTOM:fastDust*2, CUSTOM:pop*5
自定义运动效果,可以是内置的或者自定义的。
## movementEffectReverse
translation:逆向运动效果
-
type:effect
+
type:effect(s) code name
+
example:movementEffectReverse:smoke
自定义倒车效果。
## movementEffectRate
translation:运动效果频率
type:float
+
example:movementEffectRate:8
自定义效果产生频率,每隔多少帧一次。
## movementEffectReverseFlipEffects
translation:逆向时反转运动效果
-
type:bool
+
type:boolean
+
example:movementEffectReverseFlipEffects:true
倒车时反转效果
## repairEffect
translation:维修效果
-
type:effect
+
type:effect(s) code name
+
example:repairEffect:smoke
自定义维修效果,可以是任何东西。替换构建时的默认效果
## repairEffectAtTarget
translation:维修目标效果
-
type:effect
+
type:effect(s) code name
+
example:repairEffectAtTarget:smoke
维修目标上产生的效果。
## repairEffectRate
translation:维修效果频率
type:float
+
example:repairEffectRate:8
维修效果每隔多少帧产生一次。
## reclaimEffect
translation:回收效果
-
type:effect
+
type:effect(s) code name
+
example:reclaimEffect:smoke
自定义回收效果,可以是任何东西。替换回收时的默认效果
## reclaimEffectAtTarget
translation:回收目标效果
-
type:effect
+
type:effect(s) code name
+
example:reclaimEffectAtTarget:smoke
回收目标上产生的效果。
## reclaimEffectRate
translation:回收效果频率
type:float
+
example:reclaimEffectRate:8
回收效果每隔多少帧产生一次。
## rotate_with_direction
translation:随角度旋转
-
type:bool
+
type:boolean
+
example:rotate_with_direction:false
默认为true。设置为false时将单位图像锁定为0度。通常与animation_direction_ *一起用作多向视图。
## animation_direction_useMainTurret
translation:多向动画使用主炮塔
-
type:bool
+
type:boolean
+
example:animation_direction_useMainTurret:true
多向动画的执行将以单位主炮塔的角度为基准
## animation_direction_units
translation:多向动画度数
type:float
+
example:animation_direction_units:45
每隔多少度切换一次素材,比如填45代表8个方向,90个代表4个方向的动画。与rotate_with_direction一起使用。
## animation_direction_strideX
translation:多向动画x向
type:integer
+
example:animation_direction_strideX:0
动画帧取值在X方向改变时偏移。一般填0
## animation_direction_strideY
translation:多向动画y向
type:integer
+
example:animation_direction_strideY:1
动画帧在方向改变Y轴偏移偏移。与frame_height一起使用。一般填1
## animation_direction_starting
translation:多向动画朝向
type:float
+
example:animation_direction_starting:90
第一帧的方向,取决于您的素材。您要考虑转向后避免正负数交替现象,否则会导致素材朝向异常。
## disableLowHpFire
translation:禁用低生命冒火
-
type:bool
+
type:boolean
+
example:disableLowHpFire:true
禁用低生命值时冒火的视觉效果
## disableLowHpSmoke
translation:禁用低生命冒烟
-
type:bool
+
type:boolean
+
example:disableLowHpSmoke:true
禁用低生命值时冒烟的视觉效果
## showTransportBar
translation:显示运输条
-
type:bool
+
type:boolean
+
example:showTransportBar:false
填true时显示运输条,false禁用。默认为true.
## showHealthBar
translation:显示生命条
-
type:bool
+
type:boolean
+
example:showHealthBar:false
填true时显示生命条,false禁用。默认为true.
## showHealthBarChanges
translation:显示生命条变动
-
type:bool
+
type:boolean
+
example:showHealthBarChanges:false
填true时显示生命条的生命变动条(黄条)
## showEnergyBar
translation:显示能量条
-
type:bool
+
type:boolean
+
example:showEnergyBar:false
填true时显示能量条,false禁用。默认为true.
## showShieldBar
translation:显示护盾条
-
type:bool
+
type:boolean
+
example:showShieldBar:false
填true时显示护盾条,false禁用。默认为true.
## showQueueBar
translation:显示队列条
-
type:bool
+
type:boolean
+
example:showQueueBar:false
填true时显示操作、生成的队列条,false禁用。默认为true.
## showShotDelayBar
translation:显示开火后的冷却条
-
type:bool
+
type:boolean
+
example:showShotDelayBar:false
(默认为true) - 用于显示开火速度慢的炮塔的冷却指示条(译者注:原文calldown似乎有误,应为cooldown)
+## imageSmoothing
+translation:图像平滑
+
type:boolean
+
example:imageSmoothing:true
+
让图像变得平衡,这在可以避免一些情况产生的锯齿。(这影响渲染性能)
+## imageSmoothingWhenZoomedIn
+translation:在缩放时图像依然平滑
+
type:boolean
+
example:imageSmoothingWhenZoomedIn:true
+
同上
## animation_TYPE_[animationKey]
translation:动画_类型_[动画节代码]
-
type:special value
+
type:special
+
example:animation_moving_body_4s:{frame:1,scale:0.5}
大部分建议改用[animation]部分
diff --git a/rustedwarfareapicode/src/UnitNDT/leg.md b/rustedwarfareapicode/src/UnitNDT/leg.md
index c98d6f2..4e825a0 100644
--- a/rustedwarfareapicode/src/UnitNDT/leg.md
+++ b/rustedwarfareapicode/src/UnitNDT/leg.md
@@ -1,169 +1,211 @@
# leg/arm
## x
-translation:x
+translation:X坐标
type:float
+
example:x:15
设置脚在X轴上的位置。
## y
-translation:y
+translation:Y坐标
type:float
+
example:y:15
设置脚在Y轴上的位置。
## alpha
translation:不透明度
type:float
+
example:alpha:0.2
设置腿脚的透明度(建议0-1)
## copyFrom
translation:复制与
type:integer
+
example:copyFrom:1
从另一条腿复制。仅需设置一次腿部值时有用
## attach_x
translation:x轴链接位置
type:float
+
example:attach_x: -15
在X轴上设置腿部的附着点。
## attach_y
translation:Y轴链接位置
type:float
+
example:attach_y: 0
在Y轴上设置腿部的附着点。
## rotateSpeed
translation:旋转速度
type:float
+
example:rotateSpeed:30
设置脚旋转速度,非对称情况下很明显。
## endDirOffset
translation:末端角度偏移值
type:integer
+
example:endDirOffset:45
目标脚/末端相对于身体的旋转角度。
## lockMovement
translation:锁定运动
-
type:bool
+
type:boolean
+
example:lockMovement:true
禁止使用腿脚,将其锁定到主体。用于将行走单位转换为飞行单。
## heightSpeed
translation:高度速度
type:float
+
example:heightSpeed:2
移动时脚抬高速度和高度。
## moveSpeed
translation:移动速度
type:float
+
example:moveSpeed:3
腿脚移动速度。
## moveWarmUp
translation:移动延迟
type:float
+
example:moveWarmUp:15
腿脚移动延迟
## holdDisMin
translation:最小移动距离
type:float
+
example:holdDisMin:10
默认值为7。如果相邻的腿还没有重新移动,则至少移动此距离。
## holdDisMax
translation:最大移动距离
type:float
+
example:holdDisMax:40
默认值为16。如果已经移动超过此距离则强制重新放置腿。
## holdDisMin_maxMovingLegs
translation:最大移动腿数目
type:integer
+
example:holdDisMin_maxMovingLegs:4
最多移动腿数目
## hold_moveOnlyIfFurthest
translation:只在最远时保持移动
-
type:bool
+
type:boolean
+
example:hold_moveOnlyIfFurthest:true
保持移动仅在最远时候。
## holdDisMin_checkNeighbours
translation:最小移动距离检查相邻
-
type:bool
+
type:boolean
+
example:holdDisMin_checkNeighbours:true
移动最小距离时检查相邻的腿脚。
## hardLimit
translation:硬性限制
type:float
+
example:hardLimit:99
默认值为50。强制腿部不要走的超过此数值。最好不要用到。
## estimatingPositionMultiplier
translation:预测位置乘数
type:float
+
example:estimatingPositionMultiplier:1
默认值为1。根据单位速度预测单位可用的腿脚放置位置。
## hidden
translation:隐藏
-
type:LogicBoolean
+
type:Logicbooleanean
+
example:hidden:if self.isInWater()
隐藏
## image_end
translation:末端图像
-
type:image
+
type:file
+
example:image_end:爪子.png
末端图像,相当于脚。
## image_end_shadow
translation:末端图像阴影
-
type:image
+
type:file
+
example:image_end_shadow:SHADOW:爪子.png
末端图像阴影。
## image_end_teamColors
translation:末端图像队伍色
-
type:bool
+
type:boolean
+
example:image_end_teamColors:true
末端图像使用阵营色。
## image_foot
translation:脚图像
-
type:image
+
type:file
+
example:image_foot:爪子.png
脚图像,与image_end相同
## image_foot_shadow
translation:脚图像阴影
-
type:image
+
type:file
+
example:image_foot_shadow:SHADOW:爪子.png
脚图像阴影。
## image_middle
translation:中部图像
-
type:image
+
type:file
+
example:image_middle:腿.png
中部图像,相当于腿。
## image_leg
translation:腿图像
-
type:image
+
type:file
+
example:image_leg:腿.png
腿图像,与image_middle相同
## liftingHeightOffset
translation:离开高度偏移
type:float
+
example:liftingHeightOffset:1.2
离开时的脚的高度
## targetHeight
translation:目标高度
type:float
+
example:targetHeight:1.5
最终高度
## targetHeightRelative
translation:相对目标高度
type:float
+
example:targetHeightRelative:1.2
相对自身的最终高度
## image_middle_teamColors
translation:腿图像阵营色
-
type:bool
+
type:boolean
+
example:image_middle_teamColors:false
给腿也用上队伍色
## draw_foot_on_top
translation:绘制脚在顶层
-
type:bool
+
type:boolean
+
example:draw_foot_on_top:true
绘制脚在顶层。
## drawOverBody
translation:绘制主体之上
-
type:bool
+
type:boolean
+
example:drawOverBody:true
绘制在主体之上。
## drawUnderAllUnits
translation:绘制所有单位之下
-
type:bool
+
type:boolean
+
example:drawUnderAllUnits:true
绘制所有单位之下。
## drawDirOffset
translation:绘制角度偏移
type:float
+
example:drawDirOffset:45
绘制角度偏移。
## dust_effect
translation:灰尘效果
-
type:bool
+
type:boolean
+
example:dust_effect:true
脚落地时产生灰尘。
## spinRate
translation:自身自动旋转速度
type:float
+
example:spinRate:3
使手臂/腿脚一直旋转,像转塔的idleSpin。用处如直升机的螺旋桨。
## favourOppositeSideNeighbours
translation:偏向于临近一侧
-
type:bool
+
type:boolean
+
example:favourOppositeSideNeighbours:true
填true时,使得左右的腿脚拉开时间差,这样更好看。否则看起来顺拐。计算相邻的X比接近的Y查10倍时间。
## drawLegWhenZoomedOut
translation:缩小时绘制腿
-
type:bool
+
type:boolean
+
example:drawLegWhenZoomedOut:true
在缩小显示倍数(看到东西更多)后绘制腿。False时不绘制。为了提高绘制腿性能,默认值根据单位大小而变化。
## drawFootWhenZoomedOut
translation:缩小时绘制脚
-
type:bool
+
type:boolean
+
example:drawFootWhenZoomedOut:false
在缩小显示倍数(看到东西更多)后绘制脚。False时不绘制。为了提高绘制腿性能,默认值根据单位大小而变化。如果单独设置阴影则可能比较怪异。
## explodeOnDeath
translation:死亡时爆炸
-
type:bool
+
type:boolean
+
example:explodeOnDeath:false
单位死亡爆炸时腿脚跟着一起爆炸
## resetAngle
translation:复位角度
type:float
+
example:resetAngle:45
复位角度。
diff --git a/rustedwarfareapicode/src/UnitNDT/logic.md b/rustedwarfareapicode/src/UnitNDT/logic.md
index ecd328a..df4235d 100644
--- a/rustedwarfareapicode/src/UnitNDT/logic.md
+++ b/rustedwarfareapicode/src/UnitNDT/logic.md
@@ -1,330 +1,411 @@
# logic
## true
translation:是
-
type:boolean
+
type:booleanean
+
example:autoTrigger:true
满足/是/对/为真/1,不建议使用1或0,不是所有代码都支持。
## false
translation:非
-
type:boolean
+
type:booleanean
+
example:autoTrigger:false
不满足/非/错/假/0
## if
translation:如果
type:IfEvent
+
example:autoTrigger:if self.hp != 0
所有逻辑布尔值使用if开始,除非仅使用true/false
## and
translation:和
type:connect
+
example:if self.isInWater() and self.energy(greaterThan=1)
需要and两边条件都满足执行。
## or
translation:或者
type:connect
+
example:if self.energy(greaterThan=1) or self.ammo(greaterThan=1) and self.isFlying()
or两边条件满足一个即可执行。
## not
translation:非
type:connect
+
example:if not self.isOverLiquid()
将逻辑结果取反。
## self.isUnderwater()
translation:自身在水下
-
type:bool
+
type:boolean
+
example:if self.isUnderwater()
单位在水下,深水单位如潜艇。
## self.underwater()
translation:自身在水下
type:string
+
example:
同上
## self.gound()
translation:自身在地上
type:string
+
example:
单位在陆地上
## self.ground()
translation:自身在地上
type:string
+
example:
同上
## self.isAtGroundHeight()
translation:自身在地面高度
-
type:bool/float
+
type:boolean
+
example:if self.isAtGroundHeight()
单位在地面,触发范围是-1~4,如果您单位高度在不断变化时超过此值的话,此条不一定触发,因为铁锈执行频率默认是1s.
等同于self.gound()或self.ground()
## self.flying()
translation:自身在天上
type:string
+
example:
同下
## self.isFlying()
translation:自身在天上
-
type:bool
+
type:boolean
+
example:if self.isFlying()
如果单位在天上飞行,则执行。
## self.isMoving()
translation:自身在移动
-
type:bool
+
type:boolean
+
example:if self.isMoving()
如果自身在移动则执行。
## self.isAtTopSpeed()
translation:自身到最高速度
-
type:bool
+
type:boolean
+
example:if self.isAtTopSpeed()
如果到达最高速度则执行。等同self.maxspeed()
## self.isInWater()
translation:自身在水中
-
type:bool
+
type:boolean
+
example:if self.isInWater()
如果自身在水中则执行。等同于self.inwater()。
## self.inWater()
translation:自身在水中
-
type:bool
+
type:boolean
+
example:if self.inWater()
如果自身在水中则执行。等同于self.isinwater()。
## self.isOverwater()
translation:自身在水上
-
type:bool
+
type:boolean
+
example:if self.isOverwater()
如果自身投影在水面这种地形则执行。
## self.overWater()
translation:自身在水上
-
type:bool
+
type:boolean
+
example:if self.overWater()
同上
## self.isOverLiquid()
translation:自身在液体上
-
type:bool
+
type:boolean
+
example:if self.isOverLiquid()
如果自身在液体则执行。岩浆算为液体。
## self.isOverClift()
translation:自身在悬崖上
-
type:bool
+
type:boolean
+
example:if self.isOverClift()
如果自身在悬崖上则执行。等同self.isOverCliff()
## self.isOverPassableTile()
translation:自身在地块类型上
-
type:bool
+
type:boolean
+
example:if self.isOverPassableTile(type="WATER")
如果自身在这类通行地块上则执行,类型:无、陆地、建筑、空中、水面、两栖、跨悬崖、跨水和悬崖
NONE、LAND、BUILDING、AIR、WATER、HOVER、OVER_CLIFF、OVER_CLIFF_WATER
## self.isOverOpenLand()
translation:自身在开阔地带
-
type:bool
+
type:boolean
+
example:if self.isOverOpenLand()
如果自身在开阔地带则执行。self.isOverPassableTile(type ='LAND')的快捷方式
## self.height()
translation:自身高度
-
type:bool/float
+
type:boolean
+
example:if self.height(lessThan=50)
如果自身在特定高度则执行。参数:greaterThan,lessThan,equalTo,empty,full(参数,超过,少于,等于,空,满))
## self.hasResources()
translation:自身有资源
-
type:bool/resource ref
+
type:boolean
+
example:if self.hasResources(credits=5000)
可以检查多种资源(所有价格参数)
## self.resource()
translation:自身资源
-
type:bool/resource ref
+
type:boolean
+
example:if self.resource(type="NAMMO",greaterThan=35)
检查单个资源条件。(参数:greaterThan,lessThan,equalTo)参数,超过,少于,等于
## self.resource.RESOURCE_TYPE
translation:自身资源类型
-
type:bool/resource ref
+
type:boolean
+
example:addResourcesWithLogic: hp += self.resource.gold
此为快捷方式,可直接使用,原代码为self.resource(type='RESOURCE_TYPE')
## self.isResourceLargerThan()
translation:自身资源大于
-
type:bool/compare
+
type:boolean
+
example:if self.isResourceLargerThan(compareTarget=nearestUnit)
比较两个资源,注意,multiplyTargetBy不造成资源改变。(参数:来源,比较目标,超过,乘数 source=x, compareTarget=x, byMoreThan=x, multiplyTargetBy=x)
## self.maxHp()
translation:自身最大血量
-
type:bool/integer
+
type:boolean
+
example:if self.maxHp >= 10000
自身最大血量条件。
## self.hp()
translation:自身血量
-
type:bool/float
+
type:boolean
+
example:if self.hp(lessThan=100)
自身血量条件。参数:greaterThan,lessThan,equalTo,empty,full(超过,少于,等于,空,满)
## self.ammo()
translation:自身弹药
-
type:bool/integer
+
type:boolean
+
example:if self.ammo(lessThan=100)
自身弹药条件。参数:greaterThan,lessThan,equalTo,empty,full(参数,超过,少于,等于,空,满)
## self.maxShield()
translation:自身最大护盾
-
type:bool/integer
+
type:boolean
+
example:if self.maxShield >= 10000
自身最大护盾
## self.maxEnergy()
translation:自身最大能量
-
type:bool/integer
+
type:boolean
+
example:if self.maxEnergy >= 10000
自身最大能量
## self.isEnergyRecharging()
translation:自身正在充能
-
type:bool
+
type:boolean
+
example:if self.isEnergyRecharging()
自身正在充能
## self.isAmmoEmpty()
translation:自身弹药空
-
type:bool
+
type:boolean
+
example:if self.isAmmoEmpty()
自身弹药为空。self.ammo(empty=true)的快捷方式
## self.ammoIncludingQueued()
translation:自身弹药包括队列
-
type:bool/integer
+
type:boolean
+
example:if self.ammoIncludingQueued(lessThan=12)
自身弹药数量,包括还在队列中的。参数:greaterThan,lessThan,equalTo,empty,full(参数:大于,小于,等于,空,满)
## self.energy()
translation:自身能量
-
type:bool/float
+
type:boolean
+
example:if self.energy(empty=true)
自身能量数值。参数:greaterThan,lessThan,equalTo,empty,full(参数,超过,少于,等于,空,满)
## self.energyIncludingQueued()
translation:自身能量包括队列
-
type:bool/float
+
type:boolean
+
example:if self.energyIncludingQueued(lessThan=12)
自身能量数值,包括还在队列中的。(参数:greaterThan,lessThan,equalTo,empty,full)参数:大于,小于,等于,空,满
## self.isEnergyFull()
translation:自身能量满
-
type:bool
+
type:boolean
+
example:if self.isEnergyFull()
自身能量为满。self.energy(full=true)的快捷方式
## self.isEnergyEmpty()
translation:自身能量空
-
type:bool
+
type:boolean
+
example:if self.isEnergyEmpty()
自身能量为空。self.energy(empty=true)的快捷方式。
## self.shield()
translation:自身护盾
-
type:bool/float
+
type:boolean
+
example:if self.shield(greaterThan=233)
自身护盾数值。(参数:greaterThan,lessThan,equalTo,empty,full)参数:大于,小于,等于,空,满
## self.kills()
translation:自身杀敌数
-
type:bool/integer
+
type:boolean
+
example:if self.kills(greaterThan=99)
自身杀敌数量。(参数:greaterThan,lessThan,equalTo)(参数:大于,小于,等于)
## self.queueSize()
translation:自身队列量
-
type:bool/integer
+
type:boolean
+
example:if self.queueSize(greaterThan=2)
自身队列数量。(参数:greaterThan,lessThan,equalTo,empty,full,withActionTag)参数:大于,小于,等于,空,满,有行动标签
## self.id()
translation:自身id
-
type:bool/integer
+
type:boolean
+
example:if self.id == 1246
返回自身的单位id,每个单位的id都不一样,如果id小的死了,后面生成的单位就会占用那个id
## self.teamId()
translation:自身队伍id
-
type:bool/team id
+
type:boolean
+
example:if self.teamId == 1
返回单位或标记的团队 ID。 从0开始。
## self.playerName()
translation:玩家名称
-
type:bool/string
+
type:boolean
+
example:if self.playerName == "N.D.T."
返回游戏中玩家的昵称,类型为字符串
## self.teamName()
translation:队伍名称
-
type:bool/string
+
type:boolean
+
example:if self.teamName == "A"
返回自身队伍的名称,一般情况下,铁锈默认的都是ABCDEF
## self.x(), self.y(), self.z()
translation:自身坐标分量
-
type:bool/float
+
type:boolean
+
example:if self.x() == 0 and self.y() == 0 and self.z() == 0
返回单位的坐标分量
## self.dir()
translation:自身角度
-
type:bool/float
+
type:boolean
+
example:if self.dir() == 0
返回单位的方向
## self.priceCredits()
translation:自身资源价格
-
type:bool/integer
+
type:boolean
+
example:if self.priceCredits() <= 10000
返回单位的资源价格
## self.hasFlag()
translation:自身有标志
-
type:bool
+
type:boolean
+
example:if self.hasFlag(id=self.ammo)
自身拥有标志。可用通过增加资源和价格修改。(参数:id = 0-31/[logicNumber]),使用addResources在action中更改此vaule
## self.tags()
translation:自身有标签
-
type:bool
+
type:boolean
+
example:if not self.tags(includes='TAG_shiba')
自身拥有标签。等同self.hasTags()
## self.hasTags()
translation:自身有标签
-
type:bool
+
type:boolean
+
example:if not self.hasTags(includes='TAG_shiba')
自身拥有标签。等同self.tags()
## self.globalTeamTags()
translation:有全局标签
-
type:bool
+
type:boolean
+
example:if self.globalTeamTags(includes="GLBTAG_shiba")
有全局标签,(parameters: includes)参数:包括
## self.transportingCount()
translation:自身运输数量
-
type:bool/integer
+
type:boolean
+
example:if self.transportingCount(greaterThan=1)
载具运输单位数量(parameters: greaterThan, lessThan,equalTo,empty)(参数:大于,小于,等于,为空)
## self.numberOfAttachedUnits()
translation:自身子单位数量
-
type:bool
+
type:boolean
+
example:if self.numberOfAttachedUnits(withTag=ANM_cat',lessThan=1)
自身有子单位数量。(withTag,greaterThan,lessThan,equalTo)参数:标签,大于、小于、等于
## self.isAttacking()
translation:自身在攻击
-
type:bool
+
type:boolean
+
example:if self.isAttacking()
单位正在攻击。
## self.hasActiveWaypoint()
translation:自身有活动的路径点
-
type:bool
+
type:boolean
+
example:if self.hasActiveWaypoint(type='touchTarget')
单位当前活动的路径点为此类型。类型=路径点类型。([type = WAYPOINT_TYPE])
## self.transportingUnitWithTags()
translation:自身运输单位有标签
-
type:bool
+
type:boolean
+
example:if self.transportingUnitWithTags(includes='human')
自身运输单位有标签(parameters: includes)参数:包括
## self.isTransportUnloading()
translation:自身在卸载单位
-
type:bool
+
type:boolean
+
example:if self.isTransportUnloading()
卸载单位时
## self.hasParent()
translation:自身有父单位
-
type:bool
+
type:boolean
+
example:if self.hasParent()
用于子单位和载员逻辑。有父单位时执行。可选参数:需要标签。withTag ="unit"
## self.hasTakenDamage()
translation:受到伤害
-
type:bool
+
type:boolean
+
example:if self.hasTakenDamage(withinSeconds=1)
单位受到伤害。参数:几秒内,几秒后。(parameters:withinSeconds=X,laterThanSeconds=X)
## self.timeAlive()
translation:存活时间
-
type:bool/time(s)
+
type:boolean
+
example:if self.timeAlive(laterThanSeconds=10)
单位存活时间。参数:几秒内,几秒后。(parameters:withinSeconds=X,laterThanSeconds=X)
## self.lastConverted()
translation:最后转换时间
-
type:bool/time(s)
+
type:boolean
+
example:if self.lastConverted(laterThanSeconds=10)
单位最后转换时间。参数:几秒内,几秒后。(parameters:withinSeconds=X,laterThanSeconds=X)
## self.customTimer()
translation:自身自定义计时器
-
type:bool/time(s)
+
type:boolean
+
example:if self.customTimer(laterThanSeconds=99)
自身自定义计时器。参数:几秒内,几秒后。(parameters:withinSeconds=X,laterThanSeconds=X)
## self.isOnNeutralTeam()
translation:自身在中立队伍
-
type:bool
+
type:boolean
+
example:if self.isOnNeutralTeam()
自身在中立队伍。
## numberOfUnitsInTeam()
translation:队伍中此单位数量
-
type:bool/integer
+
type:boolean
+
example:if numberOfUnitsInTeam(withTag='techUnlockBuilding', greaterThan=0)
玩家自身拥有单位数量。(参数:withTag,greaterThan,lessThan,withinRange,incompleteBuildings,factoryQueue)
参数:标签,超过,少于,范围,建造中,队列中
## self.numberOfUnitsInAllyTeam()
translation:我方有单位数量
-
type:bool/integer
+
type:boolean
+
example:if self.numberOfUnitsInAllyTeam(withTag="cat",greaterThan=0,withinrange=99)
我方拥有此单位的数量。(参数:withTag,greaterThan,lessThan,withinRange,incompleteBuildings,factoryQueue)
## self.numberOfUnitsInAllyNotOwnTeam()
translation:盟友有单位数量
-
type:bool/integer
+
type:boolean
+
example:if self.numberOfUnitsInAllyNotOwnTeam(withTag="cat",greaterThan=0,withinrange=99)
盟友拥有此单位的数量。(参数:withTag,greaterThan,lessThan,withinRange,incompleteBuildings,factoryQueue)
## numberOfUnitsInEnemyTeam()
translation:敌人有单位数量
-
type:bool/integer
+
type:boolean
+
example:if numberOfUnitsInEnemyTeam(withTag="cat",greaterThan=0,withinrange=99)
敌人拥有此单位的数量。(参数:withTag,greaterThan,lessThan,withinRange,incompleteBuildings,factoryQueue)
## numberOfUnitsInNeutralTeam()
translation:中立有单位数量
-
type:bool/integer
+
type:boolean
+
example:if numberOfUnitsInNeutralTeam(withTag="cat",greaterThan=0,withinrange=99)
中立队伍拥有单位数量。(参数:withTag,greaterThan,lessThan,withinRange,incompleteBuildings,factoryQueue)
## numberOfUnitsInAggressiveTeam()
translation:敌对中立拥有单位数量
-
type:bool/integer
+
type:boolean
+
example:if numberOfUnitsInAggressiveTeam()
特殊的“对所有人都有侵略性”的队伍,这与numberOfUnitsInEnemyTeam不同.(参数:withTag, greaterThan, lessThan, withinRange, incompleteBuildings, factoryQueue
## numberOfUnitsInAllTeams()
translation:所有队伍拥有单位数量
-
type:bool/integer
+
type:boolean
+
example:if self.numberOfUnitsInAllTeams(withTag="tech")
所有队伍拥有单位数量。(参数:withTag,greaterThan,lessThan,withinRange,incompleteBuildings,factoryQueue)
## self.hasUnitInTeam()
translation:自身队伍有单位
-
type:bool
+
type:boolean
+
example:if self.hasUnitInTeam(withTag="tech")
自身队伍拥有单位数量。(参数:withTag,withinRange,incompleteBuildings,factoryQueue)numberOfUnitsInTeam的别名
## self.noUnitInTeam()
translation:自身队伍无单位
-
type:bool
+
type:boolean
+
example:if self.noUnitInTeam(withTag="tech")
自身队伍单位数量不满足。(参数:withTag,withinRange,incompleteBuildings,factoryQueue)numberOfUnitsInTeam的别名
## self.isInMap()
translation:自身在地图内
-
type:bool
+
type:boolean
+
example:if self.isInMap()
判断自身是否在地图内:地图外指那些黑色的边缘外面
## game.mapWidth()
translation:正在游戏的地图宽度
-
type:bool/float
+
type:boolean
+
example:if game.mapWidth() == 10000
检测正在游戏的地图宽度
## game.mapHeight()
translation:正在游戏的地图高度
-
type:bool/float
+
type:boolean
+
example:if game.mapHeight() == 10000
检测正在游戏的地图高度
## self.isReversing()
translation:自我正在反转
-
type:bool
+
type:boolean
+
example:if self.isReversing()
逻辑布尔值
## self.isControlledByAI()
translation:自身属于AI控制
-
type:bool
+
type:boolean
+
example:if self.isControlledByAI()
单位归属于AI所属方控制。
## self.readUnitMemory()
translation:读取单位内存
-
type:bool/memory type
+
type:boolean
+
example:if parent.readUnitMemory('boostTarget', type='unit') == self
(name:string, type:string{boolean,unit,float,string}, [default])
注:从1.15p11更新了数组后,更新三个数组的引用方式,以及数组条件判断
数组引用方式一:self.readUnitMemory('numArray', type='number', index=)
@@ -336,79 +417,98 @@ self.readUnitMemory('numArray', type='float[]').length()
self.readUnitMemory('numArray', type='float[]').contains(self.hp)
## self.eventData()
translation:事件数据
-
type:bool/message data type
+
type:boolean
+
example:if parent.eventData('boostTarget', type='unit' , default=nearestUnit) == self
与sendMessageWithData连用,从严格意义上来讲,这个key并不属于内存(name:string, type:string{boolean,unit,float,string}, [default])
## memory.NAME
translation:内存
-
type:bool/memory type
+
type:boolean
+
example:autoTrigger: if memory.experience > 100
使用当前defineUnitMemory以及@memory类型读取自身的快捷方式。 不能在其他单元上使用,为此使用 readUnitMemory。 不要调用自身。
## memory.NAME[]
translation:返回内存数组
-
type:bool/memory array type
+
type:boolean
+
example:autoTrigger: if memory.experience[1] > 100
使用当前defineUnitMemory以及@memory类型读取自身的快捷方式。 不能在其他单元上使用,为此使用 readUnitMemory。 不要调用自身。
## memory.MEMORY_NAME.size()
translation:数组内存大小
-
type:bool/integer
+
type:boolean
+
example:if memory.array.size() >= 1
对于类型是数组的内存使用,告诉你当前数组有几个不同的值
## memory.MEMORY_NAME.length()
translation:数组内存长度
-
type:bool/integer
+
type:boolean
+
example:if memory.array.length() >= 1
对于类型是数组的内存使用,告诉你当前数组有几个不同的值
## memory.MEMORY_NAME.get()
translation:数组内存获取
-
type:bool/index
+
type:boolean
+
example:if memory.array.get(1) == 1
括号里填logic或者integer,返回该索引所代表的值
## memory.MEMORY_NAME.contains()
-translation:数组内存目录监测
-
type:bool/logic
+translation:数组内存包含
+
type:boolean
+
example:if memory.array.contains(nearestUnit) == true
填与内存类型相应的值,也可以填logic,用于检测数组里面有没有该值,如果有则返回TRUE,否则返回FALSE
## self.numberOfQueuedWaypoints()
translation:自身某种路径点的队列数量
-
type:bool/integer
+
type:boolean
+
example:if self.numberOfQueuedWaypoints(type='move',full=true)
小括号里写路径点种类(parameters: greaterThan, lessThan,equalTo,empty,full)(参数:大于,小于,等于,为空,为满)
## self.speed()
translation:自身速度
-
type:bool/float
+
type:boolean
+
example:if self.speed() >= 0
Current unit speed(目前的单位速度)
## self.maxspeed()
translation:自身达到最大速度
-
type:bool
+
type:boolean
+
example:if self.maxspeed() == true
单位已经到达单位所能到达的最大速度
## self.isAtTopSpeed()
translation:自身到达最大速度
-
type:bool
+
type:boolean
+
example:if self.isAtTopSpeed()
单位已经到达单位所能到达的最大速度
## self.builtAmount()
translation:自身建造数量
-
type:bool/integer
+
type:boolean
+
example:if self.builtAmount() > 0
(似乎不包括使用autoTrigger建造的数量)How much this unit is built. 1 when complete. Note only events trigger on incomplete units, not autoTrigger(这个单位建造了多少。 1 完成后。仅注意不完整单位触发的事件,)
## self.completed()
translation:自身建造完成
-
type:bool/integer/bool
+
type:boolean
+
example:if self.completed()
(比如建造者造了一半的建筑就是0,建造完成就是1)Shortcut for checking built is(是检查已建成的快捷方式)
## self.maxMoveSpeed()
translation:自身最大移动速度
-
type:bool/float
+
type:boolean
+
example:if self.maxMoveSpeed() >= 0
自身最大移动速度
## self.teamDefeatedTech()
translation:队伍失败
-
type:bool
+
type:boolean
+
example:if self.teamDefeatedTech()
队伍失败
## self.teamWipedOut()
translation:队伍无单位
-
type:bool
+
type:boolean
+
example:if self.teamWipedOut()
(ps:都没单位了哪个单位检测队伍没单位?所以应该是只能由禁止受到攻击的单位(此单位不计入总数)来判断)
## self.numberOfConnections
translation:自身连接数
-
type:bool/integer
+
type:boolean
+
example:if self.numberOfConnections(name="XXX") >= 10
括号里填写行动名称
## self.teamVictory()
translation:队伍获胜
-
type:bool
+
type:boolean
+
example:if self.teamVictory()
队伍获胜
## thisActionTarget
translation:当前动作目标
type:unit / marker
+
example:setResourcesWithLogic:Res=(thisActionTarget.resource.credits)
当前目标或定位的位置。
• alsoTriggerAction: x (thisActionTarget==Same as original action(与原动作相同))
• [turret]onShoot_triggerActions: x (thisActionTarget==Target that was shot at(被击中的目标))
@@ -419,6 +519,7 @@ translation:当前动作目标
## eventSource
translation:事件来源
type:unit / marker
+
example:addResourcesWithLogic:Res=(eventSource.resource.credits)
来自 autoTriggerOnEvent 的当前触发器,否则为 null
autoTriggerOnEvent: tookDamage (thisActionTarget==Unit that caused damage(使单位受到伤害的单位))
autoTriggerOnEvent: killedAnyUnit (thisActionTarget==Unit that was killed(使单位击杀了任意一个其他单位的单位))
@@ -430,176 +531,221 @@ autoTriggerOnEvent: touchTargetSuccess (thisActionTarget==Target touched(是
## attachment
translation:附件
type:unit
+
example:setResourcesWithLogic:Res=(attachment(slot=0).resource.credits)
(参数:[slot(槽位)]、[withTag(带有标签)])
self.attachment(withTag='x').lastDamagedBy.getAsMarker()
## transporting
translation:运输
type:unit
+
example:addResourcesWithLogic:Res=(transporting(slot=0).resource.credits)
(参数:[slot])
if self.transporting(slot=0).hasResources(gold=100)
## attacking
translation:攻击
type:unit
+
example:setResourcesWithLogic:Res=(attacking.resource.credits)
当前正在攻击的目标,可能不是当前的路径点目标。
if attacking.tags(includes='bug') and attacking.hp < 20
## lastDamagedBy
translation:最后伤害源
type:unit
+
example:addResourcesWithLogic:Res=(lastDamagedBy.resource.credits)
最后一个攻击这个的单位。
## parent
translation:父单位
type:unit
+
example:setResourcesWithLogic:Res=(parent.resource.credits)
传输器或附件父级。 (注:单元在无连接槽位时运输时处于暂停状态)
Eg autoTrigger: if parent.energy > 100
## activeWaypointTarget
translation:活动路径点目标
type:unit
+
example:addResourcesWithLogic:Res=(activeWaypointTarget.resource.credits)
当前活动航路点目标。 包括攻击、运输、修理等。
if distanceBetween(self, activeWaypointTarget) < 100
## customTarget1
translation:自定义目标1
type:unit
+
example:setResourcesWithLogic:Res=(customTarget1.resource.credits)
自定义内存,默认为创建该单位的单位。
if parent.customTarget1 == self
## customTarget2
translation:自定义目标2
type:unit
+
example:addResourcesWithLogic:Res=(customTarget2.resource.credits)
自定义内存,默认为空
## nearestUnit
translation:距离自己最近的单位
type:unit
+
example:setResourcesWithLogic:Res=(nearestUnit.resource.credits)
(withinRange=500, withTag='x',relation='any',incompleteBuildings=true,withoutTag="xg") 搜索一个距离自己最近的单位(不推荐在 autoTrigger 中进行检查)
## globalSearchForFirstUnit
translation:全局检查第一个单位
type:unit
+
example:addResourcesWithLogic:Res=(globalSearchForFirstUnit.resource.credits)
(withTag=x,relation=any,incompleteBuildings=true) - 返回找到的与过滤器匹配的第一个(也是最旧的)单元。 慢,避免在 autoTrigger 检查中使用
## nullUnit
translation:空单位
-
type:compare value
+
type:null
+
example:if self.parent == nullUnit
返回一个空单位引用,用于比较
## null
translation:空
-
type:compare value
+
type:null
+
example:if self.parent == null
返回一个零值,可以用来检测单位引用为空
## getAsMarker()
translation:获取为标记
type:marker
+
example:if self.lastDamagedBy.getAsMarker() == nearestUnit()
在一个单位现在所在的位置创建一个临时标记。 标记的创建速度非常快,不再需要时会自动删除。 不链接到任何单位并且在单位死亡时仍然存在,并且在源移动时保持不变。
## getOffsetAbsolute()
translation:获取绝对偏移
type:marker
+
example:if lastDamagedBy.getOffsetAbsolute() == self
([x],[y],[height]) 返回具有绝对偏移量的标记(-y 是北,+x 是东)
## getOffsetRelative()
translation:获取相对偏移
type:marker
+
example:if lastDamagedBy.getOffsetRelative() == self
([x],[y],[height],[dirOffset]) 返回具有相对偏移量的标记。 (y+ 是向前)
self.getOffsetRelative(y=100).nearestUnit(withinRange=70, withTag='mouse') != null
## createMarker()
translation:创造记号
type:marker
+
example:if createMarker(x=1,y=1).nearestUnit == null
([x],[y],[height],[dir],[teamId]) 返回地图标记。 (y+是向下)
createMarker(teamId=self.teamId).nearestUnit(withinRange=70, withTag='mouse') != null
## distance(x1, y1, x2, y2)
translation:点距离
-
type:float
+
type:function
+
example:autoTrigger:if distance(self.x(),self.y(),memory.target.x(),memory.target.y()) < 400
计算两点之间的距离
## distanceSquared(x1, y1, x2, y2)
translation:点距离方差
-
type:float
+
type:function
+
example:autoTrigger:if distanceSquared(self.x(),self.y(),memory.target.x(),memory.target.y()) < 400
返回两点之距离差的平方。 比distance快,因为少了开方这一步。
## distanceBetween(unit1, unit2)
translation:单位距离
-
type:float
+
type:function
+
example:distanceBetween(self, activeWaypointTarget) < 100
返回两个单位之间的距离
## distanceBetweenSquared(unit1, unit2)
translation:单位距离方差
-
type:float
+
type:function
+
example:if distanceBetweenSquared(self, self.attacking) > 1000
返回两个单位之间的平方距离。 比 distanceBetween 快一点
## game.nukesEnabled()
translation:核武启用
-
type:bool
+
type:function
+
example:if game.nukesEnabled()
如果在此游戏的设置中启用了核武器,则返回 true。
## int([float])
translation:取整
-
type:float
+
type:functiom
+
example:if int(4.2) == 4
+price:${int(a)}(这里我们假设a是1.4,则该值返回1)
从数字中删除小数位。(可以在${x}中使用)
## select(LogicBoolean, logicA, logicB)
translation:选择
-
type:condition string
+
type:function
+
example:if select(self.isMoving,5,-5) == 5
如果布尔值为真则返回 textA 否则返回 textB
## debug(LogicBoolean)
translation:调试
-
type:logic
+
type:function
+
example:if str(debug(self.hp)) == "Hp=2400"
返回一个文本,显示该单位有关于这个逻辑的数据
## debugPassthrough(LogicBoolean)
translation:调试通行
-
type:logic / message
+
type:function
+
example:if str(debugPassthrough(self.hp)) == "2400"
显示这个逻辑在该单位上的值,并在调试模式中发送单位本身关于这个逻辑的调试消息,请打开调试模式选中单位后查看
## str(x)
translation:转为字符串
-
type:string
+
type:function
+
example:if str(self.energy)+'x' == '100x'
将数字、单位、布尔值、逻辑显示值等转换为字符串
## substring(string,logicNumber(start),logicNumber(end))
translation:子字符串
-
type:string
+
type:function
+
example:if substring('hello',0,2) == 'he'
提取指定字符串长度内的字符串,例如 substring('hello',0,2) == 'he'
## length(string)
translation:字符串长度
-
type:integer
+
type:function
+
example:if length("string") == 6
以数字形式返回字符串或者值类型是字符串的逻辑长度
## squareRoot(num)
translation:开方
-
type:float
+
type:function
+
example:if squareRoot(4) == 2
返回一个数的平方根
## sqrt(num)
translation:开方
-
type:float
+
type:function
+
example:price:${sqrt(a)}(这里我们假设a是4,则该值返回2)
返回一个数的平方根(只能在${x}中使用)
## min(num1, min2)
translation:最小值
-
type:float
+
type:function
+
example:damage = min(self.hp, self.energy)
返回最小的数字
## max(num1, min2)
translation:最大值
-
type:float
+
type:function
+
example:max(5, 10) == 10
返回最大的数字
## cos([float])
translation:算余弦
-
type:float
+
type:functiom
+
example:if cos(60) == 0.5
+price:${cos(a)}(这里我们假设a是0,则该值返回1)
返回填入的值的余弦(可以在${x}中使用)
## sin([float])
translation:算正弦
-
type:float
+
type:functiom
+
example:if sin(30) == 0.5
+price:${sin(a)}(这里我们假设a是0,则该值返回0)
返回填入的值的正弦(可以在${x}中使用)
## thisActionIndex/index
translation:行动索引/索引
-
type:integer
+
type:function
+
example:if index/thisActionIndex == 1
由alsoTriggerActionRepeat和alsoTriggerAction连用来改变该logic的值(通俗点来讲,就是被also触发的顺序位)
## uppercase(string)
translation:字符大写
-
type:string
+
type:function
+
example:if uppercase("abc") == "ABC"
给字符串中的所有小写字母进行大写处理
## lowercase(string)
translation:字符小写
-
type:string
+
type:function
+
example:if lowercase("ABC") == "abc"
给字符串中的所有大写字母进行小写处理
## direction(x1,y1,x2,y2)
translation:点朝向
-
type:float
+
type:function
+
example:if direction(1,1,10,10) == 45
给出两个点之间的直线相对于前者的点朝向的角度
## directionBetween(unit1,unit2)
translation:单位朝向
-
type:float
+
type:function
+
example:if directionBetween(self,self.customTarget1) == 90
给出两个单位参考之间的直线相对于前者单位朝向的角度
## true()
translation:真()
-
type:true
+
type:function
+
example:if true() and true() == true
if语句里套一个true()......
## false()
translation:假()
-
type:false
+
type:function
+
example:if false() and true() == false
if语句里套一个false()......
## rnd(min[float],max[float])
translation:范围内随机取数
-
type:random float
+
type:function
+
example:if rnd(1,100) == 50
可能会是浮点值,可以使用int()取整数部分
diff --git a/rustedwarfareapicode/src/UnitNDT/mod.md b/rustedwarfareapicode/src/UnitNDT/mod.md
index 9f226ee..96c608b 100644
--- a/rustedwarfareapicode/src/UnitNDT/mod.md
+++ b/rustedwarfareapicode/src/UnitNDT/mod.md
@@ -2,20 +2,25 @@
## title
translation:标题
type:string
+
example:title:模组名称
模组标题,会显示到加载页面里面,代表模组的名称
## description
translation:描述
type:string
+
example:description:模组描述
对于的模组描述
## tags
translation:标签
-
type:tag(s)
-
模组标签,方便和其他模组进行区分
+
type:string(s)
+
example:tags:模组,自制,肉鸽(?)
+
模组标签,方便和其他模组进行区分(给steam用的)
## minVersion
translation:最低版本
-
type:version
-
告诉你该模组支持的最低版本,decal为1.15p9,数组为1.15p11,但凡这两个没有在minVersion后面写上相应版本,一定会爆错
+
type:string
+
example:minVersion:v1.15
+
告诉你该模组支持的最低版本,decal为1.15p9,数组为1.15p11,但凡这两个没有在minVersion后面写上相应版本,一定会报错
## thumbnail
translation:略图
-
type:image
+
type:file
+
example:thumbnail:xxx.png
模组略图,在游戏里不会显示,因为这个是给steam用的
diff --git a/rustedwarfareapicode/src/UnitNDT/movement.md b/rustedwarfareapicode/src/UnitNDT/movement.md
index e0599ad..6c66cf8 100644
--- a/rustedwarfareapicode/src/UnitNDT/movement.md
+++ b/rustedwarfareapicode/src/UnitNDT/movement.md
@@ -1,90 +1,112 @@
# movement
## movementType
translation:运动类型
-
type:string
+
type:enum
+
example:movementType: LAND
定义单位将能够通过的地形以及与单位类型相关的其他属性。类型:无、陆地、建筑、空中、水面、两栖、跨悬崖、跨水和悬崖
NONE、LAND、BUILDING、AIR、WATER、HOVER、OVER_CLIFF、OVER_CLIFF_WATER
## moveSpeed
translation:移动速度
type:float
+
example:moveSpeed: 1.2
单位的最大移动速度。
## moveAccelerationSpeed
translation:加速度
type:float
+
example:moveAccelerationSpeed: 0.07
定义单位加速到最大速度的加速度。
## moveDecelerationSpeed
translation:减速度
type:float
+
example:moveDecelerationSpeed: 0.17
与加速度相对应得减速度。不要设的太小。
## reverseSpeedPercentage
translation:倒车速度比率
type:float
+
example:reverseSpeedPercentage: 0
0.6默认值。超过0.4会在短距离(以40%的速度)时反转。 如果设置为1前进后退则不转弯。 填0时禁止倒退,必须旋转。
## landOnGround
translation:降落到地面
-
type:bool/onlyIdle
+
type:boolean/enum
+
example:landOnGround: false
闲置时使飞行器降落。可以填true/flase/onlyIdle
## targetHeight
translation:到达高度
type:float
+
example:targetHeight: 25
默认为0,但如果运动类型为空军则默认为35。
## targetHeightDrift
translation:高度浮动
type:float
+
example:targetHeightDrift: 1
默认0,空军1.5.单位高度上下浮动高度。
## startingHeightOffset
translation:创建时高度偏移
type:float
+
example:startingHeightOffset:100
单位在创建时高度。负数上升比较慢。
## maxTurnSpeed
translation:转弯速度
type:float
+
example:maxTurnSpeed:3
最大转弯速度。
## turnAcceleration
translation:转弯加速度
type:float
+
example:turnAcceleration:1
转弯加速度。
## moveSlidingMode
translation:移动后滑动
-
type:bool
+
type:boolean
+
example:moveSlidingMode:true
移动后滑动,相当于惯性。和单位的速度,加速度,转弯速度有关。True时受推力影响
## moveIgnoringBody
translation:移动忽略转向
-
type:bool
+
type:boolean
+
example:moveIgnoringBody:true
true效果即不必转弯便能运动,false效果即原地转弯完成才能运动
## moveSlidingDir
translation:移动滑动角度
type:integer
+
example:moveSlidingDir:100
移动滑动角度。无明显效果。
## joinsGroupFormations
translation:加入队形
-
type:bool
+
type:boolean
+
example:joinsGroupFormations:false
将单位组成小队。铁锈调集大量部队时将其组成方阵以降低运算压力,但队形可能影响速度或浪费时间。禁用后则不参与组队。
## ignoreMoveOrders
translation:忽略移动指令
-
type:bool
+
type:boolean
+
example:ignoreMoveOrders:true
忽略移动指令,此代码强制要求移动速度为0,适用例子:红警中单位部署忽略移动指令。
## moveYAxisScaling
translation:Y轴速度比例
type:float
+
example:moveYAxisScaling:15.1
垂直方向单位移动速度乘数,适用于2.5D,也就是用铁锈模拟3D。典型如红警。
## slowDeathFall
translation:死亡缓慢降落
-
type:bool
+
type:boolean
+
example:slowDeathFall: true
为"true"时,被击毁时降落速度减慢,并且向前滑行一段距离。注意,必须设置死亡图像,不然坠落后会显示生前图像,而不是直接炸掉。
## slowDeathFallSmoke
translation:死亡降落烟
-
type:bool
+
type:boolean
+
example:slowDeathFallSmoke: true
在死亡坠落的时候添加烟作为尾迹
## heightChangeRate
translation:高度改变速率
type:float
+
example:heightChangeRate: 3
单位改变高度的频率,无论是转换还是浮动
## fallingAcceleration
translation:降落加速度
type:float
+
example:fallingAcceleration:1
单位降落时的加速度
## fallingAccelerationDead
translation:坠毁加速度
type:float
+
example:fallingAccelerationDead:1
单位被摧毁时降落的加速度
diff --git a/rustedwarfareapicode/src/UnitNDT/music.md b/rustedwarfareapicode/src/UnitNDT/music.md
index 626fa38..9f9ad19 100644
--- a/rustedwarfareapicode/src/UnitNDT/music.md
+++ b/rustedwarfareapicode/src/UnitNDT/music.md
@@ -1,9 +1,16 @@
# music
## sourceFolder
translation:源文件夹
-
type:floder path
+
type:path
+
example:sourceFolder:music/background\
填文件夹路径,游戏将会播放此文件夹内的音乐(仅支持.ogg或.wav)
## whenUsingUnitsFromThisMod_playExclusively
translation:当使用本模组时强制播放
-
type:bool
-
使用该代码,游戏将仅播放这个文件夹内的音乐
+
type:boolean
+
example:whenUsingUnitsFromThisMod_playExclusively:true
+
使用该代码,游戏将仅播放这个文件夹内的ogg音频(手机端只要是音频就能播放)
+## addToNormalPlaylist
+translation:将音乐添加至默认播放列表
+
type:boolean
+
example:addToNormalPlaylist:true
+
使用该代码,游戏的音乐播放列表将添加所填的目录下的ogg音频(手机端只要是音频就能播放)
diff --git a/rustedwarfareapicode/src/UnitNDT/placementRule.md b/rustedwarfareapicode/src/UnitNDT/placementRule.md
index 40b7747..8aee20f 100644
--- a/rustedwarfareapicode/src/UnitNDT/placementRule.md
+++ b/rustedwarfareapicode/src/UnitNDT/placementRule.md
@@ -2,60 +2,75 @@
## anyRuleInGroup
translation:放置规则组
type:string
+
example:anyRuleInGroup:DogFoodPlace
放置规则组名。(仅需要通过此组规则中的1条,而不是全部通过。在其他放置规则中可使用相同的组名称来创建组。)
## searchTags
translation:检索标签
-
type:tag list
+
type:string(s)
+
example:searchTags:redFox
搜索至少包含这些标签之一的任何单位
## searchTeam
translation:检索队伍
-
type:relation
+
type:enum
+
example:searchTeam:own
要搜索的团队可以是:自身|中立|盟友非自身|盟友|敌人|任何。 own|neutral|allyNotOwn|ally|enemy|any
## searchOffsetX
translation:检索偏移
type:float
+
example:searchOffsetX:0
检索偏移,默认为0
## searchOffsetY
translation:检索偏移
type:float
+
example:searchOffsetY:0
检索偏移,默认为0
## searchDistance
translation:搜索距离
type:float
+
example:searchDistance:99
搜索距离
## excludeIncompleteBuildings
translation:排除不完整建筑
-
type:bool
+
type:boolean
+
example:excludeIncompleteBuildings:true
排除不完整的建筑
## excludeNonBuildings
translation:排除非建筑
-
type:bool
+
type:boolean
+
example:excludeNonBuildings:true
排除非建筑
## minCount
translation:最小数量
type:integer
+
example:minCount:1
设定需要在搜索中找到的单位的最小数量。(如需要靠近某物)。默认值为0
## maxCount
translation:最大数量
type:integer
+
example:maxCount:1
在匹配失败前设置最大单位数量(例如不能接近某个值)。默认为无限的
## blocksPlacement
translation:禁止放置
-
type:bool
-
禁止放置。默认为true。
+
type:boolean
+
example:blocksPlacement:true
+
锁定放置。默认为true。
## cannotPlaceMessage
translation:失败信息
-
type:LocaleString
+
type:string
+
example:cannotPlaceMessage:您不能睡觉,因为附近有chemms在游荡~
如果此放置规则失败,则会向玩家显示消息(将成为mergedRuleGroup中的第一个失败规则)
## cannotPlaceMessage_[Language]
translation:失败信息(多语言)
-
type:LocaleString
+
type:string
+
example:cannotPlaceMessage_zh:您不能睡觉,因为附近有chemms在游荡~
如果此放置规则失败,则会向玩家显示消息(将成为mergedRuleGroup中的第一个失败规则)(支持多种语言显示)
## checkEachTile
translation:检查每个地块
-
type:bool
+
type:boolean
+
example:checkEachTile:true
[true / false]默认为true(仅对测试单元中心设置为false,true会检查显示在放置网格上的单元下方的每个图块)
## aiSuggestionOnly
translation:仅限ai建议
-
type:bool
+
type:boolean
+
example:aiSuggestionOnly:true
不能与blocksPlacement一起使用,仅仅只是建议AI这么做
diff --git a/rustedwarfareapicode/src/UnitNDT/projectile.md b/rustedwarfareapicode/src/UnitNDT/projectile.md
index 21bdc44..88a9e9c 100644
--- a/rustedwarfareapicode/src/UnitNDT/projectile.md
+++ b/rustedwarfareapicode/src/UnitNDT/projectile.md
@@ -2,437 +2,547 @@
## life
translation:存在时间
type:integer
+
example:life:120
开火后抛射体在没命中时的存活时间,单位为帧。60为1s。多少合适取决于速度与射程。
## delayedStartTimer
translation:延迟时间
type:time
+
example:delayedStartTimer:15
抛射体发射延迟时间。
## interceptProjectile_removeTargetLifeOnly
translation:拦截抛射体移除目标存活时间
-
type:bool
+
type:boolean
+
example:interceptProjectile_removeTargetLifeOnly:false
默认值为false,当为false时射抛射体移除。true时使被击中的抛射体爆炸或分裂。用于设定命中抛射体时是否执行分裂逻辑。
## deflectionPower
translation:激光拦截耗能
type:float
+
example:deflectionPower:-1
默认值为1。此抛射体被激光防御摧毁所需的能量。 -1为禁止拦截。(对特殊武器如火焰)
## explodeOnEndOfLife
translation:寿终爆炸
-
type:bool
+
type:boolean
+
example:explodeOnEndOfLife:true
默认为false。True则会在寿命终结时爆炸,并产生其命中时该有的效果。而不是直接消失。
## autoTargetingOnDeadTarget
translation:自动切换目标
-
type:bool
+
type:boolean
+
example:autoTargetingOnDeadTarget:true
如果目标死亡则自动切换单位。填true时如果有代码"targetGround:true"抛射体将会追踪距离它最近的单位。如果没有"targetGround"时将会在单位死亡后再改变目标。
## autoTargetingOnDeadTargetRange
translation:自动切换目标检索范围
type:float
+
example:autoTargetingOnDeadTargetRange:45
当旧目标死亡时选择新目标的范围
## autoTargetingOnDeadTargetLead
translation:自动切换目标预判
type:float
+
example:autoTargetingOnDeadTargetLead:1
尝试新的目标时的预判
## unloadUpToXUnitsFromSource
translation:卸载单位至命中地
type:integer
+
example:unloadUpToXUnitsFromSource:1
将指定个数单位卸载到抛射体爆炸位置。
## teleportSource
translation:传送
-
type:bool
+
type:boolean
+
example:teleportSource:true
将单位移动到抛射体爆炸的位置,用于传送自身。
## spawnUnit
translation:产生单位
-
type:units
+
type:unit name(s)
+
example:spawnUnit:heavyTank,tank*5,hoverTank(offsetX=10)
在抛射体丸爆炸位置产生这种单位
## convertHitToSourceTeam
translation:命中时更改所属
-
type:bool
+
type:boolean
+
example:convertHitToSourceTeam:true
将更改被命中的单位转换队伍为自身所属。
## tags
translation:标签
-
type:tags
+
type:string(s)
+
example:tags:nuke
用于抛射体拦截功能。
## flameWeapon
translation:火焰武器
-
type:bool
+
type:boolean
+
example:flameWeapon:true
命中时产生小火焰(仅用于装饰)
## spawnProjectilesOnEndOfLife
translation:在寿命结束时生成抛射体
-
type:projectile ref
+
type:projectile(s) code name
+
example:spawnProjectilesOnEndOfLife:torpedo_split(offsetDir=90),torpedo_split(offsetDir=-90)
填抛射体名。在寿命(life)结束时生成抛射体。生成抛射体逻辑具体参数参考后面生成抛射体大项。这简化了过去许多需要多炮塔(如贯穿攻击)或是生成辅助单位才能实现的操作。
## spawnProjectilesOnExplode
translation:在爆炸时生成抛射体
-
type:projectile ref
+
type:projectile(s) code name
+
example:spawnProjectilesOnExplode:shiba(offsetDir=60,recursionLimit=6)
填抛射体名。只在爆炸时生成抛射体,如果耗光life则不会生成。
## spawnProjectilesOnCreate
translation:在创建时生成抛射体
-
type:projectile ref
+
type:projectile(s) code name
+
example:spawnProjectilesOnCreate:1.5,2,3,4,5
填抛射体名。抛射体创建时生成抛射体。
## directDamage
translation:直接伤害
type:integer
+
example:directDamage:999
击中对目标单位造成伤害。不适用于targetGround:true。
## areaDamage
translation:范围伤害
type:integer
+
example:areaDamage:99
范围伤害值,此区域内敌方单位都将受到损伤,默认向边缘递减。
## areaRadius
translation:范围半径
type:float
+
example:areaRadius:99
范围伤害区域大小,此区域内敌方单位都将受到损伤,默认向边缘递减。数值类型为像素,大小算法为半径,铁锈内地块一格长为20像素。
## areaDamageNoFalloff
translation:范围伤害不衰减
-
type:bool
+
type:boolean
+
example:areaDamageNoFalloff:true
默认false.为true时范围伤害不再向边缘递减。
## areaRadiusFromEdge
translation:范围伤害从边缘计算
-
type:bool
+
type:boolean
+
example:areaRadiusFromEdge:true
范围伤害将从单位的边缘计算,而不是默认的中心计算。主要用于攻击大型单位。
## areaExpandTime
translation:范围扩展时间
type:float
+
example:areaExpandTime:15
将区域伤害变为爆炸波向边缘扩散。效果如核抛射体。
## areaHitAirAndLandAtSameTime
translation:范围武器同时攻击空中和地面
-
type:bool
+
type:boolean
+
example:areaHitAirAndLandAtSameTime:true
范围武器将同时打击空中和地面。
## areaHitUnderwaterAlways
translation:范围武器可攻击深海
-
type:bool
+
type:boolean
+
example:areaHitUnderwaterAlways:true
范围武器将可以打击深海单位如潜艇。
## areaIgnoreUnitsCloserThan
translation:范围伤害忽略区域
type:integer
+
example:areaIgnoreUnitsCloserThan:20
小于此范围的单位不会受到攻击影响。需要比areaRadius小,否则造不成伤害。
## buildingDamageMultiplier
translation:建筑伤害乘数
type:float
+
example:buildingDamageMultiplier:0.5
默认为1。对建筑物伤害乘上此数值,用于伤害修正。比如闪电对建筑物伤害低,火焰对建筑物伤害高。
## shieldDamageMultiplier
translation:护盾伤害乘数
type:float
+
example:shieldDamageMultiplier:2
默认为1。对护盾伤害乘数。如0对护盾不造成伤害,2对护盾造成双倍伤害
## shieldDefectionMultiplier
translation:护盾阻挡乘数
type:float
+
example:shieldDefectionMultiplier:0
护盾阻挡乘数,填0则可无视护盾,同时对单位和盾造成伤害。
在此代码所填的值为负数时,公式如下:默认伤害+对盾造成的伤害*护盾阻挡乘数的相反数=实际伤害
## hullDamageMultiplier
translation:护盾损伤乘数
type:float
+
example:hullDamageMultiplier:0
可以用来制造只影响护盾的电磁脉冲武器。0忽略单位,只伤害护盾
## ignoreParentShootDamageMultiplier
translation:忽略父单位射击伤害乘数
-
type:bool
+
type:boolean
+
example:ignoreParentShootDamageMultiplier:true
忽略父单位射击伤害乘数
## armourIgnoreAmount
translation:无视装甲数量
type:integer
+
example:armourIgnoreAmount:10
无视目标装甲数量并造成伤害。
## friendlyFire
translation:友伤
-
type:bool/string
+
type:boolean/enum
+
example:friendlyFire: false/true/only-ignoreEnemy
范围武器有友伤,可以伤害自己单位。铁锈限制不能对盟友有伤害。负数友伤可以用于范围维修,如果修盟友则需要用中立单位实现。参数(false,true,only-ignoreEnemy)(假,真,忽略敌人的友伤)
## mutatorX_ifUnitWithTags
translation:修正需要标签
-
type:float
+
type:string(s)
+
example:mutator??????_ifUnitWithTags: AAA
伤害修正所需标签,仅对携带标签单位有效。否则为原始伤害。
## mutatorX_ifUnitWithoutTags
translation:修正除此标签
-
type:float
+
type:string(s)
+
example:mutator114514_ifUnitWithoutTags: strongArmour
伤害修正除此标签外有效。
## mutatorX_directDamageMultiplier
translation:修正直接伤害
type:float
+
example:mutatorABC_directDamageMultiplier:2
伤害修正,直接伤害(directDamage)乘数。比如直接伤害100,这里填2,对目标就造成200伤害。
## mutatorX_areaDamageMultiplier
translation:修正范围伤害
type:float
+
example:mutator解_areaDamageMultiplier:0.5
伤害修正,范围伤害(areaDamage)乘数。比如直接伤害100,这里填2,对目标就造成200伤害。
## mutatorX_changedExplodeEffect
translation:修正命中效果
-
type:effect
+
type:effect(s) code name
+
example:mutator疑_changedExplodeEffect:custom:small
如果此修正处于有效状态,则更改爆炸效果。
## mutatorX_addResourcesDirectHit
translation:修正直接添加资源
-
type:resource
+
type:(global) resource(s) code name
+
example:mutator一个_addResourcesDirectHit:shibaMove=1
伤害修正,用于直接伤害(directDamage),给目标添加指定资源。用途如给目标资源后,目标检测自身资源然后禁止移动。
## mutatorX_addResourcesAreaHit
translation:修正区域添加资源
-
type:resource
+
type:(global) resource(s) code name
+
example:mutator时_addResourcesAreaHit:shibaMove=1
伤害修正,用于范围伤害(areaDamage),给目标添加指定资源。
## targetGround
translation:目标为地面
-
type:bool
+
type:boolean
+
example:targetGround:true
抛射体瞄准并攻击目标所在的地面,而不是追踪目标。直接伤害(directDamage)将会失效,需要使用areaDamage和areaRadius。
## targetGroundSpread
translation:目标为地面散布
type:float
+
example:targetGroundSpread:15
填数值,用于目标为地面时随机造成偏差效果
## targetGround_includeTargetHeight
-translation:目标为地面包括目标高度
-
type:bool
-
区域影响AA武器
+translation:目标为地面包括空中目标
+
type:boolean
+
example:targetGround_includeTargetHeight:true
+
targetGround_includeTargetHeight:true的时候可以让targetGround:true的抛射体在瞄准空中单位后在空中爆炸
## targetGroundHeightOffset
translation:目标为地面高度偏移
type:float
+
example:targetGroundHeightOffset:10
在目标上方或下方射击。可能对分裂和落下的抛射体有用。
## speed
translation:速度
type:float
+
example:speed:2
抛射体飞行速度,单位是每帧飞行像素。铁锈地块1格20像素,填1则每秒飞行3格。
## targetSpeed
translation:到达速度
type:float
+
example:targetSpeed:8
加速到这个速度
## targetSpeedAcceleration
translation:加速度
type:float
+
example:targetSpeedAcceleration:1
加速度,控制targetSpeed的速度提升
## ballistic
translation:弹道
-
type:bool
+
type:boolean
+
example:ballistic:true
弹道导抛射体效果,使抛射体先飞向空中并向下飞,而不是走直线。
## ballistic_delaymove_height
translation:弹道垂直飞行高度
type:float
+
example:ballistic_delaymove_height:1
弹道导抛射体发射初期效果,决定弹道一开始先升高多少,再斜向爬升到最高过度。
## ballistic_height
translation:弹道高度
type:float
+
example:ballistic_height:15
弹道最终高度。
## speedSpread
translation:速度散布
type:float
+
example:speedSpread:1
随机改变抛射体初始速度
## instant
translation:瞬间命中
-
type:bool
+
type:boolean
+
example:instant:true
开火时立即击中目标,用于激光、闪电、波束。
## instantReuseLast
translation:瞬间命中回收最后抛射体
-
type:bool
+
type:boolean
+
example:instantReuseLast:true
用于激光和闪电。激光或闪电命中后还会存在一段时间,当此抛射体命中后,清除上一个抛射体效果。使得只有一个抛射体存在。如使用高频射速变成光束武器,而不是瞎眼叠加。
## instantReuseLast_alsoChangeTurretAim
translation:命中回收抛射体且改变瞄准
-
type:bool
+
type:boolean
+
example:instantReuseLast_alsoChangeTurretAim:true
使炮塔瞄准受到命中目标扫描效果的影响,对光束武器有用
## instantReuseLast_keepAreaDamageList
translation:命中回收抛射体区域伤害列表
-
type:bool
+
type:boolean
+
example:instantReuseLast_keepAreaDamageList:false
瞬间命中并回收最后的抛射体并且保持区域伤害列表,默认false,保持列表是1.13的正常行为,造成区域伤害不会第二次生效,但不是很有用。只有当您想要旧的行为时才使用这个。
## disableLeadTargeting
translation:禁用预判
-
type:bool
+
type:boolean
+
example:disableLeadTargeting:true
瞄准移动目标时,禁用预判计算。默认为false。
## leadTargetingSpeedCalculation
translation:预判计算
type:float
+
example:leadTargetingSpeedCalculation:0.5
用于使用targetGround时预判计算。目标计算的预期速度。默认为“targetSpeed”。如果设置则基于speed.
## initialUnguidedSpeedHeight
translation:初始非制导垂直速度
type:float
+
example:initialUnguidedSpeedHeight:1
设置抛射体和地面间的垂直速度,利用gravity制造出平滑的抛物线。比较迷,填1左右,重力可以不填。
## initialUnguidedSpeedX
translation:初始非相对制导速度X
type:float
+
example:initialUnguidedSpeedX:3
让抛射体以弧线形式移动,负数向左,正数向右。
## initialUnguidedSpeedY
translation:初始非相对制导速度Y
type:float
+
example:initialUnguidedSpeedY:3
修改抛射体的高度,正数向下,负数向上。
## gravity
translation:重力
type:float
+
example:gravity:0.5
控制地面的抛射体丸的拉力。与initialUnguidedSpeedHeight一起使用。
## trueGravity
translation:绝对向重力
type:float
+
example:trueGravity:0.5
抛射体在靠近单位时因为有该key会低空飞行一段距离,但注意不要填的太大,否则会直接往屏幕下方飞走。
## turnSpeed
translation:转弯速度
type:float
+
example:turnSpeed:2
限制抛射体的转弯速度,更好的做出弹道效果。
## turnSpeedWhenNear
translation:靠近时转弯速度
type:float
+
example:turnSpeedWhenNear:1.25
+
用于当射抛射体非常接近目标时,默认禁用转弯速度以使其能够命中。
## wobbleAmplitude
translation:摆动幅度
type:float
+
example:wobbleAmplitude:0.2
抛射体飞行中摆动的剧烈程度。
## wobbleFrequency
translation:摆动频率
type:float
+
example:wobbleFrequency:0.8
抛射体飞行中摆动的频率。
## pushForce
translation:推动力量
type:float
+
example:pushForce:2
抛射体丸所携带的“重量”,质量越大,推力越大。推动(或以负值拉动)被击中的单位。除以目标质量
## pushVelocity
translation:推进速度
type:float
+
example:pushVelocity:2
抛射体爆炸后可用推动单位,推力相对于方向的速度,推动(或以负值拉动)被击中的单位。忽略目标质量
## moveWithParent
translation:随父物体移动
-
type:bool
+
type:boolean
+
example:moveWithParent:true
当父单位移动时也移动抛射体。对光束效果武器很有用。
## sweepOffset
translation:扫描偏移
type:float
+
example:sweepOffset:10
扫描偏移,用于制作类似于两栖护盾坦克的激光武器。对光束效果很有用。
## sweepSpeed
translation:扫描速度
type:float
+
example:sweepSpeed:10
扫描速度,用于制作类似于两栖护盾坦克的激光武器。对光束效果很有用。
## sweepOffsetFromTargetRadius
translation:扫描偏移目标半径
type:float
+
example:sweepOffsetFromTargetRadius:0.4
以目标半径作为扫描偏移量乘数,用于制作类似于两栖护盾坦克的激光武器。对光束效果很有用。
## retargetingInFlight
translation:重新瞄准在飞行时
-
type:bool
+
type:boolean
+
example:retargetingInFlight:true
在飞行过程中重新瞄准一个新的目标,非常适合投掷式武器和相互碰撞的抛射体
## retargetingInFlightSearchDelay
translation:重新瞄准在飞行时搜索延迟
-
type:float/time
+
type:float
+
example:retargetingInFlightSearchDelay:10
寻找新目标之间的时间。默认5
## retargetingInFlightSearchRange
translation:重新瞄准在飞行时搜索范围
type:float
+
example:retargetingInFlightSearchRange:45
重新选择目标的范围。默认值120
## retargetingInFlightSearchLead
translation:重新瞄准在飞行时预判
type:float
+
example:retargetingInFlightSearchLead:1
引导射抛射体试图击中目标。默认15
## retargetingInFlightSearchOnlyTags
translation:重新瞄准在飞行时针对标签
-
type:tag ref
+
type:string(s)
+
example:retargetingInFlightSearchOnlyTags:tg_project
只针对具有这些标签的单位进行重定向。
## color
translation:颜色
type:color
+
example:color: #bebe50
使用十六进制值对该抛射体重新着色,它也决定了激光颜色,颜色格式为#AARRGGBB。
## teamColorRatio
translation:阵营色色相
type:float
+
example:teamColorRatio:0.5
将团队颜色混合到抛射体颜色中,填0-1。
## teamColorRatio_sourceRatio
translation:阵营色色相比例
type:float
+
example:teamColorRatio_sourceRatio:0.5
将团队颜色混合到抛射体颜色中与原色比例,默认为(1-teamColorRatio)
## invisible
translation:隐藏
-
type:bool
+
type:boolean
+
example:invisible:true
隐藏抛射体图像。
## image
translation:图像
-
type:image
+
type:file
+
example:image:233.png
使用自定义图片。覆盖drawType和frame
## shadowFrame
translation:阴影帧
type:integer
+
example:shadowFrame:1
定义哪一帧是单位的阴影
## shadowImage
translation:阴影图像
-
type:image
+
type:file
+
example:shadowImage:SHADOW:PRO_fd.png
使用自定义图片给抛射体加阴影。
## drawType
translation:绘制类型
type:integer
+
example:drawType:1
使用内置抛射体图像。 0:projectiles.png 1:projectiles_large.png 2:projectiles2.png
## drawSize
translation:绘制大小
type:float
+
example:drawSize:0.5
缩放抛射体大小。默认为1
## frame
translation:帧
type:integer
+
example:frame:1
使用的内置图像帧,编号从零开始。和drawType结合使用。
## hitSound
translation:打击音效
-
type:bool
+
type:boolean
+
example:hitSound:true
启用命中音效,默认true
## explodeEffect
translation:爆炸效果
-
type:effect ref list
+
type:effect(s) code name
+
example:explodeEffect: smallExplosion, CUSTOM:myExplodeEffect
抛射体爆炸效果
## explodeEffectOnShield
translation:护盾上爆炸效果
-
type:effect ref list
+
type:effect(s) code name
+
example:explodeEffectOnShield:small
如果目标上有护盾,则使用此效果
## drawUnderUnits
translation:绘制与单位下
-
type:bool
+
type:boolean
+
example:drawUnderUnits:true
绘制于单位下方。
## effectOnCreate
translation:创建时效果
-
type:effect ref list
+
type:effect(s) code name
+
example:effectOnCreate:large
创建时效果,会追随抛射体。
## shouldRevealFog
translation:揭开迷雾
-
type:bool
+
type:boolean
+
example:shouldRevealFog:true
抛射体在爆炸时向玩家揭开迷雾。
## alwaysVisibleInFog
translation:迷雾中显示
-
type:bool
+
type:boolean
+
example:alwaysVisibleInFog:true
抛射体总是在迷雾中显示。
## nukeWeapon
translation:核武器
-
type:bool
+
type:boolean
+
example:nukeWeapon:true
发射时在迷您地图上显示。还有其他一些效果。
## trailEffect
translation:尾焰
-
type:bool/effect
+
type:boolean/effect(s) code name
+
example:trailEffect:true
设置为true时为默认的尾焰。但也可以指向任何自定义效果,或使用内置效果。
## trailEffectRate
translation:尾焰频率
type:float
+
example:trailEffectRate:8
尾焰产生频率,默认为3
## lightSize
translation:闪光大小
type:float
+
example:lightSize:2
抛射体光照大小,单位半径是地块格子
## lightColor
translation:闪光颜色
type:color
+
example:lightColor: #ffe92b
抛射体光照颜色,不决定激光颜色,激光由color决定。
## lightCastOnGround
translation:闪光映射到地面
-
type:bool
+
type:boolean
+
example:lightCastOnGround:true
将闪光效果映射到地面,如火炮的光和抛射体是分离的。
## largeHitEffect
translation:大的打击效果
-
type:bool
+
type:boolean
+
example:largeHitEffect:true
为true时会产生大的爆炸效果和声音(仅用于装饰),设为false时会禁用范围武器的冲击波效果。
## lightingEffect
translation:闪电效果
-
type:bool
+
type:boolean
+
example:lightingEffect:true
将抛射体图像修改为闪电,一般需要instant(瞬间命中)搭配.
## laserEffect
translation:激光效果
-
type:bool
+
type:boolean
+
example:laserEffect:true
将抛射体图像修改为激光。
## beamImage
translation:波束图像
-
type:image
+
type:file
+
example:beamImage:shibaray.png
用于激光效果的主体图像,图像会被复制为多份显示。例如可用于做红警中的正弦波状辐射武器。因为本质是图像拼接,所以长度限制不能小于20
## beamImageOffsetRate
translation:波束偏移频率
type:float
+
example:beamImageOffsetRate:0
波束图像的移动频率。
## beamImageStart
translation:波束开始图像
-
type:image
+
type:file
+
example:beamImageStart:beam1_start.png
光束动画开火端效果图像
## beamImageEnd
translation:波束命中图像
-
type:image
+
type:file
+
example:beamImageEnd:beam1_end.png
光束动画命中端效果图像
## beamImageStartRotated
translation:波束始端旋转
-
type:bool
+
type:boolean
+
example:beamImageStartRotated:true
光束动画开火端效果图像是否以炮塔角度旋转旋转,默认false,不旋转.
## beamImageEndRotated
translation:波束末端旋转
-
type:bool
+
type:boolean
+
example:beamImageEndRotated:true
光束动画命中端效果图像是否旋转,默认false.
diff --git a/rustedwarfareapicode/src/UnitNDT/resource.md b/rustedwarfareapicode/src/UnitNDT/resource.md
index f72567e..6bb7778 100644
--- a/rustedwarfareapicode/src/UnitNDT/resource.md
+++ b/rustedwarfareapicode/src/UnitNDT/resource.md
@@ -1,97 +1,121 @@
# resource
## stackHorizontal
translation:堆叠水平
-
type:bool
+
type:boolean
+
example:stackHorizontal:true
将此代码为真的资源统一排列到同一水平线上。
## displayName
translation:显示名称
type:string
+
example:displayName:计数器
UI中此资源的名称(如悬停在单元信息上)
## displayNameShort
translation:显示短名称
type:string
+
example:displayNameShort:s
在较小的UI上显示的文本(如action的悬浮文本)默认为displayName
## hidden
translation:隐藏
-
type:bool
+
type:boolean
+
example:hidden:true
对玩家隐藏这个资源
## equivalentGlobalResourceForAI
translation:作为AI的全局资源
-
type:resource ref
+
type:(global) resource(s) code name
+
example:equivalentGlobalResourceForAI:gold,diamond
用于向AI提示具有本地资源的资源节点可用于获取不同的全局资源。例如,当一台收割机卸载资源
## displayRoundedDown
translation:显示为整数
-
type:bool
+
type:boolean
+
example:displayRoundedDown:true
对资源进行舍入显示为整数。
## iconImageUseInText
translation:在动作(action)的描述中显示资源图标
-
type:bool
+
type:boolean
+
example:iconImageUseInText:false
默认为true
## iconImage
translation:图标
-
type:image
+
type:file
+
example:iconImage:chemms.png
自定义该资源的象征图像
## displayNameHideWhenIconShownInText
translation:显示名称在文本中显示图标时隐藏
-
type:bool
+
type:boolean
+
example:displayNameHideWhenIconShownInText:true
(默认为false) - 有助于缩短说明文本
## displayNameHideWhenIconShownInHUD
translation:文本显示名称在HUD中显示图标时隐藏
-
type:bool
+
type:boolean
+
example:displayNameHideWhenIconShownInHUD:true
默认为false
## displayColorUseInText
translation:在动作(action)的描述中显示资源颜色
-
type:bool
+
type:boolean
+
example:displayColorUseInText:false
默认为true
## appendResourceInHUD
translation:在HUD中追加资源
-
type:resource ref
+
type:(global) resource code name
+
example:appendResourceInHUD: `resources:name`
使用后,在游戏界面中这个资源值将会叠在目标资源值的后面,并且继承目标资源的颜色和图标。这个资源值后面也能继续叠加其它资源值
## displayPrefixInHUD
translation:在HUD中显示前缀
type:string
+
example:displayPrefixInHUD:321
在资源数值前显示的文本,会替换掉资源原本的名称以及冒号,和appendResourceInHUD一同使用时可以用来显示资源限制之类的内容
## displayPostfixInHUD
translation:在HUD中显示后缀
type:string
+
example:displayPostfixInHUD:123
在资源数值之后显示的文本
## displayTextAppendResourceWithGap
translation:显示具有间隙的附加资源文本
-
type:bool
+
type:boolean
+
example:displayTextAppendResourceWithGap:true
默认为false。将不相关的资源放在同一行时,在资源之间添加空格。
## appendResourceInHUD_whenThisZero
translation:在此为零时在HUD中追加资源
-
type:bool
+
type:boolean
+
example:appendResourceInHUD_whenThisZero:false
默认为true。为false时附加资源(如用于显示最大值的资源)与父资源一起隐藏。
## includeInStats
translation:包括值
-
type:bool
+
type:boolean
+
example:includeInStats:true
包括该资源,与valueInStats类似
## valueInStats
translation:统计值
-
type:bool/integer
+
type:integer
+
example:valueInStats:1
(如果全局且未隐藏,则默认为 1(true),否则默认为 0(false)) - 用于游戏后的统计和回放的排行榜
## displayTextAppendResource
translation:显示文本里添加资源
-
type:resource ref
+
type:(global) resource code name
+
example:displayTextAppendResource:
在显示的UI中添加该资源
## displayDigitGrouping
translation:资源数字分组
-
type:display type
+
type:enum
+
example:displayDigitGrouping:none
none/comma/space--(空,逗号,空格)(例如资源数量10000,空格分组就是10 000)
## displayPos
translation:显示排序
type:integer
+
example:displayPos:1
显示优先级,越小越居上
## displayWithRounding
translation:四舍五入取整
-
type:bool
+
type:boolean
+
example:displayWithRounding:true
将资源的小数部分用四舍五入法变成整数,此代码为真后,该资源数字一定是整数
## displayTextPrefix
translation:显示文本前缀
type:string
+
example:displayTextPrefix:321
与displayPrefixInHUD有着相同的作用,而且它俩不能共存
## displayTextPostfix
translation:显示文本后缀
type:string
+
example:displayTextPostfix:123
与displayPostfixInHUD有着相同的作用,而且它俩不能共存
diff --git a/rustedwarfareapicode/src/UnitNDT/resources.md b/rustedwarfareapicode/src/UnitNDT/resources.md
index d0d4e8c..66e9b6f 100644
--- a/rustedwarfareapicode/src/UnitNDT/resources.md
+++ b/rustedwarfareapicode/src/UnitNDT/resources.md
@@ -2,36 +2,53 @@
## credits
translation:资金
type:Resources
+
example:credits:600
铁锈中默认用于全局的资金。
## energy
translation:能量
type:Resources
+
example:energy=50
单位使用的能量,如可用于开火限制。
## hp
translation:血量
type:Resources
+
example:hp:40
单位血量,一般血量归零时就会销毁单位。
## shield
translation:护盾
type:Resources
+
example:price: hp=-100, shield=100
单位护盾,一般用于抵挡敌人攻击。
## ammo
translation:弹药
type:integer
+
example:ammo=1
弹药,每个单位的隐藏值,供mod使用。
## setFlag
translation:设置标志
type:integer
-
设置标志,范围0-31。标志存储在每个单元中,与addResources,resourceUsage或price等一起使用。
+
example:setFlag:1,setFlag=1,3
+
设置标志,标志存储在每个单元中,与addResources,resourceUsage或price等一起使用。
+1.15之前范围是0-31
+1.15改为无限制
## unsetFlag
translation:取消标志
type:integer
+
example:unsetFlag=1 , unsetFlag:1-5
取消已经设置的标志
+1.15之前范围是0-31
+1.15改为无限制
## hasFlag
translation:拥有标志
type:integer
+
example:hasFlag:1,hasFlag=1|2
拥有标志。
+1.15之前范围是0-31
+1.15改为无限制
## hasMissingFlag
translation:没有标志
type:integer
+
example:hasMissingFlag:1,hasMissingFlag=1|13
没有标志。
+1.15之前范围是0-31
+1.15改为无限制
diff --git a/rustedwarfareapicode/src/UnitNDT/template.md b/rustedwarfareapicode/src/UnitNDT/template.md
index 9e0d1ed..0a9143b 100644
--- a/rustedwarfareapicode/src/UnitNDT/template.md
+++ b/rustedwarfareapicode/src/UnitNDT/template.md
@@ -2,16 +2,29 @@
## @copyFromSection
translation:复制节
type:string
+
example:@copyFromSection:projectile_1
在任何节中使用,以引用节或模板的代码。如@copyFromSection template_name/action_name/projectile_name
## @copyFrom_skipThisSection
translation:复制但跳过节
type:string
+
example:[action_test]
+@copyFrom_skipThisSection:true
在任何节中使用,例如,在引用时候不复制某个action.
## @define X
translation:局部变量
type:string
+
example:@define targetEffect: boom
在一个节中定义一个局部变量(最好在模板外部)
## @global X
translation:全局变量
type:string
+
example:@global targetEffect: pop
定义在所有节中使用的全局变量。注意:局部变量具有更高的优先级
+## IGNORE
+translation:忽略(必须大写)
+
type:string
+
example:[hiddenAction_ok]
+spawnUnits:IGNORE
+requireConditional:IGNORE
+autoTrigger:IGNORE
+
一个特殊的值,所有代码均可填写,填写后什么都不会发生,一般用于section之间的复制,即忽略该代码的复制
diff --git a/rustedwarfareapicode/src/UnitNDT/turret.md b/rustedwarfareapicode/src/UnitNDT/turret.md
index 252adc1..218c77f 100644
--- a/rustedwarfareapicode/src/UnitNDT/turret.md
+++ b/rustedwarfareapicode/src/UnitNDT/turret.md
@@ -1,304 +1,380 @@
# turret
## x
-translation:x
+translation:X坐标
type:float
+
example:x:10
坐标X
## y
-translation:y
+translation:Y坐标
type:float
+
example:y:10
坐标Y
## height
translation:炮塔高度
type:float
+
example:height:1
(用于3d单位,实测链接的炮塔也会跟着改变高度)to help placement on 3d style units
## copyFrom
translation:复制数据自
-
type:turret ref
+
type:turret code name
+
example:copyFrom: 1
复制指定炮塔的所有值,作为该炮塔的默认值。新写代码重复时则覆盖掉它。
## projectile
translation:抛射体
-
type:projectile ref
+
type:projectile code name
+
example:projectile:torpedo
使用此抛射体。默认为第一个抛射体。
## altProjectile
translation:关联抛射体
-
type:projectile ref
+
type:projectile code name
+
example:altProjectile:lowEnergy
当altProjectileCondition为true时,从此炮塔发射的抛射体。
## altProjectileCondition
translation:关联抛射体条件
-
type:LogicBoolean
+
type:Logicbooleanean
+
example:altProjectileCondition:if not self.energy(full=true)
用于altProjectile
## barrelX
translation:抛射体x
type:float
+
example:barrelX:0
默认值为0。控制抛射体生成的X轴位置。
## barrelY
translation:抛射体y
type:float
+
example:barrelY:10
默认为大0。注意:size和barrelY含义相同
## barrelHeight
translation:抛射体高度
type:float
+
example:barrelHeight:10
高度(用于3d)。影响抛射体产生的高度。
## size
translation:炮塔大小
type:float
+
example:size: 5
控制炮塔中心与抛射体丸产生点之间的距离。
## turnSpeed
translation:炮塔转速
type:float
+
example:turnSpeed:5
炮塔最大转动速度。单位度每帧。
## turnSpeedAcceleration
translation:炮塔旋转加速度
type:float
+
example:turnSpeedAcceleration:1
炮塔加速度,默认设置为禁用,并使用全转速度。
## turnSpeedDeceleration
translation:炮塔旋转减速度
type:float
+
example:turnSpeedDeceleration:1
默认为turnSpeedAcceleration。将此值设置为高于转弯加速度可能会允许更快地命中目标
## idleDir
translation:闲时角度
type:float
+
example:idleDir:90
闲置时角度。
## idleDirReversing
translation:闲时角度反转
type:float
+
example:idleDirReversing:1
允许闲置时角度反转。除非连接到另一个炮塔(否则连接的炮塔在反转时通常会旋转),否则默认为idleDir + 180。如重坦逆行时炮塔转向。
## shouldResetTurret
translation:空闲自动归位
-
type:bool
+
type:boolean
+
example:shouldResetTurret:false
默认为true。 填false时禁止炮塔自动归位。
## idleSweepAngle
translation:空闲扫描角度
type:integer
+
example:idleSweepAngle:45
炮塔闲时扫描角度。这一系列用于设置炮塔闲置时候转圈警戒动作。
## idleSweepDelay
translation:空闲扫描间隔
type:float
+
example:idleSweepDelay:120
炮塔闲时扫描间隔,多久动一次。
## idleSweepSpeed
translation:空闲扫描速度
type:float
+
example:idleSweepSpeed:0.2
炮塔闲时扫描转向的速度。
## idleSweepCondition
translation:空闲扫描条件
-
type:LogicBoolean
+
type:Logicbooleanean
+
example:idleSweepCondition:if not self.isMoving()
炮塔闲时扫描的条件,比如单位移动但没攻击时炮塔确实是闲置的,但这时可能不该旋转。
## idleSweepAddRandomDelay
translation:空闲扫描随机延迟
type:float
+
example:idleSweepAddRandomDelay:40
炮塔闲时扫描的随机延迟
## idleSweepAddRandomAngle
translation:空闲扫描随机角度
type:integer
+
example:idleSweepAddRandomAngle:10
炮塔闲时扫描的随机角度
## attachedTo
translation:链接到
-
type:turret ref
+
type:turret code name
+
example:attachedTo:1
要连接的另一个炮塔的ID,将相对于它定位,并随其旋转。
## slave
translation:隶属
-
type:bool
+
type:boolean
+
example:slave:true
锁定此转塔的方向,并为附加的转塔发射冷却时间。常用于多炮管单位。
## isMainNanoTurret
translation:是主构建炮塔
-
type:bool
+
type:boolean
+
example:isMainNanoTurret:true
默认为false。用于创建建筑物的炮塔。只能在一个炮塔上为true,并且canShoot设置为false。
## energyUsage
translation:能量需求
type:float
+
example:energyUsage:1
发射武器所需的能量。与resourceUsage相同:energy = X
## resourceUsage
translation:资源需求
-
type:price
+
type:price(s)
+
example:resourceUsage: credits=5, energy=5, hp=100, shield=5, ammo=1
可以使用资金/能源/生命/护盾/弹药等。如果不符合条件则停止攻击。credits/energy/hp/shield/ammo
## delay
translation:开火间隔
type:float
+
example:delay:60
设置攻击间隔,覆盖全局炮塔间隔数据。
## linkDelayWithTurret
translation:链接间隔
-
type:turret ref
+
type:turret code name
+
example:linkDelayWithTurret:1
当另一炮塔开火时,该炮塔上的冷却延迟将被重置/删除
## warmup
translation:预热
type:time
+
example:warmup:10
射击前延迟。需要准备多长时间才能攻击,可以制作出蓄力效果。
## warmupCallDownRate
translation:预热下降速度
type:float
-
停止攻击后预热条下降速度
+
example:warmupCallDownRate:0.6
+
停止攻击后预热条下降速度,只支持浮点
## warmupNoReset
translation:预热不重置
-
type:bool
+
type:boolean
+
example:warmupNoReset:true
默认为false。射击后未重设真正的预热时。与warmupCallDownRate一起使用
## warmupShootDelayTransfer
translation:开火间隔过渡
type:float
+
example:warmupShootDelayTransfer:17
默认值为0,这是一个乘数,用于通过预热值减少下一次开火延迟。与warmupNoReset一起使用时,可以使攻击速度越来越快。
## onShoot_freezeBodyMovementFor
translation:射击时冻结主体
type:time
+
example:onShoot_freezeBodyMovementFor:1.2s
射击时禁止运动。
## barrelOffsetX_onOddShots
translation:奇数射击时抛射体偏移
type:float
+
example:barrelOffsetX_onOddShots:100
默认0。在奇数射击时横向偏移,用于简化双管单位制作。
## yAxisScaling
translation:Y轴比例
type:float
+
example:yAxisScaling:2
炮塔的x和y坐标会乘以这个代码所填的值
## canShoot
translation:可以开火
-
type:bool
+
type:boolean
+
example:canShoot:true
可以开火,默认为true
+## canAttack
+translation:可以攻击
+
type:boolean
+
example:canAttack:true
+
可以攻击,默认为true,不能和canShoot连用
## canAttackFlyingUnits
translation:可攻击空中单位
-
type:LogicBoolean
+
type:Logicbooleanean
+
example:canAttackFlyingUnits:true
可以攻击空中单位,覆盖[attack]的设定。
## canAttackLandUnits
translation:可攻击表面单位
-
type:LogicBoolean
+
type:Logicbooleanean
+
example:canAttackLandUnits:true
可以攻击表面单位(包括陆地和水面)
## canAttackUnderwaterUnits
translation:可攻击水下单位
-
type:LogicBoolean
+
type:Logicbooleanean
+
example:canAttackUnderwaterUnits:true
可以攻击水下单位
## canAttackNotTouchingWaterUnits
translation:可以攻击非接触水单位
-
type:LogicBoolean
+
type:Logicbooleanean
+
example:canAttackNotTouchingWaterUnits:true
可以攻击非接触水单位,默认为true。如果是false,则只能攻击与水接触的单位,不能攻击岸上。用于鱼雷逻辑。也可以根据炮塔需要设置。
## canOnlyAttackUnitsWithTags
translation:只攻击带特定标签单位
-
type:tags
+
type:string(s)
+
example:canOnlyAttackUnitsWithTags:sp_spy
只能攻击带特定标签的单位
## canOnlyAttackUnitsWithoutTags
translation:不攻击带特定标签单位
-
type:tags
+
type:string(s)
+
example:canOnlyAttackUnitsWithoutTags:sp_tm
不能攻击带特定标签的单位
## canAttackCondition
translation:攻击条件
-
type:LogicBoolean
+
type:Logicbooleanean
+
example:canAttackCondition: if not self.flying
攻击需要满足条件。
## clearTurretTargetAfterFiring
translation:射击后重置炮塔目标
-
type:bool
+
type:boolean
+
example:clearTurretTargetAfterFiring:true
射击后重置炮塔目标。
## limitingRange
translation:限制范围
type:float
+
example:limitingRange:150
限制此炮塔的最远攻击范围。不要将此代码应用到所有炮塔,如果需要则设置maxAttackRange。
## limitingAngle
translation:限制角度
type:float
+
example:limitingAngle:60
与idleDir配合。炮塔只能以+/-此角度进行攻击。
## limitingMinRange
translation:最小距离
type:float
+
example:limitingMinRange: 60
设置炮塔的最小攻击范围,不能攻击此范围内单位,也就是死角。
## canAttackMaxAngle
translation:可攻击最大角度
type:float
+
example:canAttackMaxAngle:90
设置炮塔的最大射击角度。如果单位在可攻击角度外则不会开火。默认值为5,不要设置得更低。可以设置为181,即不需要转向就可发射抛射体。
## interceptProjectiles_withTags
translation:拦截抛射体需有标签
-
type:string
+
type:string(s)
+
example:interceptProjectiles_withTags: nuke
拦截具有此标签的抛射体,目前铁锈用于反核武器。
## interceptProjectiles_andTargetingGroundUnderDistance
translation:拦截抛射体检索范围
type:integer
+
example:interceptProjectiles_andTargetingGroundUnderDistance: 500
守护的范围,只有当敌方攻击目标地点落在此圈子内时才考虑拦截。
## interceptProjectiles_andUnderDistance
translation:拦截抛射体攻击范围
type:integer
+
example:interceptProjectiles_andUnderDistance: 1600
默认值为2000,当抛射体到达这个距离时才开始发射拦截。
## interceptProjectiles_andOverHeight
translation:拦截抛射体高度
type:integer
+
example:interceptProjectiles_andOverHeight:50
需要超过此高度才会拦截。默认值为0.
## laserDefenceEnergyUse
translation:激光防御能量需求
type:float
+
example:laserDefenceEnergyUse:1
炮塔启用激光防御拦截敌方抛射体。还应在core中设置energyMax。
## aimOffsetSpread
translation:瞄准偏移
type:float
+
example:aimOffsetSpread:0
将每次攻击时的偏移量乘以目标半径。默认为0.6。设为0则不偏移,对范围武器影响较大。
## invisible
translation:隐藏炮塔图像
-
type:LogicBoolean
+
type:Logicbooleanean
+
example:invisible:true
即不显示炮塔本身图像,但是攻击什么的还是可以。
## image
translation:图像
-
type:image
+
type:file
+
example:image:shibaingtooth.png
使用自定义图片。覆盖单位的主炮塔图像
-## image_applyTeamColors
-translation:图像应用队伍颜色
-
type:bool
-
炮塔图像使用队伍颜色。默认为false。
## image_drawOffsetX
translation:图像绘制偏移x
type:float
+
example:image_drawOffsetX
炮塔图像在X轴偏移。
## image_drawOffsetY
translation:图像绘制偏移y
type:float
+
example:image_drawOffsetY
炮塔图像在Y轴偏移。
## chargeEffectImage
translation:充能效果图像
-
type:image
+
type:file
+
example:chargeEffectImage:a.png
预热时的充能效果。默认是由小变大。
## warmupStartEffect
translation:预热效果
-
type:effects
+
type:effect(s) code name
+
example:warmupStartEffect
开火延迟时产生效果。
## shoot_sound
translation:开火音效
-
type:string
+
type:file(s)
+
example:shoot_sound:move:0.5
开火音效,填声音文件。有以下内置条目。attack、move、click、missile_fire、missile_hit、unit_explode、buiding_explode、
tank_firing、cannon_firing、gun_fire、lighting_burst、plasma_fire、plasma_fire2、firing3、firing4、large_gun_fire1、
large_gun_fire2、bug_die、bug_attack、interface_error、nuke_explode、nuke_launch、laser_deflect、laser_deflect2
## shoot_sound_vol
translation:开火音效大小
type:float
+
example:shoot_sound_vol:
播放声音大小。
## shoot_flame
translation:开火动画
-
type:effects
+
type:effect(s) code name
+
example:shoot_flame: smoke
+shoot_flame: CUSTOM:lightFade
开火动画,内置参考表末尾。Luke推荐为:small, large, smoke, shockwave(小,大,烟,冲击波)。可以自定义。
其余有:medium,largeExplosion,smallExplosion,resourcePoolSmoke,noneExplosion(中等,大爆炸,小爆炸,资源池的绿色烟,没有爆炸)
## shoot_light
translation:开火闪光
type:color
+
example:shoot_light:#afafaf
开火时闪光,16进制argb格式。#AARRGGBB,透明度,红,绿,蓝
## idleSpin
translation:闲时转速
type:float
+
example:idleSpin:2
炮塔闲置时的旋转速度,单位度每帧。
## onShoot_playAnimation
translation:开火播放动画
-
type:animation ref
+
type:animation(s) code name
+
example:onShoot_playAnimation:animation_1
开火后播放[Animation]中的自定义动画
## onShoot_triggerActions
translation:开火触发行为
-
type:action ref
+
type:(hidden) action(s) code name
+
example:onShoot_triggerActions:foxsay
每次这个炮塔开火时触发这些动作
## unloadUpToXUnitsAndGiveAttackOrder
translation:卸载单位并赋予攻击目标
type:integer
+
example:unloadUpToXUnitsAndGiveAttackOrder:5
在炮塔炮筒位置卸下X个单位,并让它们攻击炮塔指定的目标。
## recoilOffset
translation:后坐力大小
type:float
+
example:recoilOffset:-10
开火后向前或向后推动炮塔,以产生后坐力。填像素。
## recoilOutTime
translation:后坐力速度
-
type:time
+
type:float
+
example:recoilOutTime:2
开火后到达偏移位置的时间
## recoilReturnTime
translation:后坐力恢复
-
type:time
+
type:float
+
example:recoilReturnTime:15
开火后回到默认位置所需时间。
## showRangeUIGuide
translation:显示范围UI
-
type:bool
+
type:boolean
+
example:showRangeUIGuide:false
显示攻击范围的白圈。默认true.