为车辆创建新配置最简单的方法是:在零件选择器中选择你需要的零件,进入“保存&加载”页面,然后保存你的配置。
配置文件将会被保存到 “vehicles” 文件夹中,并自动生成一个缩略图。
如果想要将这些配置包含在你的模组中,只需将其拖放到模组文件夹中即可。
配置文件包含以下几个内容:
对于大多数将包含在模组中的配置文件,通常需要手动删除两个部分。
第一个是移除 “paints” 部分。该部分定义了配置使用的颜色,但也会将生成车辆的颜色固定死,导致车辆选择器中的颜色选择功能无法正常工作。正确做法是把配置的颜色信息写到 info 文件中。
第二个是移除 “licenseName” 部分。这样配置文件会使用玩家自定义的车牌号码,而不是固定值。
如果你正在制作一个新模组,你需要为车辆本身创建一个 info 文件,它将定义在车辆选择器中展示的一些属性、可用的喷漆方案、默认配置和一些其他参数。
你可以使用此文件 作为起点。
brand 和 name 会作为车辆在选择器中的名称。其它大部分元素会作为筛选条件使用。
default_pc 表示要用作默认的配置,defaultPaintName 用于指定在变体 info 文件没有定义涂装时使用的涂装。
paints 列表定义了所有可在车辆选择器中使用的颜色。所有 paint 参数都用 0 到 1 的数值表示。唯一的例外是 alpha,但它对 PBR 涂装没有影响。
baseColor 用 RGBA 格式定义。
配置文件都创建完成后,你可以继续进行缩略图的生成。
缩略图通常在 Showroom 地图中生成,使用缩略图生成器,加载进入该地图后可以访问该功能。
要生成缩略图,先选择你的车辆,然后点击绿色的播放按钮。生成的缩略图会出现在与配置文件相同的文件夹中。
如果缩略图没有居中,你可能需要调整车辆外部摄像头 的Y轴偏移量。
请注意,默认生成的缩略图尺寸非常大。强烈建议对它们进行缩放,并转换为 jpg 格式,以减小模组体积。
每个配置都会有自己专属的 info 配置文件,命名方式为 info_configName.json。你可以使用此文件 作为模板来开始编写。
该文件中的大多数参数仅用于参考和筛选。最重要的参数是 configuration(配置名),它会作为车辆选择器中展示的配置名称,同时还包括默认的喷漆信息。
While you can manually fill out the various performance values in the info files, there is a way to automatically fill out most of them.
You first need to add these files to your beamNG game folder. This includes a batch file, and a parameters file. Some of those files might already be in your game folder.
Once you have those files in your game folder, change the car in the parameter file to the car you want to test, and run the batch file. The car name should match the name of your car’s vehicle folder.
The game will now run a series of tests on each variant, including an offroad test, and acceleration, top speed and braking tests. You should always keep the game window active, or you might get inaccurate results.
Once the tests are complete, you can find the info files in your vehicle’s folder. The generated info files will keep all the parameters as they were previously defined, with the exception of the measured performances.
这篇文章对你有用吗?