欧卡2中文社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

需要三步,才能开始

只需两步,慢速开始

欧卡2入门方向盘选莱仕达V9莱仕达折叠便携游戏方向盘支架欢迎地图Mod入驻
查看: 2361|回复: 1
收起左侧

[地图] 如何开始一个地图项目-以探路达人地图为例

[复制链接]
ETS2CN 发表于 2022-7-21 22:48 | 显示全部楼层 |阅读模式

欧卡2地图入门

探路达人 是一个极简的独立地图,用于触发探路达人(地图探索达到100%)成就。地图只包含一个国家,一个城市,2个公司,一个车库,以及一小段路。本文以此地图为例,入门欧卡2地图Mod制作。

启动Map Editor

复制steam快捷方式,将目标改为如下形式:

"C:\Program Files (x86)\Steam\steam.exe" -applaunch 227300 -homedir D:\map\pathfinder -edit pathfinder -force_mods -noworkshop

参数说明:

-applaunch 欧卡2的steam id,固定值
-homedir 主文件夹路径,建议设置,和游玩环境分离
-edit 地图Mod的名称
-force_mods Mod文件夹下所有的mod都将按字母顺序加载
-noworkshop 禁用创意工坊

如图所示:

保存地图

完成快捷方式创建之后,点击快捷方式,即可打开Map Editor,此时你应该会看到地图不存在的报错。

不用理会,关掉报错,执行以下步骤:

  1. item type下拉列表选择road,
  2. 按 E ,进入New Item模式
  3. 点击鼠标左键,移动一段距离,再次点击鼠标左键,然后按ESC,画出一条路。
  4. CTRL+S保存地图,名字和上节 -edit 参数保持一致。

此时退出Map Editor,再次点击快捷方式进入 Map Editor,就不会看到报错了,并且可以看到刚刚添加的道路。

进入 -homedir 参数指定的目录,应该可以看到如下目录结构:

国家、城市和公司

一个最小可运行的地图要包含至少一个国家,一个城市,城市里至少有1个车库,2个公司,能够生成运输任务。本例中我们选择了 cargotrasgnt 两个公司。首先要定义国家及城市。

进入 -homedir 参数指定的目录,找到 mod/user_map 文件夹,在 user_map 文件夹下建立如下目录及文件结构:

def
|-- city
|   `-- pathfinder.sui
|-- city.pathfinder.sii
|-- company
|   |-- cargotras
|   |   `-- editor
|   |       `-- pathfinder.sii
|   `-- gnt
|       `-- editor
|           `-- pathfinder.sii
|-- country
|   `-- pathfinder.sui
`-- country.pathfinder.sii

国家

基本规则:

  1. def/country.yourmodname.sii 中引用 country 目录下的 sui 格式国家定义文件
  2. def/country/coutryname.sui 定义国家
  3. def/country/country/ 目录下的3个文件定义国家的车牌,限速,交通等,目前暂时不需要深入了解

本例中, def/country.pathfinder.sii 内容为:

SiiNunit
{
@include "country/pathfinder.sui"
}

def/country/pathfinder.sui 内容为:


country_data: country.data.pathfinder
{
    name: "探路达人"
    country_code: "PF"
    pos:(0,0,0)
    fuel_price: 1.22
    country_id: 500
    lights_mandatory: false
    leftside_traffic: false
    driving_tired_offence: true

    time_zone: 480      # +8 hours in minutes
    time_zone_name: "东八区时间"
}

城市

基本规则:

  1. def/city.yourmodname.sii 中引用 def/city 目录下的 sui 格式城市定义文件
  2. def/city/cityname.sui 中定义城市

本例中,def/city.pathfiner.sii 内容为:

SiiNunit
{
@include "city/pathfinder.sui"
}

def/city/pathfiner.sui 内容为:


city_data : city.pathfinder
{
    city_name: "探路达人"
    country: pathfinder

    map_x_offsets[]: 0
    map_x_offsets[]: 0
    map_x_offsets[]: 0
    map_x_offsets[]: -10
    map_x_offsets[]: -31
    map_x_offsets[]: -29
    map_x_offsets[]: -30
    map_x_offsets[]: -30

    map_y_offsets[]: 0
    map_y_offsets[]: 0
    map_y_offsets[]: 25
    map_y_offsets[]: -28
    map_y_offsets[]: -50
    map_y_offsets[]: -48
    map_y_offsets[]: -26
    map_y_offsets[]: -26

    vehicle_brands[]: "volvo"
}

编辑地图

再次进入Map Editor,添加刚刚我们创建的城市,然后添加两个公司,一个车库,并用道路将他们连接起来。

首先按快捷键D(Delete,删除),然后点击道路的红点,删除刚刚添加的单向道路,我们要添加一个双向1车道的路。然后再按E,进入编辑模式:

添加城市:

添加车库

添加公司:

公司

本例中,我们直接使用了自带的公司。只需要将公司(公司使用的prefab名称)与城市绑定即可。
def/company/<company_name>/editor/<city_name>.sii中绑定。

如本例,我们的城市叫 pathfinder ,要和 cargotrasgnt 两个公司绑定。

def/company/cargotras/editor/pathfinder.sii 内容为:

SiiNunit
{
company_def : .pathfinder {
 city: pathfinder
 prefab: dlc_fr_39
}
}

def/company/gnt/editor/pathfinder.sii

SiiNunit
{
company_def : .pathfinder {
 city: pathfinder
 prefab: 262
}
}

打包

首先创建 manifest.sii 文件,填入Mod的信息:

SiiNunit
{
mod_package : .package_name
{
    # Package version can be any string with any length.
    package_version: "v0.1"
    # Display name can be any string with any length.
    display_name: "探路达人(Pathfinder)专用地图"
    # Author can be any string with any length.
    author: "ets2cn"
    # Categories is an array of strings. 
    category[]: "map"
    # Icon inside the root directory of the mod.
    icon: "mod_icon.jpg"
    # Description file inside the root directory of the mod.
    description_file: "description.txt"
    compatible_versions[]: "1.44.*" # Mod is compatible with 1.44.X..
    dlc_dependencies[]: "dlc_east"
    dlc_dependencies[]: "dlc_north"
    dlc_dependencies[]: "dlc_fr"
    dlc_dependencies[]: "dlc_it"
    dlc_dependencies[]: "dlc_balt"
    dlc_dependencies[]: "dlc_balkan_e"
    dlc_dependencies[]: "dlc_iberia"    
}
}

然后准备 manifest.sii 中指定的 icondescription_filedescription_file内容随意,可以使用一些颜色代码,例如:

[orange]Pathfinder - 探路达人

[normal] 探路达人(地图探索度达到100%)成就专用地图。

[normal]For more information, check our website:

[orange]Credits:
[normal]ets2cn

icon 图片分辨率须为 272x162。

然后将 user_map 文件内的内容打包:

可以将后缀名改为scs:

试玩

将打包好的 探路达人.scs 放到Mod目录(一般为 C:\Users\<yourname>\Documents\Euro Truck Simulator 2\mod),进入游戏,新建存档,Mod管理器里开启探路达人,然后地图选择 pathfinder.mbd 即可。


本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x

本帖被以下淘专辑推荐:

知行 发表于 2023-4-23 14:26 | 显示全部楼层
Navigate to your user folder – C:\Users\<username>\Documents\Euro Truck Simulator 2 by default – and open config.cfg in a text editor.

Find the line g_developer "0" and change the value to "2". Then find g_console "0" and change the value to "1".

uset g_developer "2"
uset g_console "1"
uset g_minicon "1"
回复 打印

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

联系我们|手机版|欧卡2中国 ( 湘ICP备11020288号-1 )

GMT+8, 2024-4-27 12:59 , Processed in 0.046655 second(s), 11 queries , Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表