Create Locales For Asset Manager & Radiant
From CustomCoD Wiki
Asset Manager
To create different locales in Asset Manager, you need to edit this file:
<root>\deffiles\material.gdf
Open up material.gdf in a text editor. Find the section that looks like this:
// Locale specifications. Adding a new locale also requires adding a checkbox for it. // Locale specifications must match the locales in 'locale.txt' exactly, with spaces // replaced by '_' and with 'locale_' prefixed. int 0 0 1 locale_case int 0 0 1 locale_test int 0 0 1 locale_tools int 0 0 1 locale_decal int 0 0 1 locale_Training int 0 0 1 locale_Peleliu int 0 0 1 locale_Okinawa int 0 0 1 locale_Holland int 0 0 1 locale_Hamburg int 0 0 1 locale_Rhine int 0 0 1 locale_Berlin int 0 0 1 locale_Seelow
To add a locate, copy one of the exiting entries and append it to the end of this list. Lets add a locale called Asset_Test. So, in this case, the change you make should make the end of this list look like:
int 0 0 1 locale_Berlin int 0 0 1 locale_Seelow int 0 0 1 locale_Asset_Test
Later in the material.gdf file, look for a section that looks like this:
hcontainer
{
checkbox( locale_Industrial )
[
exec
{
righttext()
height( 15 )
label( "Industrial" )
}
]
checkbox( locale_Poland )
[
exec
{
righttext()
height( 15 )
label( "Poland" )
}
]
checkbox( locale_Modern_America )
[
exec
{
righttext()
height( 15 )
label( "Modern America" )
}
]
checkbox( locale_Saint_Lo )
[
exec
{
righttext()
height( 15 )
label( "Saint Lo" )
}
]
Copy an exiting entry, and add your entry to this list. So, for "Asset_Test", this section would now looks like:
checkbox( locale_Saint_Lo )
[
exec
{
righttext()
height( 15 )
label( "Saint Lo" )
}
]
checkbox( locale_Asset_Test )
[
exec
{
righttext()
height( 15 )
label( "Asset Test" )
}
]
Radiant
Now, in Asset Manager, when editing a material, "Asset Test" will show up as a locale. However, it won't show up in Radiant.
In order to make the locale show up in Radiant, open up the file:
<root>\deffiles\materials\locale.txt
To the bottom of this list, add you locale, in this case "Asset Test." The locale will now appear in Radiant and should display any materials that have been checked with the locale "Asset Test" in asset manager.
SourceTreyarch Wiki
