Bib files specification

Discussion about custom outfits & bibs
Post Reply
Jussi Koskela
Site Admin
Site Admin
Posts: 3637
Joined: 22 Jan 2007, 14:42
Location: Finland
Contact:

Bib files specification

Post by Jussi Koskela »

Bib Files

World Cup

Default.xml
This bib style will be used in World Cup by others than the leader.
Leader.xml
This bib style will be used in World Cup by the cup leader.
KO-Blue.xml
This bib style will be used in knockout by the weaker jumper from the qualification.
KO-Red.xml
This bib style will be used in knockout by the stronger jumper from the qualification.

Team Cup
Team-N.xml
This bib style will be used in Team Cup by the N(th) jumper of non-cup-leading team.
Leader-N.xml
This bib style will be used in Team Cup by the N(th) jumper of cup-leading team.

You can alternatively define just Team.xml and Team-Leader.xml files if different team members have similar bibs.

Required Styles
It's not necessary to define all special World Cup / Team Cup bib styles. The game will use a more generic bib style if certain specialized bib style is not available. At bare minimum you have to define the default bib style in Default.xml.

Template Files
Bib template files can be found under your Windows user's Documents folder at:
<Documents>\Deluxe Ski Jump 4\Custom Outfits\Bibs\@Template

Bib XML Format

Example

Code: Select all

<bib version="DSJ4-1.11.0">
	<front texture="front.png">
		<label x="0.5" y="0.64" text="{number}" maxwidth="0.3" font="Arial" size="0.175" color="0x000000" angle="0" alignment="center" weight="800"/>
		<label x="0.5" y="0.83" text="{location@upper}" maxwidth="0.8" font="Arial" size="0.06" color="0x000000" angle="0" alignment="center" weight="800"/>
	</front>
	<rear texture="rear.png">
		<label x="0.5" y="0.64" text="{number}" maxwidth="0.3" font="Arial" size="0.175" color="0x000000" angle="0" alignment="center" weight="800"/>
		<label x="0.5" y="0.83" text="{location@upper}" maxwidth="0.8" font="Arial" size="0.06" color="0x000000" angle="0" alignment="center" weight="800"/>
	</rear>
</bib>
Bib
Element name: bib
Description: The root element of the bib definition.

Attributes
Name		Type		Allowed values		Description
version		String		DSJ4-1.11.0		Minimum DSJ4 version where the bib is supposed to work

Child elements: front, rear

Front
Element name: front
Description: Defines the front side of the bib.
Parent element: bib

Attributes
Name		Type		Allowed values		Description
texture		String		Filename		PNG or JPG file with a texture for the front side of the bib

Child elements: label

Rear

Element name: rear
Description: Defines the rear side of the bib.
Parent element: bib

Attributes
Name		Type		Allowed values		Description
texture		String		Filename		PNG or JPG file with a texture for the front side of the bib

Child elements: label

Label
Element name: label
Description: Defines a dynamically generated label to be included on front or rear side of the bib.
Parent element: front | rear

Attributes
Name		Type		Allowed values		Description
x		Float					X position of the label; 0.0 = left edge, 1.0 = right edge
y		Float					Y position of the label; 0.0 = top edge, 1.0 = bottom edge
text		String		Format string		Content of the label
maxwidth	Float					Maximum width for the label, 1.0=width of the bib
font		String					Name of the font to use (prefer default Windows fonts)
color		Color					Color formatted as hex string in 0xAARRGGBB format
angle		Float					Angle of label in degrees
alignment	String		left|center|right	Horizontal alignment of label
weight		Integer		0..1000			Weight of the font, 0=default, 1=thinnest, 400=normal, 1000=boldest

Format string
You can enter the dynamic content to labels using the following format:
{number|member|nation|nation-full|location|first-names|first-name-initials|last-name|full-name[@lower|upper]}

number
The bib number of ski jumper
member
The number of team member
nation
The nationality of ski jumper (3-letter acronym)
nation-full
The nationality of ski jumper (full country name)
location
The location (or name) of the hill
first-names
The first names of the ski jumper
first-name-initials
The first name initials of the ski jumper
last-name
The last name of the ski jumper
full-name
The full name of the ski jumper

@lower
Optional suffix: Convert the content to lowercase.
@upper
Optional suffix: Convert the content to uppercase.

The format string may also contain free text outside the curly brackets.
Post Reply