In-game music help?
Moderator: Moderators
In-game music help?
I've just installed the in-game music script found on this site and I was rather disappointed to find out that it only plays when your own units are killed.
I'm very inexperienced with any kind of coding - the most experience I've had was trying to figure out the syntax for Dawn of War's Mission Editor's map scripting. Ultimately, it was a frustrating attempt at learning something when no helpful information was given.
If someone has a modified version of the script that functions when enemy units are killed, I'd love to see it.
If not, I'd be all ears for any kind of basic modding for the script.
I'm very inexperienced with any kind of coding - the most experience I've had was trying to figure out the syntax for Dawn of War's Mission Editor's map scripting. Ultimately, it was a frustrating attempt at learning something when no helpful information was given.
If someone has a modified version of the script that functions when enemy units are killed, I'd love to see it.
If not, I'd be all ears for any kind of basic modding for the script.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: In-game music help?
in before links to lua faq
Re: In-game music help?
Tried looking through that, didn't really help me find the argument or command I was looking for.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: In-game music help?
If you are talking about the TA ingame music widget, it plays regular non-war tracks when nothing is going on. It starts playing war tracks based upon units worth. Unfortunately the values are set quite high, much higher than they should be in my opinion, so the war tracks take forever to switch to. However, the widget doesn't care which units are killed. It assigns a value no matter who the units belong to unless I missed something, but as i read it, that's the way it works.
Re: In-game music help?
Now, I'm fairly certain that's wrong. I snooped around the file myself and changed a few numbers; the required value of units killed was 12, I lowered it to 3. There was a multiplier that upped the value of your own units, I changed that to just 1 so it wouldn't be a concern anymore (So I think.). There were a bunch of metal cost values (>500 is worth 2 value units, etc.) that I lowered to get battle music to play, but this never happened when things started dying - unless they were my things dying.
I got the same result after the modification. Battle music refused to play when enemy units were killed, despite the significantly lowered values. I'll check with unit worth requirements set to just 1 to confirm this theory.
Edit: It is indeed what I suspected. I went through numerous Jeffies, a torpedo launcher, and a D-Gun multi-kill of a vehicle plant, Samson, Jeffy, Construction Vehicle, and Podger. Battle music only played when a Jeffy killed one of my metal extractors.
I got the same result after the modification. Battle music refused to play when enemy units were killed, despite the significantly lowered values. I'll check with unit worth requirements set to just 1 to confirm this theory.
Edit: It is indeed what I suspected. I went through numerous Jeffies, a torpedo launcher, and a D-Gun multi-kill of a vehicle plant, Samson, Jeffy, Construction Vehicle, and Podger. Battle music only played when a Jeffy killed one of my metal extractors.
Last edited by Carnston on 29 Jul 2008, 17:51, edited 1 time in total.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: In-game music help?
Not saying you are wrong, but that's quite different from my own experience. I'll dl the file and maek looky again.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: In-game music help?
Yep you're right
That is grabbing your team ID and then further down it initiates keeping track of your own units. I imagine that this could be changed to track all units if it was made into a gadget.
Code: Select all
function widget:UnitDestroyed(unitID, unitDefID, teamID)
local PlayerTeam = Spring.GetMyTeamID()
Re: In-game music help?
Well, is there any way some generous coder could turn this into a gadget? Or at least give me a shove in the right direction as to how to do it myself?
I'd be very grateful, Jeremy Soule kicked ass with TA's music.
Sorry for the late post, attention wandered off for a good deal of time.
I'd be very grateful, Jeremy Soule kicked ass with TA's music.
Sorry for the late post, attention wandered off for a good deal of time.
Re: In-game music help?
The problem with turning it into a gadget would be you couldn't use it except in a mod that actually had that gadget.
Re: In-game music help?
would it matter if it just plays everything, ignoring the war/peace stuff? i'm currently trying to make a music widget that can play every wav/ogg from folder x, in a random order if you want to
-
- Imperial Winter Developer
- Posts: 3742
- Joined: 24 Aug 2004, 08:59
Re: In-game music help?
Well, yeah, Hoi - that's really the whole point. Otherwise there's nothing just stopping people from running winamp or whatever in the background.
Re: In-game music help?
which is annoying becaus i always forget it, also if you make the music ingame you could also have pause, next track, and more options without having to alt-tab
-
- Imperial Winter Developer
- Posts: 3742
- Joined: 24 Aug 2004, 08:59
Re: In-game music help?
True, but I really think the selling point here is the need to have dynamic usage. Most decent players will let you hook a hotkey to next track or whatever, if you don't already have the buttons on your keyboard.
Without meaning to sound dismissive, I really think a music player needs to be able to be able to perform dynamically with regards to the gameplay, otherwise it's not much use. However, don't let that stop you from doing what you're doing, because that's a great first stepping stone.
Without meaning to sound dismissive, I really think a music player needs to be able to be able to perform dynamically with regards to the gameplay, otherwise it's not much use. However, don't let that stop you from doing what you're doing, because that's a great first stepping stone.
Re: In-game music help?
but the dynamic stuff will limit the music to the TA soundtrack, i dont want to play that but my own music 

-
- Imperial Winter Developer
- Posts: 3742
- Joined: 24 Aug 2004, 08:59
Re: In-game music help?
o_O
I don't see how that will limit you to the TA music.
You simply have a bunch of folders that it reads from. One folder is called "Tension" one called "Battle", etc. You drag and drop your music into each of those folders so that you determine what setting your music suits, and then in-game, the game selects the appropriate set of tracks for what is happening.
I don't see how that will limit you to the TA music.
You simply have a bunch of folders that it reads from. One folder is called "Tension" one called "Battle", etc. You drag and drop your music into each of those folders so that you determine what setting your music suits, and then in-game, the game selects the appropriate set of tracks for what is happening.
Re: In-game music help?
but the ta music is made for that, "real" music would be alot harder to sort out like that, and not only that, it would also be alot harder for me to make 

-
- Imperial Winter Developer
- Posts: 3742
- Joined: 24 Aug 2004, 08:59