铁锈战争模组和地图制作帮助文档

入门指南

准备工作

在开始制作铁锈战争模组之前,您需要准备以下工具和资源:

模组文件结构

铁锈战争模组通常遵循以下文件结构:

mod_folder/
├── mod-info.txt          # 模组信息文件
├── units/                # 单位定义文件夹
│   ├── unit1.ini         # 单位定义文件
│   └── unit2.ini
├── projectiles/          # 抛射体定义文件夹
│   └── projectile1.ini
├── effects/              # 效果定义文件夹
│   └── effect1.ini
├── images/               # 图像文件夹
│   ├── units/            # 单位图像
│   ├── projectiles/      # 抛射体图像
│   └── effects/          # 效果图像
└── maps/                 # 自定义地图文件夹
    └── custom_map.ini
            

mod-info.txt文件

每个模组都需要一个mod-info.txt文件来定义模组的基本信息:

[core]
name=我的自定义模组
description=这是一个示例模组,展示了如何创建自定义单位
version=1.0
author=您的名字
            

创建第一个单位

让我们创建一个简单的单位来开始您的模组制作之旅:

[core]
name:基础坦克
class:CustomUnitMetadata
price:1000
maxHp:1000
mass:10000
techLevel:1
buildSpeed:0.002
radius:20
displayRadius:25
fogOfWarSightRange:15

[graphics]
image:units/tank_base.png
image_wreak:units/tank_wreak.png
image_turret:units/tank_turret.png
image_shadow:AUTO
teamColorsUseHue:true
teamColoringMode:hueAdd

[movement]
movementType:LAND
moveSpeed:1.2
maxTurnSpeed:2
reverseSpeedPercentage:0.5

[attack]
canAttack:true
canAttackFlyingUnits:false
canAttackLandUnits:true
canAttackUnderwaterUnits:false
isFixedFiring:false

[turret_1]
x:0
y:0
projectile:main_bullet
turnSpeed:2
size:10
barrelX:0
barrelY:15

[projectile_1]
directDamage:50
life:60
speed:10
image:projectiles/bullet.png
drawType:1
color:#FF0000
            

安装和测试模组

创建完模组文件后,按照以下步骤安装和测试:

  1. 将模组文件夹复制到游戏的mods目录中
  2. 启动铁锈战争游戏
  3. 在主菜单中选择"模组"选项
  4. 启用您的模组
  5. 开始新游戏并测试您的自定义单位

常见问题

在制作模组时可能会遇到以下常见问题:

调试技巧

以下是一些有用的调试技巧:

回到顶部