Ru/Your First Left 4 Dead Map: Difference between revisions

From Valve Developer Community
< Ru
Jump to navigation Jump to search
(New page: Этот туториал поможет вам изучить основы маппинга в Left 4 Dead. Оно поможет вам найти необходимые энтити...)
 
m (obsolete language category)
 
(21 intermediate revisions by 10 users not shown)
Line 1: Line 1:
Этот туториал поможет вам изучить основы маппинга в [[Left 4 Dead]]. Оно поможет вам найти необходимые энтити, такие как режиссёр, оружие, и зоны возрождения. Также это руководство поможет ответить на основные вопросы по маппингу.
{{lang|Your First Left 4 Dead Map}}
Этот туториал не предназначен для новичков: [[Your_First_Map:ru|Базовое строение уровней]] уже задействовано в других статьях.
 
Этот туториал поможет вам изучить основы маппинга в {{L|Left 4 Dead}}. Оно поможет вам найти необходимые энтити, такие как режиссёр, оружие, и зоны возрождения. Также это руководство поможет ответить на основные вопросы по маппингу.
Этот туториал не предназначен для новичков: {{L|Your_First_Map|Базовое строение уровней}} уже задействовано в других статьях.


----
----
<center>[[Image:Tut title.png]]</center>
<center>[[File:Tut title.png]]</center>


[[Image:1st_l4d_map_1.gif|frame|right|The map layout.]]
[[File:1st_l4d_map_1.gif|frame|right|The map layout.]]
В этом туториале мы создадим 2 бесконечные кампании.  Неплохо звучит, да?  Ну, в этой статье не ставится задача научить создавать целые кампании, она всего лишь объяснит основы маппинга в L4D.
В этом туториале мы создадим 2 бесконечные кампании.  Неплохо звучит, да?  Ну, в этой статье не ставится задача научить создавать целые кампании, она всего лишь объяснит основы маппинга в L4D.


Line 11: Line 13:
Сначала, давайте прикинем, что нам понадобится для создания кампании:
Сначала, давайте прикинем, что нам понадобится для создания кампании:
* Режиссёр
* Режиссёр
* Начальная точка
* Стартовая точка
* 2 убежища
* 2 убежища
* Оружие, патроны и аптечки
* Оружие, патроны и аптечки
Line 18: Line 20:
* Туман (для создания основных эффектов в игре)
* Туман (для создания основных эффектов в игре)
<br>
<br>
The image on the right will be used for our map layout during this tutorial.{{clr}}
Изображение справа будет служить нам макетом для будущей карты.{{clr}}


== The Spawn Room ==
== Стартовая точка ==
To start with will make the room on the far left (area 1) the initial spawn room  by adding an <code>info_player_start</code> entity to itNext, let's add an <code>info_director</code> and a <code>env_fog_controller</code>, make sure the fog_controller's "Fog Enable" property is set to "Yes".
Начнем с создания комнаты слева (зона 1) для инициализации стартовой комнаты (респаун) добавим в неё энтити <code>info_player_start</code>.  Далее, добавим <code>info_director</code> и <code>env_fog_controller</code>, убедитесь, что параметр fog_controller's "Fog Enable" поставлен в положение "Yes".


For a supplies area create a small brush to act as a table and add these entities on top:
А так же добавим следующие энтити:
* health kits, 4 <code>weapon_first_aid_kit_spawn</code> entities
* 4 аптечки. Имя энтити - <code>weapon_first_aid_kit_spawn</code>
* 2 weapons; <code>weapon_smg_spawn</code> and <code>weapon_pumpshotgun_spawn</code>.
* 2 вида оружия. Имя энтити - <code>weapon_smg_spawn</code> (Мини УЗИ) и <code>weapon_pumpshotgun_spawn</code> (дробовик).
* an ammunition resupply, <code>weapon_ammo_spawn</code>
* и респаун патронов. Имя энтити - <code>weapon_ammo_spawn</code>


Now for an exit add a "<code>prop_door_rotating_checkpoint</code>" entity. For it's properties, name it "checkpoint_exit", set its "body" property to "1", the "Spawn Position" to "Closed" (spawnpos keyvalue 0), the "world model" to "models/props_doors/checkpoint_door_01.mdl", and the make sure the "Starts Open" flag is unchecked.  Make sure the side of the door with the EXIT sign in the center is facing the inside of the room.
Теперь добавим дверь выхода из убежища. Энтити - "<code>prop_door_rotating_checkpoint</code>". И настроим её параметры:
{{note|If the prop_door_rotating_checkpoint set in anymore then 8 units from the wall outside the safehouse, the infected may try to climb over it.}}
"name" - "checkpoint_exit";
"body" - "1";
"Spawn Position" - "Closed";
"world model" - "models/props_doors/checkpoint_door_01.mdl"
"Starts Open" - отключено.


That should finish the starting point, but before we move on, lets add a <code>info_landmark</code> to the room as well, name it "landmark_a". Well go more into detail on this later.
Убедитесь, что дверь стоит "лицом" внутрь комнаты. Иначе - её нельзя будет открыть.  
{{Note|Если prop_door_rotating_checkpoint установлена более чем 8 юнитов от дверного проёма - инфицированные смогут проникнуть внутрь.}}


== Rescue closets ==
Теперь мы закончили стартовую комнату, но прежде чем мы пойдём дальше, добавим в комнату энтити <code>info_landmark</code> и зададим ей имя - "landmark_a". Более подробнее о info_landmark я расскажу тебе позже.
Next we'll make the two small rooms near the number 2 into places for dead players to respawn (referred to as a rescue closets). Rescue closets are fairly basic and only consist of 4 entities, 3 <code>info_survivor_rescue</code> entities and a <code>prop_door_rotating</code>.  Add the 3 <code>info_survivor_rescue</code> entities to the inside of each room. Next up is the door. You will want a space with a width of 56 and height of 104 for the door to sit in, add the <code>prop_door_rotating</code> and set it's world model to "models/props_doors/doormain01.mdl".


== The safe house and changing levels ==
== Безопасные зоны ==
Now to connect this map to another inside the campaign with a safe room. To start with, well add another "<code>prop_door_rotating_checkpoint</code>" entity to the entrance of area 3 for the safe houses door. This one is set up a bit different then the last one. Open its properties and set the name to "checkpoint_entrance", the "body" property to "0", the "Spawn Position" to "Open Forward" (spawnpos keyvalue 1), the "world model" to "models/props_doors/checkpoint_door_02.mdl", and the make sure the "Starts Open" flag is checked. You want the side of the door with the picture of the house facing outside.
Теперь мы сделаем две маленькие комнаты (зона 2) для респауна умерших игроков (далее безопасные зоны). Безопасные зоны требуют для создания 4 энтити: 3 <code>info_survivor_rescue</code> и 1 <code>prop_door_rotating</code>.
Добавим по 3 энтити <code>info_survivor_rescue</code> в каждой комнате. Теперь поставим дверь. Для двери нужен дверной проём - 56 юнитов в ширину и 104 в высоту. Добавляем в проём энтити <code>prop_door_rotating</code> и устанавливаем параметров "world model" в значение "models/props_doors/doormain01.mdl".


To finish setting up the transition from one map to the next we still need to add an <code>info_landmark</code> and a <code>trigger_changelevel</code>. First add the <code>info_landmark</code> to the center of the room near the ceiling, then open it's properties and name it "landmark_b". Now create a large brush to cover the floorspace inside the safehouse and tie it to the <code>trigger_changelevel</code> entity, make sure the brush comes in contact with the floorspace inside the room (doesn't necessarily have to overlap the floor space, but it does have to at least touch it). Open the changelevel's properties and set the landmark name to the one we just created, "landmark_b" and for the "next map" property, enter "lst_l4dmap_b".
== Безопасная зона и смена уровня ==
Теперь свяжем эту карту с другой внутри кампании в безопасной комнате. Для начала, хорошо добавить еще один " prop_door_rotating_checkpoint "лицом к входу в область 3 за дверь безопасной зоны. Это одна созданная немного отличается, то последним. Открой её свойства и установи название на "checkpoint_entrance", "body" на "0", "Spawn Position" на "Open Forward" (spawnpos KeyValue 1), "World Model" на "models/props_doors/checkpoint_door_02 . И убедитесь, что "Starts Open" помечено флажком. Вам нужно чтобы сторона двери с картинкой оказалась на улице. Для завершения создания перехода с одной карты на следующий нам все еще необходимо добавить info_landmark и trigger_changelevel . Сначала добавьте info_landmark в центре зала под потолком, а затем откройте его свойства и назовите его "landmark_b". Теперь создадим большой браш для покрытия площадей внутри сейфхауса и свяжи его с trigger_changelevel лица, убедитесь, что браш вступает в контакт с площадей в комнате (не обязательно должны перекрывать площадь, но должны касатся друг друга). Открой changelevel в свойства и установи ориентир имя той, которую мы только что создали, "landmark_b" и "Next Map" свойства, введите "lst_l4dmap_b".


== Building a navigation mesh ==
== Building a navigation mesh ==
Line 65: Line 73:
:: Now a lot of nav squares are highlighted forming a path from the player spawn to the nav areas marked "checkpoint" at the end of the level.
:: Now a lot of nav squares are highlighted forming a path from the player spawn to the nav areas marked "checkpoint" at the end of the level.


[[Image:L4d_select_door.jpg|200px|thumb|left|using select_with_attribute DOOR]]
[[File:L4d_select_door.jpg|200px|thumb|left|using select_with_attribute DOOR]]
[[Image:L4d_select_checkpoint.jpg|200px|thumb|left|using select_with_attribute CHECKPOINT]]
[[File:L4d_select_checkpoint.jpg|200px|thumb|left|using select_with_attribute CHECKPOINT]]
[[Image:L4d_select_rescuecloset.jpg|200px|thumb|left|using select_with_attribute RESCUE_CLOSET]]
[[File:L4d_select_rescuecloset.jpg|200px|thumb|left|using select_with_attribute RESCUE_CLOSET]]
{{clr}}
{{clr}}


Line 80: Line 88:
Or, to speed things up, you can use the nav gui by opening up the console again and typing:
Or, to speed things up, you can use the nav gui by opening up the console again and typing:
  nav_gui
  nav_gui
[[Image:L4d_select_checkpoint2.jpg|200px|thumb|right|nav mesh now with both checkpoints marked]]
[[File:L4d_select_checkpoint2.jpg|200px|thumb|right|nav mesh now with both checkpoints marked]]
With the nav gui enabled, you can now left click multiple meshes, and use the <code>mark CHECKPOINT</code> console command to set the attribute for all the selected areas.
With the nav gui enabled, you can now left click multiple meshes, and use the <code>mark CHECKPOINT</code> console command to set the attribute for all the selected areas.


Line 98: Line 106:
You should only have to do this once inside the map, then every time you load the map after that the director should start on it's own.
You should only have to do this once inside the map, then every time you load the map after that the director should start on it's own.


== Making the second chapter ==
Для области спауна в последующих главах этой кампании, вы не должны продолжать использовать weapon_smg_spawn и weapon_pumpshotgun_spawn , которые вы использовали в первой карте, так как большинство игроков, вероятно, уже сменили их для других, более мощных видов оружия, которые они нашли на пути. Эти более мощное оружие можно использовать в области спауна для следующих глав, как правило, состоят из: weapon_rifle_spawn, weapon_autoshotgun_spawn, и weapon_hunting_rifle_spawn.
With the first map out of the way, the second map can be made quite easily. Back in Hammer, with the map we just compiled still loaded, go up to the file menu and choose "Save As". Now type in "lst_l4dmap_b" to save the current map under a new name. Go up to the exit menu and hit "Select all", hit CTRL and M to bring up the translation tool and type 180 into the Z field and hit "Ok".
 
Change the name of the <code>info_landmark</code> entities so that the one in the starting room is named "landmark_b" and the one in the ending safehouse is named "landmark_a". Remember "landmark_a" we created in the first map?  We're going to link the changelevel in our new map to it, open the trigger_changelevel's properties and replace "landmark_b" with "landmark_a" and "lst_l4dmap_b" with "lst_l4dmap_a". After changing up the names, finish up by compiling the map and repeating the nav creation steps you used for the previous map, don't forget to mark the spawn room with the checkpoint attribute. If all goes well, you should now have a working 2 level campaign.
 
== Additional possibilities ==
For spawn areas in later chapters of the campaign, you do not have to keep using the <code>weapon_smg_spawn</code> and <code>weapon_pumpshotgun_spawn</code> you used in the first map as most players will likely have already swapped these for other more powerful weapons they've found along the way.  These more powerful weapons you can use in the spawn areas for the later chapters will usually consist of:
* a <code>weapon_rifle_spawn</code>, <code>weapon_autoshotgun_spawn</code>, and a <code>weapon_hunting_rifle_spawn</code>.
 
== See also ==
* [[Left 4 Dead Level Creation]]
* [[Navigation Meshes]]


{{otherlang:en}}
== Смотрите также ==
{{otherlang:en:ru|Your_First_Left_4_Dead_Map:ru}}
* {{L|Left 4 Dead Level Creation}}
{{otherlang:en:zh-tw|Your_First_Left_4_Dead_Map:zh-tw}}
* {{L|Navigation Meshes}}


[[Category:Left 4 Dead]]
{{ACategory|Left 4 Dead}}

Latest revision as of 04:09, 22 August 2024

English (en)Português do Brasil (pt-br)Русский (ru)中文 (zh)中文(臺灣) (zh-tw)Translate (Translate)

Этот туториал поможет вам изучить основы маппинга в Left 4 Dead(en). Оно поможет вам найти необходимые энтити, такие как режиссёр, оружие, и зоны возрождения. Также это руководство поможет ответить на основные вопросы по маппингу. Этот туториал не предназначен для новичков: Базовое строение уровней(en) уже задействовано в других статьях.


Tut title.png
The map layout.

В этом туториале мы создадим 2 бесконечные кампании. Неплохо звучит, да? Ну, в этой статье не ставится задача научить создавать целые кампании, она всего лишь объяснит основы маппинга в L4D.


Сначала, давайте прикинем, что нам понадобится для создания кампании:

  • Режиссёр
  • Стартовая точка
  • 2 убежища
  • Оружие, патроны и аптечки
  • Безопасные зоны
  • Смена уровня в конце каждой карты
  • Туман (для создания основных эффектов в игре)


Изображение справа будет служить нам макетом для будущей карты.

Стартовая точка

Начнем с создания комнаты слева (зона 1) для инициализации стартовой комнаты (респаун) добавим в неё энтити info_player_start. Далее, добавим info_director и env_fog_controller, убедитесь, что параметр fog_controller's "Fog Enable" поставлен в положение "Yes".

А так же добавим следующие энтити:

  • 4 аптечки. Имя энтити - weapon_first_aid_kit_spawn
  • 2 вида оружия. Имя энтити - weapon_smg_spawn (Мини УЗИ) и weapon_pumpshotgun_spawn (дробовик).
  • и респаун патронов. Имя энтити - weapon_ammo_spawn

Теперь добавим дверь выхода из убежища. Энтити - "prop_door_rotating_checkpoint". И настроим её параметры: "name" - "checkpoint_exit"; "body" - "1"; "Spawn Position" - "Closed"; "world model" - "models/props_doors/checkpoint_door_01.mdl" "Starts Open" - отключено.

Убедитесь, что дверь стоит "лицом" внутрь комнаты. Иначе - её нельзя будет открыть.

Note.pngПримечание:Если prop_door_rotating_checkpoint установлена более чем 8 юнитов от дверного проёма - инфицированные смогут проникнуть внутрь.

Теперь мы закончили стартовую комнату, но прежде чем мы пойдём дальше, добавим в комнату энтити info_landmark и зададим ей имя - "landmark_a". Более подробнее о info_landmark я расскажу тебе позже.

Безопасные зоны

Теперь мы сделаем две маленькие комнаты (зона 2) для респауна умерших игроков (далее безопасные зоны). Безопасные зоны требуют для создания 4 энтити: 3 info_survivor_rescue и 1 prop_door_rotating. Добавим по 3 энтити info_survivor_rescue в каждой комнате. Теперь поставим дверь. Для двери нужен дверной проём - 56 юнитов в ширину и 104 в высоту. Добавляем в проём энтити prop_door_rotating и устанавливаем параметров "world model" в значение "models/props_doors/doormain01.mdl".

Безопасная зона и смена уровня

Теперь свяжем эту карту с другой внутри кампании в безопасной комнате. Для начала, хорошо добавить еще один " prop_door_rotating_checkpoint "лицом к входу в область 3 за дверь безопасной зоны. Это одна созданная немного отличается, то последним. Открой её свойства и установи название на "checkpoint_entrance", "body" на "0", "Spawn Position" на "Open Forward" (spawnpos KeyValue 1), "World Model" на "models/props_doors/checkpoint_door_02 . И убедитесь, что "Starts Open" помечено флажком. Вам нужно чтобы сторона двери с картинкой оказалась на улице. Для завершения создания перехода с одной карты на следующий нам все еще необходимо добавить info_landmark и trigger_changelevel . Сначала добавьте info_landmark в центре зала под потолком, а затем откройте его свойства и назовите его "landmark_b". Теперь создадим большой браш для покрытия площадей внутри сейфхауса и свяжи его с trigger_changelevel лица, убедитесь, что браш вступает в контакт с площадей в комнате (не обязательно должны перекрывать площадь, но должны касатся друг друга). Открой changelevel в свойства и установи ориентир имя той, которую мы только что создали, "landmark_b" и "Next Map" свойства, введите "lst_l4dmap_b".

Building a navigation mesh

For the survivor bots and infected to be able to move, you will need to create a navigation mesh ("mapname.nav" file) for your map. To build a basic mesh you need to have the map already compiled and loaded. Once the map is running, aim your crosshairs at the floor space, open up the console in game, and then type the following:

sv_cheats 1
nav_edit 1
nav_mark_walkable
nav_generate

The map will be reloaded after you type nav_generate, and if all goes well, we should no longer have the "NAV ERRORS - Map is unplayable!" message displayed on the screen when the map loads. This is because nav_generate assigned certain attributes to the nav mesh through a process known as "nav marking".

You can see the changes using the "select_with_attribute A" command. What this console command does is select all the nav areas that have been "marked" with the attribute "A". For instance, by using "select_with_attribute CHECKPOINT", all the nav areas that have been marked with the "CHECKPOINT" attribute would be highlighted.

For example, with "nav_edit 1" set, you would open the console and type:

select_with_attribute DOOR
4 nav squares should be highlighted telling the bot AI there is a door in these locations.
select_with_attribute CHECKPOINT
The nav areas in the safehouse at the end of the level should be highlighted.
select_with_attribute RESCUE_CLOSET
The two two rescue closets should have there nav squares highlighted
select_with_attribute ESCAPE_ROUTE
Now a lot of nav squares are highlighted forming a path from the player spawn to the nav areas marked "checkpoint" at the end of the level.
using select_with_attribute DOOR
using select_with_attribute CHECKPOINT
using select_with_attribute RESCUE_CLOSET

NAV Marking

In this case, nav_generate did a fairly good job at locating and assigning the final checkpoint, rescue closets, and other attributes to the nav mesh, but you may not always be so lucky. To manually assign attributes to nav squares, you will need use the MARK command via 'mark A', where A is the attribute you wish to mark the nav area with.

For example, before we can get our level working correctly, we will have to manually "mark" one additional location on the nav mesh that nav_generate missed, a starting checkpoint. To do this, we need to be in nav editing mode with:

sv_cheats 1
nav_edit 1

Now inside the starting safe room we will label one nav square at a time by pointing the targeting reticule at them then typing this into the console:

mark CHECKPOINT

Or, to speed things up, you can use the nav gui by opening up the console again and typing:

nav_gui
nav mesh now with both checkpoints marked

With the nav gui enabled, you can now left click multiple meshes, and use the mark CHECKPOINT console command to set the attribute for all the selected areas.

If you make a mistake, you can remove a single attribute from a selected nav area by using:

  • nav_clear_attribute A
    • where A is the attribute you wish to remove (eg: nav_clear_attribute CHECKPOINT)

Or, if you wanted to remove all nav attributes from the selected area, you could use:

  • wipe_attributes

Once you have finished with nav marking, be sure to save the changes to your map with nav_save, then re-analyze it with nav_analyze

Getting the infected to spawn

Now that the nav mesh is built, you should be able to get the infected to spawn by using the console commands:

director_stop
director_start

You should only have to do this once inside the map, then every time you load the map after that the director should start on it's own.

Для области спауна в последующих главах этой кампании, вы не должны продолжать использовать weapon_smg_spawn и weapon_pumpshotgun_spawn , которые вы использовали в первой карте, так как большинство игроков, вероятно, уже сменили их для других, более мощных видов оружия, которые они нашли на пути. Эти более мощное оружие можно использовать в области спауна для следующих глав, как правило, состоят из: weapon_rifle_spawn, weapon_autoshotgun_spawn, и weapon_hunting_rifle_spawn.

Смотрите также