EditingWesnoth

From The Battle for Wesnoth Wiki
Revision as of 21:20, 18 September 2005 by Scott (talk | contribs) (a lot of that stuff was outdated or redundant (still working on it))


Game and User Directories

Wherever you install the game, there will be a game data directory that contains, of course, the game's data. This directory should have the following subdirectories: data, music, sounds, and images. There are several others, but these are the important ones. In this wiki, the terms "game data", wesnoth/data, or ./data refers to the wesnoth/data directory. You normally do not need to modify these files, but you can if you want to modify a unit or something.

The user data directory allows you to add custom content without modifying the game's own files. Each OS puts its user data directory in a different place. Windows has an actual userdata directory in with the game data. Linux systems use ~/.wesnoth, and Mac OS X uses either ~/.wesnoth or ~/Library/Preferences/Wesnoth/data. In this wiki, "user data", userdata/subdirectory, or (occasionally) ~wesnoth/ refer to this directory.

Game data

The major directories you need to know about are wesnoth/data, wesnoth/data/units, wesnoth/data/campaigns, wesnoth/data/maps, wesnoth/data/scenarios, wesnoth/images

Become familiar with what is in ./data/campaigns, ./data/scenarios, and ./data/maps. These have the officially distributed campaigns and multiplayer maps. If you ever want to examine or edit one of the scenario configuration files, this is where you would go. For example, a common question is how a new player can give himself more turns or gold in scenario X. This is where you would go to do that.

Two very important directories are ./data/units and ./images. You have the ability to drop new units or images in these directories and have the game recognize them. When specifying an image for something, you do so relative to ./images.

Some information is stored in files in the data/ directory itself:

  • amla.cfg - global definition for After Max-Level Advancement (currently 3 hp per 100 XP)
  • fonts.cfg - defines which fonts the game can use
  • game.cfg
  • help.cfg - the entire help system document
  • items.cfg - macros for common objects and items used in the game, also available for campaign writer use
  • multiplayer.cfg - defines the multiplayer eras and factions
  • names.cfg - lists of name fragments that are randomly put together to create random-sounding names. Segregated by race and gender
  • scenario-test.cfg - a simple test scenario. Run it with the command wesnoth -t
  • schedules.cfg - defines the global day-night cycle
  • terrain.cfg - defines the terrain types
  • terrain-graphics.cfg - defines terrain layering and usage of random terrain
  • tips.cfg - the contents of the Tome of Wesnoth
  • traits.cfg - defines all traits used globally in the game
  • utils.cfg - some common macros used in the game, also available for campaign writer use
  • units.cfg - defines the races, which traits each race has, and the movement types (which set defenses, resistances, and movement costs)

For more information about game configuration:

See Also