binary_path not working

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
WYRMY
Posts: 102
Joined: August 11th, 2008, 6:36 am
Location: Australia

binary_path not working

Post by WYRMY »

Hi, when I make my _main.cfg, I have to put the binary_path that's outside the #ifdef pointing to the folder, not to the external_binary_data folder, or it can't find the images.

Code: Select all

#textdomain wesnoth-sotgs
[textdomain]
    name="wesnoth-sotgs"
[/textdomain]

##### if I have this, the image won't show up

[binary_path]
    path="data/campaigns/Swords_of_the_Golden_Sands/external_binary_data"
[/binary_path]

##### if I have this, the image will show up
##### of course I would have to change the path inside [campaign][/campaign]

[binary_path]
    path="data/campaigns/Swords_of_the_Golden_Sands"
[/binary_path]

[campaign]
    id=Swords_of_the_Golden_Sands
    rank=300
    icon=raider.png~RC(magenta>black)
    name= _ "<255,204,0>Swords of the Golden Sands"
    abbrev= _ "SotGS"
    define=CAMPAIGN_SOTGS
    first_scenario=01_Dawn_Raid
    difficulties=EASY,NORMAL,HARD
    difficulty_descriptions={MENU_IMG_TXT2 "fighter.png~RC(magenta>black)" _"Fighter" _"(Easy)"} +
    ";*" + {MENU_IMG_TXT2 "raider.png~RC(magenta>black)" _"Raider" _"(Normal)"} + ";" +
    {MENU_IMG_TXT2 "elite.png~RC(magenta>black)" _"Elite" _"(Hard)"}
    description= _ "A desert chieftan must fight to save his tribe from mysterious happenings. Will he succeed, or will the shadow of chaos descend upon the men of the desert and rent them asunder?
Set after the fall of wesnoth.

Version 0.1.0

Report bugs to WYRMY."
    #    image=portraits/.png
[/campaign]

#ifdef CAMPAIGN_SOTGS
[binary_path]
    path=data/campaigns/Swords_of_the_Golden_Sands
[/binary_path]
[+units]
    {@campaigns/Swords_of_the_Golden_Sands/units}
[/units]

[+images]
    {@campaigns/Swords_of_the_Golden_Sands/images}
[/images]

{@campaigns/Swords_of_the_Golden_Sands/macros}
{@campaigns/Swords_of_the_Golden_Sands/scenarios}
{@campaigns/Swords_of_the_Golden_Sands/about.cfg}
#endif
Help would be appreciated.
WYRMY.
AI
Developer
Posts: 2396
Joined: January 31st, 2008, 8:38 pm

Re: binary_path not working

Post by AI »

I'm not sure what your problem is, but I do know that the following code does nothing at all:

Code: Select all

[+images]
    {@campaigns/Swords_of_the_Golden_Sands/images}
[/images]
There is no [image] tag, nor does including a folder containing no *.cfg files do anything.
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: binary_path not working

Post by zookeeper »

Maybe you should actually tell where you have those images of yours, like raider.png.
User avatar
WYRMY
Posts: 102
Joined: August 11th, 2008, 6:36 am
Location: Australia

Re: binary_path not working

Post by WYRMY »

AI wrote:I'm not sure what your problem is, but I do know that the following code does nothing at all:

Code: Select all

[+images]
    {@campaigns/Swords_of_the_Golden_Sands/images}
[/images]
There is no [image] tag, nor does including a folder containing no *.cfg files do anything.
I had a suspicion about this, after after finishing my campaign it had the [image] path wrong. I'll delete it.
zookeeper wrote:Maybe you should actually tell where you have those images of yours, like raider.png.
In the toplevel directory, I have a folder called external_binary_data.

Inside I have raider.png etc.
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: binary_path not working

Post by zookeeper »

WYRMY wrote:
zookeeper wrote:Maybe you should actually tell where you have those images of yours, like raider.png.
In the toplevel directory, I have a folder called external_binary_data.

Inside I have raider.png etc.
Images are looked in the images/ subdirs of all binary paths. Move them to external_binary_data/images/ and they'll work.
User avatar
WYRMY
Posts: 102
Joined: August 11th, 2008, 6:36 am
Location: Australia

Re: binary_path not working

Post by WYRMY »

Cool! It works now!
Post Reply