Out of the Park Developments Online Manuals
 
Title
KeyExisting Key New Key
Create as
Find in this manual
Case sensitive

Replace with
XML File Properties
XML File Properties

In the colors XML file following properties can be specified:

  • team colors
  • uniform properties (home-away switches, weekdays, showname, shownumber, highsocks flags, font for jerseys)
  • uniform item (ballcap, jersey, pants, ...) colors and design ids
  • filenames and subfolders for texture files
  • time period when to use the properties above
  • notes

Entries are written with a tag followed by the options and their values.

  • Everything should be wrapped by a COLORS block.
  • TEAMCOLORS tag followed by time period and 'color1' and 'color2' will change the team colors.
  • UNIFORM tag followed by time period, 'name', 'ha' (home-away switches), 'subfolder', 'showname', 'shownumber', 'highsocks' and 'weekdays' will change uniform properties.
  • CAP tag followed by 'color1', 'color2', 'color3', 'subfolder', 'filename' and 'id' will change ballcap properties (id = design id).
  • JERSEY tag followed by 'color1', 'color2', 'color3', 'subfolder', 'filename' and 'id' will change jersey properties (id = design id).
  • PANTS tag followed by 'color1', 'color2', 'color3', 'subfolder', 'filename' and 'id' will change pants properties (id = design id).
  • Time period is specified by 'from' and 'to' (inclusively).
  • NOTES tag will be ignored by the parser.

Please also make note of the following.

  • all tags and options are optional. For UNIFORM the 'name' option should be specified, otherwise the following options will not be attached to any uniform.
  • up to 3 colors can be specified per uniform item in HEX (6 characters, 3x 00-FF) or RGB (9 characters, 3x 000-255) color codes. No prefixes are needed that are used in logo filename (C1H etc.). First color will change the main color, second the second (visor/belt) color and third the pin stripes color.
  • up to 2 team colors can be specified in HEX or RGB. First color will change team background color, second the team text color.
  • for 'weekdays' use 3 letter per day (Mon, Tue, Wed, Thu, Fri, Sat, Sun), can be specified individually: MonSun, in a range: Mon-Fri, Sun-Tue, or both: Wed-SatMon. The order does not matter.
  • for home-away switches ('ha') set "h" to use the selected uniform for home games, "a" for away games, both "ha" for home and away games, leave it out to not change the existing options or set blank (ha="") to unset both switches.
  • for time periods ('from' and 'to') years should be used (from="2000" to="2022"). Wrong or missing year will result in using the uniform for all games before/after the other option, e.g. from="" to="2022": uniform will be used for all years until 2022
  • uniform names should be unique. In case several uniforms with the same name are found the values of the latest one will be used.
  • several TEAMCOLORS can be set to cover different time periods.
  • showing name and/or number on the jersey and using high socks can be activated by including 'showname', 'shownumber' and 'highsocks' options followed by 'y' or 'yes' (showname="y").
  • changing a font used for showing name and number on the jersey can be done by specifying a new font name after the 'font' tag. The font name should be the same as the corresponding file in /data/jersey_fonts folder without the file extension. No other folders are taken into account.

For "Home" and "Away" uniforms (standard ones) home-away switches ('ha') and 'weekdays' options will be ignored.

When a uniform is found in the colors XML file there are four possible outcomes:

  • 1. If the uniform also exists in-game for the currently selected team, and the name and time period both match, then the game will change the values for the existing uniform to match those defined in the colors XML file.
  • 2. If there is no corresponding uniform in-game for the currently selected team in the dialog, a new uniform will be created in-game that matches the conditions defined in the colors XML file, as long as the current year in-game is part of the time period defined for this uniform.
  • 3. If the year in-game is not part of the specified time period for a uniform found in the colors XML file, and the currently selected team does not already have a uniform with a name that matches the defined name, the uniform will be ignored.
  • 4. If a uniform with a matching name exists for the currently selected team, but the year in-game is not part of the specified time period for a uniform found in the colors XML file, then the existing uniform will be deactivated by clearing the home-away options for this uniform. Uniforms deactivated in this manner will not be deleted.

When creating a new uniform or updating an existing alternate one, the game will search for uniform item textures in the folders for alternate uniform item textures (/data/ballcaps/alternates, /data/jerseys/alternates, /data/pants/alternates, …). When a subfolder is specified in CAP, JERSEY or PANTS tag it will be added to the search path. If a filename is specified, the game will try to load that file. A subfolder can also be defined in the UNIFORM tag, it then will be added to the path for all uniform items, but not in case their tags have their own subfolder definition. If matching texture files are found, these will be used (other options in the texture filenames will be ignored). If nothing was found in the alternate folders, the search will continue in the default folders (/data/ballcaps, /data/jerseys, /data/pants, ...) and if the specified textures are not found there either, standard textures from templates will be created using other options specified like design id and colors.

The default filenames are:
Ballcapcaps_TEAMNAME_TEAMNICKNAME_ALTERNATEUNIFORMNAME_everything_else.png
Jerseyjerseys_TEAMNAME_TEAMNICKNAME_ALTERNATEUNIFORMNAME_everything_else.png
Pantspants_TEAMNAME_TEAMNICKNAME_ALTERNATEUNIFORMNAME_everything_else.png

TEAMNAME is the name of the team.
TEAMNICKNAME is the nickname of the team.
ALTERNATEUNIFORMNAME is the name of the alternate uniform.
everything_else is ignored

The names can contain several words. The uniform ALTERNATEUNIFORMNAME should match the one in the colors XML file.

Example:jerseys_boston_red_sox_holiday_special_uniform_ignored_text.png

When no texture file for an item was found a texture from a template will be created using the colors and design id (or random one if not set). Note: only one file is searched for, either with default or custom name and only in one folder (/alternates, or /alternates/subfolder).

If the colors and/or ids are changed and the uniform item texture was created from a template before, it will be recreated using updated values.

XML File Example

--------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?> <COLORS fileversion="OOTP Developments 2022-08-12 09:30:00">
<TEAMCOLORS from="1999" to="2021" color1="554455" color2="111222111">
<NOTES> Early colors </NOTES>
</TEAMCOLORS>
<TEAMCOLORS from="2022" color1="112233" color2="334455">
<NOTES> Current colors </NOTES>
</TEAMCOLORS>
<UNIFORM name="Home" from="2012" ha="h" weekdays="Mon-Fri">
<NOTES> It's my favorite </NOTES>
<CAP color1="aa44bb" color2="222111222" color3="ffaaff" id="1" />
<JERSEY color1="010255010" color2="123456" color3="123123123" id="4" />
<PANTS color1="000151000" color2="088066077" color3="7733bb" id="1" />
</UNIFORM>
<UNIFORM name="Test1" from="1999" to="2002" ha="a" showname="y" shownumber="y" weekdays="WedSat-Mon" font="default_font">
<NOTES> Test1 </NOTES>
<CAP color1="111111" color2="222222" color3="333333" id="2" />
<JERSEY color1="773377" color2="774499" color3="443322" id="5" />
<PANTS color1="ccddee" color2="aa2255" color3="99ee33" id="1" />
</UNIFORM>
<UNIFORM name="Test2" from="2020" to="2024" subfolder="test2texs" ha="h" highsocks="y" weekdays="Fri">
<NOTES> Test1 </NOTES>
<CAP color1="724596" color2="f25d3a" color3="02e5b2" filename="mycap.png" id="4" />
<JERSEY color1="55ff22" color2="bb4411" color3="b92d44" subfolder="jerseytexs"
filename="myjersey.png" id="12" />
<PANTS color1="255000255" color2="111080222" color3="994466" id="3" />
</UNIFORM>
</COLORS>
--------------------------------------------------------

Loading the colors XML file example above will change the team colors to the 'Early colors' if the in-game year is between 1999 and 2021 or to 'Current colors' for all years after 2022. For the "Home" uniform only the colors and the design ids will be changed.

"Test1" uniform will be used for away games (ha="a") on Wednesdays, Saturdays, Sundays and Mondays for the years 1999 to 2002, for other years the home and away switches for this uniform will be unset if the team has a uniform with this name. Player's name and number will be shown on the back of his jersey using the default font (default_font.wepb (or .png or .jpg ...) from "/data/jersey_fonts").

"Test2" uniform will be used for home games (ha="h") on Fridays for the years 2020 to 2024.
As cap texture the file "/data/ballcaps/alternates/test2texs/mycap.png" will be loaded, for jersey the file "/data/jerseys/alternates/jerseytexs/myjersey.png" and for pants first found file starting with "pants_TEAMNAME_TEAMNICKNAME_test2*.png" ("*" can be anything) in "/data/pants/alternates". If the custom file could be loaded the "id" parameter is ignored. High socks will be used for this uniform.

Previous page: XML Colors
Next page: Team Settings