Difference between revisions of "BuildingMaps/es"

From The Battle for Wesnoth Wiki
(Mapas)
(Formato de datos del mapa: remove outdated part)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
{{Translations}}
 
<div class="navtemplate">Enlaces de creación: [[BuildingMaps/es | Mapas]] | [[BuildingScenarios/es | Escenarios]] | [[BuildingCampaigns/es | Campañas]] | [[MultiplayerContent| Multijugadores]] | [[BuildingUnits | Unidades]] </div class="navtemplate">
 
<div class="navtemplate">Enlaces de creación: [[BuildingMaps/es | Mapas]] | [[BuildingScenarios/es | Escenarios]] | [[BuildingCampaigns/es | Campañas]] | [[MultiplayerContent| Multijugadores]] | [[BuildingUnits | Unidades]] </div class="navtemplate">
 
<br>
 
<br>
  
= Mapas =
 
 
 
 
Un mapa, es sólo un conjunto de cuerdas de terreno dispuestas en un rectángulo (lo que se conoce como "mapa de datos").  Hay dos maneras de utilizar este rectángulo en un archivo: como un mapa independiente o dentro de un escenario.  La manera más fácil de crear mapas es utilizar el "Editor de Mapas", pero si desea comprender mejor cómo funcionan los mapas le recomendamos leer un poco sobre el formato de datos del mapa.   
 
Un mapa, es sólo un conjunto de cuerdas de terreno dispuestas en un rectángulo (lo que se conoce como "mapa de datos").  Hay dos maneras de utilizar este rectángulo en un archivo: como un mapa independiente o dentro de un escenario.  La manera más fácil de crear mapas es utilizar el "Editor de Mapas", pero si desea comprender mejor cómo funcionan los mapas le recomendamos leer un poco sobre el formato de datos del mapa.   
  
 
+
Esta página explica ese formato, y luego tiene algunos consejos sobre el editor, guardar archivos, y cómo jugar en un mapa una vez que usted lo ha hecho. Para obtener instrucciones sobre la forma de distribuir los mapas, consulte [[Distributing_content]].
 
 
Esta página explica ese formato, y luego tiene algunos consejos sobre el editor, guardar archivos, y cómo jugar en un mapa una vez que usted lo ha hecho. Para obtener instrucciones sobre la forma de distribuir los mapas, consulte Distributing_content
 
 
 
 
 
The easiest way to create maps is just to use the built-in editor, but if you want to actually understand how maps work, you should read a little about the map data format. This page explains that format, and then has some pointers about the editor, saving files, and how to play on a map once you've made it. For instructions on how to distribute maps, see [[Distributing_content]].
 
  
  
Line 25: Line 18:
 
This is not the Matrix.  You normally don't need to look at encoded maps. However, if you would like to use some advanced terrain features or create scenarios and campaigns, you'll have to dive into the map code. The encoding for maps has a specific format in Wesnoth:
 
This is not the Matrix.  You normally don't need to look at encoded maps. However, if you would like to use some advanced terrain features or create scenarios and campaigns, you'll have to dive into the map code. The encoding for maps has a specific format in Wesnoth:
  
* A map starts with a header with the following keys
 
** '''usage''', this should be 'map' for a map and 'mask' for an overlay mask
 
** '''border_size''', the size of the border, should be 1 for map and 0 for mask. When the border_size is 1 the map border is part of the map data, this means the user can define the border instead of the game taking a guess.
 
* Between the header and the data should be 1 empty line
 
 
* A map data file consists of any number of lines, each with the same number of strings.
 
* A map data file consists of any number of lines, each with the same number of strings.
 
* Each string must be a string specified in a ''string'' key specifying a terrain (see [[TerrainLettersWML]]).
 
* Each string must be a string specified in a ''string'' key specifying a terrain (see [[TerrainLettersWML]]).
Line 42: Line 31:
 
For example, to have a road of connected dirt ('Re') tiles, the map data would look like this:
 
For example, to have a road of connected dirt ('Re') tiles, the map data would look like this:
  
usage=map
 
border_size=1
 
 
 
  Re, Re, Gg, Gg, Gg, Gg, Gg, Gg
 
  Re, Re, Gg, Gg, Gg, Gg, Gg, Gg
 
  Gg, Gg, Re, Re, Gg, Gg, Gg, Gg
 
  Gg, Gg, Re, Re, Gg, Gg, Gg, Gg
Line 79: Line 65:
 
<br><br>
 
<br><br>
 
<div class="navtemplate">Enlaces de creación: [[BuildingMaps/es | Mapas]] | [[BuildingScenarios/es | Escenarios]] | [[BuildingCampaigns/es | Campañas]] | [[MultiplayerContent| Multijugadores]] | [[BuildingUnits | Unidades]] </div class="navtemplate">
 
<div class="navtemplate">Enlaces de creación: [[BuildingMaps/es | Mapas]] | [[BuildingScenarios/es | Escenarios]] | [[BuildingCampaigns/es | Campañas]] | [[MultiplayerContent| Multijugadores]] | [[BuildingUnits | Unidades]] </div class="navtemplate">
 +
 +
[[Category:Create]]

Latest revision as of 03:46, 8 November 2024


Un mapa, es sólo un conjunto de cuerdas de terreno dispuestas en un rectángulo (lo que se conoce como "mapa de datos"). Hay dos maneras de utilizar este rectángulo en un archivo: como un mapa independiente o dentro de un escenario. La manera más fácil de crear mapas es utilizar el "Editor de Mapas", pero si desea comprender mejor cómo funcionan los mapas le recomendamos leer un poco sobre el formato de datos del mapa.

Esta página explica ese formato, y luego tiene algunos consejos sobre el editor, guardar archivos, y cómo jugar en un mapa una vez que usted lo ha hecho. Para obtener instrucciones sobre la forma de distribuir los mapas, consulte Distributing_content.


Creando un mapa

Wesnoth has a fully functional map editor, accessible from within the game. The map editor should be fairly straightforward. Making good, balanced, interesting maps is another task altogether. ESR has addressed it in his Campaign Design How-To. If you run into trouble with the map editor, go ahead and ask for help on the Multiplayer Development forum.

If you're a programmer, note that while the source code and most binary distributions come with the official graphical map editor, you may have to give the build system a flag or argument to tell it to compile them as well as the main game.

Formato de datos del mapa

This is not the Matrix. You normally don't need to look at encoded maps. However, if you would like to use some advanced terrain features or create scenarios and campaigns, you'll have to dive into the map code. The encoding for maps has a specific format in Wesnoth:

  • A map data file consists of any number of lines, each with the same number of strings.
  • Each string must be a string specified in a string key specifying a terrain (see TerrainLettersWML).
  • Each string may be padded with spaces or tabs and must be separated with a comma, except for the last string on a line this one may not have a comma.
  • When the file is interpreted, each string will be replaced by the terrain it refers to.
  • Empty lines are allowed before, after and between lines of characters, between lines is not advised.
  • Terrains may be prefixed with a number followed by one space, these indicate the starting position for side n. n = 1, 2, 3, ... 9 (more might work but is untested and unsupported). This is a change from the previous system where a starting position was automatically a keep.

It's advised to use spaces for padding and pad each column to be the same width; the game does this when writing a map file.

Since text file tiles are squares while game tiles are hexes, some tiles must be shifted. Tiles in even-numbered columns are shifted down 1/2 of a tile. For example, to have a road of connected dirt ('Re') tiles, the map data would look like this:

Re, Re, Gg, Gg, Gg, Gg, Gg, Gg
Gg, Gg, Re, Re, Gg, Gg, Gg, Gg
Gg, Gg, Gg, Gg, Re, Re, Gg, Gg
Gg, Gg, Gg, Gg, Gg, Gg, Re, Re

¿Ahora qué?

You've created an awesome map with the map editor and you're ready to test it out. But how can you do this? It's actually quite simple.

Jugar en su propio mapa

If you just want to play the map, maybe against the computer or with a friend, all you have to do is save it into the map editor's folder (the default location). Then, when you launch the game and host a multiplayer game, the map should appear at the top of the map choices screen.

When creating a game on the multiplayer server, your map will be described to other players as a "User Map" and any replays stored on the server will refer to the game as "User Map."

For the curious: Saving a map file like this creates a stand-alone file that holds the map data. That file is by default saved in userdata/editor/maps/, and maps in that location are added to the top of the multiplayer map selection list.

Colabore compartiendo su mapa

Cuando esté listo para compartir su mapa con el mundo, coloquelo en el foro de desarrollo multijugador or package it to be distributed on the in-game add-ons server.

Nota

There is a proposed update for the map format coming up soon. Please read this to find out more.

New map format

También vea



This page was last edited on 8 November 2024, at 03:46.