In game music options or suggestions

Brainstorm ideas of possible additions to the game. Read this before posting!

Moderators: Forum Moderators, Developers

Forum rules
Before posting a new idea, you must read the following:
Post Reply
Claes
Posts: 7
Joined: April 27th, 2012, 10:57 am

In game music options or suggestions

Post by Claes » May 20th, 2012, 5:48 am

Is there an option somewhere to select your favorite Wesnoth tracks to play during a certain battle or are they hardwired into the scenario? If they are not, and you do not currently have this option, it might be interesting to have (though I am not sure of the specifics - it might be difficult to implement).

Claes

User avatar
Crendgrim
Moderator Emeritus
Posts: 1328
Joined: October 15th, 2010, 10:39 am
Location: Germany

Re: In game music options or suggestions

Post by Crendgrim » May 20th, 2012, 6:16 am

Moved to Ideas, where it belongs.

No, the music is — as you assumed — hardwired into the scenarios. Changing this would make introducing custom music for UMC authors a bit more complicated, I guess.
You can change the default music playlist (which many scenarios use), though:
Edit the file [wiki=EditingWesnoth#Where_is_my_game_data_directory.3F]<game data directory>[/wiki]/data/core/macros/sound-utils.cfg and add some [music] tags as this:

Code: Select all

    [...]
    [music]
        name=battle-epic.ogg
        ms_before=12000
        append=yes
    [/music]
    [music]
        name=my-new-music.ogg
        ms_before=12000
        append=yes
    [/music]
    [event]
        name=prestart
        [music]
            name=knolls.ogg
            ms_before=12000
        [/music]
        [...]
        [music]
            name=my-new-music.ogg
            ms_before=12000
            append=yes
        [/music]
    [/event]
And then you place my-new-music.ogg in e.g. /data/core/music.
I hope at least that this does not cause any OOS errors when playing online.

If you do not want to meddle with this, though, I fear you're out of luck. ;)
UMC Story Images — Story images for your campaign!

User avatar
MetalKing
Posts: 197
Joined: July 8th, 2011, 11:34 am

Re: In game music options or suggestions

Post by MetalKing » May 20th, 2012, 3:26 pm

I think it would be useful to be able to create named PlayLists without oimplicite Assignment for any UseCase and assign/Combine these Lists for special UseCases.

// I don't like WML-Code and give here just a Try of WML-PseudoCode probably with alot syntactical Errors.
// The Semantic is fictional to express what I mean.

Code: Select all

[title]
ID = EpicBattle
Name = "Epic Battle"
Tags="dramatic,thrive,..."
File = battle-epic.ogg
[/title]
[title]
ID = Knolls
Name = "Knolls"
Tags="thrive,lurking"
File = knolls.ogg
[/title]


[PlayerList]
ID = Set_A
Name = "Playlist A"
pregap=12000  //defaults?
intergap=12000  //defaults?
postgap=12000  //defaults?
Items = EpicBattlem,Knolls,...
[/PlayList]
...
[PlayList]
ID = Set_C
Name = "Playlist C"
Items= {Set_A, Set_B}
[/PlayList]
...
[PlayList]
ID = Set_D
Name = "Playlist D"
Items= SEARCH_TITLES (for="dramatic", without="lurking");
[/PlayList]

// Syntax for more flexible Filtering of Titles for Attributes:

// one way
playlist = getAllMusicTitles();
playlist = extract (playlist,"dramatic")
playlist = remove (playlist,"lurking")

// or equivalent
playlist = getAllMusicTitles();
playlist2 = extract (playlist,"lurking")
playlist = remove (playlist,playlist2)

[event]
name=prestart
playlist=Set_C
[/event]

The Possibility to applay Mood-Tags to Music enables the Game to change the Music interactive to present Happening. It's rather funny for the superior Player when the Map is almost finished and the Player's Game-State is totally uncritical but the Music plays totally dramatical Sounds. If Music can get handled to express Moods it's easier to integrate/automatize the Handling of Music.

I did hear anytime Wesnoth is not a Media-Player ... Well, MusicFiles are known to be MediaFiles and Wesnoth play them. There is a Song that sometimes boring due to I did heat it to often. I can use the Editor to edit any Files with some Knowledge about WML but I have at first to figure out which Title it is and where the Location is of the relevant Code that includes that MediaFile for the relevant/present Game-State. The Statement that B4W is not a MediaPlayer is Nonesense and explaining the User have to take the Editor if he want to change Music is some Kind of Humor if a User claims he want InGame-Possibilities to manipulate PlayLists, add or remove Titles. It's absolutely not unusual to omit/resign support to deal with the GameMusic as I still don't know any Game that offer such a Thing. But however if other Games doesn't offer a specific Feature isn't a Reason to resign the Feature but at best a Hint that this Feature is perhaps not important.

To show you the real Application of Games resp. Wesnoth: A Player plays the Game with Music till the Point the Music is boring or some disable Music even at Begin due to they know the Music will at all Cases get boring. No, they don't search Forums, don't take the Editor and don't copy any Files from any Source to any special Location due to they are unsatisfied with any special Feature or Property with the Game. Of Course, such People exist as well but you shouldn't confuse them with the normal Player. It's like you did invent an OpenSource-Car. There are more or less talented Screwer which all together can do almost all what can be done but most People want just to drive their Car and if its broken they want to get it repaired or drive into any special Do-it-Yourself-Workshop to figure out how a new AutoRadio can get installed. E.g. my Father did probably never touched any Screw of his Cars but two Times those for the Wheels. That's the ordinary Driver - not Screwer. The Share of Screwers in this Forum is of course larger than those from all who plays Wesnoth.

I did scew alot and was several Times bored by any Title I still didn't identify due to I don't want to invest an half Hour or more to listen through all Tracks to find out which Title contains the Sequence that bores me again and again.

If at least each Time the Title changes its Title get displayed e.g. with green Letters at the Top I would know what Title it is and change the File's Name to keep it for the Case of I did select the wrong File. The Song isn't really bad, is in Fact even a good Song but I did hear the Music for Hours and Hours and Hours. It's not trivial to change the Music even it's not the hardest Task to accomplish but I don't invest Hours just to figure out how to add or drop a single Title I like or dislike.

I can understand if other Things got a higher Priority due to they offer a higher ROI to the Developer and/or Player but the Answer "B4W is not a Media-Player. Take the File-Browser, and put there, take the Editor and wrote here and Documentation is here" sounds to me (even it's really not the same) like "k-m-b" to a kindly expressed Need for a Feature, that is very relevant to the effective LongTerm-Satisfaction of the Game. The effective real Support for Music-Media-Handling of B4W is a Switch to disable/enable Music and probably gets finally always switched off. Sure he can (perhaps) handle that Matter this Way but perhaps he can also implement the MediaPlayer-Features if he is a Programmer. Of course he can also program a totally new Game from Scratch. There were several Times Request for advanced Media-Management-Features for Handling of Music-Titles in the Game and IIRC I didn't read any Response declaring Understanding for that Need of probably most Players.

Fazit: Even the Music-Titles of B4W are really best Quality the Capabilities to manage these Medias are primitive and inflexible at least for the ordinary Player. I can't create a Campaign and a Player decides to integrate another Title into his Wesnoth-Music-Pool to play my Campaign with the Music of his Favor. For probably almost all other Games that's true as well but the Point is not if B4W miss something that all other Games have but there is something Players want to have.

There exist already MediaPlayers which could play these Titles in arbitrary PLAYLISTS. If B4W want that the Player uses these instead B4W could support any/several Formats of PlayLists for this Players. I use a Player that sux me by its stupid Behavior and I don't want to mix up his PlayLists with B4W-Titles etc. IIRC that Player doesn't use any special Extension for its PlayLists and doesn't have any Idea where it want to have its PlayLists so I HAVE TO select the Destination of its PlayLists as well as the FileName inclusive any File-Extension. Either I store these PlayLists directly into my HomeFolder or I hide them anyway into its large FileHierachy. I don't know what other MediaPlayer get used other People but that simple Solution sux to me. As I did show with the Mood-Tags the Game resp. Campaigns could make much better Use of the Music the Game provides.

There is another Point. AFAICS does UMC-Campaigns often integrate (large) Music-Files for their own Needs and thus enlarge unneccessary the Size of these Files. I suggest any Peckage-Depency-Mechanism for Campaigns that UMC-Music can get integrated by triggering one or multiple Music-Packages. I would prefer to store Tracks that don't get used instead one Track that get multiple Times stored and used by different Campaigns. I know at least from one UMC-Designer that he considered to add a Title due to it match his special Requirements but still didn't decide to add due to he considered the additional Size of his Campaings Package would get very significantly larger and he is surely right that there are alot People with a much smaller BandWidth than we in Industrial Countries are used to have and play Wesnoth resp. its Campaign. I don't have Problems with BandWidht but I don't like that if I download 20 Campaigns that more than 50% of those contains identical Media-Files due to there is no efficient Mechanism to handle these Depencies resp. Need for Libraries. I think it's annoying but for those with limited Bandwidth it can be a real Obstacle.

Anyway did MediaPlayer XMMS degenerate in last Decade from Mammal back to a Protozoon. Else I would suggest to use that Players and his Filters for audial Effect (Echo,etc.) to support Audio-Effect from Game e.g. for Caves etc. and if would it get used for it could also deal as well with the Music. However, I dunno what I shall call XMMS today and can't point to any sophisticated Audio-Suite but instead to suggest develop a new MediaPlayer I suggest to searach for an existing suited OpenSource-MediaPlayer and INTEGRATE that Player.

- MK
"Sir! We are surrounded by our enemies!" - "Excellent ! We can attack in every direction!"
"Make everything as simple as possible, but not simpler." -- Albert Einstein
No Source - No Binary - No Trust!
Map Wesnoth Springs - The great War [200x120],Player=9

Claes
Posts: 7
Joined: April 27th, 2012, 10:57 am

Re: In game music options or suggestions

Post by Claes » May 22nd, 2012, 10:30 am

Thank you MetalKing. That was an amazing post. I have not dabbled inside the innards of the game yet, though I have been playing through with great enjoyment. Is there an introduction to the code I could read? It would help me understand how to utilize the ideas in the last post so much more. Thanks for the great reply though.

User avatar
The_Other
Posts: 189
Joined: February 3rd, 2012, 10:05 pm
Location: UK

Re: In game music options or suggestions

Post by The_Other » May 22nd, 2012, 11:35 am

http://wiki.wesnoth.org/WML_for_Complete_Beginners and http://wiki.wesnoth.org/ReferenceWML

Note however that the first is still an incomplete work-in-progress, while the second assumes at least some prior knowledge. I have zero programming ability, though, and I can still (usually) make sense of it if I stare at it long enough!
Nothing is true; everything is permissible.

User avatar
Pentarctagon
Forum Administrator
Posts: 4003
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: In game music options or suggestions

Post by Pentarctagon » May 22nd, 2012, 8:47 pm

I am not sure if this is exactly what you are looking for, but I have an add-on on the add-on server that allows you to create/play your own playlists. It has its own scenario, but to use it in another scenario just download the add-on (called "Music") and add this line to the scenario file(s):

Code: Select all

{~add-ons/Music/macros/sp_combine.cfg}
Just don't put it inside any tags other then the [multiplayer]/[scenario] tag.
This will work for single player scenarios/campaigns/local multiplayer (playing on the same machine), but probably will not work on multiplayer does not work with online multiplayer.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code

User avatar
MetalKing
Posts: 197
Joined: July 8th, 2011, 11:34 am

Re: In game music options or suggestions

Post by MetalKing » May 23rd, 2012, 4:22 pm

This is exactly what I mean: you say there is a fancy Script you made (I didn't know) before and I have to find to find out where to store Music-Files and at best I have to take the Editor add Data (even it's a single Line) anywhere at any File etc etc etc. Exatly this is what most Players never do and I won't do as well due to all these Thing I have to do again when I download the next Release of Wesnoth. So what I want is a nice GUI which helps me to import Music and an Editor which enables me to edit Mood-Tags for new Tracks and finally a simple Way to import/export such Things in a simple Way like I can do with MediaFiles inclusive a PlayList for.

No, I don't invest to search for your fine AddOn which you did surely designed with best Intension, don't figure out a suited Postion inside that File to add there another etc etc AND THAT is exactly that what MOST Players did, do and will do. It's alright resp. may be reasonable to define Priorities for future Development that like that an Enhancement of the Game concerning its Capabilities for Management of SoundTracks is anytime in undefined Future but it's total Nonesense to argue that Wesnoth is not a Media-Player and therefore doesn't enhanced Media-Management-Capabilities resp. refering other Games which doesn't have as well. The pure Existence of frequently occouring Requests for Features concerning Media-Management prove that there is a Need for and the explained Way to DIY is something like you enter a DIY-SuperMarket and ask for a CupBoard and you get a Saw instead. That's the Point.

regards, MK
"Sir! We are surrounded by our enemies!" - "Excellent ! We can attack in every direction!"
"Make everything as simple as possible, but not simpler." -- Albert Einstein
No Source - No Binary - No Trust!
Map Wesnoth Springs - The great War [200x120],Player=9

User avatar
Pentarctagon
Forum Administrator
Posts: 4003
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: In game music options or suggestions

Post by Pentarctagon » May 25th, 2012, 9:13 pm

*shrugs*
Well given the (lack of) interest shown by other users and the developer's stance that wesnoth is not a media player (which is true), you'll be waiting a long time for this feature to be implemented. In the mean time, if you are unwilling to copy/paste a single line of code a few times and download a ~20kb add-on, there isn't much I can do to help.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code

User avatar
Crow_T
Posts: 850
Joined: February 24th, 2011, 4:20 am

Re: In game music options or suggestions

Post by Crow_T » May 25th, 2012, 10:07 pm

I like the idea of this, would it be hard to make a script that could perform the task of adding the code to scenarios automatically?

User avatar
Pentarctagon
Forum Administrator
Posts: 4003
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: In game music options or suggestions

Post by Pentarctagon » May 26th, 2012, 8:58 am

I could write a C++ program to do it pretty easily (if that's what you mean), but I have no clue about how it would work on OS's other than my Windows 7.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code

Post Reply