New Wiki UnitDef Tag Documentation - Page 3

New Wiki UnitDef Tag Documentation

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: New Wiki UnitDef Tag Documentation

Post by knorke »

moar screenshots/info/link please.
might also be worth a seperate thread.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: New Wiki UnitDef Tag Documentation

Post by AF »

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?
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: New Wiki UnitDef Tag Documentation

Post by knorke »

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? :shock:
If by hand, how do you want to keep up with updates...
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Re: New Wiki UnitDef Tag Documentation

Post by FLOZi »

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.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: New Wiki UnitDef Tag Documentation

Post by knorke »

FLOZi wrote:Furthermore you can probably define soundtypes in gamedata/sounds.lua and refer to them in any of these rather than the filename.
You mean the soundcategory that can be found in ie BA units?
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.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Re: New Wiki UnitDef Tag Documentation

Post by FLOZi »

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.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: New Wiki UnitDef Tag Documentation

Post by knorke »

FLOZi wrote:No, FBI-style soundcategory is handled entirely though parse_fbi.lua, which just creates the sounds subtable in the unitdef
ah ok.
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.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Re: New Wiki UnitDef Tag Documentation

Post by FLOZi »

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}}
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: New Wiki UnitDef Tag Documentation

Post by smoth »

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?
waiting on a topic split just an fyi.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: New Wiki UnitDef Tag Documentation

Post by knorke »

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.
Post Reply

Return to “Game Development”