[MOD] Trying to Add City-State Music

Josho

Chieftain
Joined
Oct 16, 2016
Messages
4
Using Modbuddy, I figured out how to add city states to the game but without music, however. When I tried to add music to a certain city-state, the mod itself still shows up on the mod list in Civ5 but when activated, the city state does not appear in the Civilopedia nor does it spawn.

The code I have pasted below is what is being used in my mod.

CityStateReplacements.xml (NOTE: data entries unrelated to sound have being omitted.)
Code:
<GameData>
    <!-- Adding a new CityState entry. -->
    <MinorCivilizations>
    <MinorCivsSounds>
        <MinorCivSound>
            <ScriptID>AS2D_MINOR_CIV_LUXEMBOURG</ScriptID>
            <SoundID>SND_MINOR_CIV_LUXEMBOURG</SoundID>
        </MinorCivSound>
    </MinorCivsSounds>
        </Row>
    </Language_en_US>
    </GameData>

2D Audio Scripts.xml
Code:
<Script2DFile>
    <Script2DSounds>
        <Script2DSound>
            <ScriptID>AS2D_MINOR_CIV_LUXEMBOURG</ScriptID>
            <SoundID>SND_MINOR_CIV_LUXEMBOURG</SoundID>
            <SoundType>GAME_MUSIC_STINGS</SoundType>
            <iMinVolume>50</iMinVolume>
            <iMaxVolume>50</iMaxVolume>
            <iMinTimeDelay>0</iMinTimeDelay>
            <iDontPlayMoreThan>1</iDontPlayMoreThan>
            <bDontTriggerDuplicates>True</bDontTriggerDuplicates>
            <iMinTimeMustNotPlayAgain>0</iMinTimeMustNotPlayAgain>
            <fTaperSoundtrackVolume>0.0</fTaperSoundtrackVolume>
        </Script2DSound>
    </Script2DSounds>
</Script2DFile>

audioDefines.xml
Code:
<AudioDefinesFile>
    <SoundDatas>
        <SoundData>
            <SoundID>SND_MINOR_CIV_LUXEMBOURG</SoundID>
            <Filename>MinorCiv_Luxembourg</Filename>
            <bDontCache />
            <bOnlyLoadOneVariationEachTime />
            <LoadType>DYNAMIC_RES</LoadType>
        </SoundData>
    </SoundDatas>
</AudioDefinesFile>

The sound referenced in the above XML (MinorCivLuxembourg.mp3) has being set to "Import into VFS: True" so I don't know what could be causing the mod to not work.

Any help would be greatly appreciated.
 
Audio Add-ins Tutorials:
  1. [TUTORIAL] Making a custom Leader use Custom Music! (by Leugi)
  2. [TUTORIAL] Creating your own Soundtrack! (by Leugi)

You're using incorrect methods for adding Music from a mod.

Also bear in mind that since the migration to the new forum software almost every codeblock in a tutorial has been made into a bit of a mess. One example is this:
Code:
<GameData>
 <Audio_Sounds>
<Row>
 <SoundID>SND_CUSTOM_PEACE_01</SoundID>
 <Filename>[B]YourFileName[/B]</Filename>
 <LoadType>DynamicResident</LoadType>
</Row>
<Row>
 <SoundID>SND_CUSTOM_PEACE_02</SoundID>
 <Filename>[B]YourOtherFileName[/B]</Filename>
 <LoadType>DynamicResident</LoadType>
</Row>

....

<Row>
 <SoundID>SND_CUSTOM_WAR_26</SoundID>
 <Filename>[B]YourFinalFileName[/B]</Filename>
 <LoadType>DynamicResident</LoadType>
</Row>
</Audio_Sounds>
</GameData>
The block Leugi originally made for his tutorial had bold-text formatting in it to make it easier to see what he was trying to show, which is now showing as for example:
Code:
<Filename>[B]YourFinalFileName[/B]</Filename>
Important part, though, is the difference in XML syntax from the correct usage as shown by Leugi, and as you are attempting to use.
 
Thanks, I managed to figure it out after experimenting a bit.
Audio Add-ins Tutorials:
  1. [TUTORIAL] Making a custom Leader use Custom Music! (by Leugi)
  2. [TUTORIAL] Creating your own Soundtrack! (by Leugi)

You're using incorrect methods for adding Music from a mod.

Also bear in mind that since the migration to the new forum software almost every codeblock in a tutorial has been made into a bit of a mess. One example is this:
Code:
<GameData>
 <Audio_Sounds>
<Row>
 <SoundID>SND_CUSTOM_PEACE_01</SoundID>
 <Filename>[B]YourFileName[/B]</Filename>
 <LoadType>DynamicResident</LoadType>
</Row>
<Row>
 <SoundID>SND_CUSTOM_PEACE_02</SoundID>
 <Filename>[B]YourOtherFileName[/B]</Filename>
 <LoadType>DynamicResident</LoadType>
</Row>

....

<Row>
 <SoundID>SND_CUSTOM_WAR_26</SoundID>
 <Filename>[B]YourFinalFileName[/B]</Filename>
 <LoadType>DynamicResident</LoadType>
</Row>
</Audio_Sounds>
</GameData>
The block Leugi originally made for his tutorial had bold-text formatting in it to make it easier to see what he was trying to show, which is now showing as for example:
Code:
<Filename>[B]YourFinalFileName[/B]</Filename>
Important part, though, is the difference in XML syntax from the correct usage as shown by Leugi, and as you are attempting to use.
ng
 
Top Bottom