Skip to content

Commit 24632b2

Browse files
committed
图像组更新
1 parent 21f305c commit 24632b2

1 file changed

Lines changed: 149 additions & 1 deletion

File tree

rustedwarfareapicode/src/Unit/graphics.md

Lines changed: 149 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ outline: deep
2424
绝对路径中的根目录是以模组包内的首层目录为根目录的。<br>
2525
相对路径则是以ini代码文件的目录为起始目录。<br>
2626
图片和代码在同一目录下直接填写路径的用法相当于使用了相对路径。<br>
27-
此方法基本适用于[graphics]组内所以需要引用图像文件的地方
27+
此方法基本适用于[graphics]组内所有需要引用图像文件的地方
2828
:::
2929

3030
#### image-示例
@@ -111,3 +111,151 @@ image_shield: \124\255\image_shield.png # 相对路径
111111
image_shield: NONE
112112
```
113113

114+
### image_offsetX
115+
#### image_offsetX-代码简介
116+
代码:image_offsetX 中文释义:图像X轴偏移 类型:整数
117+
118+
#### image_offsetX-用法
119+
作用于主体图像,填写的数值会作为偏移的像素大小,可以为负。
120+
121+
::: tip
122+
偏移的方向依据X的数值而定。<br>
123+
X轴以单位中心点为坐标,X增大则图像向右偏移。
124+
:::
125+
126+
#### image_offsetX-示例
127+
```ini
128+
[graphics]
129+
image_offsetX:1 # 偏移量为 1
130+
131+
```
132+
133+
### image_offsetY
134+
#### image_offsetY-代码简介
135+
代码:image_offsetY 中文释义:图像Y轴偏移 类型:整数
136+
137+
#### image_offsetY-用法
138+
作用于主体图像,填写的数值会作为偏移的像素大小,可以为负。
139+
140+
::: tip
141+
偏移的方向依据Y的数值而定。<br>
142+
X轴以单位中心点为坐标,Y增大则图像向下偏移。
143+
:::
144+
145+
#### image_offsetY-示例
146+
```ini
147+
[graphics]
148+
image_offsetY:1 # 偏移量为 1
149+
150+
```
151+
152+
### isVisible
153+
#### isVisible-代码简介
154+
代码:isVisible 中文释义:可见 类型:逻辑布尔值
155+
156+
#### isVisible-用法
157+
填写布尔值或逻辑判断语句,作用于全部图像,会决定单位图像是否可见。
158+
159+
::: info
160+
默认值为true。<br>
161+
即使图像隐藏,在小地图上还是可以看见的。
162+
:::
163+
164+
#### isVisible-示例
165+
```ini
166+
[graphics]
167+
isVisible:false # 使用布尔值
168+
169+
[graphics]
170+
isVisible:if self.hp() > 200 # 使用逻辑语句
171+
172+
```
173+
174+
### isVisibleToEnemies
175+
#### isVisibleToEnemies-代码简介
176+
代码:isVisibleToEnemies 中文释义:对敌人可见 类型:逻辑布尔值
177+
178+
#### isVisibleToEnemies-用法
179+
填写布尔值或逻辑判断语句,作用于全部图像,会决定单位图像是否被敌人可见。
180+
181+
::: info
182+
与showOnMinimapToEnemies,canOnlyBeAttackedByUnitsWithTags一起使用时,可以创建隐形系统。<br>
183+
(抄自HX代码表)
184+
:::
185+
186+
#### isVisibleToEnemies-示例
187+
```ini
188+
[graphics]
189+
isVisibleToEnemies:false # 使用布尔值
190+
191+
[graphics]
192+
isVisibleToEnemies:if self.hp() > 200 # 使用逻辑语句
193+
194+
```
195+
196+
### teamColorsUseHue
197+
#### teamColorsUseHue-代码简介
198+
代码:teamColorsUseHue 中文释义:阵营色色相 类型:布尔值
199+
200+
#### teamColorsUseHue-用法
201+
填写布尔值决定如何使用,大概就是在单位主体图像上附着一层半透明的阵营色滤镜。
202+
203+
::: info
204+
默认为false。
205+
:::
206+
207+
#### teamColorsUseHue-示例
208+
```ini
209+
[graphics]
210+
teamColorsUseHue:true # 使用布尔值
211+
212+
```
213+
214+
### teamColoringMode
215+
#### teamColoringMode-代码简介
216+
代码:teamColoringMode 中文释义:阵营色模式 类型:字符串
217+
218+
#### teamColorsUseHue-用法
219+
填写对应的字符串选择图像的着色逻辑。
220+
221+
::: tip
222+
默认是纯绿,即pureGreen。<br>
223+
一共有disabled、hueShift、hueAdd、pureGreen,四种模式。<br>
224+
中文便是,禁用,色相偏移,色相添加,纯绿。
225+
:::
226+
227+
#### teamColoringMode-示例
228+
```ini
229+
[graphics]
230+
teamColoringMode:disabled # 禁用 会使单位不使用阵营色
231+
232+
[graphics]
233+
teamColoringMode:hueShift # 色相偏移 颜色会影响周围其他像素的着色
234+
235+
[graphics]
236+
teamColoringMode:hueShift # 色相添加 像极了使用teamColorsUseHue,加了一层颜色滤镜
237+
238+
[graphics]
239+
teamColoringMode:pureGreen # 纯绿 默认就是这个
240+
241+
```
242+
243+
### scaleImagesTo
244+
#### scaleImagesTo-代码简介
245+
代码:scaleImagesTo 中文释义:图像缩放到 类型:浮点数
246+
247+
#### scaleImagesTo-用法
248+
填写单位像素以缩放图像,同时影响腿部和阴影图像。
249+
250+
::: tip
251+
这里的像素大小指的是每帧图像宽度的像素大小。<br>
252+
例如图像原每帧宽度12,这里填24,图像将被等比例放大2倍。
253+
:::
254+
255+
#### scaleImagesTo-示例
256+
```ini
257+
[graphics]
258+
scaleImagesTo:12.5
259+
260+
261+
```

0 commit comments

Comments
 (0)