Musics! - Page 3

Musics!

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

User avatar
BlueTemplar
Posts: 314
Joined: 28 Oct 2007, 22:37

Re: Musics!

Post by BlueTemplar »

Since some very cool people decided to look into it:
Mac Binary Release
(and Spring on Mac?)
User avatar
LOrDo
Posts: 1154
Joined: 27 Feb 2006, 00:21

Re: Musics!

Post by LOrDo »

Some pointers:

-Idle building music is to loud and drowns out the sfx, but I find the volume is perfect for the battle music. I wonder if theres a way to make them seperate.

-Its good at detecting when battles are starting, but not so hot at telling when they end. Should be more sensitive to that, perhaps you could take the distance of enemy units into account?

-It should start the music before the com is actually placed IMO, if this is possible.

and last but not least...

-Randomize the music selection! This is a big one, and even AF's Music AI had it. Right now it just plays every one in order.

Once again, great job so far.
User avatar
Noruas
XTA Developer
Posts: 1269
Joined: 24 Feb 2005, 02:58

Re: Musics!

Post by Noruas »

-Idle building music is to loud and drowns out the sfx, but I find the volume is perfect for the battle music. I wonder if theres a way to make them seperate.

I can fix this by lowering the actual sound of the song itself...
User avatar
LOrDo
Posts: 1154
Joined: 27 Feb 2006, 00:21

Re: Musics!

Post by LOrDo »

bump, has smartie abandoned this or what?
User avatar
url_00
Posts: 163
Joined: 15 Apr 2007, 22:44

Re: Musics!

Post by url_00 »

if he has, I could work on it.
User avatar
LOrDo
Posts: 1154
Joined: 27 Feb 2006, 00:21

Re: Musics!

Post by LOrDo »

I would love it. Its a functional widget already, but it could be so much more. See my list of pointers up a couple of posts if you already havent.
User avatar
url_00
Posts: 163
Joined: 15 Apr 2007, 22:44

Re: Musics!

Post by url_00 »

Ok, I'll start working on it right now.
User avatar
LOrDo
Posts: 1154
Joined: 27 Feb 2006, 00:21

Re: Musics!

Post by LOrDo »

Go you :-)
Im sure spring will end up using this if it becomes a good widget. I even got a soundtrack setup we can use.
User avatar
LordMatt
Posts: 3393
Joined: 15 May 2005, 04:26

Re: Musics!

Post by LordMatt »

The OTA soundtrack is pretty good. ;)
User avatar
ILMTitan
Spring Developer
Posts: 410
Joined: 13 Nov 2004, 08:35

Re: Musics!

Post by ILMTitan »

Two more things that would be cool:

1. Use subfolders for the different music types, and search for the music files (aka, don't hard-code the names) so that people can put whatever music they want in there.

2. Search the mod archive for a music folder and subfolder before defaulting to the spring music folder (although I don't know if this is possible with the current interface).
User avatar
smartie
NOTA Developer
Posts: 146
Joined: 23 Jun 2005, 19:29

Re: Musics!

Post by smartie »

sry, I normally don't get online much during the week so I kindof forgot about this.

I dunno about searching the music folder. I wasn't aware that was possible with lua. I still a total noob with scripting thou. if you know how to do this that would be nice.

The music actually is random except for the starting track, and the starting war track. It's kindof weird how it works. It's not actually picking a random number, but it's switching through the tracks at a rate of one per second. if the track that was playing has ended then it starts whichever track it is on.

There's a good reason it doesn't play before the game starts. If you pause the game while the music is playing it will skip repeatedly like a broken record. It is really annoying to listen to while you wait for people to pick their start spots. Maybe something to get fixed for the next release. Not too big of a deal though.

The trigger for starting and stopping battle music is easy to mess with. I don't have the script in front of me, but there's a couple of things you can change. The script adds up all the guys killed at each second interval for the past 45 seconds (the dethklok array) into a varible called totalKilled. You can change it so that it's less than 45 seconds. That number is hardcoded in a couple places, so search for 45 and change it to something like 30. Also change...

if totalKilled <= 1 then
-- something about switching to peace tracks

to a higher number, say 3. Then, once the battle music starts the script will require more than 3 guys to die every 30 seconds to maintain battle music instead of 1 guy every 45 seconds.

its actually a little more complicated than that, cause not all units are weighed the same. Your units are weighed 1.5x units that are on your team, and more expensive units are worth more.

the reason i had it so low (1 unit every 45 seconds) was to lower the amount of hard cutoffs the music would do where it switches the music that's playing. that was one of the things that annoyed me about AF's music AI, it would always switch the music from peace to war back to peace back to war when stuff was going on. I dunno if I ever heard it ever play one of the war tracks all the way through.

If you want to get rid of the cutoffs alltogether comment out the stopsoundstream. That'll make it so it always plays the tracks all the way through. when it finishes a track it'll check if it's in peace mode or war mode. If it's peace it'll start a peace track, if it's war it'll start a war track.
User avatar
LOrDo
Posts: 1154
Joined: 27 Feb 2006, 00:21

Re: Musics!

Post by LOrDo »

LordMatt wrote:The OTA soundtrack is pretty good. ;)
It is indeed, though the problem is its cavedog IP. And we want as little as that included with spring as possible.

Also smartie thanks for your comments. They are helpful to anyone who wants to develop upon this.
Post Reply

Return to “Lua Scripts”