Difference between revisions of "EditingWesnoth"

From The Battle for Wesnoth Wiki
(See Also)
(a lot of that stuff was outdated or redundant (still working on it))
Line 1: Line 1:
 
<!-- single enters on this page are intentional -->
 
<!-- single enters on this page are intentional -->
Wesnoth data is stored in 11 different directories, but most of the information is in '''data/'''.
 
== data/ == is divided into 5 subdirectories.
 
  
To understand how '''data/''' works, it is suggested that you read [[BuildingScenariosWML]].
+
== Game and User Directories ==
  
This page contains links explaining how data in each subdirectory of '''data/|| and the ||game.cfg''' file work.
+
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.
  
== Links ==
+
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.
  
 
** themes/: [[ThemeSystem]]
 
** themes/: [[ThemeSystem]]
Line 13: Line 19:
 
** scenarios/: [[BuildingScenarios]]
 
** scenarios/: [[BuildingScenarios]]
 
** translations/: [[WesnothTranslations]]
 
** translations/: [[WesnothTranslations]]
** units/: [[BuidlingUnits]]
+
** units/: [[BuildingUnits]]
 
** game.cfg: [[WesnothGameConfigure]]
 
** game.cfg: [[WesnothGameConfigure]]
  
 
Some information is stored in files in the data/ directory itself. These are explained on this page.
 
Some information is stored in files in the data/ directory itself. These are explained on this page.
  
battleworld.cfg:
+
amla.cfg - global definition for After Max-Level Advancement (currently 3 hp per 100 XP)
This is a multiplayer scenario (See '''multiplayer.cfg''')
+
fonts.cfg - defines which fonts the game can use
 
+
game.cfg
convert.pl:
+
help.cfg - the entire help system document
!(What does this file do?)
+
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
deaths.cfg:
+
names.cfg - lists of name fragments that are randomly put together to create random-sounding names. Segregated by race and gender
This is a partial scenario file (See [[BuildingScenarios]])
+
scenario-test.cfg - a simple test scenario.  Run it with the command wesnoth -t
used as a shortcut that makes death of Delfador, Kalenz, or Li'sar
+
schedules.cfg - defines the global day-night cycle
cause the player's defeat on any scenario in the Heir to the Throne campaign.
+
terrain.cfg - defines the terrain types
See [[BuildingScenariosWML]] for information on how to make shortcuts.
+
terrain-graphics.cfg - defines terrain layering and usage of random terrain
 
+
tips.cfg - the contents of the Tome of Wesnoth
intro.cfg:
+
traits.cfg - defines all traits used globally in the game
This is a partial scenario file containing a [story] tag.
+
utils.cfg - some common macros used in the game, also available for campaign writer use
It is accessed only once, in the file '''scenarios/Elves_Besieged'''.
+
units.cfg - defines the races, which traits each race has, and the movement types (which set defenses, resistances, and movement costs)
See [[BuildingScenariosAdvanced]] for info on [story] tags.
 
 
 
items.cfg:
 
This contains macros for objects and items
 
(Objects and items are subelements of scenario files.
 
See [[BuildingScenariosReference]] for further information).
 
 
 
multiplayer.cfg:
 
This file contains all multiplayer scenarios except Battleworld.
 
Multiplayer scenarios have the same format as normal scenarios
 
but are contained within a '''[multiplayer]|| tag instead of a ||[scenario]''' tag.
 
 
 
== multiplayer.cfg''' also contains '''[era] == tags which contain information about the possible eras a multiplayer game
 
can take place in. Each era contains '''[multiplayer_side]''' tags which contain information about the different sides
 
available in that area.
 
 
 
names.cfg:
 
Names in Wesnoth are generated by randomly combining parts
 
of the base names, which are contained in this file.
 
 
 
sample_translation.cfg:
 
This is not a data file.
 
It is a template for translations.
 
 
 
scenario-test.cfg:
 
This file contains a test scenario (accessed by the command '''wesnoth -t''').
 
Any scenario enclosed in [test] tags with the attribute '''id=test'''
 
is interpreted by Wesnoth as being the test scenario.
 
 
 
schedules.cfg:
 
This file contains the definitions for the different times of day.
 
 
 
terrain.cfg:
 
This file contains a series of '''[terrain]''' tags, each of which creates a new terrain.
 
 
 
tutorial.cfg:
 
This file contains the tutorial (accessed by the button 'tutorial' in-game).
 
Any scenario enclosed in [tutorial] tags with the attribute '''id=tutorial'''
 
is interpreted by Wesnoth as being the tutorial.
 
 
 
utils.cfg:
 
This contains macros for scenario files.
 
 
 
 
 
Syntax for '''[multiplayer_side]|| and ||[terrain]''' tags:
 
 
 
The first keys in '''[multiplayer_side]''' are
 
== name''', ||type||, ||recruit||, and '''recruitment_pattern ==.
 
These work the same way as in a normal '''[side]''' tag (See [[BuildingScenariosSimple]]).
 
 
 
The '''music''' key is the music to play for that team.
 
The '''terrain_liked''' key !(does what?)
 
 
 
The only neccessary keys in a '''[terrain]''' tag are
 
== name''', ||char||, ||image||, and '''aliasof ==.
 
 
 
All instances of the character '''char''' in a map file will be replaced by this terrain.
 
This terrain is gameplay-equivalent to the terrain
 
with character equal to the value of '''aliasof'''
 
  
== name == is displayed in the terrain descriptor corner (top-right)
 
when this terrain is selected.
 
== image == is the image displayed for this terrain.
 
All other keys for '''[terrain]''' affect the image in some way.
 
(not documented)
 
  
 
== See Also ==
 
== See Also ==
  
 
* [[Create]]
 
* [[Create]]

Revision as of 21:18, 18 September 2005


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. These are explained on this page.

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)


See Also