Skip to content

Documentation: ThemeDef

Daniel Cavazos edited this page Nov 22, 2022 · 1 revision

Description

ThemeDefs are what users can select and what the mod uses to choose what track to play. TrackDefs populate them!

Fields

Type Field Description of Use
string label The theme's title shown in mod settings.
string description The description shown in mod settings.
string iconPath The image icon shown in the mod settings
List<MusicExpanded.TrackDef> tracks Associates the theme with several tracks.
List<MusicExpanded.SoundDef> sounds A list of sounds to replace existing vanilla sounddefs with the theme's sounddef.

Example

<MusicExpanded.ThemeDef>
  <defName>ExampleMod_Theme</defName>
  <label>Music Expanded: Example</label>
  <iconPath>UI/HeroArt/RimWorldLogo</iconPath>
  <description>An example theme to show modders how to make a cool thing!</description>
  <sounds>
    <li>ExampleMod_StartSting</li>
  </sounds>
  <tracks>
    <li>ExampleMod_TheCoolestSongOnEarth</li>
    <li>ExampleMod_TheWorstSongOnEarth</li>
  </tracks>
</MusicExpanded.ThemeDef>