Compartir entrada

jueves, 5 de septiembre de 2013

Tutorial Left 4 Dead: Distribuir un mapa

Durante más de un mes hemos aprendido todo lo necesario para crear un escenario no sólo de Left 4 Dead, sino de cualquier juego de Valve que tenga la posibilidad de crear mapas mediante el Valve Hammer World Editor. Los elementos básicos los conocemos y podemos aplicarlos en cualquier juego, no obstante cada uno de ellos poseen sus propias reglas y gameplay que lo hacen únicos, como los modos de juego en Left 4 Dead, la creación de infectados, etc. En éste tutorial vamos a ver el último paso que nos falta, distribuir nuestro mapa.


Crear árbol de directorios.

Distribuir un mapa de Left 4 Dead es una tarea bastante sencilla, tan sólo es necesario tener el mapa compilado, la rejilla de navegación creada y un árból de directorios para ubicarlo todo.

Los pasos son los siguientes:

- Creamos un árbol de directorios que tenga lo siguiente:
  - Un directorio raíz con el nombre del mapa.
  - Dentro del directorio raíz creamos los directorios maps, materials, missions y models.
  - Dentro del directorio "materials" creamos los directorios models y vgui.
  - Dentro del directorio "vgui" creamos un directorio llamado maps.
- Dentro del directorio "maps" que cuelga en el raíz pegamos los archivos .bsp y .nav de nuestro mapa, que se encuentra en la ruta "...\Steam\SteamApps\common\left 4 dead\sdk_content\mapsrc". Estos son los archivos del mapa compilado y de la rejilla de navegación.
- En el directorio raíz creamos un archivo llamado addoninfo.txt.
- En el directorio "missions" creamos un archivo llamado NOMBREMAPA.txt.

Con ésto hemos terminado de crear los directorios.

Addoninfo.txt y MissionFile.txt

El archivo addoninfo.txt contiene toda la información necesaria de nuestro mapa o campaña, dicha información aparecerá en el juego cuando seleccionemos el mapa.

Configurar el archivo addoninfo.txt es sencillo, tan sólo hay que rellenar algunos campos y poco más. Valve publicó un ejemplo de archivo addoinfo.txt, el cual tiene el siguiente contenido:

"AddonInfo"
{
"addonSteamAppID"                  "500"
"addonTitle"                       "Dead Line"
"addonVersion"                     "1.0"
"addonTagline"                     "Catch the last subway... out of hell."
"addonAuthor"                      "Valve"
"addonAuthorSteamID"               "MikeDurand"
"addonSteamGroupName"              "deadlineadd-on"
"addonURL0"                        "http://media.steampowered.com/apps/513/deadline.html"

"addonContent_Campaign"            "1"
"addonContent_Survival"            "0"
"addonContent_Scavenge"            "0"
"addonContent_Versus"              "0"
"addonContent_Map"                 "0"

"addonContent_Survivor"            "0"
"addonContent_Skin"                "0"

"addonContent_BossInfected"        "0"
"addonContent_CommonInfected"      "0"
"addonContent_Music"               "0"
"addonContent_Sound"               "0"
"addonContent_Prop"                "0"
"addonContent_Prefab"              "0"
"addonContent_Spray"               "0"
"addonContent_Script"              "0"
"addonContent_BackgroundMovie"     "0"

"Content_Weapon"                   "0"
"Content_WeaponModel"              "0"

"addonDescription"                 "Survivors must escape on a subway train in this short tutorial example campaign. Get source files and tools for creating your own campaigns by downloading the Left 4 Dead 2 Authoring tools SDK, which is available under the 'Tools' tab in Steam."
"addonDescription_DA"              "Overlevende skal undslippe et S-tog i denne korte tutorial eksempel kampagne. Få kildefiler og værktøjer til at skabe dine egne kampagner ved at downloade Left 4 Dead 2 Authoring værktøjer SDK, som er tilgængelig under 'Funktioner' fanen i Steam."
"addonDescription_NL"              "Overlevenden moet ontsnappen op een metro in deze korte handleiding voorbeeld campagne. Krijg bronbestanden en tools voor het maken van uw eigen campagnes door het downloaden van de Left 4 Dead 2 Authoring gereedschappen SDK, die beschikbaar is op het tabblad 'Extra' in Steam."
"addonDescription_FI"              "Survivors on pelastautua metro tässä lyhyessä harjoitusesimerkit kampanja. Hanki lähdetiedostot ja työkalut luoda omia kampanjoita lataamalla Left 4 Dead 2 Authoring Tools SDK, joka on käytettävissä Työkalut-välilehti Steam."
"addonDescription_FR"              "Les survivants doivent s'échapper en métro dans cette carte du tutoriel. Obtenez les fichiers et les outils pour créer vos propres cartes en chargeant les outils de création SDK Left 4 Dead 2 qui sont disponibles sous l'onglet 'Outils' sur Steam."
"addonDescription_DE"              "Survivors muss auf einer U-Bahn in diesem kurzen Tutorial beispielsweise Kampagne entkommen. Holen Sie sich die Quelldateien und Werkzeuge für die Erstellung eigener Kampagnen, indem Sie die Left 4 Dead 2 Authoring Tools SDK, welches unter der Registerkarte 'Tools' in Steam."
"addonDescription_IT"              "I sopravvissuti devono sfuggire su un treno della metropolitana in questa breve campagna esempio tutorial. Ottenere file di origine e di strumenti per la creazione di campagne scaricando il Left 4 Dead 2 Authoring Tools SDK, che è disponibile sotto la scheda 'Strumenti' nel vapore."
"addonDescription_JA"              "生存者はこの短いチュートリアルの例のキャンペーンの地下鉄電車の中でエスケープする必要があります。スチームで[ツール]タブの下で利用可能ですレフト4デッドオーサリングツールのSDKをダウンロードすることにより、独自のキャンペーンを作成するためのソースファイルやツールを入手してください。"
"addonDescription_KO"              "생존자들은이 짧은 튜토리얼 예제 캠페인 지하철에서 탈출해야합니다. 증기의 '도구'탭에 따라 사용할 수 있습니다 레프트 4 데드 저작 도구 SDK를 다운로드하여 자신의 캠페인을 만들기위한 소스 파일과 도구를 얻을."
"addonDescription_NO"              "Overlevende må rømme på et tog i denne korte opplæringen eksempel kampanjen. Få kildefilene og verktøy for å lage dine egne kampanjer ved å laste ned Left 4 Dead 2 Authoring verktøy SDK, som er tilgjengelig under 'Verktøy'-fanen i Steam."
"addonDescription_PL"              "Ocaleni muszą uciekać na pociąg metra w tej krótkiej kampanii przykład samouczka. Pobierz pliki źródłowe i narzędzia do tworzenia własnych kampanii pobierając Left 4 Dead 2 Authoring narzędzi SDK, który jest dostępny w zakładce 'Narzędzia' w Steam."
"addonDescription_PT"              "Sobreviventes deve escapar em um trem do metrô nesta campanha exemplo curto tutorial. Obter arquivos de origem e ferramentas para criar suas próprias campanhas baixando o Left 4 Dead 2 Authoring ferramentas SDK, que está disponível na aba 'Ferramentas' no Steam."
"addonDescription_RU"              "Выжившие должны бежать на поезд метро, ​​в этой короткой кампании пример урока. Получить исходные файлы и инструменты для создания собственных кампаний, загрузив Left 4 Dead 2 Authoring инструментов SDK, который доступен на вкладке 'Инструменты' в Steam."
"addonDescription_ZH"              "幸存者必须逃离地铁列车在这个简短的教程示例活动。获取源文件和工具下载左4人死亡创作工具SDK,这是可以在“工具”选项卡下蒸汽用于创建您自己的运动。"
"addonDescription_ES"              "Los sobrevivientes deben escapar en un tren subterráneo en esta corta campaña de ejemplo del tutorial. Obtenga los archivos de origen y las herramientas para crear sus propias campañas por descargar el Left 4 Dead 2 Authoring herramientas SDK, que está disponible en la pestaña 'Herramientas' en Steam."
"addonDescription_SV"              "Överlevande måste fly på ett tunnelbanetåg i denna korta handledning exempel kampanjen. Få källfiler och verktyg för att skapa dina egna kampanjer genom att ladda ner Left 4 Dead 2 Authoring Tools SDK, som är tillgänglig under 'Verktyg' fliken i Steam."
}

Realmente casi todo se puede eliminar de ahí ya que lo último es la descripción del mapa en el idioma que se desee. Por ejemplo en mi mapa "The Chalet" tengo puesto ésto:

"AddonInfo"
{
     addonSteamAppID         500                                                
     addontitle              "The Chalet"                                      
     addonversion            1.0                                                
     addontagline            "Quiet rest ... and forever"          
     addonauthor             "kukilin"                                            
     addonSteamGroupName     "thechaletadd-on"                          
     addonContent_Campaign   1                                                    
     addonURL0               "http://www.l4dmaps.com/details.php?file=24877"
     addonDescription        "Survival map where survivors must defend a villa from the hordes. "

}

Las líneas significan lo siguiente:

ID de juego en Steam.
Nombre del mapa/campaña.
Versión.
Subtítulo del mapa/campaña.
Autor.
Grupo de Steam
Indicador de contenido de campaña.
URL desde la que se puede descargar el contenido. (Esto aparecerá en las salas de espera del juego, por lo que viene muy bien para que otros usuarios puedan encontrar tu mapa)
Descripción.

No es necesaria ninguna cosa más, tan sólo rellenar lo necesario y guardar el archivo addoninfo.txt.

El archivo NOMBREMAPA.txt es también bastante fácil de configurar, éste se encarga de especificar los datos del contenido y cómo el juego debe procesarlos, por ejemplo el mapa que se cargará dependiendo de si entramos en Survival, Versus o Campaña.

Valve liberó el contenido del fichero en su tutorial Deadline, el contenido es el siguiente:

// Mission files describe the metadata needed by campaign-specific add-ons so they can be
// integrated into Left4Dead. The data in this file is used by the game UI, matchmaking and server.
// Although you may provide multiple Campaigns in one add-on by putting more than one .TXT file
// in the missions folder, it's generally a good idea to stick to one per add-on.
//
// HOW TO DEBUG MISSION FILES:
// In the console set "developer 2"
// Then type "mission_reload"
// This will make the game reload all the mission files and print out every chapter for every mode it
// finds.  It's very useful to ensure that your mission file is being correctly read.

"mission"
{
// Use a short name, since it is used as a tag on the servers for matching
// your campaign when looking for a dedicated server.  Generally it should
// be something unique.  One suggestion to is use your initials and a short
// abbreviated name for your campaign.
"Name" "DeadLine"

// The version number is used when finding campaigns on dedicated servers
// and in matchmaking. If you try to connect to someone in matchmaking
// who has a newer version, you will be directed to download the new
// version.  You must increment this to the next integer (whole numbers)every
        // time you release an update.
"Version"       "3"

// Author is displayed in the UI when people see others playing your
// campaign.
"Author" "Valve"

// Website is extremely important as people will automatically be sent
// to this URL if they try to join a friend running your campaign.  This
// should be the home page for your campaign and it should provide a
// description, a link to download it, and installation instructions.
"Website" "http://media.steampowered.com/apps/513/deadline.html"

// This name is used when refering to the campaign in the UI.
"DisplayTitle" "Dead Line"
"Description"   "Catch the last subway... out of hell."

// Vmt shown behind the end credits when your campaign completes.
        // Note: This item needs to have "vgui\" at the front. It is assumed
// for the poster and the map thumbnails.
  "OuttroImage" "vgui\OutroTitle_Deadline"

// Loading poster data
//
// Note that "posterTitle" and "posterTagline" are often blank as
// the poster usually includes these in the poster image itself.
// If you do not provide a poster, a generic default will be used.
"poster"
{
"posterImage" "LoadingScreen_DeadLine"

"posterTitle" ""
"posterTitle_y" "360"

"posterTagline" ""
"posterTagline_y" "372"

// Adjust these to align the survivor names on your poster.
// 0,0 is center of the poster.
// Adjusting x value moves the names horizontally.
// Adjusting y value moves the names vertically.
// Try to space them in a staggered arrangement so that long names do not overlap.
"bill_player_name_x" "118"
"bill_player_name_y" "-195"

"louis_player_name_x" "-53"
"louis_player_name_y" "-205"

"zoey_player_name_x" "-124"
"zoey_player_name_y" "-210"

"francis_player_name_x" "31"
"francis_player_name_y" "-200"
}

// The modes section lists each of your campaign maps and each mode
// they support.  Depending on how you set up your campaign maps,
// you can reuse the same bsp for different modes as is the case with
        // coop and versus in this example. This requires setting up entities
        // that show up or operate differently for different modes.
        //
// The following modes are supported: "coop", "versus", "survival"
//
// Number each map section starting with "1"
//
// "Map" is the name of the bsp of the starting map. (do not include
        // an extension)
// "DisplayName" is the name to use for the chapter of the map.
// "Image" is the image used for the chapter in the lobby and
// settings.

"modes"
{
"coop"
{
"1"
{
"Map" "l4d_deadline01"
"DisplayName" "Deadline 1"
"Image" "maps/l4d_deadline"
}

"2"
{
"Map" "l4d_deadline02"
"DisplayName" "Deadline 2"
"Image" "maps/l4d_deadline"
}
}

"versus"
{
"1"
{
"Map" "l4d_deadline02_vs"
"DisplayName" "Deadline Versus"
"Image" "maps/l4d_deadline"
}
}

"survival"
{
"1"
{
"Map" "l4d_deadline02"
"DisplayName" "Dead Line Survival"
"Image" "maps/l4d_deadline"
}
}
}

}

Yo en el caso de mi mapa The Chalet lo rellené así:

// Mission files describe the metadata needed by campaign-specific add-ons so they can be
// integrated into Left4Dead. The data in this file is used by the game UI, matchmaking and server.
// Although you may provide multiple Campaigns in one add-on by putting more than one .TXT file
// in the missions folder, it's generally a good idea to stick to one per add-on.
//
// HOW TO DEBUG MISSION FILES:
// In the console set "developer 2"
// Then type "mission_reload"
// This will make the game reload all the mission files and print out every chapter for every mode it
// finds.  It's very useful to ensure that your mission file is being correctly read.

"mission"
{
// Use a short name, since it is used as a tag on the servers for matching
// your campaign when looking for a dedicated server.  Generally it should
// be something unique.  One suggestion to is use your initials and a short
// abbreviated name for your campaign.
"Name" "The Chalet"

// The version number is used when finding campaigns on dedicated servers
// and in matchmaking. If you try to connect to someone in matchmaking
// who has a newer version, you will be directed to download the new
// version.  You must increment this to the next integer (whole numbers)every
        // time you release an update.
"Version"       "1"

// Author is displayed in the UI when people see others playing your
// campaign.
"Author" "kukilin"

// Website is extremely important as people will automatically be sent
// to this URL if they try to join a friend running your campaign.  This
// should be the home page for your campaign and it should provide a
// description, a link to download it, and installation instructions.
"Website" "http://www.l4dmaps.com/details.php?file=24877"

// This name is used when refering to the campaign in the UI.
"DisplayTitle" "The Chalet"
"Description"   "Quiet rest ... and forever"

// Vmt shown behind the end credits when your campaign completes.
        // Note: This item needs to have "vgui\" at the front. It is assumed
// for the poster and the map thumbnails.
  "OuttroImage" "vgui\OutroTitle_Deadline"

// Loading poster data
//
// Note that "posterTitle" and "posterTagline" are often blank as
// the poster usually includes these in the poster image itself.
// If you do not provide a poster, a generic default will be used.
"poster"
{
"posterImage" ""

"posterTitle" ""
"posterTitle_y" "360"

"posterTagline" ""
"posterTagline_y" "372"

// Adjust these to align the survivor names on your poster.
// 0,0 is center of the poster.
// Adjusting x value moves the names horizontally.
// Adjusting y value moves the names vertically.
// Try to space them in a staggered arrangement so that long names do not overlap.
"bill_player_name_x" "118"
"bill_player_name_y" "-195"

"louis_player_name_x" "-53"
"louis_player_name_y" "-205"

"zoey_player_name_x" "-124"
"zoey_player_name_y" "-210"

"francis_player_name_x" "31"
"francis_player_name_y" "-200"
}

// The modes section lists each of your campaign maps and each mode
// they support.  Depending on how you set up your campaign maps,
// you can reuse the same bsp for different modes as is the case with
        // coop and versus in this example. This requires setting up entities
        // that show up or operate differently for different modes.
        //
// The following modes are supported: "coop", "versus", "survival"
//
// Number each map section starting with "1"
//
// "Map" is the name of the bsp of the starting map. (do not include
        // an extension)
// "DisplayName" is the name to use for the chapter of the map.
// "Image" is the image used for the chapter in the lobby and
// settings.

"modes"
{
"survival"
{
"1"
{
"Map" "the_chalet"
"DisplayName" "The Chalet Survival"
"Image" ""
}
}
}

}

Básicamente lo que hay que rellenar es la información del mapa al igual que con el addoninfo.txt y además configurar el comportamiento del póster del nivel y los mapas que se van a cargar en todo momento.

En mi caso como el mapa The Chalet era sólo de Survival eliminé el resto de modos. Además como no metí ningún poster pude obviar ese detalle también.

Cambiamos lo que necesitemos y guardamos el archivo. Ya están todos los archivos preparados, ahora sólo falta empaquetarlos.

Creando un fichero .vpk

Para que el mapa pueda ser instalado por otros jugadores es necesario empaquetarlo en un archivo ejecutable. Valve incorpora con sus juegos un programa llamado vpk, el cual se encarga de empaquetar el contenido y hacerlo instalable por cualquier jugador.

La aplicación se encuentra en "...\Steam\SteamApps\common\left 4 dead\bin" y se llama vpk.exe.

- Creamos un acceso directo de vpk.exe en el escritorio.
- Buscamos la carpeta raíz del mapa, la que tiene el nombre del mapa, y la arrastramos encima del acceso directo.

Con ésto hemos creado un archivo con el nombre del mapa y la extensión .vpk.

Para instalar el mapa tan sólo es necesario hacer doble click sobre él. Ahora se puede jugar desde Left 4 Dead sin necesidad de usar el Hammer Editor.

Ahora sólo es cuestión de distribuir el archivo .vpk por donde queramos, en foros, portales, webs, a los amigos, etc. Ellos tan sólo deberán coger el archivo .vpk y hacer doble click sobre él para poder jugar tu contenido.

Conclusiones.

Con ésto damos por finalizada esta serie de tutoriales sobre creación de mapas para Left 4 Dead. Ha durado más de un mes la aventura pero sin duda ha merecido la pena, porque a la vez que aprendéis vosotros sigo aprendo yo, espero que os haya gustado.

Naturalmente no es un cierre definitivo, aún se puede hacer mucho más con Left 4 Dead y el Hammer Editor, aún no hemos creado los posters o definidos eventos o triggers más laboriosos, pero no te preocupes que de vez en cuando ésta sección seguirá alimentandose de contenido y conocimiento.

Para la próxima serie de tutoriales no lo tengo aún claro, el siguiente juego del que aprenderemos a hacer mapas y mods puede que sea de Valve o no, puede que sea un juego de masas o uno de culto. De momento no lo tengo decidido, mañana saldremos de dudas.

Como extra a éste tutorial os dejo los posters de todas las campañas, para que los uséis de inspiración.







¿Qué sitios para distribuir mapas conoces?

 
Google+