MAP files? Maps selction for senarios

The place to post your WML questions and answers.

Moderator: Forum Moderators

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Post Reply
User avatar
Tna
Posts: 2
Joined: August 10th, 2010, 3:15 am

MAP files? Maps selction for senarios

Post by Tna »

Hi, I'm new to coding and have been experimenting with WML. I downloaded the A Simple Champaing add-on and modified it. But I can't change maps on it. All the maps I've seen are ".MAP" files, except the ones I make with Wesnoth map editor. If I take one of my Wesnoth Editor maps and put it in my ASC map folder, then change the senario WML to use that map, it doesn't work. I've made sure my file path and spelling were correct. So what are ".MAP" files, how do I make my maps into ".MAP" files, and what's the difference between Wesnoth editor maps and all the other maps?
User avatar
Dixie
Posts: 1757
Joined: February 10th, 2010, 1:06 am
Location: $x1,$y1

Re: MAP files? Maps selction for senarios

Post by Dixie »

either rename your files "map_name.map", either remove the ".map" in the scenario's filepath. AFAIK, both way should work fine.
Jazz is not dead, it just smells funny - Frank Zappa
Current projects: Internet meme Era, The Settlers of Wesnoth
User avatar
Tna
Posts: 2
Joined: August 10th, 2010, 3:15 am

Re: MAP files? Maps selction for senarios

Post by Tna »

k, so now the map file's name is "01_templatee.map", the senario has the correct file path and file name with the ".map" includded. And I got this error while trying to play it:

An error due to possible invalid WML occured
The error message is:

A Map without a header is not supported

When reporting the bug please include the following error message:
Condition '!(header_offset == std::string::nopos || comma_offset <header_offset)' failed at src/map.ccp:163 in function 'read'.
User avatar
Mica
Posts: 577
Joined: December 4th, 2007, 5:18 pm

Re: MAP files? Maps selction for senarios

Post by Mica »

You need to edit the map itself, and click the flag in the top right corner that's called 'Set Player Starting Position' or something similar. And place the starting positions for each player.
Mica says one who cheats, cheats himself.

You are an Elvish Shyde - Beautiful, natural, and helpful, though sometimes under-appreciated.
monochromatic
Posts: 1549
Joined: June 18th, 2009, 1:45 am

Re: MAP files? Maps selction for senarios

Post by monochromatic »

Also, check to make sure you called it correctly in the scenario file. To make sure, it should be something like:

Code: Select all

[scenario]
# Within the top level scenario tag

    map_data="{~add-ons/My_Awesome_Addon/maps/My_Awesome_Map.map}"
    # The rest of the stuff.

[/scenario]
Post Reply