-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
173c801
commit 95c8c62
Showing
3 changed files
with
99 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Action0x00 物品特性 | ||
|
||
Action0x00 可以用来定义新的物品,或是修改现有物品的属性。 | ||
物品即为游戏中的载具、车站、物件(Object)等。 | ||
每项物品有独特的属性,你可以在子页面找到物品的属性列表与解释。 | ||
|
||
```{toctree} | ||
:glob: | ||
:titlesonly: | ||
./action0x00/* | ||
``` | ||
|
||
## 语法 | ||
|
||
Action0x00 在 yagl 中使用 `properties` 呈现。 | ||
|
||
```cpp | ||
// 1145 在这里表示任意值 | ||
// 此处定义的为车站 | ||
properties<Stations, 0x1145> // Action00 | ||
{ | ||
// instance_id: 0x1145 | ||
// 具体属性与对应数值 | ||
{ | ||
class_id: "1145"; | ||
station_name_id: 0x1145; | ||
can_train_enter_tile: 0x11; | ||
pylon_placement: 0x11; | ||
overhead_wire_placement: 0x11; | ||
little_lots_threshold: 0x1145; | ||
general_flags: 0x11; | ||
cargo_type_triggers: 0x11451145; | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# 车站 | ||
|
||
| 序号 | 大小 | 版本 | 描述 | | ||
|------|------|------|------------------------------------| | ||
| 08 | D | 0.6 | 类别 ID | | ||
| 09 | V | 0.6 | 图像布局 | | ||
| 0A | B/B* | 0.6 | 复制图像布局 | | ||
| 0B | B | 0.6 | 回调标志 | | ||
| 0C | B | 0.6 | 禁用站台数量掩码 | | ||
| 0D | B | 0.6 | 禁用站台长度掩码 | | ||
| 0E | V | 0.6 | 自定义布局 | | ||
| 0F | B/B* | 0.6 | 从参数给定的车站 ID 复制自定义布局 | | ||
| 10 | W | 0.6 | 车站货物少量/大量阈值 | | ||
| 11 | B | 0.6 | 接触网杆设置 | | ||
| 12 | D | 0.6 | 触发随机化的货物类别 | | ||
| 13 | B | 0.6 | 一般标志 | | ||
| 14 | B | 0.6 | 接触网设置 | | ||
| 15 | B | 0.6 | 列车是否可以通过车站格 | | ||
| 16 | W | 0.7 | 动画信息 | | ||
| 17 | B | 0.7 | 动画速度 | | ||
| 18 | W | 0.7 | 动画触发条件 | | ||
| 1A | V | 1.2 | 高级图像布局(带临时变量) | | ||
| 1B | | | 预留 | | ||
| 1C | W | 14 | 车站名称指针 | | ||
| 1D | W | 14 | 类别名称指针 | | ||
| 1E | V | 15 | 车站图像布局标识 | | ||
|
||
## 车站名称(1C) | ||
|
||
OpenTTD 14 提供了车站属性 1C,允许用新方式指定车站名称。 | ||
在 OTTD 14 以前,车站名称是使用特定的 Action0x04 编号实现的(0xC500—0xC5FF)。 | ||
|
||
1C 的数值是一个指向 Action0x04 的指针。这个 Action0x04 当中的文本将作为车站名称使用。 | ||
此处指定的 Action0x04 编号必须在 0xDC00—0xFFFF 区间内。 | ||
|
||
## 类别名称(1D) | ||
|
||
1D 与 1C 极其相似。 | ||
|
||
OpenTTD 14 提供了车站属性 1D,允许用新方式指定类别名称。 | ||
在 OTTD 14 以前,车站名称是使用特定的 Action0x04 编号实现的(0xC400—0xC4FF)。 | ||
|
||
1D 的数值是一个指向 Action0x04 的指针。这个 Action0x04 当中的文本将作为类别名称使用。 | ||
此处指定的 Action0x04 编号必须在 0xDC00—0xFFFF 区间内。 | ||
|
||
### 样例 | ||
|
||
```cpp | ||
strings<Stations, default, 0xDC00> // Action04 | ||
{ | ||
/* 0xDC00 */ "My station class"; | ||
/* 0xDC01 */ "My station name"; | ||
} | ||
|
||
properties<Stations, 0x0001> // Action00 | ||
{ | ||
{ | ||
station_name_id: 0xDC01; // 1C | ||
class_name_id: 0xDC00; // 1D | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters