global_resource
stackHorizontal
translation:堆叠水平
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: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:boolean
example:displayRoundedDown:true
对资源进行舍入显示为整数。
displayWhenZero
translation:为零时显示
type:boolean
example:displayWhenZero:true
资源为零时也显示。
iconImageUseInText
translation:在动作(action)的描述中显示资源图标
type:boolean
example:iconImageUseInText:false
默认为true
iconImage
translation:图标
type:file
example:iconImage:chemms.png
自定义该资源的象征图像
displayNameHideWhenIconShownInText
translation:显示名称在文本中显示图标时隐藏
type:boolean
example:displayNameHideWhenIconShownInText:true
(默认为false) - 有助于缩短说明文本
displayNameHideWhenIconShownInHUD
translation:文本显示名称在HUD中显示图标时隐藏
type:boolean
example:displayNameHideWhenIconShownInHUD:true
默认为false
displayColorUseInText
translation:在动作(action)的描述中显示资源颜色
type:boolean
example:displayColorUseInText:false
默认为true
appendResourceInHUD
translation:在HUD中追加资源
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:boolean
example:displayTextAppendResourceWithGap:true
默认为false。将不相关的资源放在同一行时,在资源之间添加空格。
appendResourceInHUD_whenThisZero
translation:在此为零时在HUD中追加资源
type:boolean
example:appendResourceInHUD_whenThisZero:false
默认为true。为false时附加资源(如用于显示最大值的资源)与父资源一起隐藏。
includeInStats
translation:包括值
type:boolean
example:includeInStats:true
包括该资源,与valueInStats类似
valueInStats
translation:统计值
type:integer
example:valueInStats:true
(如果全局且未隐藏,则默认为 1(true),否则默认为 0(false)) - 用于游戏后的统计和回放的排行榜
displayInHud
translation:在HUD里显示
type:boolean
example:displayInHud:true
- 用于 appendResourceInHUD(在HUD中追加资源) 中的资源,而不会隐藏它们,这有其他副作用
displayDigitGrouping
translation:资源数字分组
type:enum
example:displayDigitGrouping:none
none/comma/space--(空,逗号,空格)(例如资源数量10000,空格分组就是10 000)
displayTextAppendResource
translation:显示文本里添加资源
type:(global) resource code name
example:displayTextAppendResource:resource:name
往文本里添加一个资源
displayPos
translation:显示排序
type:integer
example:displayPos:1
显示优先级,越小越居上
displayWithRounding
translation:四舍五入取整
type:boolean
example:displayWithRounding:true
将资源的小数部分用四舍五入法变成整数,此代码为真后,该资源数字一定是整数
displayTextPrefix
translation:显示文本前缀
type:string
example:displayTextPrefix:321
与displayPrefixInHUD有着相同的作用,而且它俩不能共存
displayTextPostfix
translation:显示文本后缀
type:string
example:displayTextPostfix:123
与displayPostfixInHUD有着相同的作用,而且它俩不能共存