Map loading

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
Mille
Art Contributor
Posts: 350
Joined: May 6th, 2006, 11:48 am
Location: Germany

Map loading

Post by Mille »

HI there is one thing i don´t understand. I created the basic settings of my campaign with campgen and edited it afterwards. Everything works fine beside the map loading. By default campgen includes the whole map inside the scenario cfg. I would like it much ore, if i could include the mapfile tself, but when i replace it this way

map_data="{campaigns/Deep_down_in_the_sludgy_swamp/maps/01_swamp}"

wesnoth couldn´t load the map anymore.
Can anyone tell me what the problem is.


(campgen 0.17 and wesnoth 1.1.3
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Map loading

Post by zookeeper »

Mille wrote:map_data="{campaigns/Deep_down_in_the_sludgy_swamp/maps/01_swamp}"

wesnoth couldn´t load the map anymore.
Can anyone tell me what the problem is.
First of all, try writing it as:

Code: Select all

map_data="{@campaigns/Deep_down_in_the_sludgy_swamp/maps/01_swamp}"
And if it still doesn't work, verify that the directory structure is right and that the map file actually exists.
Mille
Art Contributor
Posts: 350
Joined: May 6th, 2006, 11:48 am
Location: Germany

Re: Map loading

Post by Mille »

HI

Thanks Zookeeper. This works. But can you explain it?
I´m just curious. In "Heirs to the the throne" there is no @ character ?
zookeeper wrote:
Mille wrote:map_data="{campaigns/Deep_down_in_the_sludgy_swamp/maps/01_swamp}"

wesnoth couldn´t load the map anymore.
Can anyone tell me what the problem is.
First of all, try writing it as:

Code: Select all

map_data="{@campaigns/Deep_down_in_the_sludgy_swamp/maps/01_swamp}"
And if it still doesn't work, verify that the directory structure is right and that the map file actually exists.
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Map loading

Post by zookeeper »

Mille wrote:I´m just curious. In "Heirs to the the throne" there is no @ character ?
I think the @ just points to the userdata/data/ directory. Mainline campaigns don't need to use it, since they don't reside in userdata.
Mille
Art Contributor
Posts: 350
Joined: May 6th, 2006, 11:48 am
Location: Germany

Re: Map loading

Post by Mille »

zookeeper wrote:
Mille wrote:I´m just curious. In "Heirs to the the throne" there is no @ character ?
I think the @ just points to the userdata/data/ directory. Mainline campaigns don't need to use it, since they don't reside in userdata.
ok thanks
scott
Posts: 5248
Joined: May 12th, 2004, 12:35 am
Location: San Pedro, CA

Post by scott »

The ~ points to the userdata directory. The @ points to both - it looks first in the game directory then the user directory. Before the @ symbol, we used to have to use this construction:

map_data="{CAMPAIGNS/MYCAMPAIGN/MAPS/mapname}{~CAMPAIGNS/MYCAMPAIGN/MAPS/mapname}"

Also, back then people were sometimes installing campaigns into the game data directory, thus the need for the two entries.
Hope springs eternal.
Wesnoth acronym guide.
Post Reply