desc.ext: Difference between revisions
Lou Montana (talk | contribs) m (Text replacement - ";[ ]+ " to "; ") |
Lou Montana (talk | contribs) m (Text replacement - " (\=+)([a-zA-Z0-9][^ ]+[a-zA-Z0-9])(\=+) " to " $1 $2 $3 ") |
||
Line 25: | Line 25: | ||
All honor and glory to Kju and Alef | All honor and glory to Kju and Alef | ||
=General= | = General = | ||
As a '''general''' guide, the file search algorithm breaks down to the following, and in the following order: | As a '''general''' guide, the file search algorithm breaks down to the following, and in the following order: | ||
Line 147: | Line 147: | ||
*PboPrefix (in the obvious case of a \hard\path) | *PboPrefix (in the obvious case of a \hard\path) | ||
=other misc= | = other misc = | ||
<pre> | <pre> | ||
Line 167: | Line 167: | ||
}; | }; | ||
</pre> | </pre> | ||
=cfgSounds= | = cfgSounds = | ||
titles[]={StartTime,Text,...}; | titles[]={StartTime,Text,...}; | ||
Line 198: | Line 198: | ||
=cfgENVsounds== | = cfgENVsounds == | ||
<pre> | <pre> | ||
class CfgEnvSounds | class CfgEnvSounds |
Revision as of 15:29, 17 November 2021
Basics
Mission Related File References
'Mission Related' files are
- mission.sqm
- desc.ext
- any.sqX file call (execvm, loadfile, etc)
- any.bikb (arma only)
- any.fsm (arma only)
Files vs Paths
There are four classes of file reference.
- \Hard\Path
- \HardFile (no path, just a file)
- Soft\Path
- SoftFile
Innocently similar references will result in drastically different search paths for the file of interest.
Note that a Soft\Path is not a relative file reference. (BI do not use relative addressing for anything in their engines except #include)
The following 'truth' was gleaned from an invaluable tool that saved days of hair pulling frustration:
http://technet.microsoft.com/en-us/sysinternals/bb896645
All honor and glory to Kju and Alef
General
As a general guide, the file search algorithm breaks down to the following, and in the following order:
- mission\
- Campaign\Scripts\ or Campaign\DtaExt\ (if a campaign)
- exe\Scripts\ or exe\DtaExt\
- PboPrefix
- exe\
PboPrefix is where the initial part (or all), of the Soft or \Hard path matches an Arma Addon's internal prefix.
By definition, Soft and \Hard files cannot refer to Addons because a file has no path information. Addons are defined as pbo's containing config.cpp's.
For Addons that have no internal prefix (All of OFP, and some Arma Oem's), the NameOfPbo is substitued.
Ofp vs Arma
- Where relevant, prepending DtaExt\ or Scripts\ remains the same.
- Arma extends desc.ext to be able to refer to files outside of it is own folder and children.
- Arma extends mission\desc.ext's to be able to refer to files in campaign\desc.ext
- An OFP engine prepends a Sound\ Folder to sound references in it is desc.ext. Thus:
sound[] = {"S01v05.ogg", db-10, 1.0};
actually refers to a ~Sound\S01v05.ogg. Arma does not prepend.
sqX (Scripts)
sqX is the scripting language found in mission.sqm, *.sqs and *.sqf. A sqX script, regardless of source follows the following file pathing for missionspace (note that sqX encountered in addons behaves differently)
By convention only, sqX files are .sqs for exec calls and .sqf for execVM calls. (The actual extension is immaterial)
OFP
OFP only uses exec
[] exec "\anything"
- exe\anything
[] exec "Soft\Path.sqs";
- mission\
[] exec "SoftFile.sqs";
- mission\
- campaign\Scripts\
- OFP\Scripts\
ARMA
[] exec(VM) "SoftFile.sqX";
- mission\
- exe\scripts\ OR campaign\scripts\
- exe\
[] exec(VM) "Soft\Path.sqX";
- mission\
- exe\scripts\ OR campaign\scripts\
- PboPrefix
[] execVM "\HardFile.sqf";
- exe\ ONLY
[] execVM "\Hard\Path.sqf";
- PboPrefix
- exe\
desc.ext
OFP
mission.ext
sound[] = {"Anything",1,1};
mission\Sound
sound[] = {"\Anything",1,1};
mission\
campaign.ext
sound[] = {"\Anything",1,1};
campaign\dtaext\Anything
sound[] = {"Anything",1,1};
campaign\dtaext\sound\Anything
notes:
For large missions, although and of course, you can place everything in a single mission folder with no subfolders, Ofp mission designers tend to use the following folder constructs:
- Sound
- Music
- Voice
- Scripts
- OtherStuff
This innocent and sensible looking order illustrates inconsistency of syntax in the texts. Thus:
sound[] = {"S01v05.ogg", db-10, 1.0}; // and sound[] = {"\sound\S01v05.ogg", db-10, 1.0}; // both refer to ~\Sound\S01v05.ogg
and
sound[] = {"\music\S01v05.ogg", db-10, 1.0}; //refers to ~\Music\S01v05.ogg
but
sound[] = {"music\S01v05.ogg", db-10, 1.0}; //refers to ~\SOUND\Music\S01v05.ogg
ARMA
mission.ext
campaign.ext
Unlike OFP, Arma engines allow a desc.ext to reference files otuside of it is own space. Unlike OFP, Arma engines allow access from mission description.ext's into the campaign\space.
loadScreen="Soft\Path.paa";
- mission\
- campaign\dtaext\
- arma\dtaext\
- PboPrefix
loadScreen="SoftFile.paa";
- mission\
- campaign\dtaext\
- arma\dtaext\
- exe\
loadScreen="\Hard\Path.paa";
- PboPrefix ONLY
loadScreen="\HardFile.paa";
- exe\ ONLY
bikb
- Prior to hotfix patch in version 1.05, bikb couldn't access anything except addons
- bikb is only a convention. you can have any extension.
- the file cannot be binarised even tho it is classtext. This is marked to change at further engine revisions.
- You can't specify soft\paths or SoftFiles, it results in a rpt error
Protocol bin\config.bin/RadioProtocol_EP1_EN/: Missing word fred\05bv01.ogg
speech[] = {"\Hard\Path.ogg"}; speech[] = {"\HardFile.ogg"};
either reference searches in the following order
- mission\
- campaign\
- PboPrefix (in the obvious case of a \hard\path)
other misc
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
titles[]={StartTime,Text,...};
ofp can use semi colons between
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;//show next text in 10 seconds // {{ofp}} will accept semi colon or ; for above }; };
cfgENVsounds =
class CfgEnvSounds { sounds[]={dest}; class dest { name="dest"; sound[]={"sound\dest.ogg", db, 1.0}; soundNight[]={"sound\dest.ogg", db, 1.0};//<<<< titles[]={}; }; };