Editing Banners with Benzin
From WADder Wiki
Contents |
Editing xmlyt files
This is designed to be a basic overview of how to edit and manipulate the various sections of data. Detailed information on each of the tags is presented in Brlyt_Documentation
Useful References - Further Reading
- Brlyt/Xmlyt
- Detailed documentation on brlyt/xmlyt files
- Information on how to flip and image, useful for reflections etc
- Brlan/Xmlan
- Detailed documentation on brlan/xmlan files
- Information on how to fine tune animation movements
- RLTP - frame animation (Advanced)
- General
- hackmii.com/2008/05/the-elusive-banner/ - good write-up by marcan
Outline Structure
The starting point to all xmlyt files looks a lot like the following. There are a few tweaks that can be made to this, but not many, and these are not required. Comments have been added and these are marked with '#'.
<?xml version="1.0"?>
<xmlyt>
<tag type="lyt1"> # LYT1 Start - defines screen resolution
<a>00000001</a>
<size>
<width>608.000000</width>
<height>456.000000</height>
</size>
</tag> # LYT1 End
<tag type="txl1"> # TXL1 Start - lists the images used in the banner
<entries>
<# REPLACE START>
<# See Texture List below>
<# REPLACE END>
</entries>
</tag> # TXL1 End
<tag type="mat1" count="0"> # MAT1 Start - defines certain properties that are applied to the images in the banner. The images were listed in TXL1 above.
<# REPLACE START>
<# See Material List below>
<# REPLACE END>
</tag> # MAT1 End
<tag type="pan1" name="RootPane"> # PAN1 Start - marks the start of the pane header
<flags>01-04</flags>
<alpha>ff-00</alpha>
<coords>
<x>0.0000000000000000</x>
<y>0.0000000000000000</y>
<z>0.0000000000000000</z>
</coords>
<flip>
<x>0.000000</x>
<y>0.000000</y>
</flip>
<rotate>0.000000</rotate>
<zoom>
<x>1.0000000000</x>
<y>1.0000000000</y>
</zoom>
<size>
<width>608.000000</width>
<height>456.000000</height>
</size>
</tag> # PAN1 End - end of the pane header, but not the end of the pane
<tag type="pas1" /> # PAS1 Start - marks the starts of the pane
<# REPLACE START>
<# See Picture List below>
<# REPLACE END>
<tag type="pae1" /> # PAS1 End (PAE1 = Pane End)
<tag type="grp1" name="RootGroup"> # GRP1 Start
<subs>
</subs>
</tag> # GRP1 End
</xmlyt>
At the moment, this xmlyt does not include any images, it is necessary to add detail to the three points (Texture, Material, Picture) in the xmlyt above that are marked by <# REPLACE>. Detail on each of these sections is presented below:
Texture List
The xmlyt starts by listing the images (TPL Textures) that are in the banner. To add/delete an image start here.
<name>Background.tpl</name>
Material List
The xmlyt then defines the materials. Materials are like sheets of paper that move around as defined in the brlan. In the materials section you give the material a name and define which tpl image sits on that material - it must be one of the images specified in txl1. To add or delete an image, also add or remove a section like this:
<entries name="BackgroundMaterial">
<colors>
<black_color>0</black_color>
<black_color>0</black_color>
<black_color>0</black_color>
<black_color>0</black_color>
<white_color>255</white_color>
<white_color>255</white_color>
<white_color>255</white_color>
<white_color>255</white_color>
<unk2>255</unk2>
<unk2>255</unk2>
<unk2>255</unk2>
<unk2>255</unk2>
<tev_k>0xffffffff</tev_k>
<tev_k>0xffffffff</tev_k>
<tev_k>0xffffffff</tev_k>
<tev_k>0xffffffff</tev_k>
</colors>
<flags>00800111</flags>
<material name="Background.tpl">
<wrap_s>00</wrap_s>
<wrap_t>00</wrap_t>
</material>
</entries>
Picture List
Next you define the attributes of the material (they are listed by material name as defined in ('mat1', . You can define the size of the image here, and also it's position on the pane. To add/remove an image from the banner you also need to add/remove a section like this:
<tag type="pic1" name="BackgroundPicture">
<flags>01-04</flags>
<alpha>ff-00</alpha>
<coords>
<x>0.00000000000000000000</x>
<y>0.00000000000000000000</y>
<z>0.00000000000000000000</z>
</coords>
<flip>
<x>0.000000</x>
<y>0.000000</y>
</flip>
<rotate>0.000000</rotate>
<zoom>
<x>1.0000000000</x>
<y>1.0000000000</y>
</zoom>
<size>
<width>256.000000</width>
<height>256.000000</height>
</size>
<tpl name="BackgroundMaterial"></tpl>
<colors>
<vtx>0xFFFFFFFF</vtx>
<vtx>0xFFFFFFFF</vtx>
<vtx>0xFFFFFFFF</vtx>
<vtx>0xFFFFFFFF</vtx>
</colors>
<coordinates>
<set>
<coord>0.000000</coord>
<coord>0.000000</coord>
<coord>1.000000</coord>
<coord>0.000000</coord>
<coord>0.000000</coord>
<coord>1.000000</coord>
<coord>1.000000</coord>
<coord>1.000000</coord>
</set>
</coordinates>
</tag>
Sample xmlyt
See a complete xmlyt here
brlan files
Specifies how to animate the items prescribed in the brlyt. There are three types:
banner_start.brlan - specifies a different animation when the banner is first opened banner_loop.brlan - specifies a repeating (looping) animation to play once the banner_start.brlan has finished banner.brlan - is like a banner_loop.brlan, but starts immediately, i.e. there is no starting animation
All of these files look identical. The filename tells the wii when to play them. there are more complicated brlan names in the disc channel to handle different animations for different scenarios (e.g. disc in / disc out), and in the System Menu you will find brlan's with random and various names.
Technical details of brlan is maintained here.
framesize
Specifies how many frames are in the animation, then it will loop again. a framesize of 60 will give approximately one second of animation.
File Description
all brlans start with a
<?xml version="1.0"?>
then there is a xmlan tag with the version of benzin used, number of frames of animation, and the flags.
<xmlan version="1.1.0BETA" framesize="7" flags="00">
then there is the name of the pane or material we are animating. This also has the type with 1 for material, and 0 for pane to animate.
<pane name="4x3" type="0">
then there is the type of animation done to the material or pane
POSSIBILITIES:
=============
RLPA - Pane Animation
RLTS - Texture Sequence ?
RLTP - Texture Pattern ?
RLVC - Vertex Colors
RLMV - Material Colors
RLVI - Vertex Index ?
example:
<tag type="RLVC">
<entry type="16">
<triplet>
<frame>0.00000000000000000000</frame>
<value>210.000000000000000000</value>
<blend>0.00000000000000000000</blend>
</triplet>
<triplet>
<frame>6.00000000000000000000</frame>
<value>0.00000000000000000000</value>
<blend>0.00000000000000000000</blend>
</triplet>
</entry>
</tag>
</pane>
</xmlan>
and that is a sample xmlan file. that is just a very simple example.
DISCLAIMER
THE FOLLOWING LISTS ARE SUBJECT TO CHANGE WITH UPDATES TO BENZIN. THIS IS SO THAT THEY CAN HAVE MORE USEFUL NAMES AND DESCRIPTIONS.
Detailed Description
now we'll try to explain a little more. RLTP, RLPA, RLTS, RLVC, RLVI currently all use the same entry type list
"X Translation" "Y Translation" "Z Translation" "X Flip" "Y Flip" "Angle" "X Zoom" "Y Zoom" "Width" "Height" "0x0A" "0x0B" "0x0C" "0x0D" "0x0E" "0x0F"
the items in this list are mainly to do with RLPA. the other types just use this list
RLMC has gotten it's own list as it has certain attributes
"0x00" "0x01" "0x02" "0x03" "Blackcolor R" "Blackcolor G" "Blackcolor B" "Blackcolor A" "Whitecolor R" "Whitecolor G" "Whitecolor B" "Whitecolor A" "0x0C" "0x0D" "0x0E" "0x0F"
unfortunately the numbered ones in this list have not yielded results that I have been told yet.
RLVC has been given it's own list now too
"Top Left R" "Top Left G" "Top Left B" "Top Left A" "Top Right R" "Top Right G" "Top Right B" "Top Right A" "Bottom Left R" "Bottom Left G" "Bottom Left B" "Bottom Left A" "Bottom Right R" "Bottom Right G" "Bottom Right B" "Bottom Right A" "16" == Alpha Transparency for whole image
these are the colors for the different corners of the pic1 section
Sample xmlan
<?xml version="1.0"?>
<xmlan framesize="60" flags="01">
<pane name="SpinMat" type="0">
<tag type="RLPA">
<entry type="Angle">
<triplet>
<frame>0.000000000000000</frame>
<value>-360.000000000000000</value>
<blend>-6.000000000000000</blend>
</triplet>
<triplet>
<frame>60.000000000000000</frame>
<value>-720.000000000000000</value>
<blend>-6.000000000000000</blend>
</triplet>
</entry>
</tag>
</pane>
</xmlan>
