desc.ext: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
Line 156: Line 156:
     speech[] = {"\sound\02v1.ogg"};
     speech[] = {"\sound\02v1.ogg"};


another, dreadful piece of inconsistency where the '\hardpath' refers to mission space AND \prefixSpaec. feel free to scream.
similar to mission.sqm's and desc.ext, if the file is not found in a genuine addon, it's looked for in missionRoot. However:


if the file is not found in a genuine addon, it's looked for in missionspace.
'''you CANNOT have relative refereces'''
 
you CANNOT have relative refereces


     speech[] = {"sound\02v1.ogg"};
     speech[] = {"sound\02v1.ogg"};
Line 171: Line 169:
WHY to bis do this to themselves.
WHY to bis do this to themselves.


note that bikb is only a convention. you can have any extension. the file cannot be binarised even tho it's classtext
notes:
*bikb is only a convention. you can have any extension.
*the file cannot be binarised even tho it's classtext. This is marked to change at further engine revisions.

Revision as of 06:39, 27 September 2011

basics

Until bis break their own code again, file references in desc.ext seem to follow the following conventions

note this is incompatible with resistance (and arma1). the rules have changed


  • DescriptionRoot is the location of the description.ext
  • This in turn becomes a CampaignRoot or a MissionRoot (see below)
  • A \hardpath or lack of one makes no (ultimate) difference to the addressing scheme. You can speed the access up by using \hardpaths for addons and RelativePath if the file is in the DescriptionRoot. It only changes the order of searching.
  • The engine scans \addons and descriptionRoot in the following order
    • If a \hardpath is specified, \addons are scanned first
\path\to\file// is first scanned, then
DescriptionRoot\path\to\file
    • If a RelativePath is specified, desriptionRoot is scanned first.
DescriptionRoot\Relpath\to\file// is first scanned then
\RelPath\to\file
      • If not found in the 1st path, the 2nd path is scanned.


Two types of description.ext exist, and they operated differently.

missionroot

The desc.ext is located in the primary folder of a mission.sqm

Addressing rules as above.

campaignroot

A campaignroot\desc.ext is 'special' in that the only useable locations are dtaext\ (and scripts\)

scripts\ are a global entity for mission.sqms. They aren't desc.ext related.

unlike mission.sqms, you cannot have a sounds\ child folder as such (or any other)

All references are implied DtaExt (sigh)

sounds[]=fred and sounds[]=\fred

mean DtaExt\fred

Not tested: \fred\... might be scanned by the engine

In fact, the DtaExt default is quite pointless. Inconsistent as ever, campaignroot's can't have the same structure as missions. but, there's no reason anymore why they shouldn't.

Bis have crippled the original default folders of DtaExt\sounds for sounds, and DtaExt\Music for music. They must be fully specified as

sounds[]=Sounds\whatever; (which actually means DtaExt\Sounds\....


This isn't a bad thing, but there wasn't a reason to keep the dtaext at all!!!!

There may or may not be other 'special' folders, 'my documents'\arma\username and other trifles. But you can't rely on it or them. they are likely to break or disappear at whim. mission scripts eg seem to have default access to ca\data\scripts. Fool it is, who rely on Bis to maintain that.

Bis themselves dont actually use dtaext (or scripts) in any of their campaigns. Probably because their mission makers either weren't aware of them, or could understand them.

But, from not making used of the global architecture, means common sound files (and common scripts) are bloated in each mission that uses one, for any official campaign.


other

class CfgRadio //straightfoward array of {filename,volume,pitch}
{
  sounds[]={};
  class Seq0{name="Seq0";  sound[]={"sound\09r06.wss", db-40, 1.0};	title=$STRM_09r06;  };
};
class CfgSFX
{
  sounds[]={hospoda2};
  class Hospoda2
  {
    name="Hospoda2";
    sounds[]={sound1};//<<<<<name of sound array
    sound1[]={"hospoda2.ogg", db-0,1, 1, 1, 1, 1};//who knows
    empty[]= {, , , , 1 , 5, 20};
  };
};

cfgSounds

one hell of a mess with titleS note the plural

ofp used semi colons between

titles[]={StartTime,Text}; titles[]=

class CfgSounds
{
  sounds[]={};
  class Seq1 {name="Seq1";  sound[]={"sound\09v07.ogg", db, 1.0};    titles[]={0,       $STRM_09v07};  };//standard

  class 11v01{name="11v01"; sound[]={"sound\11v01.ogg", db-05, 1.0}; titles[]={{0,0.4}, $STRM_11v01};  };
  class 11v04{name="11v04"; sound[]={"sound\11v04.ogg", db-05, 1.0}; titles[]={ 0,      $STRM_11v04,  {5.5,0.5}, $STRM_11v04a};    };
  class DX04v01
  {
    name="DX04v01";
    sound[]={"sound\DX04v01.ogg", db+60, 1.0};
    titlesfont="tahomaB24";
    titlessize=0.025;
  titles[]=
    {
      0, $STRD_DX04v01;
      10, $STRD_DX04v02;
    };
  }; //wierd

cfgENVsounds=

class CfgEnvSounds
{
  sounds[]={dest};
  class dest
  {
    name="dest";
    sound[]={"sound\dest.ogg", db, 1.0};
    soundNight[]={"sound\dest.ogg", db, 1.0};//<<<<
    titles[]={};
  };
};


Scripts

scripts are part of mission.sqm and \hardpaths to addons are valid. Therefore, all relative references in a mission.sqm (and their scripts) are relative to the mission.sqm, NOT the folder they are encountered in. (sigh)

expActiv="nul=[] execVM ""scripts\dialog.sqf""";

relative to mission.sqm

expActiv="nul=[] execVM ""\scripts\dialog.sqf""";

would refer to a (non existent) pboprefix 'scripts'

fowley kbAddTopic ["dialog", "scripts\dialog.bikb", ""];

again, relative to mission.sqm, even tho, this piece of text is in the 'scripts' folder.

Note that Campaign root scripts folder is implied if it cannot find file in the mission.

execvm thing.sqf // assumes it's in mission.sqm root, OR campaignroot\scripts execvm Scripts\thing.sqf // will look in mission.sqm\scripts or campaignRoot\scripts\scripts

previously, mission.sqm\scripts and ~\sound were also a default folders. but it looks like they broke it.

bikb

   speech[] = {"\sound\02v1.ogg"};

similar to mission.sqm's and desc.ext, if the file is not found in a genuine addon, it's looked for in missionRoot. However:

you CANNOT have relative refereces

   speech[] = {"sound\02v1.ogg"};


goes off to wander land

this because of some hotfix patch in version 1.05, where previously, bikb couldn't access anything except addons

WHY to bis do this to themselves.

notes:

  • bikb is only a convention. you can have any extension.
  • the file cannot be binarised even tho it's classtext. This is marked to change at further engine revisions.