Mod语法:修订间差异
小 (写着写着不自信了,我再收集收集资料) |
小 (→节的类型) 标签:移动版编辑 移动版网页编辑 高级移动版编辑 |
||
(未显示2个用户的15个中间版本) | |||
第1行: | 第1行: | ||
{{欢迎编辑}} |
{{欢迎编辑}} |
||
== .ini文件 == |
== .ini文件 == |
||
纯文本文件。游戏通过读取以<code>.ini</code>为扩展名的文件来获 |
UTF-8纯文本文件。游戏通过读取以<code>.ini</code>为扩展名的文件来获得某个单位的参数信息。其内容主要由节(Section)和参数(Parameter)两部分组成。 |
||
=== |
=== 格式 === |
||
<pre style="white-space:pre;overflow:auto;margin:0;padding:0;width:100%;"> |
|||
包含用两个半角英文方括号包围的节的名称([section]),单独占一行。用于声明相关的键从属于该节。其后的行直到另一个节前一行的键均归属于该节。名称不同的节视为不同类型的节。 |
|||
#节由两个半角方括号包裹,单独占一行 |
|||
[section] |
|||
节的类型: |
|||
#参数由它的名称和它的值构成,名称和值使用半角冒号分隔,通常单独占一行 |
|||
<pre style="white-space:pre;overflow:auto;"> |
|||
name: value |
|||
[core] |
|||
[canBuild_NAME] |
|||
[graphics] |
|||
[attack] |
|||
[turret_NAME] |
|||
[projectile_NAME] |
|||
[movement] |
|||
[ai] |
|||
[leg_#] |
|||
[arm_#] |
|||
[attachment_NAME] |
|||
[action_NAME] |
|||
[hiddenAction_NAME] |
|||
[effect_NAME] |
|||
[animation_NAME] |
|||
[placementRule_NAME] |
|||
[global_resource_NAME] |
|||
[resource_NAME] |
|||
[template_NAME] |
|||
[comment_NAME] |
|||
[decal_NAME] |
|||
</pre> |
</pre> |
||
<p style="font-size:12px;color:#888;margin-top:0px;"><nowiki>*</nowiki>另有部分代码存在不同的书写格式,待到具体代码再作讲解。</p> |
|||
参数从属于节,要想具体参数从属于具体节,需将节写在参数行的上方;不同参数的值有不同类型,且规定有取值区间。 |
|||
=== 属性(property) === |
|||
=== 节的类型 === |
|||
在 Rusted Warfare 中,属性包含一组键值对。键(key)的名称与其对应的值(value)用半角冒号或等号隔开,单独占一行。用于规定单位的具体属性。名称不同的键视为不同类型的键,名称相同的键从属于不同类型的节视为不同类型的键。值的类型不同填写的内容和格式会有不同。 |
|||
截至<u>1.15</u>版本,节的类型有: |
|||
<pre style="white-space:pre;overflow:auto;margin:0;padding:0;width:100%;"> |
|||
参考:{{折叠|1=|2= |
|||
[core]--基础节,涉及单位的名称、生命值、体积大小、是建筑与否等基本设置。 |
|||
<pre style="white-space:pre;overflow:auto;"> |
|||
[canBuild_NAME]--可建造节,涉及单位能建造生产那些单位,建造方式和条件等设置。 |
|||
[core]name--设定单位的名称 |
|||
[graphics]--图像节,涉及单位主体贴图等设置。 |
|||
[core]mass--设定单位的质量(重量) |
|||
[attack]--攻击节,涉及单位能攻击与否、最大攻击范围等设置。 |
|||
[core]radius--设定单位的碰撞半径(体积) |
|||
[turret_NAME]--炮塔节,涉及单位炮塔的贴图、旋转速度、攻击间隔等设置。 |
|||
[core]price--设定建造该单位的花费 |
|||
[projectile_NAME]--炮弹节,涉及单位炮塔发射的弹丸的贴图、寿命、飞行速度、伤害等设置。 |
|||
[core]class--未知,不用管,默认CustomUnitMetadata |
|||
[movement]--移动节,涉及单位的移动类型、速度、转向速度等设置。 |
|||
[core]maxHp--设定单位的最大生命值 |
|||
[ai]--AI节,涉及AI玩家对该单位的建造、升级概率以及部分单位特性等设置。 |
|||
[core]techLevel--设定单位的科技等级,可填1(默认)或2或3??? |
|||
[arm_#]--臂节,涉及单位臂装饰物的位置、贴图等设置。 |
|||
[core]buildSpeed--设定建造该单位的速度(耗时) |
|||
[leg_#]--腿节,同上。 |
|||
[core]altNames--设定单位的别名,可以填多个,用英文逗号隔开 |
|||
[attachment_NAME]--附属节,涉及单位的子附属单位的位置、能攻击与否等设置。 |
|||
[core]strictLevel--设定该.ini文件·代码格式错误检查·的严格等级,填0或1(默认),若填0则代码被重复赋值时不会报错,不建议打它主意 |
|||
[action_NAME]--操作节,涉及单位的资源手动添加、手动升级按钮、添加路径点等设置。 |
|||
[core]isBio--设定单位归类于“生物”与否,默认false??? |
|||
[hiddenAction_NAME]--隐藏的操作节,同上。 |
|||
[core]isBug--设定单位归类于“虫”与否,默认false??? |
|||
[effect_NAME]--特效节,涉及单位炮塔开火,弹丸飞行、爆炸等生成的特效的设置。 |
|||
[core]isBuilder--设定单位归类于“建造者”与否,默认false,若单位要使用纳米建造修复回收功能则必须为true |
|||
[animation_NAME]--动画节,涉及单位移动、部署、攻击等时机播放的帧动画的设置。 |
|||
[core]streamingCost--设定建造该单位的·流动式(持续地小单位地支付费用)·花费 |
|||
[placementRule_NAME]--放置规则节,单位建造时放置的规则的设置。 |
|||
[core]switchPriceWithStreamingCost--将一次性花费的方式改为·流动式(持续地小单位地支付费用)·花费,默认false |
|||
[global_resource_NAME]--全局资源节,队伍内单位通用的自定义资源的名称、样式设置。 |
|||
[core]selfRegenRate--设定单位生命值·自·回复率,每帧(游戏的时间单位,游戏定义每秒有60个帧)回复多少生命值,默认0 |
|||
[resource_NAME]--资源节,具体单位自用的自定义资源的名称样式设置 |
|||
[core]maxShield--设定单位的最大护盾值,默认0 |
|||
[template_NAME]--模板节,节之间复制参数时选用。 |
|||
[core]startShieldAtZero--将单位的初始护盾值设为0 |
|||
[comment_NAME]--注释节,用于大篇幅注释。 |
|||
[core]shieldRegen--设定护盾回复速率,每帧(游戏的时间单位,游戏定义每秒有60个帧)回复多少护盾值,默认0.25 |
|||
[decal_NAME]--贴花节,单位身上的贴花、伪3D等设置。 |
|||
[core]energyMax |
|||
[core]energyRegen |
|||
[core]energyNeedsToRechargeToFull |
|||
[core]energyRegenWhenRecharging |
|||
[core]armour |
|||
[core]armourMinDamageToKeep |
|||
[core]borrowResourcesWhileAlive |
|||
[core]borrowResourcesWhileBuilt |
|||
[core]generation_resources |
|||
[core]generation_active |
|||
[core]generation_credits |
|||
[core]generation_delay |
|||
[core]showInEditor |
|||
[core]displayText |
|||
[core]displayDescription |
|||
[core]displayLocaleKey |
|||
[core]displayRadius |
|||
[core]uiTargetRadius |
|||
[core]shieldRenderRadius |
|||
[core]shieldDisplayOnlyDeflection |
|||
[core]shieldDeflectionDisplayRate |
|||
[core]showOnMinimap |
|||
[core]showActionWithMixedSelectionIfOtherUnitsHaveTag |
|||
[core]showOnMinimapToEnemies |
|||
[core]isBuilding |
|||
[core]footprint |
|||
[core]constructionFootprint |
|||
[core]displayFootprint |
|||
[core]buildingSelectionOffset |
|||
[core]buildingToFootprintOffsetX |
|||
[core]buildingToFootprintOffsetY |
|||
[core]placeOnlyOnResPool |
|||
[core]selfBuildRate |
|||
[core]ignoreInUnitCapCalculation |
|||
[core]copyFrom |
|||
[core]dont_load |
|||
[core]overrideAndReplace |
|||
[core]onNewMapSpawn |
|||
[core]isLocked |
|||
[core]isLockedIfGameModeNoNuke |
|||
[core]experimental |
|||
[core]stayNeutral |
|||
[core]createNeutral |
|||
[core]createOnAggressiveTeam |
|||
[core]tags |
|||
[core]defineUnitMemory |
|||
[core]fogOfWarSightRange |
|||
[core]fogOfWarSightRangeWhileNotBuilt |
|||
[core]softCollisionOnAll |
|||
[core]disableAllUnitCollisions |
|||
[core]isUnrepairableUnit |
|||
[core]isUnselectable |
|||
[core]isUnselectableAsTarget |
|||
[core]isPickableStartingUnit |
|||
[core]startFallingWhenStartingUnit |
|||
[core]soundOnAttackOrder |
|||
[core]soundOnMoveOrder |
|||
[core]soundOnNewSelection |
|||
[core]canNotBeDirectlyAttacked |
|||
[core]canNOtBeDamaged |
|||
[core]canNotBeGivenOrdersByPlayer |
|||
[core]canOnlyBeAttackedByUnitsWithTags |
|||
[core]disableDeathOnZeroHp |
|||
[core]allowCaptureWhenNeutralByAl |
|||
[core]transportSlotsNeeded |
|||
[core]maxTransportingUnits |
|||
[core]transportUnitsRequireTag |
|||
[core]transportUnitsRequireMovementType |
|||
[core]transportUnitsBlockAirAndWaterUnits |
|||
[core]transportUnitsEachUnitAlwaysUsesSingleSlot |
|||
[core]transportUnitsKeepBuiltUnits |
|||
[core]transportUnitsCanUnloadUnits |
|||
[core]transportUnitsAddUnloadOption |
|||
[core]transportUnitsUnloadDelayBetweenEachUnit |
|||
[core]transportUnitsKillOnDeath |
|||
[core]transportUnitsHealBy |
|||
[core]transportUnitsBlockOtherTransports |
|||
[core]whileNeutralTransportAnyTeam |
|||
[core]whileNeutralConvertToTransportedTeam |
|||
[core]convertToNeutralIfNotTransporting |
|||
[core]transportUnitsOnTeamChangeKeepCurrentTeam |
|||
[core]resourceRate |
|||
[core]similarResourcesHaveTag |
|||
[core]resourceMaxConcurrentReclaimingThis |
|||
[core]reclaimPrice |
|||
[core]canReclaimResources |
|||
[core]canReclaimResourcesNextSearchRange |
|||
[core]canReclaimResourcesOnlyWithTags |
|||
[core]canReclaimUnitsOnlyWithTags |
|||
[core]resourceReclaimMultiplier |
|||
[core]canRepairUnitsOnlyWithTags |
|||
[core]canRepairBuildings |
|||
[core]canRepairUnits |
|||
[core]autoRepair |
|||
[core]nanoRange |
|||
[core]nanoRepairSpeed |
|||
[core]nanoBuildSpeed |
|||
[core]nanoUnbuildSpeed |
|||
[core]nanoReclaimSpeed |
|||
[core]nanoRangeForRepairIsMelee |
|||
[core]nanoRangeForReclaimIsMelee |
|||
[core]nanoRangeForRepair |
|||
[core]nanoRangeFprReclaim |
|||
[core]nanoFactorySpeed |
|||
[core]extraBUildRangeWhenBuildingThis |
|||
[core]builtFrom_#_name |
|||
[core]builtFrom_#_pos |
|||
[core]builtFrom_#_forceNano |
|||
[core]builtFrom_#_isLocked |
|||
[core]builtFrom_#_isLockedMessage |
|||
[core]exit_x |
|||
[core]exit_y |
|||
[core]exit_dirOffset |
|||
[core]exit_heightOffset |
|||
[core]exit_moveAwayAmount |
|||
[core]exitHeightIgnoreParent |
|||
[core]dieOnConstruct |
|||
[core]dieZeroEnergy |
|||
[core]numBitsOnDeath |
|||
[core]nukeOnDeath |
|||
[core]nukeOnDeathRange |
|||
[core]nukeOnDeathDamage |
|||
[core]nukeOnDeathDisableWhenNoNuke |
|||
[core]fireTurretXAtSelfOnDeath |
|||
[core]explodeOnDeath |
|||
[core]explodeOnDeathGroundCollision |
|||
[core]explodeTypeOnDeath |
|||
[core]effectOnDeath |
|||
[core]effectOnDeathGroundCollision |
|||
[core]unitsSpawnedOnDeath |
|||
[core]unitsSpawnedOnDeath_setToTeamOfLastAttacker |
|||
[core]hideScorchMark |
|||
[core]soundOnDeath |
|||
[core]effectOnDeathIfUnbuilt |
|||
[core]autoTriggerCooldownTime |
|||
[core]autoTriggerCooldownTime_allowDangerousHighCPU |
|||
[core]autoTriggerCheckRate |
|||
[core]updateUnitMemory |
|||
[core]updateUnitMemoryRate |
|||
[core]autoTriggerCheckWhileNotBuilt |
|||
[canBuild_Name]name |
|||
[canBuild_Name]pos |
|||
[canBUild_Name]tech |
|||
[canBUild_Name]forceNano |
|||
[canBUild_Name]isVisible |
|||
[canBUild_Name]isLocked |
|||
[canBuild_Name]isLockedMessage |
|||
[canBUild_Name]isLockedAlt |
|||
[canBuild_Name]isLockedAlt2 |
|||
[canBUild_Name]addResources |
|||
[canBUild_Name]price |
|||
[canBUild_Name]isGuiBlinking |
|||
[graphics]image |
|||
[graphics]image_back |
|||
[graphics]image_shield |
|||
[graphics]image_wreak |
|||
[graphocs]image_offsetX |
|||
[graphics]iamge_offsetY |
|||
[graphics]image_offsetH |
|||
[graphics]image_floatingPointSize |
|||
[graphics]isVisible |
|||
[graphics]isVisibleToEnemies |
|||
[graphics]teamColoringMode |
|||
[graphics]scaleImagesTo |
|||
[graphics]iamgeScale |
|||
[graphics]drawLayer |
|||
[graphics]whenBeingBuiltMakeTransparentTill |
|||
[graphics]icon_zoomed_out |
|||
[graphics]icon_zoomed_out_neverShow |
|||
[graphics]icon_build |
|||
[graphics]image_turret |
|||
[graphics]teamColorsOnTurret |
|||
[graphics]scaleTurretImageTo |
|||
[graphics]lock_body_rotation_with_main_turret |
|||
[graphics]lock_leg_roration_with_main_turret |
|||
[graphics]image_shadow |
|||
[graphics]shadowOffsetX |
|||
[graphics]shaodowOffstY |
|||
[graphics]iamge_shadow_frames |
|||
[graphics]lock_shadow_rotation_with_main_turret |
|||
[graphics]total_frames |
|||
[graphics]frame_width |
|||
[graphics]frame_height |
|||
[graphics]splastEffect |
|||
[graphics]dustEffect |
|||
[graphics]splastEffectReverse |
|||
[graphics]dustEffectReverse |
|||
[graphics]movementEffect |
|||
[graphics]movementEffectReverse |
|||
[graphics]movementEffectRate |
|||
[graphics]movementEffectReverseFilpEffects |
|||
[graphics]repairEffect |
|||
[graphics]repairEffectAtTarget |
|||
[graphics]repairEffectRate |
|||
[graphics]reclaimEffect |
|||
[graphics]reclaimEffectAtTargrt |
|||
[graphics]reclaimEffectRate |
|||
[graphics]roate_with_direction |
|||
[graphics]animation_direction_units |
|||
[graphics]animation_direction_strideX |
|||
[graphics]animation_direction_strideY |
|||
[graphics]animation_direction_starting |
|||
[graphics]disableLowHpFire |
|||
[graphics]disableLowHpSmoke |
|||
[graphics]showTransportBar |
|||
[graphics]showHealthBar |
|||
[graphics]showEnergyBar |
|||
[graphics]showShieldBar |
|||
[graphics]showQueueBar |
|||
[graphics]showShotDelayBar |
|||
[graphics]showSelectionIndicator |
|||
[attack]canAttack |
|||
[attack]canAttackFlyingUnits |
|||
[attack]canAttackLandUnits |
|||
[attack]canAttackUnderwaterUnits |
|||
[attack]canAttackNotTouchingWaterUnits |
|||
[attack]maxAttackRange |
|||
[attack]canOnlyAttackUnitsWithTags |
|||
[attack]canOnlyAttackUnitsWithoutTags |
|||
[attack]turretMultiTargeting |
|||
[attack]isMelee |
|||
[attack]meleeEngangementDistance |
|||
[attack]turretRotateWithBody |
|||
[attack]attackMovement |
|||
[attack]dieOnAttack |
|||
[attack]isFixedFiring |
|||
[attack]aimOffsetSpread |
|||
[attack]stopTargetingAfterFiring |
|||
[attack]disablePassiveTargeting |
|||
[attack]showRangeUIGuide |
|||
[attack]shootDelayMultiplier |
|||
[attack]shootDamageMultiplier |
|||
[turret_Name]x |
|||
[turret_Name]y |
|||
[turret_Name]copyFrom |
|||
[turret_Name]projectile |
|||
[turret_Name]altProjectile |
|||
[turret_Name]altProjectileCondition |
|||
[turret_Name]barrelX |
|||
[turret_Name]barrelY |
|||
[turret_Name]barrelHeight |
|||
[turret_Name]height |
|||
[turret_Name]size |
|||
[turret_Name]turnSpeed |
|||
[turret_Name]turnSpeedAcceleration |
|||
[turret_Name]turnSpeedDeceleration |
|||
[turret_Name]idleDir |
|||
[turret_Name]idleDirReversing |
|||
[turret_Name]shouldResetTurret |
|||
[turret_Name]idleSweepAngle |
|||
[turret_Name]idleSweepDelay |
|||
[turret_Name]idleSweepSpeed |
|||
[turret_Name]idleSweepCondition |
|||
[turret_Name]idleSweepAddRandomDelay |
|||
[turret_Name]idleSweepAddRandomAngle |
|||
[turret_Name]attachedTo |
|||
[turret_Name]slave |
|||
[turret_Name]isMainNanoTurret |
|||
[turret_Name]energyUsage |
|||
[turret_Name]resourceUsage |
|||
[turret_Name]delay |
|||
[turret_Name]linkDelayWithTurret |
|||
[turret_Name]warmup |
|||
[turret_Name]warmupCallDownRate |
|||
[turret_Name]warmupNoReset |
|||
[turret_Name]warmupShootDelayTransfer |
|||
[turret_Name]onShoot_freezeBodyMovementFor |
|||
[turret_Name]barrelOffsetX_onOddShots |
|||
[turret_Name]aimOffsetSpread |
|||
[turret_Name]canShoot |
|||
[turret_Name]canAttackFlyingUnits |
|||
[turret_Name]canAttackLandUnits |
|||
[turret_Name]canAttackUnderwaterUnits |
|||
[turret_Name]canAttackNotTouchingWaterUnits |
|||
[turret_Name]canOnlyAttackUnitsWithTags |
|||
[turret_Name]canOnlyAttackUnitsWithoutTags |
|||
[turret_Name]canAttackCondition |
|||
[turret_Name]canAttackMaxAngle |
|||
[turret_Name]clearTurretTargetAfterFiring |
|||
[turret_Name]limitingRange |
|||
[turret_Name]limitAngle |
|||
[turret_Name]limitingMinRange |
|||
[turret_Name]interceptProjectiles_withTags |
|||
[turret_Name]interceptProjectiles_andTargetingGroundUnderDistance |
|||
[turret_Name]interceptProjectiles_andUnderDistance |
|||
[turret_Name]interceptProjectiles_andOverHeight |
|||
[turret_Name]laserDefenceEnergyUse |
|||
[turret_Name]invisible |
|||
[turret_Name]image |
|||
[turret_Name]image_applyTeamColors |
|||
[turret_Name]image_drawOffsetX |
|||
[turret_Name]image_drawOffsetY |
|||
[turret_Name]chargeEffectImage |
|||
[turret_Name]warmupStartEffect |
|||
[turret_Name]shoot_sound |
|||
[turret_Name]shoot_sound_vol |
|||
[turret_Name]shoot_flame |
|||
[turret_Name]shoot_light |
|||
[turret_Name]idleSpin |
|||
[turret_Name]onShoot_playAnimation |
|||
[turret_Name]onShoot_triggerActions |
|||
[turret_Name]onShoot_freezeBodyMovementFor |
|||
[turret_Name]unloadUpToXUnitsAndGiveAttackOrder |
|||
[turret_Name]recoilOffset |
|||
[turret_Name]recoilOutTime |
|||
[turret_Name]recoilReturnTime |
|||
[turret_Name]showRangeUIGuide |
|||
[projectile_Name]life |
|||
[projectile_Name]deflectionPower |
|||
[projectile_Name]explodeOnEndOfLife |
|||
[projectile_Name]autoTargetingOnDeadTarget |
|||
[projectile_Name]autoTargetingOnDeadTargetRange |
|||
[projectile_Name]autoTargetingOnDeadTargetLead |
|||
[projectile_Name]unloadUpToXUnitsFromSource |
|||
[projectile_Name]teleporSource |
|||
[projectile_Name]spawnUnit |
|||
[projectile_Name]spawnProjectilesOnEndOfLife |
|||
[projectile_Name]spawnProjectilesOnExplode |
|||
[projectile_Name]spawnProjectilesOnCreate |
|||
[projectile_Name]convertHitToSourceTeam |
|||
[projectile_Name]tags |
|||
[projectile_Name]flameWeapon |
|||
[projectile_Name]dircetDamage |
|||
[projectile_Name]areaDamage |
|||
[projectile_Name]areaRadius |
|||
[projectile_Name]areaDamageNoFallOff |
|||
[projectile_Name]areaRadiusFromEdge |
|||
[projectile_Name]areaExpandTime |
|||
[projectile_Name]areaHitAirAndLandAtSameTime |
|||
[projectile_Name]areaHitUnderwaterAlways |
|||
[projectile_Name]areaIgnoreUnitsCloserThan |
|||
[projectile_Name]buildingDamageMultiplier |
|||
[projectile_Name]shieldDamageMultiplier |
|||
[projectile_Name]shieldDefectionMultiplier |
|||
[projectile_Name]hullDamageMultiplier |
|||
[projectile_Name]ignoreParentShootDamageMultiplier |
|||
[projectile_Name]armourIgnoreAmount |
|||
[projectile_Name]friendlyFire |
|||
[projectile_Name]mutatorX_ifUnitWithTags |
|||
[projectile_Name]mutatorX_ifUnitWithoutTags |
|||
[projectile_Name]mutatorX_directDamageMultiplier |
|||
[projectile_Name]mutatorX_areaDamageMultiplier |
|||
[projectile_Name]mutatorX_changedExplodeEffect |
|||
[projectile_Name]mutatorX_addResourcesDiiectHit |
|||
[projectile_Name]mutatorX_addResourcesAreaHit |
|||
[projectile_Name]targetGround |
|||
[projectile_Name]targetGround_includeTargetHeight |
|||
[projectile_Name]targetGroundHeightOffset |
|||
[projectile_Name]speed |
|||
[projectile_Name]targetSpeed |
|||
[projectile_Name]targetSpeedAcceleration |
|||
[projectile_Name]ballistic |
|||
[projectile_Name]ballistic_height |
|||
[projectile_Name]ballistic_delaymove_height |
|||
[projectile_Name]targetGroundSpread |
|||
[projectile_Name]speedSpread |
|||
[projectile_Name]instant |
|||
[projectile_Name]instantReuseLast |
|||
[projectile_Name]instantReuseLast_alsoChangeTurretAim |
|||
[projectile_Name]instantReuseLast_keepAreaDamageList |
|||
[projectile_Name]interceptProjectile_removeTargetLifeOnly |
|||
[projectile_Name]disableLeadTargeting |
|||
[projectile_Name]leadTargetingSpeedCalculation |
|||
[projectile_Name]initialUnguidedSpeedHeight |
|||
[projecitle_Name]gravity |
|||
[projectile_Name]turnSpeed |
|||
[projectile_Name]wobbleAmplitude |
|||
[projectile_Name]wobbleFrequency |
|||
[projectile_Name]pushForce |
|||
[projectile_Name]pushVelocity |
|||
[projectile_Name]moveWithParent |
|||
[projectile_Name]sweepOffset |
|||
[projectile_Name]sweepOffsetFromTargetRadius |
|||
[projectile_Name]sweepSpeed |
|||
[projectile_Name]retargetingInFlight |
|||
[projectile_Name]retargetingInFlightSearchDelay |
|||
[projectile_Name]retargetingInFlightSearchRange |
|||
[projectile_Name]retargetingInFlightSearchLead |
|||
[projectile_Name]retargetingInflightSeearchOnlyTags |
|||
[projecitle_Name]color |
|||
[projecitle_Name]invisible |
|||
[projectile_Name]image |
|||
[projectile_Name]drawType |
|||
[projectile_Name]drawSize |
|||
[projectile_Name]frame |
|||
[projectile_Name]hitSound |
|||
[projectile_Name]explodeEffect |
|||
[projectile_Name]explodeEffectOnShield |
|||
[projectile_Name]teamColorRatio |
|||
[projectile_Name]teamColorRatio_sourceRatio |
|||
[projectile_Name]drawUnderUnits |
|||
[projectile_Name]effectOnCreate |
|||
[projecitle_Name]shouldRevealFog |
|||
[projectile_Name]alwaysVisibleInFog |
|||
[projectile_Name]nukeWeapon |
|||
[projectile_Name]trailEffect |
|||
[projectile_Name]trailEffectRate |
|||
[projectile_Name]lightCastOnGround |
|||
[projectile_Name]lightSize |
|||
[projectile_Name]lightColor |
|||
[projectile_Name]largeHitEffect |
|||
[projectile_Name]lightingEffect |
|||
[projectile_Name]laserEffect |
|||
[projectile_Name]beamImage |
|||
[projectile_Name]beamImageOffsetRate |
|||
[projectile_Name]beamImageStart |
|||
[projectile_Name]beamImageStartRotated |
|||
[projectile_Name]beamImageEnd |
|||
[projectile_Name]beamImageEndRotated |
|||
[movement]movementType |
|||
[movement]slowDeathFall |
|||
[movement]moveSpeed |
|||
[movement]moveAccelerationSpeed |
|||
[movement]moveDecelerationSpeed |
|||
[movement]reverseSpeedPercentage |
|||
[movement]landOnGround |
|||
[movement]targetHeight |
|||
[movement]targetHeightDrift |
|||
[movement]startingHeightOffset |
|||
[movement]heightChangeRate |
|||
[movement]fallingAcceleration |
|||
[movement]fallingAccelerationDead |
|||
[movement]maxTurnSpeed |
|||
[movement]turnAcceleration |
|||
[movement]moveSlidingMode |
|||
[movement]moveIgnoringBody |
|||
[movement]moveSlidingDir |
|||
[movement]joinsGroupFormations |
|||
[ai]useAsBuilder |
|||
[ai]useAsTransport |
|||
[ai]useAsHarvester |
|||
[ai]disableUse |
|||
[ai]ai_upgradePriority |
|||
[ai]buildPriority |
|||
[ai]noneInBaseExtraPriority |
|||
[ai]noneGlobalExtraPriority |
|||
[ai]recommendedInEachBaseNum |
|||
[ai]recommendedInEachBasePriorityIfUnmet |
|||
[ai]upgradedFrom |
|||
[ai]maxGlobal |
|||
[ai]maxEachBase |
|||
[ai]notPassivelyTargetedByOtherUnits |
|||
[ai]lowPriorityTargetForOtherUnits |
|||
[ai]whenUsingAsHarvester_recommendedInEachBase |
|||
[ai]whenUsingAsHarvester_recommendedGlobal |
|||
[ai]whenUsingAsHarvester_includeOtherHarvesterCounts |
|||
[ai]onlyUseAsHarvester_ifBaseHasUnitTagged |
|||
[arm_#]x |
|||
[leg_#]x |
|||
[arm_#]y |
|||
[arm_#]copyFrom |
|||
[arm_#]attach_x |
|||
[arm_#]attach_y |
|||
[arm_#]rotateSpeed |
|||
[arm_#]endDirOffset |
|||
[arm_#]lockMovement |
|||
[arm_#]heightSpeed |
|||
[arm_#]moveSpeed |
|||
[arm_#]moveWarmup |
|||
[arm_#]holdDisMin |
|||
[arm_#]holdDisMax |
|||
[arm_#]holdDisMin_maxMovingLegs |
|||
[arm_#]hold_moveOnlyIfFurthest |
|||
[arm_#]holdDisMin_checkNeighbours |
|||
[arm_#]hardLimit |
|||
[arm_#]estimatingPositionMultiplier |
|||
[arm_#]hidden |
|||
[arm_#]image_end |
|||
[arm_#]iamge_end_shadow |
|||
[arm_#]iamge_end_teamColors |
|||
[arm_#]image_foot |
|||
[arm_#]image_foot_shadow |
|||
[arm_#]image_middle |
|||
[arm_#]image_leg |
|||
[arm_#]draw_foot_on_top |
|||
[arm_#]drawOverBody |
|||
[arm_#]drawUnderAllUnits |
|||
[arm_#]drawDirOffset |
|||
[arm_#]dust_effect |
|||
[arm_#]spinRate |
|||
[arm_#]favourOppositeSideNeighbours |
|||
[arm_#]drawLegWhenZoomedOut |
|||
[arm_#]drawFootWhenZoomedOut |
|||
[arm_#]liftingHeightOffset |
|||
[arm_#]targetHeight |
|||
[arm_#]targetHeightRelative |
|||
[attachment_Name]x |
|||
[attachment_Name]y |
|||
[attachment_Name]height |
|||
[attachment_Name]idleDir |
|||
[attachment_Name]idleDirReversing |
|||
[attachment_Name]isVisible |
|||
[attachment_Name]onCreateSpawnUnitOf |
|||
[attachment_Name]isUnselectable |
|||
[attachment_Name]canAttack |
|||
[attachment_Name]canBeAttackedAndDamaged |
|||
[attachment_Name]deattachIfWantingToMove |
|||
[attachment_Name]lockLegMovement |
|||
[attachment_Name]keepAliveWhenParentDies |
|||
[attachment_Name]setDrawLayerOnTop |
|||
[attachment_Name]setDrawLayerOnBottom |
|||
[attachment_Name]addTransportedUnits |
|||
[attachment_Name]lockRotation |
|||
[attachment_Name]rotateWithParent |
|||
[attachment_Name]resetRotationWhenNotAttacking |
|||
[attachment_Name]prioritizeParentsMainTarget |
|||
[attachment_Name]alwaysAllowedToAttackParentsMainTarget |
|||
[attachment_Name]onParentTeamChangeKeepCurrentTeam |
|||
[attachment_Name]smoothlyBlendPositionWhenExistingUnitAdded |
|||
[attachment_Name]keepWaypointsNeedingMovement |
|||
[attachment_Name]showAllActionFrom |
|||
[attachment_Name]createIncompleteIfParentIs |
|||
[attachment_Name]redirectDamageToParent |
|||
[attachment_Name]redirectDamageToParent_shieldOnly |
|||
[action_Name]text |
|||
[action_Name]textPostFix |
|||
[action_Name]description |
|||
[action_Name]displayType |
|||
[action_Name]displayRemainingStockpile |
|||
[action_Name]pos |
|||
[action_Name]iconImage |
|||
[action_Name]iconExtraImage |
|||
[action_Name]iconExtraColor |
|||
[action_Name]iconExtraIsVisible |
|||
[action_Name]unitShownInUI |
|||
[action_Name]guiBuildUnit |
|||
[action_Name]setBuilt |
|||
[action_Name]tags |
|||
[action_Name]textAddUnitName |
|||
[action_Name]descriptionAddFromUnit |
|||
[action_Name]descriptionAddUnitStats |
|||
[action_Name]unitShownInUIWithHpBar |
|||
[action_Name]unitShownInUIWithProgressBar |
|||
[action_Name]alwaysSinglePress |
|||
[action_Name]price |
|||
[action_Name]isActive |
|||
[action_Name]isVisible |
|||
[action_Name]isLocked |
|||
[action_Name]isLockedMessage |
|||
[action_Name]isLockedAlt |
|||
[action_Name]isLockedAlt2 |
|||
[action_Name]allowMultipleInQueue |
|||
[action_Name]onlyOneUnitAtTAime |
|||
[action_Name]isGuiBlinking |
|||
[action_Name]isAlsoViewableByAllies |
|||
[action_Name]isAlsoViewableByEnemies |
|||
[action_Name]ai_isHighProiority |
|||
[action_Name]ai_isDisabled |
|||
[action_Name]ai_considerSameAsBuilding |
|||
[action_Name]autoTriggerOnEvent |
|||
[action_Name]autoTrigger |
|||
[action_Name]autoTriggerCheckRate |
|||
[action_Name]buildSpeed |
|||
[action_Name]highPriorityQueue |
|||
[action_Name]canPlayerCancel |
|||
[action_Name]whenBuilding_cannotMove |
|||
[action_Name]whenBuiling_playAnimation |
|||
[action_Name]whenBuilding_rotateTo |
|||
[action_Name]whenBUilding_rotateTo_orBackwards |
|||
[action_Name]whenBuilding_rotateTo_waitTillRotated |
|||
[action_Name]whenBuilding_temporarilyConvertTo |
|||
[action_Name]whenBuilding_temporarilyConvertTo_keepFields |
|||
[action_Name]whenBuilding_triggerAction |
|||
[action_Name]whenBuilding_rotateTo_aimAtActionTarget |
|||
[action_Name]whenBuilding_rotateTo_rotateTurretX |
|||
[action_Name]spawnEffectsOnQueue |
|||
[action_Name]playSoundToPlayerOnQueue |
|||
[action_Name]requireConditional |
|||
[action_Name]convertTo |
|||
[action_Name]convertTo_keepCurrentTags |
|||
[action_Name]convertTo_keepCurrentFields |
|||
[action_Name]addEnergy |
|||
[action_Name]addResources |
|||
[action_Name]addResourcesScaledByAIHandicaps |
|||
[action_Name]addResourcesWithLogic |
|||
[action_Name]setResourcesWithLogic |
|||
[action_Name]deleteSelf |
|||
[action_Name]resetCustomTimer |
|||
[action_Name]setBodyRotation |
|||
[action_Name]setUnitStats |
|||
[action_Name]resetUnitStats |
|||
[action_Name]setUnitMemory |
|||
[action_Name]sendMessageTo |
|||
[action_Name]sendMessageWithTags |
|||
[action_Name]sendMessageWithData |
|||
[action_Name]refundAllQueuedItems |
|||
[action_Name]removeAllQueuedItemsWithoutRefund |
|||
[action_Name]alsoTriggerAction |
|||
[action_Name]alsoQueueAction |
|||
[action_Name]alsoTriggerOrQueueActionConditional |
|||
[action_Name]alsoTriggerOrQueueActionWithTarget |
|||
[action_Name]playSoundAtUnit |
|||
[action_Name]playSoundGloabally |
|||
[action_Name]playSoundToPlayer |
|||
[action_Name]fireTurretXAtGround |
|||
[action_Name]fireTurretXAtGround_withOffset |
|||
[action_Name]fireTurretXAtGround_withProjectile |
|||
[action_Name]fireTurretXAtGround_withTarget |
|||
[action_Name]fireTurretXAtGround_count |
|||
[action_Name]fireTurretXAtGround_onlyOverPassableTileOf |
|||
[action_Name]spawnUnits |
|||
[action_Name]produceUnits |
|||
[action_Name]spawnEffects |
|||
[action_Name]offsetSelfAbsolute |
|||
[action_Name]addUnitsIntoTransport |
|||
[action_Name]deleteNumUnitsFromTransport |
|||
[action_Name]deleteNumUnitsFromTransport_onlyWithTags |
|||
[action_Name]startUnloadingTranport |
|||
[action_Name]forceUnloadTransportNow |
|||
[action_Name]forceUnloadTransportNow_onlyOnSlot |
|||
[action_Name]clearAllWaypoints |
|||
[action_Name]clearActiveWaypoint |
|||
[action_Name]addWaypoint_type |
|||
[action_Name]addWaypoint_unitType |
|||
[action_Name]addWaypoint_prepend |
|||
[action_Name]addWaypoint_triggerActionIfFailed |
|||
[action_Name]addWaypoint_triggerActionIfMatched |
|||
[action_Name]addWaypoint_maxTime |
|||
[action_Name]addWaypoint_target_nearestUnit_tagged |
|||
[action_Name]addWaypoint_target_nearestUnit_team |
|||
[action_Name]addWaypoint_target_nearestUnit_maxRange |
|||
[action_Name]addWaypoint_target_nearestUnit_mapMustBeReachable |
|||
[action_Name]addWaypoint_target_nearestUnit_fromReference |
|||
[action_Name]addWaypoint_position_offsetFromSelf |
|||
[action_Name]addWaypoint_position_fromAction |
|||
[action_Name]addWaypoint_position_randomOffsetFromSelf |
|||
[action_Name]addWaypoint_position_relativeOffsetFromSelf |
|||
[action_Name]addWaypoint_target_randomUnit_tagged |
|||
[action_Name]addWaypoint_target_randomUnit_team |
|||
[action_Name]addWaypoint_target_randomUnit_maxRange |
|||
[action_Name]addAllActionCooldownsTime |
|||
[action_Name]addActionCooldownTime |
|||
[action_Name]addActionCooldownApplyToActions |
|||
[action_Name]clearAllActionCooldowns |
|||
[action_Name]playAnimation |
|||
[action_Name]playAnimationIfNotPlaying |
|||
[action_Name]finishPlayingLastAnimation |
|||
[action_Name]stopLastAnimation |
|||
[action_Name]switchToNeutralTeam |
|||
[action_Name]switchToAggressiveTeam |
|||
[action_Name]switchToTeam |
|||
[action_Name]takeResources |
|||
[action_Name]takeResources_includeUnitsInTransport |
|||
[action_Name]takeResources_includeParent |
|||
[action_Name]takeResources_includeReference |
|||
[action_Name]takeResources_includeUnitsWithinRange |
|||
[action_Name]takeResources_includeUnitsWithinRange_team |
|||
[action_Name]takeResources_excludeUnitsWithoutTags |
|||
[action_Name]takeResources_excludeUnitsWithTheseResources |
|||
[action_Name]takeResources_excludeUnitsWithoutAllResources |
|||
[action_Name]takeResources_triggerActionIfAnyCollected |
|||
[action_Name]takeResources_triggerActionIfNoneCollected |
|||
[action_Name]takeResources_discardCollected |
|||
[action_Name]takeResources_keepResourcesOnTarget |
|||
[action_Name]takeResources_maxUnits |
|||
[action_Name]takeResources_directTransfrStoppingAtZero |
|||
[action_Name]convertResource_from |
|||
[action_Name]convertResource_to |
|||
[action_Name]convertResource_minAmount |
|||
[action_Name]convertResource_maxAmount |
|||
[action_Name]convertResource_multiplyAmountBy |
|||
[action_Name]resourceAmount |
|||
[action_Name]resourceAmount_setValue |
|||
[action_Name]resourceAmount_addOtherResource |
|||
[action_Name]resourceAmount_multiplyBy |
|||
[action_Name]attachments_addNewUnits |
|||
[action_Name]attachments_deleteNumUnits |
|||
[action_Name]attachments_onlyOnSlots |
|||
[action_Name]disconnectFromParent |
|||
[action_Name]attachments_unload |
|||
[action_Name]attachemnts_disconnect |
|||
[action_Name]temporarilyAddTags |
|||
[action_Name]temporarilyRemoveTags |
|||
[action_Name]resetToDefaultTags |
|||
[action_Name]addGlobalTeamTags |
|||
[action_Name]removeGlobalTeamTags |
|||
[action_Name]showMessageToPlayer |
|||
[action_Name]showMessageToAllPlayers |
|||
[action_Name]showMessageToAllEnemyPlayers |
|||
[action_Name]showQuickWarLogToPlayer |
|||
[action_Name]showQuickWarLogToAllPlayers |
|||
[action_Name]debugMessage |
|||
[action_Name]setHeight |
|||
[action_Name]teleportTo |
|||
[action_Name]transportTargetNow |
|||
[action_Name]id |
|||
[action_Name]fireTurretXAtGround_showGuideDecals |
|||
[action_Name]autoTriggerOnEventRecursionLimit |
|||
[action_Name]takeResources_triggerActionForEach |
|||
[action_Name]takeResources_searchOnly |
|||
[action_Naem]alsoTriggerActionRepeat |
|||
[effect_Name]life |
|||
[effect_Name]lifeRandom |
|||
[effect_Name]alsoEmitEffects |
|||
[effect_Name]alsoEmitEffectsOnDeath |
|||
[effect_Name]ifSpawnFailsEmitEffects |
|||
[effect_Name]alsoPlaySound |
|||
[effect_Name]createWhenOffscreen |
|||
[effect_Name]createWhenZoomOut |
|||
[effect_Name]createWhenOverLiquid |
|||
[effect_Name]createWhenOverLand |
|||
[effect_Name]spawnChance |
|||
[effect_Name]showInFog |
|||
[effect_Name]delayedStartTimer |
|||
[effect_Name]liveAfterAttachedDies |
|||
[effect_Name]priority |
|||
[effect_Name]attachedToUnit |
|||
[effect_Name]alwayStartDirAtZero |
|||
[effect_Name]atmospheric |
|||
[effect_Name]physics |
|||
[effect_Name]physicsGravity |
|||
[effect_Name]xOffsetRelative |
|||
[effect_Name]yOffsetRelative |
|||
[effect_Name]xOffsetRelativeRandom |
|||
[effect_Name]yOffsetRelativeRandom |
|||
[effect_Name]xOffsetAbsolute |
|||
[effect_Name]yOffsetAbsolute |
|||
[effect_Name]xOffsetAbsoluteRandom |
|||
[effect_Name]yOffsetAbsoluteRandom |
|||
[effect_Name]xSpeedRelative |
|||
[effect_Name]ySpeedRelative |
|||
[effect_Name]xSpeedRelativeRandom |
|||
[effect_Name]ySpeedRelativeRandom |
|||
[effect_Name]xSpeedAbsolute |
|||
[effect_Name]ySpeedAbsolute |
|||
[effect_Name]xSpeedAbsoluteRandom |
|||
[effect_Name]ySpeedAbsoluteRandom |
|||
[effect_Name]hOffset |
|||
[effect_Name]hOffsetRandom |
|||
[effect_Name]hSpeed |
|||
[effect_Name]hSpeedRandom |
|||
[effect_Name]dirOffset |
|||
[effect_Name]dirOffsetRandom |
|||
[effect_Name]dirSpeed |
|||
[effect_Name]dirSpeedRandom |
|||
[effect_Name]frameIndex |
|||
[effect_Name]frameIndexRandom |
|||
[effect_Name]stripIndex |
|||
[effect_Name]image |
|||
[effect_Name]imageShadow |
|||
[effect_Name]scaleFrom |
|||
[effect_Name]scaleTo |
|||
[effect_Name]color |
|||
[effect_Name]teamColorRatio |
|||
[effect_Name]drawUnderUnits |
|||
[effect_Name]fadeInTime |
|||
[effect_Name]fadeOut |
|||
[effect_Name]alpha |
|||
[effect_Name]shadow |
|||
[effect_Name]pivotOffset |
|||
[effect_Name]pivotOffsetRandom |
|||
[effect_Name]total_frames |
|||
[effect_Name]animateFrameStart |
|||
[effect_Name]animateFrameEnd |
|||
[effect_Name]animateFramePingPong |
|||
[effect_Name]animateFrameSpeed |
|||
[effect_Name]animateFrameSpeedRandom |
|||
[effect_Name]animateFrameLooping |
|||
[effect_Name]trailEffect |
|||
[effect_Name]trailEffectRate |
|||
[animation_Name]onActions |
|||
[animation_Name]onActionsQueuedUnitPlayAt |
|||
[animation_Name]blendIn |
|||
[animation_Name]blendOut |
|||
[animation_Name]pingPong |
|||
[animation_Name]KeyFrameTimeScale |
|||
[animation_Name]arm#_[time] |
|||
[animation_Name]leg#_[time] |
|||
[animation_Name]body_[time] |
|||
[animation_Name]effect_[time] |
|||
[animation_Name]direction_units |
|||
[animation_Name]direction_strideX |
|||
[animation_Name]direction_strideY |
|||
[animation_Name]direction_starting |
|||
[placementRule_Name]anyRuleInGroup |
|||
[placementRule_Name]searchTags |
|||
[placementRule_Name]searchTeam |
|||
[placementRule_Name]searchOffsetX |
|||
[placementRule_Name]searchOffsetY |
|||
[placementRule_Name]searchDistance |
|||
[placementRule_Name]excludeIncompleteBuildings |
|||
[placementRule_Name]excludeNonBuildings |
|||
[placementRule_Name]minCount |
|||
[placementRule_Name]maxCount |
|||
[placementRule_Name]blocksPlacement |
|||
[placementRule_Name]cannotPlaceMessage |
|||
[placementRule_Name]checkEachTile |
|||
[resource_Name]displayName |
|||
[global_resource_Name]displayName |
|||
[resource_Name]displayNameShort |
|||
[resource_Name]hidden |
|||
[resource_Name]priority |
|||
[resource_Name]displayColor |
|||
[resource_Name]displayRoundedDown |
|||
[resource_Name]displayTextPrefix |
|||
[resource_Name]displayTextPostfix |
|||
[resource_Name]displayTextAppendResource |
|||
[resource_Name]displayWhenZero |
|||
[resource_Name]displayPos |
|||
[resource_Name]iconImage |
|||
[resource_Name]iconImageUseInText |
|||
[resource_Name]displayNameHideWhenIconShownInText |
|||
[resource_Name]displayNameHideWhenIconShownInHUD |
|||
[resource_Name]displayColorUseInText |
|||
[resource_Name]appendResourceInHUD |
|||
[resource_Name]appendResourceInHUD_whenThisZero |
|||
[resource_Name]displayPrefixInHUD |
|||
[resource_Name]displayPostfixInHUD |
|||
[resource_Name]displayTextAppendResourceWithGap |
|||
[resource_Name]displayDigitGrouping |
|||
[resource_Name]equivalentGlobalResourceForAI |
|||
[resource_Name]valueInStats |
|||
[resource_Name]displayInHUd |
|||
[template_Name] |
|||
[decal_Name]layer |
|||
[decal_Name]order |
|||
[decal_Name]onlyWhenSelectedByOwnPlayer |
|||
[decal_Name]onlyWhenSelectedByEnemyPlayer |
|||
[decal_Name]onlyWhenSelectedByAllyNotOwnPlayer |
|||
[decal_Name]onlyWhenSelectedByAnyPlayer |
|||
[decal_Name]includeParentSelection |
|||
[decal_Name]onlyPlayersWithUnitControl |
|||
[decal_Name]onlyTeam |
|||
[decal_Name]onlyWithZoomLevelOrMore |
|||
[decal_Name]onlyWhileActive |
|||
[decal_Name]onlyWhileAlive |
|||
[decal_Name]onlyOnNonPreview |
|||
[decal_Name]isVisible |
|||
[decal_Name]imageScale |
|||
[decal_Name]imageScaleX |
|||
[decal_Name]imageScaleY |
|||
[decal_Name]image |
|||
[decal_Name]imageStack |
|||
[decal_Name]teamColors |
|||
[decal_Name]stack_hOffset |
|||
[decal_Name]stack_frameOffset |
|||
[decal_Name]stack_drawInReverseOrder |
|||
[decal_Name]stack_indexCount |
|||
[decal_Name]total_frames |
|||
[decal_Name]frame_width |
|||
[decal_Name]frame_height |
|||
[decal_Name]frame |
|||
[decal_Name]xOffsetRelative |
|||
[decal_Name]yOffsetRelative |
|||
[decal_Name]xOffsetAbsolute |
|||
[decal_Name]yOffsetAbsolute |
|||
[decal_Name]hOffset |
|||
[decal_Name]dirOffset |
|||
[decal_Name]pivotOffset |
|||
[decal_Name]alwaysStartDirAtZero |
|||
[decal_Name]imageShadow |
|||
[decal_Name]shadowOffsetX |
|||
[decal_Name]shadowOffsetY |
|||
[decal_Name]basePosition |
|||
[decal_Name]basePositionFromLegEnd |
|||
[decal_Name]basePositionFromTurret |
|||
[decal_Name]drawLineTo |
|||
[decal_Name]color |
|||
[decal_Name]lineWidth |
|||
[decal_Name]alpha |
|||
[comment_Name] |
|||
</pre> |
</pre> |
||
部分节可以自行添加名称或序号,如上面的"NAME"要求填写名称,"#"要求填写序号(1-20),这样得到的同类型不同名称的节,在应用时是各自独立的;允许重复书写一个节使其分布在文档的不同位置。 |
|||
}} |
|||
=== |
=== 参数的类型 === |
||
参数是文档中真正起作用的部分,每行参数必然关联者一个功能;参数(行)必须跟随在某个节的后面,以从属该节;节会因缺少必要参数而报错;部分参数有默认值,即使不写出也会起作用。<br /> |
|||
注释即为对代码的解释和说明。清晰的注释有利于帮助理解代码的含义。铁锈战争的<code>.ini</code>文件语法在注释方面提供了三种方式: |
|||
有关具体参数的参考请移步至[[mod参数]]。 |
|||
=== 书写建议 === |
|||
(1)用<code>#</code>进行单行的注释 |
|||
规范书写是为了方便阅读,在你使用眼睛查找某个参数时心中越多的筛选条件你找的就会越快,而我们直觉上会对写过的代码进行功能上的归类,所以你节之间插入两个以上的空行,几行参数组合形成的功能块你也可以在它们上下各空一行与其他参数进行分隔;而参数名称和值之间只有冒号未免拥挤,你可以在冒号后加入一个空格。 |
|||
在行的开头加上符号<code>#</code>后,游戏程序会忽略这一行的内容,不将其作为代码解析。但编写这些的人类可以注意到这些。 |
|||
<pre style="white-space:pre;overflow:auto;"> |
|||
[projectile_1] |
|||
#directDamage: 20 |
|||
#经由反馈,伤害应该提高至30 |
|||
directDamage: 30 |
|||
… |
|||
</pre> |
|||
(2)用<code>"""</code>和<code>"""</code>的组合进行多行注释 |
|||
在行头使用<code>"""</code>作为起始,在之后的行尾使用<code>"""</code>作为结束。在其之间的内容均会被游戏忽略。注意:三个引号的组合还被游戏用于忽略 值 的换行符,有可能两个功能发生冲突。 |
|||
<pre style="white-space:pre;overflow:auto;"> |
|||
""" |
|||
这是三个英文引号 |
|||
实际上这个组合还有个功能,就是用它引住key: VALUE的value,使value允许换行输入如: |
|||
builtFrom_1_name: airFactory |
|||
可以是 |
|||
builtFrom_1_name: """airF |
|||
actory""" |
|||
可是有一种情况,你用多行注释注释掉了有换行输入的内容它显然就会混乱,也就是目前的情况 |
|||
""" |
|||
</pre> |
|||
(3)用<code>[comment_NAME]</code>进行成节的注释 |
|||
该节之后的行直到下一个节前一行均不会被加载。 |
|||
<pre style="white-space:pre;overflow:auto;"> |
|||
[comment_hiddenAction_1] |
|||
autoTriggerOnEvent: created |
|||
addGlobalTeamTags: 计时 |
|||
[comment_1] |
|||
maxHp: 2000 |
|||
[core] |
|||
#[comment_NAME]节下的东西是不会被加载的,去引用它会提示找不到任何key |
|||
@copyFromSection: comment_1 |
|||
… |
|||
</pre> |
|||
== mod-info.txt文件 == |
== mod-info.txt文件 == |
||
纯文本文件。游戏通过 |
UTF-8纯文本文件。游戏通过读取位于mod文件夹根目录下<code>mod-info.txt</code>这样命名的文件来获得由mod作者提供的mod的描述信息。 |
||
格式: |
|||
相关参数解释: |
|||
<pre style="white-space:pre;overflow:auto;"> |
<pre style="white-space:pre;overflow:auto;margin:0;padding:0;width:100%;"> |
||
#(必填) |
|||
[mod] |
[mod] |
||
# |
#告诉游戏能够支持该mod运行的最低游戏版本。若不满足要求的最低版本,提示后仍可加载,但除地图外不可用,同时不提供代码错误的报错提醒。 |
||
minVersion: |
minVersion: 1.15p7 |
||
# |
#该mod在游戏中显示的标题 |
||
title: Mega Builders |
title: Mega Builders |
||
# |
#该mod在游戏中显示的描述。使用"\n"使其在显示时换行(pc版尚不能换行显示) |
||
description: Example mod which replaces builders with Mega Builders. |
description: Example mod which replaces builders with Mega Builders. |
||
# |
#在游戏中播放mod里的.ogg或.wav音频文件作为背景音乐 |
||
[music] |
[music] |
||
#填音乐文件夹的路径 |
#填音乐文件夹的路径 |
||
sourceFolder: soundtrack |
sourceFolder: soundtrack |
||
#当使用该mod的单位时播放该mod的音乐,填"true"或"false" |
#当使用该mod的单位时特别播放该mod的音乐,填"true"或"false" |
||
whenUsingUnitsFromThisMod_playExclusively: true |
whenUsingUnitsFromThisMod_playExclusively: true |
||
#加入音乐播放列表,填"true"或"false" |
#加入音乐播放列表,填"true"或"false" |
||
第984行: | 第69行: | ||
#该文件支持单行注释 |
#该文件支持单行注释 |
||
""" |
""" |
||
和 |
|||
多行 |
多行 |
||
注释 |
注释 |
||
""" |
|||
</pre> |
</pre> |
||
== all-units.template文件 == |
== all-units.template文件 == |
||
纯文本文件。游戏程序会识别<code>all-units.template</code>这样命名的文件,将其内容自动应用到同级及以下级的所有<code>.ini</code>文件中(效果与使用<code>core</code>节下的<code>copyFrom</code>一致)。若存在代码错误,报错不会指向其本身,而是其所应用的<code>.ini</code>文件。 |
UTF-8纯文本文件。内容格式与<code>.ini</code>文件一致。游戏程序会识别<code>all-units.template</code>这样命名的文件,将其内容自动应用到同级及以下级的所有<code>.ini</code>文件中(效果与使用<code>core</code>节下的<code>copyFrom</code>一致)。若存在代码错误,报错不会指向其本身,而是其所应用的<code>.ini</code>文件。另外,若两文件同一参数的值存在冲突,下级的<code>all-units.template</code>会覆盖上级的<code>all-units.template</code>。 |
||
下级的<code>all-units.template</code>会替换上级的<code>all-units.template</code> |
2023年8月5日 (六) 15:39的最新版本
![]() |
Rusted Wiki欢迎您参与完善本条目 |
.ini文件
UTF-8纯文本文件。游戏通过读取以.ini
为扩展名的文件来获得某个单位的参数信息。其内容主要由节(Section)和参数(Parameter)两部分组成。
格式
#节由两个半角方括号包裹,单独占一行 [section] #参数由它的名称和它的值构成,名称和值使用半角冒号分隔,通常单独占一行 name: value
*另有部分代码存在不同的书写格式,待到具体代码再作讲解。
参数从属于节,要想具体参数从属于具体节,需将节写在参数行的上方;不同参数的值有不同类型,且规定有取值区间。
节的类型
截至1.15版本,节的类型有:
[core]--基础节,涉及单位的名称、生命值、体积大小、是建筑与否等基本设置。 [canBuild_NAME]--可建造节,涉及单位能建造生产那些单位,建造方式和条件等设置。 [graphics]--图像节,涉及单位主体贴图等设置。 [attack]--攻击节,涉及单位能攻击与否、最大攻击范围等设置。 [turret_NAME]--炮塔节,涉及单位炮塔的贴图、旋转速度、攻击间隔等设置。 [projectile_NAME]--炮弹节,涉及单位炮塔发射的弹丸的贴图、寿命、飞行速度、伤害等设置。 [movement]--移动节,涉及单位的移动类型、速度、转向速度等设置。 [ai]--AI节,涉及AI玩家对该单位的建造、升级概率以及部分单位特性等设置。 [arm_#]--臂节,涉及单位臂装饰物的位置、贴图等设置。 [leg_#]--腿节,同上。 [attachment_NAME]--附属节,涉及单位的子附属单位的位置、能攻击与否等设置。 [action_NAME]--操作节,涉及单位的资源手动添加、手动升级按钮、添加路径点等设置。 [hiddenAction_NAME]--隐藏的操作节,同上。 [effect_NAME]--特效节,涉及单位炮塔开火,弹丸飞行、爆炸等生成的特效的设置。 [animation_NAME]--动画节,涉及单位移动、部署、攻击等时机播放的帧动画的设置。 [placementRule_NAME]--放置规则节,单位建造时放置的规则的设置。 [global_resource_NAME]--全局资源节,队伍内单位通用的自定义资源的名称、样式设置。 [resource_NAME]--资源节,具体单位自用的自定义资源的名称样式设置 [template_NAME]--模板节,节之间复制参数时选用。 [comment_NAME]--注释节,用于大篇幅注释。 [decal_NAME]--贴花节,单位身上的贴花、伪3D等设置。
部分节可以自行添加名称或序号,如上面的"NAME"要求填写名称,"#"要求填写序号(1-20),这样得到的同类型不同名称的节,在应用时是各自独立的;允许重复书写一个节使其分布在文档的不同位置。
参数的类型
参数是文档中真正起作用的部分,每行参数必然关联者一个功能;参数(行)必须跟随在某个节的后面,以从属该节;节会因缺少必要参数而报错;部分参数有默认值,即使不写出也会起作用。
有关具体参数的参考请移步至mod参数。
书写建议
规范书写是为了方便阅读,在你使用眼睛查找某个参数时心中越多的筛选条件你找的就会越快,而我们直觉上会对写过的代码进行功能上的归类,所以你节之间插入两个以上的空行,几行参数组合形成的功能块你也可以在它们上下各空一行与其他参数进行分隔;而参数名称和值之间只有冒号未免拥挤,你可以在冒号后加入一个空格。
mod-info.txt文件
UTF-8纯文本文件。游戏通过读取位于mod文件夹根目录下mod-info.txt
这样命名的文件来获得由mod作者提供的mod的描述信息。
格式:
[mod] #告诉游戏能够支持该mod运行的最低游戏版本。若不满足要求的最低版本,提示后仍可加载,但除地图外不可用,同时不提供代码错误的报错提醒。 minVersion: 1.15p7 #该mod在游戏中显示的标题 title: Mega Builders #该mod在游戏中显示的描述。使用"\n"使其在显示时换行(pc版尚不能换行显示) description: Example mod which replaces builders with Mega Builders. #在游戏中播放mod里的.ogg或.wav音频文件作为背景音乐 [music] #填音乐文件夹的路径 sourceFolder: soundtrack #当使用该mod的单位时特别播放该mod的音乐,填"true"或"false" whenUsingUnitsFromThisMod_playExclusively: true #加入音乐播放列表,填"true"或"false" addToNormalPlaylist: false #该文件支持单行注释 """ 和 多行 注释 """
all-units.template文件
UTF-8纯文本文件。内容格式与.ini
文件一致。游戏程序会识别all-units.template
这样命名的文件,将其内容自动应用到同级及以下级的所有.ini
文件中(效果与使用core
节下的copyFrom
一致)。若存在代码错误,报错不会指向其本身,而是其所应用的.ini
文件。另外,若两文件同一参数的值存在冲突,下级的all-units.template
会覆盖上级的all-units.template
。