Difference between revisions of "Make your Map Pack"

From The Battle for Wesnoth Wiki
(Method One - the Map Editor)
(Method One - the Map Editor)
Line 31: Line 31:
 
* It is recommended you use a specialised text editor for the next steps. For this guide, we are using '''Visual Studio Code'''. I know most of you can use Notepad/TextEdit for this, which is perfectly fine, but when you start getting errors and those text editors are helpless in telling where you did the typo, you shall start appreciating VSCode or Kate. #BeenThereDoneThat
 
* It is recommended you use a specialised text editor for the next steps. For this guide, we are using '''Visual Studio Code'''. I know most of you can use Notepad/TextEdit for this, which is perfectly fine, but when you start getting errors and those text editors are helpless in telling where you did the typo, you shall start appreciating VSCode or Kate. #BeenThereDoneThat
  
*
+
* Now to code the files which shall make it an add-on.
 +
 
 +
* The <nowiki>_main.cfg</nowiki> file:
 +
<nowiki>
 +
#textdomain wesnoth-Sample_Map_Pack
 +
 
 +
# these are textdomains
 +
# simply put, if you want your maps to be translated
 +
# into other languages, then you add this
 +
[textdomain]
 +
    name="wesnoth-Sample_Map_Pack"
 +
    path="data/add-ons/Sample_Map_Pack/translations"
 +
[/textdomain]
 +
 
 +
#ifdef MULTIPLAYER
 +
# indicate the binary path
 +
# this will Wesnoth find your maps
 +
# for the map_file= key
 +
[binary_path]
 +
    path=data/add-ons/Sample_Map_Pack
 +
[/binary_path]
 +
 
 +
# load the scenarios
 +
{~add-ons/Sample_Map_Pack/scenarios}
 +
#endif
 +
</nowiki>
  
 
=== Extras ===
 
=== Extras ===

Revision as of 17:28, 23 March 2021

This is a step-by-step guide showing how users can get their custom made maps converted to scenarios, and then compile those scenarios into a map-pack add-on, ready for release! I shall to be as concise as possible, providing images to help understand.

For this guide, the process will be done with Battle for Wesnoth 1.15.11 which is the version I have installed right now, but the process is the same for every version.

Things to Consider

The Approach

This is about how you are making the maps/scenarios. Are you using the in-game map editor to make your maps? Or, are you taking it a step further and making the complete scenario using the map-editor's scenario editor? Or, are you determined to just code it entirely using the MapGeneratorWML? Hey, we are covering all three!

The Procedures

This section covers the Step-by-Step guides.

Method One - the Map Editor

  • Make your desired Map. Refer to BuildingMaps if you want further info.
  • Assign player positions
  • Save your Map. Give it a cool or immersive name. Remember to save once every 5 minutes or so while making your map because you get a power outage, crash, or whatever, you probably won't be able to restore any changes made. It is good practice to save while map-making.
  • Open your add-ons folder. Refer to this page if you are not sure where it is.
  • For our guide, we shall be making an add-on titled Sample Map Pack.
  • For this guide, I shall be using one of my maps, Sylvan Refuge as a sample.
  • In the add-ons folder, make a new directory (or new folder) named Sample_Map_Pack. Please note the underscores and the uppercase and lowercase alphabets. You would have to keep them constant when you start the actual coding stuff.
  • Go inside (open it) this folder/directory and make subdirectories (more new folders) named maps and scenarios. If you want translations as well, make a translations directory/folder as well. We shall cover this at a later section.
  • It is recommended you use a specialised text editor for the next steps. For this guide, we are using Visual Studio Code. I know most of you can use Notepad/TextEdit for this, which is perfectly fine, but when you start getting errors and those text editors are helpless in telling where you did the typo, you shall start appreciating VSCode or Kate. #BeenThereDoneThat
  • Now to code the files which shall make it an add-on.
  • The _main.cfg file:

#textdomain wesnoth-Sample_Map_Pack # these are textdomains # simply put, if you want your maps to be translated # into other languages, then you add this [textdomain] name="wesnoth-Sample_Map_Pack" path="data/add-ons/Sample_Map_Pack/translations" [/textdomain] #ifdef MULTIPLAYER # indicate the binary path # this will Wesnoth find your maps # for the map_file= key [binary_path] path=data/add-ons/Sample_Map_Pack [/binary_path] # load the scenarios {~add-ons/Sample_Map_Pack/scenarios} #endif

Extras