Audio2DScripts: Difference between revisions

From Civilization Modding Wiki
Jump to navigationJump to search
(1st entry of data, copied from "civ4.wikidot.com".)
 
m (Unprotected "Audio2DScripts")
 
(8 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{| align="left"
The '''Audio2DScripts''' file defines the primary background and foreground sounds for each screen and playing attribute. These include the music for the opening, map and diplomacy screens and the primary background for the city screen. Foreground sounds include those for tech discoveries, structure and unit builds, and mouse clicks.
|[[Civ4RouteModelInfos|Previous article]]
 
|}
All tags must be opened and closed; the first is the "open", the second the "close" tag. If nothing goes inside a "list tag", then it should just be the opening tag with a "/" before the closing bracket. The following tables contain all available tags, as well as their purpose and accepted values.
{|align="right"
 
|[[Civ4 XML Reference|Back to XML Reference]]
|}<br><br>
<font color=red>This page is missing information.
<font color=red>This page is missing information.
Do not remove this notice until it is complete.</font>
Do not remove this notice until it is complete.</font>
=Summary=
This file defines the primary background and foreground sounds for each screen and playing attribute. These include the music for the opening, map and diplomacy screens and primary background for the city screen. Foreground sounds would be tech discoveries, structure and unit builds and mouse clicks.




=Single-Line Tags=
==Tags==
===Text Tags===
===Text===
{| border="1" cellpadding="2" cellspacing="0"
{| border="1" style="text-align:left" cellpadding="3" cellspacing="0"
|-
|-
! style="background:#efefef;" | Tag Name
! style="background:#efefef;" | Tag Name
! style="background:#efefef;" | Description
! style="background:#efefef;" | Description
|-
|-
|ScriptID || This is the name of the sound object used by the Audio2D script, This ID is used in [[CIV4LeaderHeadInfos]], [[AudioSoundscapeScripts]] and by Python CyAudioGame.Play2DSound() function. The IDs are prefixed with AS2D_ for easier identification and followed by the filename.
!ScriptID
| This is the name of the sound object used by the Audio2D script. This ID is used in [[CIV4LeaderHeadInfos]], [[AudioSoundscapeScripts]] and by Python CyAudioGame.Play2DSound() function. The IDs are prefixed with AS2D_ for easier identification and followed by the filename.
|-
|-
|SoundID || Implemented in AudioDefines to retrieve the sound file.
!SoundID
| Implemented in AudioDefines to retrieve the sound file.
|-
|-
|SoundType || Indicates which volume slider to use under Game Options -> Audio AMBIENCE, INTERFACE, MUSIC, SFX or SPEECH These are prefixed with GAME_ for easy identification. Values are defined in AudioDefines.
!SoundType
| Indicates which volume slider to use under Game Options -> Audio AMBIENCE, INTERFACE, MUSIC, SFX or SPEECHThese are prefixed with GAME_ for easy identification. Values are defined in AudioDefines.
|}
|}




===Boolean Tags===
===Integer===
{| border="1" cellpadding="2" cellspacing="0"
 
All of these tags have a numerical value.  Though it sometimes can be negative, it usually is not.
 
{| border="1" style="text-align:left" cellpadding="3" cellspacing="0"
|-
|-
! style="background:#efefef;" | Tag Name
! style="background:#efefef;" | Tag Name
! style="background:#efefef;" | Description
! style="background:#efefef;" | Description
|-
|-
|bLooping || Indicates whether the sound will "loop", ie: repeat indefinately.
!iMinVolume
| Minimum volume to play this sound. Values are from 0 to 100.
|-
|-
|bTaperForSoundtracks || <font color=red>unknown.</font> Set to 0.
!iMaxVolume
|}
| Maximum volume to play this sound. Values are from 0 to 100.
 
 
===Integer Tags===
{| border="1" cellpadding="2" cellspacing="0"
|-
|-
! style="background:#efefef;" | Tag Name
!iPitchChangeDown
! style="background:#efefef;" | Description
| <font color=red>unknown.</font> Set to 0.
|-
|-
|iMinVolume || Minimum volume to play this sound. Values are from 0 to 100.
!iPitchChangeUp
| <font color=red>unknown.</font> Set to 0.
|-
|-
|iMaxVolume || Maximum volume to play this sound. Values are from 0 to 100.
!iMinLeftPan
| <font color=red>unknown.</font> Set to -1.
|-
|-
|iPitchChangeDown || <font color=red>unknown.</font> Set to 0.
!iMaxLeftPan
| <font color=red>unknown.</font> Set to -1.
|-
|-
|iPitchChangeUp || <font color=red>unknown.</font> Set to 0.
!iMinRightPan
| <font color=red>unknown.</font> Set to -1.
|-
|-
|iMinLeftPan || <font color=red>unknown.</font> Set to -1.
!iMaxRightPan
| <font color=red>unknown.</font> Set to -1.
|-
|-
|iMaxLeftPan || <font color=red>unknown.</font> Set to -1.
!iMinTimeDelay
| <font color=red>unknown.</font> Minimum time in delay playing sound. Values in milliseconds.
|-
|-
|iMinRightPan || <font color=red>unknown.</font> Set to -1.
!iMaxTimeDelay
| <font color=red>unknown.</font> Maximum time in delay playing sound. Values in milliseconds.
|-
|-
|iMaxRightPan || <font color=red>unknown.</font> Set to -1.
!iLengthOfSound
| <font color=red>unknown.</font> Set to 0.
|-
|-
|iMinTimeDelay || <font color=red>unknown.</font> Minimum time in delay playing sound. Values in milliseconds.
!iNotPlayPercent
| <font color=red>unknown.</font> Set to 0. (Beyond the Sword only)
|}
 
 
===Boolean===
 
All of these can either be 1 (on, or true) or 0 (off, or false).  Be careful, as you can wind up with a double-negative, which the game will interpret as "True".
 
{| border="1" style="text-align:left" cellpadding="3" cellspacing="0"
|-
|-
|iMaxTimeDelay || <font color=red>unknown.</font> Maximum.time in delay playing sound. Values in milliseconds.
! style="background:#efefef;" | Tag Name
! style="background:#efefef;" | Description
|-
|-
|iLengthOfSound || <font color=red>unknown.</font> Set to 0.
!bLooping
| Indicates whether the sound will "loop" (repeat indefinitely).
|-
|-
|iNotPlayPercent || <font color=red>unknown.</font> Set to 0. Only in BtS.
!bTaperForSoundtracks
| <font color=red>unknown.</font> Set to 0.
|}
|}




===Floating-Point Tags===
===Floating-Point===
{| border="1" cellpadding="2" cellspacing="0"
{| border="1" style="text-align:left" cellpadding="3" cellspacing="0"
|-
|-
! style="background:#efefef;" | Tag Name
! style="background:#efefef;" | Tag Name
! style="background:#efefef;" | Description
! style="background:#efefef;" | Description
|-
|-
|fMinDryLevel || <font color=red>unknown.</font> Set to 1.0.
!fMinDryLevel
| <font color=red>unknown.</font> Set to 1.0.
|-
|-
|fMaxDryLevel || <font color=red>unknown.</font> Set to 1.0.
!fMaxDryLevel
| <font color=red>unknown.</font> Set to 1.0.
|-
|-
|fMinWetLevel || <font color=red>unknown.</font> Set to 0.0.
!fMinWetLevel
| <font color=red>unknown.</font> Set to 0.0.
|-
|-
|fMaxWetLevel || <font color=red>unknown.</font> Set to 0.0.
!fMaxWetLevel
| <font color=red>unknown.</font> Set to 0.0.
|}
|}




=Example=
==Example==
 
In the following example of code, please note that there is a specific order of all of the tags.  You ''must'' list the tags in this order for the game to properly interpret your file.
 
  <Script2DSound>
  <Script2DSound>
     <ScriptID>AS2D_ERROR</ScriptID>
     <ScriptID>AS2D_ERROR</ScriptID>
Line 109: Line 135:
     <fMaxWetLevel>0.0</fMaxWetLevel>
     <fMaxWetLevel>0.0</fMaxWetLevel>
  </Script2DSound>
  </Script2DSound>
{| align="left"
 
|[[Audio3DScripts|Next article]]
{{Civ4_XML_Files}}
|}
{|align="right"
|[[Civ4 XML Reference|Back to XML Reference]]
|}

Latest revision as of 03:27, 3 October 2011

The Audio2DScripts file defines the primary background and foreground sounds for each screen and playing attribute. These include the music for the opening, map and diplomacy screens and the primary background for the city screen. Foreground sounds include those for tech discoveries, structure and unit builds, and mouse clicks.

All tags must be opened and closed; the first is the "open", the second the "close" tag. If nothing goes inside a "list tag", then it should just be the opening tag with a "/" before the closing bracket. The following tables contain all available tags, as well as their purpose and accepted values.

This page is missing information. Do not remove this notice until it is complete.


Tags

Text

Tag Name Description
ScriptID This is the name of the sound object used by the Audio2D script. This ID is used in CIV4LeaderHeadInfos, AudioSoundscapeScripts and by Python CyAudioGame.Play2DSound() function. The IDs are prefixed with AS2D_ for easier identification and followed by the filename.
SoundID Implemented in AudioDefines to retrieve the sound file.
SoundType Indicates which volume slider to use under Game Options -> Audio AMBIENCE, INTERFACE, MUSIC, SFX or SPEECH. These are prefixed with GAME_ for easy identification. Values are defined in AudioDefines.


Integer

All of these tags have a numerical value. Though it sometimes can be negative, it usually is not.

Tag Name Description
iMinVolume Minimum volume to play this sound. Values are from 0 to 100.
iMaxVolume Maximum volume to play this sound. Values are from 0 to 100.
iPitchChangeDown unknown. Set to 0.
iPitchChangeUp unknown. Set to 0.
iMinLeftPan unknown. Set to -1.
iMaxLeftPan unknown. Set to -1.
iMinRightPan unknown. Set to -1.
iMaxRightPan unknown. Set to -1.
iMinTimeDelay unknown. Minimum time in delay playing sound. Values in milliseconds.
iMaxTimeDelay unknown. Maximum time in delay playing sound. Values in milliseconds.
iLengthOfSound unknown. Set to 0.
iNotPlayPercent unknown. Set to 0. (Beyond the Sword only)


Boolean

All of these can either be 1 (on, or true) or 0 (off, or false). Be careful, as you can wind up with a double-negative, which the game will interpret as "True".

Tag Name Description
bLooping Indicates whether the sound will "loop" (repeat indefinitely).
bTaperForSoundtracks unknown. Set to 0.


Floating-Point

Tag Name Description
fMinDryLevel unknown. Set to 1.0.
fMaxDryLevel unknown. Set to 1.0.
fMinWetLevel unknown. Set to 0.0.
fMaxWetLevel unknown. Set to 0.0.


Example

In the following example of code, please note that there is a specific order of all of the tags. You must list the tags in this order for the game to properly interpret your file.

<Script2DSound>
   <ScriptID>AS2D_ERROR</ScriptID>
   <SoundID>SND_ERROR</SoundID>
   <SoundType>GAME_SFX</SoundType>
   <iMinVolume>80</iMinVolume>
   <iMaxVolume>80</iMaxVolume>
   <iPitchChangeDown>0</iPitchChangeDown>
   <iPitchChangeUp>0</iPitchChangeUp>
   <iMinLeftPan>-1</iMinLeftPan>
   <iMaxLeftPan>-1</iMaxLeftPan>
   <iMinRightPan>-1</iMinRightPan>
   <iMaxRightPan>-1</iMaxRightPan>
   <bLooping>0</bLooping>
   <iMinTimeDelay>0</iMinTimeDelay>
   <iMaxTimeDelay>0</iMaxTimeDelay>
   <bTaperForSoundtracks>0</bTaperForSoundtracks>
   <iLengthOfSound>0</iLengthOfSound>
   <fMinDryLevel>1.0</fMinDryLevel>
   <fMaxDryLevel>1.0</fMaxDryLevel>
   <fMinWetLevel>0.0</fMinWetLevel>
   <fMaxWetLevel>0.0</fMaxWetLevel>
</Script2DSound>


GlobalDefinesGlobalDefinesAltGlobalTypesPythonCallbackDefines

Art:

Civ4ArtDefines_BonusCiv4ArtDefines_BuildingCiv4ArtDefines_CivilizationCiv4ArtDefines_FeatureCiv4ArtDefines_ImprovementCiv4ArtDefines_InterfaceCiv4ArtDefines_LeaderheadCiv4ArtDefines_MiscCiv4ArtDefines_MovieCiv4ArtDefines_TerrainCiv4ArtDefines_UnitCiv4MainMenusCiv4RiverModelInfosCiv4RouteModelInfos

Audio; Buildings:

Audio2DScriptsAudio3DScriptsAudioDefinesAudioSoundscapeScriptsCiv4BuildingClassInfosCiv4BuildingInfosCiv4CityLSystemCiv4PlotLSystemCiv4SpecialBuildingInfos

BasicInfos:

Civ4AttitudeInfosCiv4BasicInfosCiv4CalendarInfosCiv4CityTabInfosCiv4DenialInfosCiv4DomainInfosCiv4InvisibleInfosCiv4MemoryInfosCiv4MonthInfosCiv4NewConceptInfosCiv4SeasonInfosCiv4UnitAIInfosCiv4UnitCombatInfos

Civilizations; Events:

Civ4CivilizationInfosCiv4LeaderHeadInfosCiv4TraitInfosCiv4UnitArtStyleTypeInfosCiv4EventInfosCiv4EventTriggerInfos

GameInfo:

Civ4CivicInfosCiv4CivicOptionInfosCiv4ClimateInfoCiv4CommerceInfoCiv4CorporationInfoCiv4CultureLevelInfoCiv4CursorInfoCiv4DiplomacyInfosCiv4EmphasizeInfosCiv4EspionageMissionInfoCiv4EraInfosCiv4ForceControlInfosCiv4GameOptionInfosCiv4GameSpeedInfoCiv4GoodyInfoCiv4GraphicOptionInfosCiv4HandicapInfoCiv4HintsCiv4MPOptionInfosCiv4PlayerOptionInfosCiv4ProcessInfoCiv4ReligionInfoCiv4SeaLevelInfoCiv4SpecialistInfosCiv4TurnTimerInfoCiv4UpKeepInfoCiv4VictoryInfoCiv4VoteInfoCiv4VoteSourceInfosCiv4WorldInfo

Interface:

Civ4AdvisorInfosCiv4CameraInfosCiv4ColorValsCiv4InterfaceModeInfosCiv4PlayerColorInfosCiv4SlideShowInfosCiv4SlideShowRandomInfosCiv4SpaceShipInfosCiv4ThroneRoomeInfosCiv4ThroneRoomCameraInfosCiv4ThroneRoomStyleInfosCiv4WorldPickerInfos

Misc:

Civ4AttachableInfosCiv4CameraOverlayInfosCiv4DetailManagerCiv4EffectInfosCiv4QuestInfosCiv4RiverInfosCiv4RouteInfosCiv4TerrainPlainInfosCiv4TutorialInfosCiv4WaterPlaneInfos

Technologies:

Civ4TechInfos

Terrain:

Civ4BonusClassInfosCiv4BonusInfosCiv4FeatureInfosCiv4ImprovementInfosCiv4SymbolMeshPathsCiv4TerrainInfosCiv4TerrainSettingsCiv4YieldInfos

Units:

Civ4AnimationInfosCiv4AnimationPathInfosCiv4AutomateInfosCiv4BuildInfosCiv4CommandInfosCiv4ControlInfosCiv4EntityEventInfosCiv4FormationInfosCiv4MissionInfosCiv4PromotionInfosCiv4SpecialUnitInfosCiv4UnitClassInfosCiv4UnitInfos

Schemas:

Civ4GlobalDefinesSchemaCiv4GlobalTypesSchemaCiv4ArtDefinesSchemaAudioDefinesSchemaAudioScriptSchemaCiv4BasicInfoSchemaCiv4BuildingSchemaCiv4LSystemSchemaCiv4CivilizationSchemaCiv4EventSchemaCiv4GameInfoSchemaCiv4InterfaceSchemaCiv4MiscSchemaCiv4TutorialSchemaCiv4DetailManagerSchemaCiv4TechnologiesSchemaCiv4TerrainSchemaCiv4FormationSchemaCiv4UnitSchema

Italics: Beyond the Sword only