Hard Truck 2 - Workshop Guide

This guide explains how mods work in Hard Truck 2: King of the Road, how to put one together, and how to publish it to the Steam Workshop with the Workshop Uploader that ships with the game.

  1. How mods work
  2. What you need
  3. Quick start
  4. Mod folder layout
  5. The mod.cfg file
  6. Load order and conflicts
  7. What you can change
  8. Using the Workshop Uploader
  9. Testing your mod
  10. For players: installing mods
  11. Common problems

How mods work

A mod is a folder of game files, laid out the same way as the game's installation folder, plus a small text file called mod.cfg that describes it.

When you start the game from Steam, the mod synchronizer, WorkshopModSync.exe, runs first. It takes out everything it put into the game folder on the previous start, copies the files of your subscribed mods into the game folder, and only then starts the game. A file in a mod replaces the game's file at the same path, and a file the game does not have is added. The game's own files that a mod replaces are kept in the Workshop Backups folder and put back on the first start after the mod stops being active. Unsubscribe, start the game from Steam again, and everything is back to the original.

Three rules follow from this, and they are worth keeping in mind from the start:

  • Files are matched by their path inside the game folder. COMMON\TRUCKS.RES in your mod replaces COMMON\TRUCKS.RES in the game. The same file placed at the top of your mod folder would be copied to the top of the game folder, where the game never looks for it. Files that sit at the top of the game folder, such as ddraw.dll, go at the top of your mod folder. Upper and lower case do not matter.
  • Whole files replace whole files. The game keeps many objects in one file: all trucks share a few files in COMMON (TRUCKS.B3D, TRUCKS.RES and their numbered companions). To change one truck you ship the whole file, and two mods that change the same file cannot be combined: only one version of it ends up in the game.
  • Ship only what you changed. The fewer files a mod contains, the fewer other mods it collides with.

What you need

  • The game installed through Steam, and the Steam client running and signed in with the account you want to publish from. The account must own the game.
  • The Workshop Uploader: Workshop Uploader GUI - Hard Truck 2.exe in the game's installation folder, next to king.exe. Leave it where it is: it must stay in the game folder to work.
  • The Template mod folder from the same place. It contains a ready-to-edit mod.cfg and a placeholder preview image.
  • Most game files are binary formats (models, textures, encoded tables) and need suitable tools to edit.

Quick start

  1. Copy the Template mod folder somewhere outside the game folder and rename the copy after your mod.
  2. Open mod.cfg and set at least ~title.
  3. Replace preview.png with your own image.
  4. Put the game files you changed into your mod folder, at the same paths they have in the game folder.
  5. Try the mod in the game first, see Testing your mod.
  6. Start the Workshop Uploader from the game folder, select your mod folder, and publish.

The uploader saves a file called .workshop_id in your mod folder. That is how it knows which Workshop item to update next time.

Mod folder layout

your_mod/
├─ mod.cfg            (required, describes your mod)
├─ preview.png        (required, shown on the Workshop page)
├─ ddraw.dll          (changed file from the top of the game folder)
├─ COMMON/
│  └─ TRUCKS.RES      (changed file from the COMMON subfolder)
└─ MUSIC/
   └─ track01l.mp3    (changed file from the MUSIC subfolder)

After the first upload the uploader adds:

├─ .workshop_id       (do not delete or edit)

If you delete .workshop_id, the uploader can no longer find your Workshop item, and publishing again creates a brand new item instead of updating the existing one.

Only three files in the mod folder are never copied into the game: mod.cfg at the top of the folder, .workshop_id, and the preview image named in ~preview_image (preview.png unless you set another name). Everything else is copied into the game folder, readme and licence files included. The game has its own README.TXT at the top of its folder, and a README.txt in your mod would replace it. Put notes for players into the Workshop description instead.

The mod.cfg file

One directive per line:

setf ~key value

Lines that do not start with setf are ignored, so you can use them for comments. Values that span several lines, and lists, go in { } braces. If the file contains anything other than Latin letters, save it as UTF-8.

KeyRequiredMeaning
~titleyesName shown on the Workshop, up to 128 characters. A longer title is cut short.
~descriptionnoWorkshop description. Steam BBCode is supported ([b], [list], [url] ...).
~tagsnoWorkshop categories from the list below, each in quotes: {"Vehicles" "Textures"}.
~preview_imagenoFile name of the preview image. Defaults to preview.png. The image itself is required.
~versionnoAny version number you choose, for example 1.0.
~visibilitynopublic, friends or private. Defaults to public.
~prioritynoWhole number, default 0. Negative numbers are allowed. The mod's place in the load order: a higher number loads earlier. See the next section.
~exclusiveno1 means the load order ends with this mod: every mod that would load after it is skipped. For total conversions, and for add-ons that must not be combined with anything else.
~conflictsnoWorkshop IDs of mods this mod cannot be used together with, separated by spaces: {3781112928 3794389861}.

Tags

Pick any that fit. Tags are case-sensitive, so write them exactly as shown.

TagUse for
VehiclesNew or changed trucks, cabins and other vehicles
CargoCargo, goods and orders
TexturesReplaced textures and paint jobs
AudioMusic and sounds
MapsRoads, towns, terrain and objects in the world
BalancePrices, pay, fines, vehicle performance, difficulty
LocalizationTranslations and text changes
UIMenus, fonts, interface graphics
OtherAnything that fits no other tag, for example graphics wrappers or fixes

Example mod.cfg

setf ~title Night Music

setf ~description {
Replaces the game's music with twelve new tracks.

[b]Features:[/b]
[list]
[*] Twelve new tracks
[*] Same volume level as the original music
[/list]
}

setf ~tags {"Audio"}

setf ~preview_image preview.png

setf ~version 1.0

setf ~visibility public

setf ~priority 0

Preview image

  • PNG or JPG, 512 x 512 pixels works best in the Workshop grid.
  • At most 1 MB.

Other requirements

  • At least one file besides mod.cfg and the preview. For the game to use it, it has to be at the same path as in the game folder, see How mods work.
  • Program files (.exe, .dll, .bat, .cmd, .ps1 and similar) are allowed in Hard Truck 2 mods, see Program files. The uploader lists each one as a warning, so that you can confirm it belongs in the mod.

Load order and conflicts

~priority is the mod's place in the load order, not a measure of how important it is.

  • Mods are loaded from the highest ~priority to the lowest. Mods with the same priority load in the alphabetical order of their Workshop titles.
  • Each mod is copied over the mods loaded before it. When two mods contain the same file, the game gets the version from the mod loaded later.
  • Leave ~priority at 0 for an ordinary mod.
  • An add-on that changes files of another mod needs a lower number than that mod, so that it is copied on top of it. Negative numbers are allowed, so an add-on for an ordinary mod can use -1.
  • A mod made to be extended by add-ons can use a higher number, for example 10, so that add-ons left at 0 land on top of it.
  • When two mods with the same priority change the same file, the order of their titles decides, which is not something you should rely on. Set a priority if the order matters.

~conflicts is for mods that cannot work together at all. When a player is subscribed to both, the one that comes first in the load order (the higher priority) is applied and the other is skipped completely. It is enough for one of the two mods to list the other. The Workshop ID is the number at the end of the item's Workshop page address.

~exclusive 1 ends the load order at this mod: every mod that would load after it (a lower priority) is skipped. Mods that load before it (a higher priority) are still applied.

  • A total conversion that must run alone sets ~exclusive 1 together with a high priority, for example 1000, so that nothing loads before it either.
  • For a mod and its add-on that together should not be combined with anything else, mark the add-on, the last mod in the chain. If the base mod is exclusive, its own add-ons load after it and are skipped.
  • If a player has several exclusive mods, the one that comes first in the load order ends it.

For example, a player is subscribed to four mods:

Mod~priority~exclusive
Old Roads20
Big Truck Pack10
Winter Paint51add-on for Big Truck Pack
Night Music0
  • The load order is Old Roads, Big Truck Pack, Winter Paint.
  • Winter Paint is copied over Big Truck Pack, so its version wins every file the two share.
  • Winter Paint is exclusive, so Night Music, which would load after it, is skipped.
  • Old Roads loads before the exclusive mod and is still applied.

The mod synchronizer can write the load order to a log file: which mods were applied and with how many files, and which were skipped and why. See The log file.

What you can change

A mod can replace any file in the game folder or add new ones. The game only reads files it knows by name, so a new file has an effect only when the game or another file refers to it. In practice, new content is made by changing the files that already exist. To change a file, start from a copy of the original, edit it, and put it in your mod folder at the same path.

KindFilesWhat it is
Trucks and cabinsCOMMON\TRUCKS.* COMMON\CABINES.* and the numbered files next to themModels and textures of all trucks and of the cabin interiors. All trucks share these files.
Shared objectsCOMMON\COMMON.* common1.res common2.res Models and textures used throughout the game.
The worldENV\The main map, split into tiles named aa, ab, ac and so on. Each tile has its geometry (.b3d), textures and other resources (.res with numbered companions), roads and routes (.way) and a scheme file (mod_aa.sch and so on). The terrain*.raw files hold the terrain heights, GAME.CNF the map settings.
Other locationsMENV\ MTR\ MTB\Smaller separate locations built from the same kinds of files.
Game tables.sch files and vehicle.tech in the game folderGoods and cargo (merchandise.sch), vehicles (evehicles.sch, vehicle.tech), names (names.sch) and other tables. The .sch files are stored encoded.
SettingsWEATHER.INI kmjin.iniWeather and fog, controller layouts. Plain text.
Textmess.txtMessages shown in the game. Plain text.
MusicMUSIC\track01l.mp3 ... track12l.mp3The game's music. Replace a track with an MP3 file of the same name.
InterfaceLOAD.RES load.ovl .FON .SFT Interface graphics (menus, cursor, driver logos and photos) and fonts.
Videokotr.avi .bneThe intro and other video clips. The .bne files are AVI videos under another extension.
Program filesking.exe ddraw.dllThe game itself and its graphics wrapper. See Program files below.

Notes

  • The mod_ prefix of the scheme files in ENV has nothing to do with Workshop mods. These are ordinary game files.
  • Many textures are stored several times, in a set of numbered files: TRUCKS.RES, TRUCKS1.RES, TRUCKS2.RES ... or aa.res, aa1.res, aa2.res hold the same textures in decreasing size. Check your change at different graphics settings, and change every file of the set where needed.
  • Text files such as mess.txt, and king.exe itself, differ between the Russian and English versions of the game. If your mod replaces them, say in the description which language it is for.
  • Keep text files in their original encoding when you save them.

Files a mod must not contain

  • dinput.dll. In the Steam version of the game it runs the Steam achievements, and a mod that replaces it turns them off.
  • steam_api.dll, steam_appid.txt, WorkshopModSync.exe, WorkshopCore.dll, the Workshop Uploader and workshop.cfg. They run the Workshop itself.
  • Files the game or the player changes: driver profiles (*.pl1), which hold the player's progress, and settings files such as TRUCK.INI, dxcfg.ini and fpslimiter.ini. The mod synchronizer copies the mod's version back on every start, so the player's progress or settings in that file would be reset each time.

Program files

Hard Truck 2 has long been modded with patched executables and graphics wrappers, so Workshop mods for it may contain program files such as king.exe or ddraw.dll. The uploader does not refuse them, it lists each one as a warning. Such a file runs with the same rights as the game itself, so players should install mods with program files only from authors they trust.

Using the Workshop Uploader

Start the uploader from the game's installation folder. It detects the game and shows it at the top of the window, under Publishing to. The window is in Russian on a Russian Windows and in English everywhere else.

  1. Select your mod folder with Browse. The uploader reads mod.cfg, shows the title, tags, content and preview, and checks the folder straight away.
  2. Read the checks. Each line reports one thing: mod.cfg itself, title, tags, priority and the other optional keys, visibility, description, version, preview image, content files and program files. Errors must be fixed. Warnings are there for you to read and do not stop publishing. After changing files, press Check to run the checks again.
  3. When there are no errors, the summary line says Ready to publish.
  4. Publish creates a new Workshop item. For a folder that already has a .workshop_id, the same button reads Update: it uploads a new version of the item you published before, and first asks what changed in this update.
  5. When the upload finishes, a new item's Workshop ID is shown in the summary line, and an Open Workshop page link appears.
The first time you publish, Steam may ask you to accept the Steam Workshop legal agreement, and the uploader tells you so. Until you accept it, your item is not visible to anyone else. Accept it while signed in, at steamcommunity.com/sharedfiles/workshoplegalagreement.

Visibility

  • public: everyone can find and subscribe to the mod.
  • friends: only your Steam friends can see it.
  • private: only you can see it. Useful for testing.

You can change the visibility later, either by editing mod.cfg and updating, or on the item's Workshop page.

Removing a mod

The uploader does not delete Workshop items. To remove one, open its Workshop page while signed in and use the owner controls there.

Testing your mod

You can run your mod from a folder on your disk without uploading anything.

  1. Open workshop.cfg in the game's installation folder, next to king.exe. The mod synchronizer and the uploader create this file the first time they run. If it is not there yet, create a text file with that name.
  2. Add one line per mod you want to test:
    setf ~local_mod_folder my_mod C:\path\to\your\mod
    The first word is the mod's name for the log, and it sets its place among mods with the same priority. If it needs spaces, wrap it in braces: {My Mod}. The path may contain spaces and runs to the end of the line.
  3. Start the game from Steam. The folder is applied exactly like a subscribed Workshop item, including its ~priority, ~exclusive and ~conflicts settings.
  4. Change your files and start the game again to see the result.

Mods are applied when the game starts. Changes never take effect in a running game.

A local folder has no Workshop ID, so other mods cannot name it in their ~conflicts. Its own ~conflicts list works as usual.

If you are also subscribed to the published version of the same mod, both copies are applied, one on top of the other. Unsubscribe from your item while you test the local folder. Remove the line from workshop.cfg when you are done, otherwise your local folder keeps being applied on your machine.

Before going public you can also do a final check through Steam itself: publish with setf ~visibility private, subscribe to your own item, and start the game.

The log file

The mod synchronizer can write a log of every start. It is off by default. To turn it on, change this line in workshop.cfg:

setf ~logging 1

From the next start, the mod synchronizer writes WorkshopModSync_log.txt into the game folder, anew on every start. The lines starting with [workshop] list your subscriptions and those still downloading. The lines starting with [mods] show the load order: every applied mod with its priority and number of files, and every skipped mod with the reason. The lines starting with [overlay] show the files taken back from the previous start. If a mod does not seem to do anything, this is the first place to look.

The Workshop Backups folder in the game folder holds the game's own files that mods have replaced, together with the mod synchronizer's list of what it has put in. It is managed automatically. Do not edit or delete it.

For players: installing mods

  1. Open the game's Workshop page on Steam and press Subscribe on the mods you want.
  2. Let Steam finish downloading them.
  3. Start the game from Steam. No other step is needed.

To remove a mod, unsubscribe and start the game from Steam again. If a mod was still downloading when you started the game, it becomes active on the next start.

Mods are put into the game folder and taken out again only when the game is started from Steam. If you start king.exe directly, the game runs with the mods that were active on the last start from Steam.

If you let Steam verify the game files, start the game from Steam once more afterwards, and your mods are applied again.

Common problems

What you seeWhat to do
Game not identifiedStart the uploader from the game's installation folder. It does not work when copied elsewhere.
Steam is not running, or you are not signed inStart Steam, sign in, then start the uploader again.
You do not own this gamePublish from a Steam account that owns it.
Unknown tagsUse only the tags from the list above, spelled exactly the same.
Preview file not found, or too largePut the image next to mod.cfg under the name given in ~preview_image, and keep it at or below 1 MB.
~priority must be a whole numberWrite a number without spaces or other characters, for example 5 or -1.
~conflicts takes Workshop IDsList the other mods by their Workshop ID numbers, not by their titles.
Unknown key in mod.cfgCheck the spelling of the key against the table above.
Executable found (warning)Program files are allowed in Hard Truck 2 mods. Make sure every listed file belongs in your mod, and remove leftovers.
Your item is not visible to othersAccept the Workshop legal agreement, and check that the visibility is public.
The mod is subscribed but nothing changes in the gameStart the game from Steam, not with king.exe. Then turn on the log. Most often a file is not at the same path as in the game, a mod loaded later replaces the same file, the mod was skipped because of a conflict or an exclusive mod, or it was still downloading.
Progress or settings are reset on every startOne of your mods contains a driver profile (*.pl1) or a settings file such as TRUCK.INI. Unsubscribe from it, or ask its author to remove that file.
Achievements stopped working after installing a modThe mod contains dinput.dll. Unsubscribe from it.

Hard Truck 2: руководство по Мастерской

Это руководство объясняет, как устроены моды в Hard Truck 2: King of the Road ("Дальнобойщики 2"), как собрать мод и как опубликовать его в Мастерской Steam с помощью загрузчика Workshop Uploader, который поставляется вместе с игрой.

  1. Как работают моды
  2. Что понадобится
  3. Быстрый старт
  4. Структура папки мода
  5. Файл mod.cfg
  6. Порядок загрузки и конфликты
  7. Что можно изменить
  8. Работа с Workshop Uploader
  9. Проверка мода
  10. Для игроков: установка модов
  11. Частые проблемы

Как работают моды

Мод состоит из папки с файлами игры, разложенными так же, как в папке установки игры, и небольшого текстового файла mod.cfg с описанием мода.

При запуске игры из Steam сначала работает синхронизатор модов WorkshopModSync.exe. Он убирает из папки игры всё, что положил туда при прошлом запуске, копирует в неё файлы модов, на которые вы подписаны, и только после этого запускает игру. Файл из мода заменяет файл игры, лежащий по тому же пути, а файл, которого в игре нет, добавляется. Заменённые файлы игры сохраняются в папке Workshop Backups и возвращаются на место при первом запуске после того, как мод перестал быть активным. Отпишитесь от мода, снова запустите игру из Steam, и всё вернётся к исходному состоянию.

Отсюда три правила, которые стоит помнить с самого начала:

  • Файлы сопоставляются по пути внутри папки игры. COMMON\TRUCKS.RES в моде заменяет COMMON\TRUCKS.RES в игре. Тот же файл, положенный прямо в корень папки мода, окажется в корне папки игры, где игра его не ищет. Файлы, которые лежат в корне папки игры, например ddraw.dll, кладутся в корень папки мода. Регистр букв значения не имеет.
  • Файл заменяется целиком. Игра хранит много объектов в одном файле: все грузовики лежат в нескольких файлах папки COMMON (TRUCKS.B3D, TRUCKS.RES и файлы с номерами рядом с ними). Чтобы изменить один грузовик, в мод придётся положить весь файл. Два мода, которые меняют один и тот же файл, совместить нельзя: в игру попадёт только одна его версия.
  • Кладите в мод только то, что изменили. Чем меньше в моде файлов, тем реже он пересекается с другими модами.

Что понадобится

  • Игра, установленная через Steam, и запущенный клиент Steam, в котором выполнен вход в аккаунт, от имени которого вы будете публиковать мод. Игра должна быть на этом аккаунте.
  • Workshop Uploader: файл Workshop Uploader GUI - Hard Truck 2.exe в папке установки игры, рядом с king.exe. Не перемещайте его: он работает только из папки игры.
  • Папка Template mod оттуда же. В ней лежат готовый к правке mod.cfg и картинка-заглушка для превью.
  • Большинство файлов игры хранится в двоичных форматах (модели, текстуры, закодированные таблицы), и для их правки нужны соответствующие инструменты.

Быстрый старт

  1. Скопируйте папку Template mod в любое место вне папки игры и дайте копии название своего мода.
  2. Откройте mod.cfg и заполните как минимум ~title.
  3. Замените preview.png своей картинкой.
  4. Положите изменённые файлы игры в папку мода, по тем же путям, по которым они лежат в папке игры.
  5. Сначала проверьте мод в игре, см. Проверка мода.
  6. Запустите Workshop Uploader из папки игры, выберите папку мода и опубликуйте его.

Загрузчик сохраняет в папке мода файл .workshop_id. По нему он в следующий раз узнаёт, какой мод в Мастерской обновлять.

Структура папки мода

your_mod/
├─ mod.cfg            (обязательно, описание мода)
├─ preview.png        (обязательно, картинка на странице в Мастерской)
├─ ddraw.dll          (изменённый файл из корня папки игры)
├─ COMMON/
│  └─ TRUCKS.RES      (изменённый файл из подпапки COMMON)
└─ MUSIC/
   └─ track01l.mp3    (изменённый файл из подпапки MUSIC)

После первой загрузки загрузчик добавляет:

├─ .workshop_id       (не удаляйте и не редактируйте)

Если удалить .workshop_id, загрузчик больше не найдёт ваш мод в Мастерской, и следующая публикация создаст новый мод вместо обновления существующего.

Только три файла из папки мода никогда не копируются в игру: mod.cfg в корне папки, .workshop_id и картинка превью, указанная в ~preview_image (по умолчанию preview.png). Всё остальное копируется в папку игры, в том числе файлы readme и лицензии. В корне игры есть собственный README.TXT, и README.txt из мода его заменит. Пояснения для игроков пишите в описании мода в Мастерской.

Файл mod.cfg

Одна директива на строку:

setf ~key value

Строки, которые не начинаются с setf, игнорируются, поэтому их можно использовать для комментариев. Многострочные значения и списки заключаются в фигурные скобки { }. Если в файле есть русские буквы, сохраните его в кодировке UTF-8.

КлючОбязателенЗначение
~titleдаНазвание в Мастерской, до 128 символов. Более длинное название будет обрезано.
~descriptionнетОписание в Мастерской. Поддерживается Steam BBCode ([b], [list], [url] ...).
~tagsнетКатегории Мастерской из списка ниже, каждая в кавычках: {"Vehicles" "Textures"}.
~preview_imageнетИмя файла картинки превью. По умолчанию preview.png. Сама картинка обязательна.
~versionнетПроизвольно указанная вами версия, например 1.0.
~visibilityнетpublic, friends или private. По умолчанию public.
~priorityнетЦелое число, по умолчанию 0, отрицательные тоже допустимы. Место мода в порядке загрузки: чем больше число, тем раньше загружается мод. Подробнее в следующем разделе.
~exclusiveнет1 означает, что порядок загрузки заканчивается на этом моде: все моды, которые загрузились бы после него, пропускаются. Для тотальных конверсий и для дополнений, которые нельзя сочетать ни с чем другим.
~conflictsнетНомера в Мастерской (Workshop ID) модов, с которыми этот мод несовместим, через пробел: {3781112928 3794389861}.

Теги

Выберите подходящие. Теги чувствительны к регистру, пишите их точно так, как в таблице.

ТегДля чего
VehiclesНовые или изменённые грузовики, кабины и другие машины
CargoГрузы, товары и заказы
TexturesЗаменённые текстуры и раскраски
AudioМузыка и звуки
MapsДороги, города, рельеф и объекты мира
BalanceЦены, оплата, штрафы, характеристики машин, сложность
LocalizationПереводы и изменения текста
UIМеню, шрифты, графика интерфейса
OtherВсё, что не подходит под другие теги, например графические обёртки или исправления

Пример mod.cfg

setf ~title Ночная музыка

setf ~description {
Заменяет музыку в игре двенадцатью новыми треками.

[b]Что внутри:[/b]
[list]
[*] Двенадцать новых треков
[*] Громкость на уровне оригинальной музыки
[/list]
}

setf ~tags {"Audio"}

setf ~preview_image preview.png

setf ~version 1.0

setf ~visibility public

setf ~priority 0

Картинка превью

  • PNG или JPG, лучше всего 512 x 512 пикселей: так она хорошо смотрится в сетке Мастерской.
  • Не больше 1 МБ.

Другие требования

  • Хотя бы один файл помимо mod.cfg и превью. Чтобы игра его использовала, он должен лежать по тому же пути, что и в папке игры, см. Как работают моды.
  • Программные файлы (.exe, .dll, .bat, .cmd, .ps1 и подобные) в модах для Hard Truck 2 допускаются, см. Программные файлы. Загрузчик показывает каждый такой файл как предупреждение, чтобы вы убедились, что он действительно нужен моду.

Порядок загрузки и конфликты

~priority задаёт место мода в порядке загрузки, а не его важность.

  • Моды загружаются от наибольшего ~priority к наименьшему. Моды с одинаковым приоритетом загружаются в алфавитном порядке их названий в Мастерской.
  • Каждый мод копируется поверх загруженных до него. Если один и тот же файл есть в двух модах, в игре окажется версия мода, загруженного позже.
  • Для обычного мода оставьте ~priority равным 0.
  • Дополнению, которое меняет файлы другого мода, нужно число меньше, чем у этого мода, чтобы оно копировалось поверх него. Отрицательные числа допустимы, так что дополнению к обычному моду подойдёт -1.
  • Мод, к которому задуманы дополнения, может получить приоритет побольше, например 10. Тогда дополнения с приоритетом 0 окажутся поверх него.
  • Если два мода с одинаковым приоритетом меняют один и тот же файл, всё решит порядок их названий, а на него лучше не полагаться. Если порядок важен, задайте приоритет.

~conflicts нужен для модов, которые вообще не могут работать вместе. Если игрок подписан на оба, применяется тот, что стоит раньше в порядке загрузки (с большим приоритетом), а второй пропускается целиком. Достаточно, чтобы один из двух модов указал другой. Номер в Мастерской стоит в конце адреса страницы мода.

~exclusive 1 заканчивает порядок загрузки на этом моде: все моды, которые загрузились бы после него (с меньшим приоритетом), пропускаются. Моды, которые загружаются раньше (с большим приоритетом), всё равно применяются.

  • Тотальной конверсии, которая должна работать одна, нужен ~exclusive 1 вместе с высоким приоритетом, например 1000, чтобы и до неё ничего не загружалось.
  • Если мод и дополнение к нему не должны сочетаться ни с чем другим, помечайте дополнение, последний мод в цепочке. Если исключительным сделать базовый мод, его собственные дополнения загрузятся после него и будут пропущены.
  • Если у игрока несколько исключительных модов, порядок загрузки заканчивает тот, что стоит в нём раньше.

Например, игрок подписан на четыре мода:

Мод~priority~exclusive
Старые дороги20
Большой набор фур10
Зимняя раскраска51дополнение к "Большому набору фур"
Ночная музыка0
  • Порядок загрузки: "Старые дороги", "Большой набор фур", "Зимняя раскраска".
  • "Зимняя раскраска" копируется поверх "Большого набора фур", поэтому в каждом общем файле остаётся её версия.
  • "Зимняя раскраска" исключительная, поэтому "Ночная музыка", которая загрузилась бы после неё, пропускается.
  • "Старые дороги" загружаются раньше исключительного мода и всё равно применяются.

Синхронизатор модов может записывать порядок загрузки в лог: какие моды применены и сколько в каждом файлов, какие пропущены и почему. См. Файл лога.

Что можно изменить

Мод может заменить любой файл в папке игры или добавить новые. Игра читает только файлы, которые знает по имени, поэтому новый файл работает только тогда, когда на него ссылается игра или другой файл. На практике новое содержимое делается правкой уже существующих файлов. Чтобы изменить файл, возьмите копию оригинала, отредактируйте её и положите в папку мода по тому же пути.

ЧтоФайлыОписание
Грузовики и кабиныCOMMON\TRUCKS.* COMMON\CABINES.* и файлы с номерами рядом с нимиМодели и текстуры всех грузовиков и интерьеров кабин. Все грузовики хранятся в этих файлах вместе.
Общие объектыCOMMON\COMMON.* common1.res common2.res Модели и текстуры, которые используются по всей игре.
МирENV\Основная карта, разбитая на участки aa, ab, ac и так далее. У каждого участка есть геометрия (.b3d), текстуры и другие ресурсы (.res и файлы с номерами), дороги и маршруты (.way) и файл схемы (mod_aa.sch и так далее). В файлах terrain*.raw хранятся высоты рельефа, в GAME.CNF настройки карты.
Другие локацииMENV\ MTR\ MTB\Отдельные локации поменьше, собранные из тех же видов файлов.
Таблицы игрыфайлы .sch и vehicle.tech в папке игрыТовары и грузы (merchandise.sch), машины (evehicles.sch, vehicle.tech), имена (names.sch) и другие таблицы. Файлы .sch хранятся в закодированном виде.
НастройкиWEATHER.INI kmjin.iniПогода и туман, раскладки контроллеров. Обычный текст.
Текстmess.txtСообщения, которые показывает игра. Обычный текст.
МузыкаMUSIC\track01l.mp3 ... track12l.mp3Музыка игры. Чтобы заменить трек, положите MP3-файл с тем же именем.
ИнтерфейсLOAD.RES load.ovl .FON .SFT Графика интерфейса (меню, курсор, логотипы и фотографии водителей) и шрифты.
Видеоkotr.avi .bneВступительный ролик и другие видео. Файлы .bne представляют собой AVI-видео с другим расширением.
Программные файлыking.exe ddraw.dllСама игра и её графическая обёртка. См. Программные файлы ниже.

Замечания

  • Приставка mod_ у файлов схем в ENV не имеет отношения к модам из Мастерской. Это обычные файлы игры.
  • Многие текстуры хранятся по нескольку раз, в наборе файлов с номерами: TRUCKS.RES, TRUCKS1.RES, TRUCKS2.RES ... или aa.res, aa1.res, aa2.res содержат одни и те же текстуры всё меньшего размера. Проверьте изменения при разных настройках графики и при необходимости правьте все файлы набора.
  • Текстовые файлы, например mess.txt, и сам king.exe в русской и английской версиях игры различаются. Если ваш мод их заменяет, укажите в описании, для какого языка он сделан.
  • Сохраняйте текстовые файлы в их исходной кодировке.

Чего не должно быть в моде

  • dinput.dll. В Steam-версии игры через него работают достижения Steam, и мод, который его заменит, их отключит.
  • steam_api.dll, steam_appid.txt, WorkshopModSync.exe, WorkshopCore.dll, сам Workshop Uploader и workshop.cfg. На них работает сама Мастерская.
  • Файлы, которые меняет игра или игрок: профили водителей (*.pl1), в которых хранится прогресс игрока, и файлы настроек, например TRUCK.INI, dxcfg.ini и fpslimiter.ini. Синхронизатор модов возвращает версию из мода при каждом запуске, поэтому прогресс или настройки игрока в этом файле сбрасывались бы каждый раз.

Программные файлы

Hard Truck 2 давно модифицируют пропатченными исполняемыми файлами и графическими обёртками, поэтому моды для неё в Мастерской могут содержать программные файлы, например king.exe или ddraw.dll. Загрузчик не отказывает в публикации, а показывает каждый такой файл как предупреждение. Такой файл запускается с теми же правами, что и сама игра, поэтому устанавливать моды с программными файлами стоит только от авторов, которым вы доверяете.

Работа с Workshop Uploader

Запустите загрузчик из папки установки игры. Он сам определяет игру и показывает её вверху окна, под надписью Публикация для. Окно загрузчика на русском, если Windows русская, и на английском в остальных случаях.

  1. Выберите папку мода кнопкой Обзор. Загрузчик прочитает mod.cfg, покажет название, теги, содержимое и превью и сразу проверит папку.
  2. Прочитайте результаты проверки. Каждая строка сообщает об одном: сам mod.cfg, название, теги, приоритет и другие необязательные ключи, видимость, описание, версия, картинка превью, файлы мода и программные файлы. Ошибки нужно исправить. Предупреждения нужно прочитать, публиковать они не мешают. После правки файлов нажмите Проверить, чтобы запустить проверку заново.
  3. Когда ошибок нет, в итоговой строке написано Готов к публикации.
  4. Опубликовать создаёт новый мод в Мастерской. Если в папке уже есть .workshop_id, та же кнопка называется Обновить: она загружает новую версию ранее опубликованного мода и сначала спрашивает, что изменилось в этом обновлении.
  5. Когда загрузка закончится, для нового мода в итоговой строке появится его номер в Мастерской, а рядом ссылка Открыть страницу в Мастерской.
При первой публикации Steam может попросить принять соглашение Мастерской Steam, и загрузчик об этом сообщит. Пока вы его не примете, мод не виден никому, кроме вас. Примите соглашение, войдя в аккаунт, по адресу steamcommunity.com/sharedfiles/workshoplegalagreement.

Видимость

  • public: мод могут найти все и подписаться на него.
  • friends: мод видят только ваши друзья в Steam.
  • private: мод видите только вы. Удобно для проверки.

Видимость можно поменять и потом: в mod.cfg с последующим обновлением или на странице мода в Мастерской.

Удаление мода

Загрузчик не удаляет моды из Мастерской. Чтобы удалить мод, откройте его страницу в Мастерской, войдя в аккаунт, и воспользуйтесь кнопками управления для владельца.

Проверка мода

Мод можно запустить прямо из папки на диске, ничего не загружая.

  1. Откройте workshop.cfg в папке установки игры, рядом с king.exe. Синхронизатор модов и загрузчик создают этот файл при первом запуске. Если его ещё нет, создайте текстовый файл с таким именем.
  2. Добавьте по строке на каждый мод, который хотите проверить:
    setf ~local_mod_folder my_mod C:\path\to\your\mod
    Первое слово задаёт имя мода для лога, и от него зависит место мода среди модов с тем же приоритетом. Если в имени нужны пробелы, заключите его в фигурные скобки: {My Mod}. Путь может содержать пробелы и занимает всю оставшуюся строку.
  3. Запустите игру из Steam. Папка применяется точно так же, как мод из Мастерской, с учётом её ~priority, ~exclusive и ~conflicts.
  4. Правьте файлы и перезапускайте игру, чтобы увидеть результат.

Моды применяются при запуске игры. Изменения никогда не подхватываются уже запущенной игрой.

У локальной папки нет номера в Мастерской, поэтому другие моды не могут указать её в своём ~conflicts. Её собственный список ~conflicts работает как обычно.

Если вы одновременно подписаны на опубликованную версию того же мода, применятся обе копии, одна поверх другой. Пока проверяете локальную папку, отпишитесь от своего мода. Закончив, удалите строку из workshop.cfg, иначе локальная папка так и будет применяться на вашем компьютере.

Перед открытой публикацией можно проверить мод и через сам Steam: опубликуйте его с setf ~visibility private, подпишитесь на него и запустите игру.

Файл лога

Синхронизатор модов умеет записывать лог каждого запуска. По умолчанию запись выключена. Чтобы включить её, измените эту строку в workshop.cfg:

setf ~logging 1

Со следующего запуска синхронизатор модов будет записывать в папку игры файл WorkshopModSync_log.txt, каждый раз заново. Строки, начинающиеся с [workshop], перечисляют ваши подписки и те из них, что ещё скачиваются. Строки с [mods] показывают порядок загрузки: каждый применённый мод с его приоритетом и числом файлов и каждый пропущенный мод с причиной. Строки с [overlay] показывают файлы, убранные после прошлого запуска. Если мод, кажется, ничего не делает, смотрите сначала сюда.

Папка Workshop Backups в папке игры хранит файлы игры, заменённые модами, и список того, что положил туда синхронизатор модов. Он управляет этой папкой сам. Не редактируйте и не удаляйте её.

Для игроков: установка модов

  1. Откройте страницу игры в Мастерской Steam и нажмите Подписаться на нужных модах.
  2. Дождитесь, пока Steam их скачает.
  3. Запустите игру из Steam. Больше ничего делать не нужно.

Чтобы убрать мод, отпишитесь от него и снова запустите игру из Steam. Если во время запуска игры мод ещё скачивался, он заработает со следующего запуска.

Моды кладутся в папку игры и убираются из неё только при запуске игры из Steam. Если запустить king.exe напрямую, игра будет работать с модами, которые были активны при последнем запуске из Steam.

Если вы проверили целостность файлов игры в Steam, запустите после этого игру из Steam ещё раз, и моды применятся снова.

Частые проблемы

Что вы видитеЧто делать
Игра не определенаЗапустите загрузчик из папки установки игры. Скопированный в другое место, он не работает.
Steam не запущен или вы не вошли в SteamЗапустите Steam, войдите в аккаунт и снова откройте загрузчик.
Этой игры нет в вашем аккаунтеПубликуйте из аккаунта Steam, на котором есть игра.
Неизвестные тегиИспользуйте только теги из списка выше, написанные точно так же.
Файл превью не найден, или превью слишком большоеПоложите картинку рядом с mod.cfg под именем из ~preview_image и уменьшите её до 1 МБ или меньше.
~priority должен быть целым числомНапишите число без пробелов и других символов, например 5 или -1.
~conflicts принимает номера из МастерскойУказывайте другие моды их номерами в Мастерской, а не названиями.
Неизвестный ключ в mod.cfgСверьте написание ключа с таблицей выше.
Найден исполняемый файл (предупреждение)В модах для Hard Truck 2 программные файлы разрешены. Убедитесь, что каждый файл из списка действительно нужен моду, и уберите лишнее.
Мод не виден другим игрокамПримите соглашение Мастерской и проверьте, что видимость public.
Подписка есть, но в игре ничего не меняетсяЗапускайте игру из Steam, а не через king.exe. Затем включите лог. Чаще всего файл лежит не по тому же пути, что в игре, тот же файл заменяет мод, загруженный позже, мод пропущен из-за конфликта или исключительного мода, или он ещё скачивался.
Прогресс или настройки сбрасываются при каждом запускеВ одном из модов есть профиль водителя (*.pl1) или файл настроек, например TRUCK.INI. Отпишитесь от него или попросите автора убрать этот файл.
После установки мода перестали работать достиженияВ моде есть dinput.dll. Отпишитесь от него.