|
This tutorial covers the creation of a custom map for Lux based on a realistic environment. It was originally written by Preacherman back in the old days, and has now been moved to the Wiki for everyone to contribute to.
Step 1 - Deciding what to build.
As with anything, it is good to have clear idea what we are trying to do before we do it. For the purposes of this tutorial, I have settled on the UK. The first thing to do is obviously to find a decent image that we can work from - decent for our purposes means something large and clear, but with enough detail to provide us with the outlines we require. I was lucky enough to find this image <http://sillysoft.net/maps/tutorial/uk.gif> using Google's excellent image search, so we'll use this as our model.
Usually it's best to resize your image to the best proportions before starting. The larger the better, but take into account that not everyone has a big screen, and Lux's built in Chat window will be taking some space as well. A maximum width of 800-1000 and height of 500-700 pixels is recommended.
Lux maps, as you probably know, use polygons to create countries, and groups of countries make up continents. This works globally, but as we are representing the UK only here, we'll need to redefine some terms. The logical thing to do would be to call each country in the UK a continent, and each county (area, state, whatever) will become it's own country.
Step 2 - Start the Editor and load your Image
Lux includes a Map Editor that can be used to ease some map-making tasks. Open it by going to the File menu and selecting Map Editor. Next you should go to the Editor menu and select Load Background Image. Navigate to your image and select it. NOTE: This tool is NOT for setting a theme, it is only for tracing purposes within the map editor.
Step 3 - Drawing countries
Now start tracing the outlines on the map. We will start with Wales, as that is the smallest and easiest of our five "continents". Start adding points around the outline of the first area simply by clicking. The fewer points you use the better in general - this particular map makes this very easy, as the outlines already have nice straight edges, but for other maps, you needn't be 100% geographically correct, we are looking to reproduce a recognizable shape more than anything else. Too many points will not only make lining up neighboring areas more time-consuming, but will increase the overall load time of the file in Lux. Once you have all but one point of an area complete, press the spacebar to seal it up and create your polygon.
You should be aware that Lux automatically adds a thin border around each country, so we need to allow for this when mapping, we don't want each polygon to be slap up against it's neighbor. Leave a little gap between countries, and make this gap a little bigger where continent divisions will exist.
You can switch the Map Editor into 'Edit Shapes' mode to drag each point to fine tune a polygon's shape if necessary.
Step 4 - Editing the army locations.
Select the 'Move army boxes' mode in the editor. Lux will display where all of the army boxes get put for each country. Many of the default places will be OK, however some will not be as well placed as they could be. Click and drag army boxes to move them around as you desire.
Step 5 - Naming countries and Creating a Starting Scenario
Select the 'Name countries' mode in the editor. You can now proceed to enter names for all of the countries that you have created. I am using an open web browser to find the names of these places as I go (I am not as well read on Welsh county names as I should be!) Please be sure to name ALL countries, this makes it easier for the mapLAB when testing your map.
This is also where you include a set of starting conditions for your map. To do this, go through every country and assign it an initial owner value between 1 and 6. This value is the ID of the player who will start out owning it. An id value of 1 means the first player will own that country, a value of 6 means the sixth player will start out owning that country. All countries in the map have to be assigned an initial owner value in order for the scenario to work properly. You can not have any countries with empty ID values and you cannot skip any values. But remember there does not need to be all 6 players in the starting scenario. If you wanted your scenario to only have three players then you'd only use the id values 1-3. Your map can have as little as 2. So if your map isn't condusive to 6 players then don't force them in. You can also assign starting armies using the 'initial armies' box. The default is 1, and most people have the 'show one less army' preference set, so the map editor displays what it will look like to them.
For more on starting scenarios visit this link: StartingScenario
NOTE: In order to have your map released in the plugin manager it MUST contain a starting scenario. So add one if you're planning on submiting your map.
Step 6 - Connecting countries.
From the combo-box at the bottom of the Map Editor select the Connect Countries option. Click on one country and drag into another to connect them. Repeat till all the connections you want have been added. This is the easiest and most common place to make mistakes, so be sure you go over your map again and again to make sure all connections are correct. Correct connections will shorten the time your map spends in the mapLAB testing room.
Step 7 - Creating continents and assigning the countries
Select 'Create Continents' from the map editor editing mode selection box. Click the 'New Continent' button to create as many continents as you will need. For each one a little colored box will appear on the left side of the map.
Drag from countries onto a colored continent box to assign that country to the continent. The color of the country will change to indicate what continent it is in.
Step 8 - Set Continent Info
Now put the editor into 'Set Continent Names and Data' mode. This allows you to cycle through the continents and set their names and bonus values. The best way to calculate the bonus is to base it on how many countries we need to occupy in order to defend the continent. We can see quite simply by looking that by occupying 3 "countries", we can successfully defend the Scottish "continent".
- TIP* naming a continent "water" will trigger the army graphics to be a boat icon on all countries within that continent.
Step 9 - Set meta-info
Go to the Editor menu and select 'Set Map Info' and fill in as much as you want (remember the width and height values from earlier - if they aren't there already). The Title is what will appear at the top of the window when playing the map and is also what will appear as the name of the map in the network window. The Version is to keep track of any updates, when updating your map after it's uploaded you must change the version number. The Width and Height is the measurement in pixels of your map. The Theme dropdown is the name of the theme your map is using, to choose a different theme click the dropdown and scroll to the desired theme (for more visit the Theme Tutorial). Army Pictures are the little icons that appear when the Show Army Graphics preference is selected, to change simply select a different time period from the dropdown. Author is your name or screen name. Email must be a valid email address and is only used for correspondence with the mapLAB. Webpage is the link that will connect to your name on your maps page. Description is the story or directions for your map, put some thought into this. Owner ID of the open Land in the scenario is the ID value of the player you want to be played by an Empty bot when the starting scenario is used in other words, the ID value of the "unoccupied lands." Click 'OK' to save the info and then save your map file.
Get into the habit of saving your map file regularly as we proceed through the tutorial, always a good habit in case things go wrong.
Step 10 - Adding additional lines
If you have countries that connect to each other but are not touching then it's a good idea to add a line between them so that people know about the connection. You do this using the 'Draw Extra Lines' mode in the map editor.
Step 11 - Preview
You can select the Preview mode in the editor to test out how your map will look at any time. Take a good look at your map, making sure that everything looks the way it should... if there are errors anywhere we want to pick them up now, before moving on.
Step 12 - Real testing
By default the Map Editor will save files where Lux looks for them. If you saved your file somewhere else or have moved it then you must copy it into Lux's Saved Boards folder (Board -> Goto Saved Boards from within Lux). Start Lux, and you should see the name of your new board in the Saved Boards drop box. Start a new game, and go!
Testing is a crucial part of map making so don't take it lightly. Play your map several times to ensure that all the connections are clear and correct, the balancing is solid, and the map is free of eny errors.
Note that if you used a background image in the Map Editor it will not automatically show up. You must create a theme folder for the background. Inside your Lux /Support/Themes/ folder create a folder and name it what your theme should be named. Then put your image named background.jpg into that folder. Then in the map editor go to Set Info and select the theme that you created from the list. For more help in creating a theme See the Theme Tutorial
If you get error messages that you can't figure out then post the contents of your map file in the forum and you will be sure to get a solution.
Step 13 - Release your map to the world
Make sure to test your map before you upload it. That doesn't mean just testing to see if it loads. Test it for clear and correct connections, fair and solid balancing, and make sure it's free of any errors (including spelling errors). The less issues the mapLAB finds with your map, the faster it will make it into the plugin manager. So TEST, TEST, TEST!
When you are happy with your map and have tested it, you can submit it to the Sillysoft mapLAB. The mapLAB will then further test your map to make sure it's ready for the plugin manager. They will correspond with you via e-mail (the e-mail you used for your forum account)
To upload a map go to http://sillysoft.net/plugins/upload/ there you will find a map upload agreement, read it carefully. After agreeing to the map upload agreement you will find forms that will guide you through the uploading process. Huzzah!
Advanced techniques
At its core every Lux map is just a specially formatted text file. If you have some experience with HTML code or XML then you will recognize the format. You can edit these files by hand to make changes if you want. To familiarize yourself with the way that Lux map files are built up open one in a text editor and have a look. The formal description of the format can be found at <http://sillysoft.net/maps/mapspec.php>. Once you have read that, you will have a better understanding of Lux maps.
More help
You can find experienced map-makers in the MapLAB Forum, and look in the Intro sticky for a list of generally helpful threads.
Graphics
See the Theme Tutorial for all the info on making graphic themes for maps.
EditText of this page
(last edited October 26, 2009)
[info]
[diff])
FindPage by browsing or searching
5 best incoming links:
Lux Guide (62), Map Editor (24), Theme Tutorial (23), FrontPage (11), RecentChanges (10)
5 best outgoing links:
Theme Tutorial (23), StartingScenario (14)
5 most popular nearby:
FrontPage (216394), Lux Guide (60872), RecentChanges (31700), Lux History (7981), Theme Tutorial (7833)
|