Wesnoth Can't Find My Map

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
Schubdog
Posts: 9
Joined: April 6th, 2016, 3:17 am
Location: Away Slaughtering Orcs

Wesnoth Can't Find My Map

Post by Schubdog »

I'm pretty sure wesnoth can't find my map. Either way, whatever it is, it isn't working. When I try to load it, a thing pops up saying:

Macro/File '~add-ons/Survival_2/maps/Survival_2.map' is missing
at ~add-ons\\Survival_2\\scenarios\\Survival_2.cfg:7
included from ~add-ons\\Survival_2\\_main.cfg:6

This is my scenario:

#textdomain wesnoth-Survival_2
[multiplayer]

id=01_test-Survival_2_

name=_"Survival 2"
map_data="{~add-ons/Survival_2/maps/Survival_2.map}"
turns=32

{DAWN}
{MORNING}
{AFTERNOON}
{DUSK}
{FIRST_WATCH}
{SECOND_WATCH}

music=battle.ogg

victory_when_enemies_defeated=no

[event]
name=prestart
[objectives]
side=2,3
[objective]
description= _ "Survive Until Turns Run Out"
condition=win
[/objective]
[objective]
description= _ "Death Of Your Leader"
condition=lose
[/objective]
[/objectives]
[/event]

[side]
side=1
controller=ai
team_name=2
user_team_name= _ "Invaders"
allow_player=no
{GOLD 0 0 0}
{INCOME 0 0 0}
aggression=1.00
caution=0.00
village_value=-100
leader_value=100
support_villages=no
[/side]

[side]
side=2
controller=human
team_name=1
user_team_name= _ "Survivors"
{GOLD 75 75 75}
{INCOME 1 1 1}
[/side]

[side]
side=3
controller=human
team_name=1
user_team_name= _ "Survivors"
{GOLD 75 75 75}
{INCOME 1 1 1}
[/side]

[event]
name=time over
[endlevel]
result=victory
[/endlevel]
[/event]
[/multiplayer]


And this is my _main file:

[textdomain]
name="wesnoth-Survival_2"
path="data/add-ons/Survival_2/translations"
[/textdomain]
#textdomain wesnoth-Survival_2
#ifdef MULTIPLAYER
{~add-ons/Survival_2/scenarios}
#endif


I can't figure out what in the world is wrong and would really appreciate some help.
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Wesnoth Can't Find My Map

Post by zookeeper »

Well presumably the error means exactly what it says. That is, the file maps/Survival_2.map simply isn't there. If you think it is, then probably it actually has a different extension (such as .map.txt or something instead of just .map).

Also, moved to WML Workshop.
Shiki
Developer
Posts: 348
Joined: July 13th, 2015, 9:53 pm
Location: Germany

Re: Wesnoth Can't Find My Map

Post by Shiki »

It also may be due to different upper/lower case writing
Try out the dark board theme.
User avatar
Schubdog
Posts: 9
Joined: April 6th, 2016, 3:17 am
Location: Away Slaughtering Orcs

Re: Wesnoth Can't Find My Map

Post by Schubdog »

I double and triple checked those options of why it isn't working, but they seemed fine. Are there any other possiblities for why it is not working?
User avatar
Vulpine
Posts: 152
Joined: February 17th, 2017, 4:13 pm
Location: Capacitated

Re: Wesnoth Can't Find My Map

Post by Vulpine »

Have you tried reading this? :eng: https://wiki.wesnoth.org/WML_for_Comple ... _Chapter_3
Not sure if the omitted [binary_path] tag affects anything... probably not, but I don't know much about coding.

(And boy do I hate coding!)
One foot in my mouth, and one in the grave; that's the way I like it, and that's the way it'll stay.
[shameless_advertising]
Also the author of Elvish Incursion, a short little prologue.
[/shameless_advertising]
Smok
Posts: 53
Joined: June 14th, 2016, 11:52 am

Re: Wesnoth Can't Find My Map

Post by Smok »

You can upload your addon here. Somenoe will figure out. But make sure you have folder called "maps" in your addon and map is in it. Rename your map, maybe you made typo you dont see. Try to open your map with editor, to make sure it isnt broken.
User avatar
James_The_Invisible
Posts: 534
Joined: October 28th, 2012, 1:58 pm
Location: Somewhere in the Northlands, fighting dark forces
Contact:

Re: Wesnoth Can't Find My Map

Post by James_The_Invisible »

[binary_path] is needed only if you use any images, music or sounds which are not in core.
User avatar
Schubdog
Posts: 9
Joined: April 6th, 2016, 3:17 am
Location: Away Slaughtering Orcs

Re: Wesnoth Can't Find My Map

Post by Schubdog »

I still can't figure out what the problem is. I'm attaching my add-on so that it might be easier for you guys to find my error. Thanks for all your help.

All of the attachments are in a folder named "Survival 2" which is in a folder labeled "add-ons".
Attachments
_main.cfg
this is my "_main" file
(192 Bytes) Downloaded 181 times
Survival_2.cfg
This is in a folder named "scenarios"
(1.07 KiB) Downloaded 169 times
Suvival_2.map
the folder this is in is named "maps"
(6.7 KiB) Downloaded 173 times
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Wesnoth Can't Find My Map

Post by zookeeper »

There is nothing wrong with the content of those files.
Schubdog wrote:I still can't figure out what the problem is. I'm attaching my add-on so that it might be easier for you guys to find my error. Thanks for all your help.
As a general rule, don't post individual files, as no one knows whether you're describing your directory structure right or not. Wrap the whole thing in an archive (zip, 7z, whatever) and post that, to make sure nothing possibly relevant gets omitted.
Schubdog wrote:All of the attachments are in a folder named "Survival 2"
Well obviously it should be called "Survival_2" instead... which it is in your error message.

EDIT: You typoed your map filename. So the problem is exactly what the error message said.
Smok
Posts: 53
Joined: June 14th, 2016, 11:52 am

Re: Wesnoth Can't Find My Map

Post by Smok »

As I said, you have typo in map name. By the way, next time pack your addon to zip with all folders. The way you did,i cant check if you have correct folder structue and corectly named folders.
User avatar
Schubdog
Posts: 9
Joined: April 6th, 2016, 3:17 am
Location: Away Slaughtering Orcs

Re: Wesnoth Can't Find My Map

Post by Schubdog »

It works! I swear I had checked all the names a thousand times. Either way thanks for the help you guys!
Post Reply