moar screenshots/info/link please.
might also be worth a seperate thread.
New Wiki UnitDef Tag Documentation
Moderator: Moderators
Re: New Wiki UnitDef Tag Documentation
I'm waiting for smoths criticisms before posting further info.
What errors are there in the sound docs? Am I okay to lift the data and have an update within the next week? Or is it one of those wishywashy areas where nobodies quite sure what tags do but what we've got is as close as we can manage?
What errors are there in the sound docs? Am I okay to lift the data and have an update within the next week? Or is it one of those wishywashy areas where nobodies quite sure what tags do but what we've got is as close as we can manage?
Re: New Wiki UnitDef Tag Documentation
just have a look, I left several (???) because I had no idea when those sounds are played.
I guess eventually somebody will be able to figure that out.
Why does that matter, do you copy over things by hand and not with some script?
If by hand, how do you want to keep up with updates...
I guess eventually somebody will be able to figure that out.
Why does that matter, do you copy over things by hand and not with some script?

If by hand, how do you want to keep up with updates...
Re: New Wiki UnitDef Tag Documentation
The sounds can be defined three ways;
1. You can treat the 'events' as tags, like knorke did, and specify a single filename
2. You can make each event a table, which is a simple array of filenames, which is chosen from randomly
3. you can make each event a table, which is a simple array of further tables, containing the 'file' (string) and 'volume' (float) tags.
Furthermore you can probably define soundtypes in gamedata/sounds.lua and refer to them in any of these rather than the filename.
Then there are questions over when (and whether) these sound events are called.
I'm not 100% sure about any of this myself, which is why I haven't updated it yet.
1. You can treat the 'events' as tags, like knorke did, and specify a single filename
2. You can make each event a table, which is a simple array of filenames, which is chosen from randomly
3. you can make each event a table, which is a simple array of further tables, containing the 'file' (string) and 'volume' (float) tags.
Furthermore you can probably define soundtypes in gamedata/sounds.lua and refer to them in any of these rather than the filename.
Then there are questions over when (and whether) these sound events are called.
I'm not 100% sure about any of this myself, which is why I haven't updated it yet.
Re: New Wiki UnitDef Tag Documentation
You mean the soundcategory that can be found in ie BA units?FLOZi wrote:Furthermore you can probably define soundtypes in gamedata/sounds.lua and refer to them in any of these rather than the filename.
BA has a sounds.tdf with entries like
[CORE_CVEHICLE]
{
select1=vcorsel;
ok1=vcormove;
cant1=cantdo4;
build=nanlath2;
repair=repair2;
working=reclaim1;
capture=capture1;
underattack=warning1;
count5=count1;
count4=count2;
count3=count3;
count2=count4;
count1=count5;
count0=count6;
canceldestruct=cancel2;
}
and in the unit .fbi files there is
soundcategory=CORE_CVEHICLE;
But I did not find soundcategory in the engine. (searching all files)
-> I think this soundcategory thing is some leftover from TA.
With Lua it would be possible to recreate it though, just make your own unitsounds.lua that returns some tables and include it in the unitDef.
unit sounds, or sounds in general (units,weapon, ui sounds) might deserve their page.
Re: New Wiki UnitDef Tag Documentation
No, FBI-style soundcategory is handled entirely though parse_fbi.lua, which just creates the sounds subtable in the unitdef.
sounds.lua is not a replacement for sound.tdf
http://answers.springlobby.info/questio ... -soundslua
Sounds.lua allows you to make a 'SoundItem' with the various sound control tags which can then be referred to elsewhere as though it were a filename, or so is my understanding.
sounds.lua is not a replacement for sound.tdf
http://answers.springlobby.info/questio ... -soundslua
Sounds.lua allows you to make a 'SoundItem' with the various sound control tags which can then be referred to elsewhere as though it were a filename, or so is my understanding.
Re: New Wiki UnitDef Tag Documentation
ah ok.FLOZi wrote:No, FBI-style soundcategory is handled entirely though parse_fbi.lua, which just creates the sounds subtable in the unitdef
Thats what I meant by "with Lua it would be possible to recreate it", did not know how such functionality was already in spring base content.
Re: New Wiki UnitDef Tag Documentation
Updated, to the best of my current knowledge:
http://springrts.com/wiki/Units-UnitDefs#sounds
I also made a new template akin to the forumlink template for sourcecode.
Example usage: {{sourcelink|file=rts/Sim/Units/UnitDefHandler.cpp}}
http://springrts.com/wiki/Units-UnitDefs#sounds
I also made a new template akin to the forumlink template for sourcecode.
Example usage: {{sourcelink|file=rts/Sim/Units/UnitDefHandler.cpp}}
Re: New Wiki UnitDef Tag Documentation
waiting on a topic split just an fyi.AF wrote:I'm waiting for smoths criticisms before posting further info.
What errors are there in the sound docs? Am I okay to lift the data and have an update within the next week? Or is it one of those wishywashy areas where nobodies quite sure what tags do but what we've got is as close as we can manage?
Re: New Wiki UnitDef Tag Documentation
I think AF is old enough to make a topic for his spring docu thing himself, if he wants to share more about it. Same if somebody wants to discuss it in more detail.