This article's documentation is for the "GoldSrc" engine. Click here for more information.

Porting maps without decompilation (GoldSrc): Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
 
(11 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Language subpage}}
{{LanguageBar|title = Porting maps without decompilation}}
This article is about porting maps to {{hl|4}} from other {{goldsrc|4}} games ({{cs|4}}, {{tfc|4}}, {{dod|4}} and others). The process of porting will not be boring and monotonous. Porting one map approximately takes from 10 minutes to one hour.
{{Orphan|date=January 2024}}
{{essay}}
{{gldsrc topicon}}
{{deprecated|Use [[BSPEntSpy]] and/or [[newbspguy]] instead.}}
 
This article is about porting maps to {{hl|4}} from other {{gldsrc|4}} games ({{cs|4}}, {{tfc|4}}, {{dod|4}} and others). The process of porting will not be boring and monotonous. Porting one map approximately takes from 10 minutes to one hour.
</br>
</br>
'''Required tools:'''
'''Required tools:'''
Line 10: Line 15:
The process of porting is creating {{hl|4}} items on the map - weapons, spawn points, and removing items from another game. All information about the objects on the map is stored in text form.
The process of porting is creating {{hl|4}} items on the map - weapons, spawn points, and removing items from another game. All information about the objects on the map is stored in text form.
We just need to export this information to a text file, edit it and import it back into the map.
We just need to export this information to a text file, edit it and import it back into the map.
Scatter objects on the map we will be in the game itself, it is very convenient to fly around the map and in suitable places to insert weapons. We will do it with the help of AMX plugin from GordonFreeman'a -- Weapon Factory.
Creating objects on the map we will be in the game itself, it is very convenient to fly around the map and in suitable places to insert weapons. We will do it with the help of AMX plugin from GordonFreeman'a -- Weapon Factory.
Rename the file liblist.gam to liblist_backup.gam, it is located in the directory valve.
Rename the file liblist.gam to liblist_backup.gam, it is located in the directory valve.
Now download the archive below and copy all the contents into the valve directory, on all suggestions about substitutions click "Yes".
Now download the archive below and copy all the contents into the valve directory, on all suggestions about substitutions click "Yes".
The porting process itself I will demonstrate on the map for Counter-Strike -- fy_kano, the author of which is Burner. I downloaded it from gamebanana.com, you can find many interesting maps there.
The porting process itself I will demonstrate on the map for Counter-Strike -- fy_kano, the author of which is Burner.
Go into the archive, see there the directory cstrike, go into it and unpack all the contents into the directory valve, it is located in the directory with the Half-Life game (for example, D:\Games\Steam\steam\steamapps\common\Half-Life). Unpack the contents, but not the cstrike directory itself.
Go into the archive, see there the directory cstrike, go into it and unpack all the contents into the directory valve, it is located in the directory with the Half-Life game.
{{modernExample|D:\Games\Steam\steam\steamapps\common\Half-Life)}} Unpack the contents, but not the cstrike directory itself.
<gallery mode=nolines widths=384px heights=256px>
<gallery mode=nolines widths=384px heights=256px>
pmwd-1.jpg
pmwd-1.jpg
Line 24: Line 30:
</gallery>
</gallery>


Подобные ошибки появляются, когда используемый ресурс (модель, звук, спрайт) не был найден.
Such errors occur when a resource (model, sound, sprite) was not found.
Есть два способа решения этой пробелемы. Первый способ -- скопировать используемые ресурсы карты из игры Counter-Strike в Half-Life.
There are two ways to solve this problem:
Второй способ -- удалить или заменить сведения об объектах из ent файла, в этом случае мы удалим объект на карте или просто заменим свойства объекта, и игра не станет его искать, либо загрузит другой файл. С этим способом нужно быть аккуратным и учитывать особенности карты, т.к. некоторые объекты могут быть очень важны. Если на карте есть какой-либо вертолет, дерево, бутылка, человек, то он может пропасть.
{{modernFix|The first way is to copy used map resources from Counter-Strike game to Half-Life.}}
{{modernFix|The second way -- remove or replace information about objects from ent file, in this case we will delete an object on the map or simply replace the object properties, and the game will not search for it, or load another file. With this method you need to be careful and take into account the peculiarities of the map, because some objects can be very important. If there is a helicopter, a tree, a bottle, a person on the map, it can disappear.}}


Рассмотрим второй способ, т.к. экспортировать сведения об объектах нам все равно придется. Для этого воспользуемся приложением RipEnt.
Let's consider the second way, because we will have to export information about objects anyway. For this we will use the [[RipEnt]].
В архиве, что я дал, имеется два bat файла, необходимо открыть их и исправить имя карты на свое, сохранить и запустить ripent_export.bat
There are two bat files in the archive I gave, you need to open them and correct the map name to your own, save and run ripent_export.bat
<gallery mode=nolines widths=384px heights=256px>
<gallery mode=nolines widths=384px heights=256px>
pmwd-3.jpg
pmwd-3.jpg
</gallery>
</gallery>


После запуска, у нас появится новый ent файл с названием нашей карты. Открываем этот файл и удаляем ненужные объекты, каждый объект начинается с открывающей фигурной скобки "{", и заканчивается "}", между скобками находятся различные директивы со свойствами. Директива "classname" это название объекта, мы будем работать лишь с некоторыми:
After launching, we will have a new ent file with the name of our map. We open this file and delete unnecessary objects, each object starts with an opening curly brace "{" and ends with "}", between the braces are various directives with properties. The "classname" directive is the name of the object, we will only work with a few:
 
[[cycler_sprite]]
cycler_sprite -- модель или спрайт на карте.
[[env_sprite]]
env_sprite -- спрайт на карте (огонь или какой-то эффект).
[[info_player_deathmatch]]
info_player_deathmatch -- точка спавна игроков в мультиплеере. В Counter-Strike точка спавна террористов.
[[info_player_start]]
info_player_start -- точка спавна игрока в одиночном режиме. В Counter-Strike точка спавна спецназовцев.
[[game_player_equip]]
game_player_equip -- объект позволяет экипировать игрока нужным оружием.
[[ambient_generic]]
ambient_generic -- звук на карте.
<gallery mode=nolines widths=384px heights=256px>
<gallery mode=nolines widths=384px heights=256px>
pmwd-4.jpg
pmwd-4.jpg
</gallery>
</gallery>


На карте fy_kano я убрал все cycler_sprite, game_player_equip, и оставил по одному info_player_deathmatch и info_player_start, остальные спавны будут расставляться по всей карте. Также я переместил некоторые стандартные файлы из cstrike в valve. После редактирования ent файла, его нужно импортировать обратно, для этого в архиве есть ripent_import.bat. Импортируем свойства объектов, кидаем карту в папку valve/maps и пробуем запустить ее в игре.
On the map fy_kano we removed all [[cycler_sprite]], [[game_player_equip]], and left one [[info_player_deathmatch]] and [[info_player_start]], the rest of the spavens will be placed throughout the map. I also moved some standard files from cstrike to valve. After editing ent file, it must be imported back, for this purpose in the archive there is ripent_import.bat. Import the properties of objects, throw the map in the valve/maps folder and try to run it in the game.


После запуска можно заметить отсутствие различного оружия и предметов.
After launching, you may notice the absence of various weapons and items.
<gallery mode=nolines widths=384px heights=256px>
<gallery mode=nolines widths=384px heights=256px>
pmwd-5.jpg
pmwd-5.jpg
</gallery>
</gallery>


Теперь воспользуемся плагином "Weapon Factory". Вводим в консоли "wp_spawn" и видим появившееся слева меню.
Now let's use the Weapon Factory plugin. Type "wp_spawn" in the console and see the menu that appears on the left.
<gallery mode=nolines widths=384px heights=256px>
<gallery mode=nolines widths=384px heights=256px>
pmwd-6.jpg
pmwd-6.jpg
Line 59: Line 65:
</gallery>
</gallery>


Выбираем, какое оружие или предмет будем спавнить. Можно указать угол поворота нашего предмета. До перезагрузки карты все добавленные предметы будут иметь голографический эффект.
Choose what weapon or item we want to spawn. You can specify the rotation angle of our item. Until the map reloads, all added items will have a holographic effect.
<gallery mode=nolines widths=384px heights=256px>
<gallery mode=nolines widths=384px heights=256px>
pmwd-8.jpg
pmwd-8.jpg
Line 65: Line 71:
</gallery>
</gallery>


Помимо оружия и патронов, не забываем расставить места спавна игроков. В плагине "Weapon Factory" объекта info_player_deathmatch нет, вернее он есть, но не работает. Я обычно использую монтировку в качестве точки спавна, в текстовом файле entity потом можно исправить weapon_crowbar на info_player_deathmatch.
In addition to weapons and ammunition, do not forget to set up a place to spawn players. In the plugin "Weapon Factory" object info_player_deathmatch does not exist, or rather it is there, but it does not work. I usually use the mount as a spawn point, in the text file entity then you can fix weapon_crowbar to info_player_deathmatch.


После того, как расставили все предметы и точки спана, перезагружаем карту ("restart" в консоли) и видим уже, что наша карта полна предметами. Но портирование на этом не закончено,
After we have placed all the items and spawn points, we reload the map ("restart" in the console) and see that our map is full of items. But the porting is not finished,
все эти предметы хранятся в базе данных плагина "Weapon Factory", а нам нужно внедрить все предметы в саму карту.
all these items are stored in the database of the plugin "Weapon Factory", and we need to implement all the items in the map itself.
<gallery mode=nolines widths=384px heights=256px>
<gallery mode=nolines widths=384px heights=256px>
pmwd-10.jpg
pmwd-10.jpg
</gallery>
</gallery>


Теперь нужно конвертировать данные "Weapon Factory" в данные, которые можно спокойно импортировать в карту. Переходим в директорию valve\addons\amxmodx\configs\weapon_factory, в ней должен находится ini-файл с названием нашей карты, в моем случае fy_kano.ini. Для конвертации воспользуемся моим конвертером EntConverter, копируем файл ent_converter.exe в директорию с ini файлами valve\addons\amxmodx\configs\weapon_factory и запускаем его. После этого должен появится ent-файл с названием нашей карты, в моем случае это fy_kano.ent, все содержимое этого файла нужно дописать в ent-файл, который мы экспортировали с помощью RipEnt.
Now we need to convert "Weapon Factory" data into data that can be safely imported into the map. Go to the valve\addons\amxmodx\configs\weapon_factory directory, there should be an ini file with the name of our map, in my case fy_kano.ini. For conversion let's use my EntConverter, copy ent_converter.exe file to the directory with ini files valve\addons\amxmodx\configs\weapon_factory and run it. After that an ent-file with the name of our map should appear, in my case it's fy_kano.ent, all the contents of this file should be added to the ent-file that we exported with RipEnt.
<gallery mode=nolines widths=384px heights=256px>
<gallery mode=nolines widths=384px heights=256px>
pmwd-11.jpg
pmwd-11.jpg
Line 79: Line 85:




Не забываем про наш костыль. Нужно заменить weapon_crowbar на info_player_deathmatch. В некоторых случаях игроки могут появиться в земле, поэтому нужно увеличить z-координату (высоту) объекта, не забываем, что числа могут быть отрицательными.
We need to replace weapon_crowbar with info_player_deathmatch. In some cases players can appear in the ground, so we need to increase z-coordinate (height) of the object, don't forget that numbers can be negative.
<gallery mode=nolines widths=384px heights=256px>
<gallery mode=nolines widths=384px heights=256px>
pmwd-12.jpg
pmwd-12.jpg
Line 85: Line 91:
</gallery>
</gallery>


После сохранения конечного ent-файла, его нужно импортировать в карту, для этого нужно запустить файл "ripent_import.bat".
After saving the final ent-file, it must be imported into the map, to do this, run the file "ripent_import.bat".
Карта успешно портирована из Counter-Strike в Half-Life. Можно проверить, все ли работает. Перед этим не забываем удалить liblist.gam и переименовать liblist_backup.gam обратно в liblist.gam,
The map is successfully ported from Counter-Strike to Half-Life. You can check if everything works. Before that, don't forget to delete liblist.gam and rename liblist_backup.gam back to liblist.gam,
этим самым мы отключим AmxModx и плагин "Weapon Factory", если этого не сделать, то все раскиданные нами предметы будут дублироваться.
This way we will disable AmxModx and plugin "Weapon Factory", if you do not do this, then all the items we created will be duplicated.
 
In a similar way you can port absolutely all GoldSource maps. Besides porting, you can add some items to existing Half-Life maps, fix some map problems, etc.
Подобным образом можно портировать абсолютно все GoldSource карты. Помимо портирования, можно добавлять какие-то предметы в существующие карты Half-Life, исправить какие-то проблемы карт и т.п.


== External Links ==
== External links ==
* [https://hldm.org/interes/stati/310-portirovanie-kart-bez-dekompilyacii.html HLDM]
* [https://hldm.org/interes/stati/310-portirovanie-kart-bez-dekompilyacii.html HLDM]
* [https://www.ugx-mods.com/forum/mapping/51/tutorial-porting-half-lifecounter-strike-maps-to-waw/1883/ UGX-Mods]
* [https://www.ugx-mods.com/forum/mapping/51/tutorial-porting-half-lifecounter-strike-maps-to-waw/1883/ UGX-Mods]
[[Category:Modding]]
[[Category:Level Design]]
[[Category:Scripting]]
[[Category:Tutorials]]
[[Category:Glossary]]
[[Category:GoldSrc]]
[[Category:Level Design FAQ]]
{{stub}}

Latest revision as of 18:58, 3 May 2025

English (en)Translate (Translate)
Icon-essay.png
This is an essay.
It contains the advice or opinions of one or more of the Valve Developer Community's contributors.
This page is not an encyclopedia article, nor is it one of the Valve Developer Community's policies or guidelines, as it has not been thoroughly vetted by the community.
Some essays represent widespread norms; others only represent minority viewpoints.

Obsolete-notext.pngDeprecated:Use BSPEntSpy and/or newbspguy instead.

This article is about porting maps to Half-Life Half-Life from other GoldSrc GoldSrc games (Counter-Strike Counter-Strike, Team Fortress Classic Team Fortress Classic, Day of Defeat Day of Defeat and others). The process of porting will not be boring and monotonous. Porting one map approximately takes from 10 minutes to one hour.
Required tools:

  • RipEnt - CMD application from Zoner's Halflife Tools (ZHLT) compiler set.
  • Half-Life Half-Life game with configured AmxModX and "Weapon Factory" plugin, for convenient and fast scattering of items on the map.
  • EntConverter

Introduction

The process of porting is creating Half-Life Half-Life items on the map - weapons, spawn points, and removing items from another game. All information about the objects on the map is stored in text form. We just need to export this information to a text file, edit it and import it back into the map. Creating objects on the map we will be in the game itself, it is very convenient to fly around the map and in suitable places to insert weapons. We will do it with the help of AMX plugin from GordonFreeman'a -- Weapon Factory. Rename the file liblist.gam to liblist_backup.gam, it is located in the directory valve. Now download the archive below and copy all the contents into the valve directory, on all suggestions about substitutions click "Yes". The porting process itself I will demonstrate on the map for Counter-Strike -- fy_kano, the author of which is Burner. Go into the archive, see there the directory cstrike, go into it and unpack all the contents into the directory valve, it is located in the directory with the Half-Life game.

PlacementTip.pngExample:D:\Games\Steam\steam\steamapps\common\Half-Life)

Unpack the contents, but not the cstrike directory itself.

At the first launch of the map in Half-Life game I got the error "Mod_NumForName: models/winebottle.mdl not found".

Such errors occur when a resource (model, sound, sprite) was not found. There are two ways to solve this problem:

Note.pngFix:The first way is to copy used map resources from Counter-Strike game to Half-Life.
Note.pngFix:The second way -- remove or replace information about objects from ent file, in this case we will delete an object on the map or simply replace the object properties, and the game will not search for it, or load another file. With this method you need to be careful and take into account the peculiarities of the map, because some objects can be very important. If there is a helicopter, a tree, a bottle, a person on the map, it can disappear.

Let's consider the second way, because we will have to export information about objects anyway. For this we will use the RipEnt. There are two bat files in the archive I gave, you need to open them and correct the map name to your own, save and run ripent_export.bat

After launching, we will have a new ent file with the name of our map. We open this file and delete unnecessary objects, each object starts with an opening curly brace "{" and ends with "}", between the braces are various directives with properties. The "classname" directive is the name of the object, we will only work with a few: cycler_sprite env_sprite info_player_deathmatch info_player_start game_player_equip ambient_generic

On the map fy_kano we removed all cycler_sprite, game_player_equip, and left one info_player_deathmatch and info_player_start, the rest of the spavens will be placed throughout the map. I also moved some standard files from cstrike to valve. After editing ent file, it must be imported back, for this purpose in the archive there is ripent_import.bat. Import the properties of objects, throw the map in the valve/maps folder and try to run it in the game.

After launching, you may notice the absence of various weapons and items.

Now let's use the Weapon Factory plugin. Type "wp_spawn" in the console and see the menu that appears on the left.

Choose what weapon or item we want to spawn. You can specify the rotation angle of our item. Until the map reloads, all added items will have a holographic effect.

In addition to weapons and ammunition, do not forget to set up a place to spawn players. In the plugin "Weapon Factory" object info_player_deathmatch does not exist, or rather it is there, but it does not work. I usually use the mount as a spawn point, in the text file entity then you can fix weapon_crowbar to info_player_deathmatch.

After we have placed all the items and spawn points, we reload the map ("restart" in the console) and see that our map is full of items. But the porting is not finished, all these items are stored in the database of the plugin "Weapon Factory", and we need to implement all the items in the map itself.

Now we need to convert "Weapon Factory" data into data that can be safely imported into the map. Go to the valve\addons\amxmodx\configs\weapon_factory directory, there should be an ini file with the name of our map, in my case fy_kano.ini. For conversion let's use my EntConverter, copy ent_converter.exe file to the directory with ini files valve\addons\amxmodx\configs\weapon_factory and run it. After that an ent-file with the name of our map should appear, in my case it's fy_kano.ent, all the contents of this file should be added to the ent-file that we exported with RipEnt.


We need to replace weapon_crowbar with info_player_deathmatch. In some cases players can appear in the ground, so we need to increase z-coordinate (height) of the object, don't forget that numbers can be negative.

After saving the final ent-file, it must be imported into the map, to do this, run the file "ripent_import.bat". The map is successfully ported from Counter-Strike to Half-Life. You can check if everything works. Before that, don't forget to delete liblist.gam and rename liblist_backup.gam back to liblist.gam, This way we will disable AmxModx and plugin "Weapon Factory", if you do not do this, then all the items we created will be duplicated. In a similar way you can port absolutely all GoldSource maps. Besides porting, you can add some items to existing Half-Life maps, fix some map problems, etc.

External links


Stub

This article or section is a stub. You can help by expanding it.