Problems with adding customized sounds - Please help

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
Aekar
Posts: 7
Joined: March 28th, 2009, 11:48 am

Problems with adding customized sounds - Please help

Post by Aekar »

I have been creating a new faction and have a problem with the customized sounds I am trying to put.
I have the same problem with all counds (die, hit, attack, miss...) : the sounds doesn't play.
I can call any core sounds (bite-miss.ogg ) but no customized one.
My units work well (animations, descriptions, upgrades...) but not the sounds.

My sounds are located in the "/sounds" directory of my campaign.

Here is a sample code snippet (one inside an attack_anim):

Code: Select all

[if]
            hits=yes
            [frame]
                begin=-100
                end=100
                image=units/stygian_unit_stygianbeast.png
                sound=stygianbeast_attack_bite.wav
            [/frame]
        [/if]
Very common thing as you can see.
Of course the problem seems to come from the paths in "_main.cfg".
So I have tried different things to make it working, with no success after hours of forum reading and .cfg file editing. What a mess.

Here is the "_main.cfg" code:

Code: Select all

[campaign]
    name=_"unlimited_conquest"
    description=_"Campagne d'essai"
    difficulties="EASY,NORMAL,HARD"
    difficulty_descriptions="&icons/icon-serverother.png=" + _"Valet" + "="  + ";*&icons/icon-general.png=" + _"Chevalier" + "="  + ";&icons/icon-display.png=" + _"Champion" + "="  + ""
    define="CAMPAIGN_UNLIMITED_CONQUEST"
    first_scenario="1_Premier_depart"
    icon="icons/icon-addon-publish.png~TC(1,red)"
    icon_easy="icons/icon-serverother.png"
    icon_medium="icons/icon-general.png"
    icon_hard="icons/icon-display.png"

    [about]
        title = _ "Author"
        [entry]
            name = "Christophe Finas (fra)"
        [/entry]
    [/about]
[/campaign]

[binary_path]
    path=data/campaigns/Unlimited_Conquest/
[/binary_path]

#ifdef CAMPAIGN_UNLIMITED_CONQUEST
[binary_path]
    path=data/campaigns/Unlimited_Conquest/
[/binary_path]

{@campaigns/Unlimited_Conquest/scenarios}
{@campaigns/Unlimited_Conquest/sounds}

[+units]
    {@campaigns/Unlimited_Conquest/macros}
    {@campaigns/Unlimited_Conquest/units}
    #traits that are common to all races and units
    {TRAIT_UC_HEAVY}
    {TRAIT_UC_STRONG}
    {TRAIT_UC_RESILIENT}
    {TRAIT_UC_QUICK}
    {TRAIT_UC_INTELLIGENT}
    {TRAIT_UC_SKILLED}
    {TRAIT_UC_KILLER}
    {TRAIT_UC_DEXTROUS}
    {TRAIT_UC_UNWILLING}
    {TRAIT_UC_MILD}
    {TRAIT_UC_STUBBORN}
    {TRAIT_UC_FEARLESS}
[/units]

#endif

I have also tried without the "path" out of the #ifdef...
Please help me, I need to go further with Wesnoth editing and am stuck here for an unknown, certainly stupid reason ;)
User avatar
Turuk
Sithslayer
Posts: 5283
Joined: February 28th, 2007, 8:58 pm
Contact:

Re: Problems with adding customized sounds - Please help

Post by Turuk »

Moved to the proper forum and removed the color.

Please do not use color in accordance with the posting guidelines. Also note that code blocks are much more effective in enabling others to easily view your code then making it purple.
Posting Guidelines wrote:Smilies, Colors, Size and Capitalization.
If you must use smilies, use them sparingly. Excessive smilies will get deleted or your whole post deleted. Do not use colors, as they are the sole realm of those who moderate the forums and develop the game. Do not make your text large without a very good reason (making a list), and above all, do not make posts or thread titles in all caps.
Mainline Maintainer: AOI, DM, NR, TB and THoT.
UMC Maintainer: Forward They Cried, A Few Logs, A Few More Logs, Start of the War, and Battle Against Time
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Problems with adding customized sounds - Please help

Post by zookeeper »

I don't see anything wrong with that. Check your stderr/stderr.txt after you should have heard the sound in-game.

Also, {@campaigns/Unlimited_Conquest/sounds} doesn't do anything.
Aekar
Posts: 7
Joined: March 28th, 2009, 11:48 am

Re: Problems with adding customized sounds - Please help

Post by Aekar »

I forgot to update this thread's status.

Thanks a lot Turuk for moving it to a more according place. And for the information about posting guidelines.

Thanks a great lot zookeeper for your advice.

Looking into stderr.txt indeed provided critical help - Wesnoth couldn't read the .WAV files whereas "Windows Media" or "BSPlayer" could. It was an odd codec-crypted WAV file (whereas WAV files usually do not use any codec at all).

I solved my problem by playing the WAV files from any reader that could do it, and recording the sound being played from the sound card itself (with ARRecorder Wizard or anything like this). I saved it in OGG format and it worked.

And this general information about stderr.txt helped me work on a lot of other things.

Problem solved!
Post Reply