[TUTO] Make your own MIX Template - Universal-Rom-Tools/Universal-XML-Scraper GitHub Wiki

It's time to explain you how it works ^^

So, Template are Zip File. The Zip file must contain :

  • config.ini : The file with the different information to download
  • exemple.png (optionnal) : An exemple of what render your MIX Template. It must be in 800x200 and have on the left side a render with no data scraped (it may be empty) and on the right side the render of a full scraped picture.
  • Some files (optionnal) : Local picture you need to add in your Template, they are the "Fixe" image.

Now the config.ini :

Header part :

  • [MIX_IMG] : It's a "tag" I need, always start by that.
  • $MIX_IMG_NAME : Your Zip file name without the extension (ex : Arcade (moon) for Arcade (moon).zip
  • $MIX_IMG_EXEMPLE : Normaly : exemple.png It's the file name of your exemple picture
  • $MIX_IMG_CIBLE_X : Width of you Final picture (If you specify a size in the UXS Configuration windows, it "overwrite" this value)
  • $MIX_IMG_CIBLE_Y : Width of you Final picture (If you specify a size in the UXS Configuration windows, it "overwrite" this value)
  • $MIX_IMG_NBIMG : Number of element in the picture (I explain what is an element just after ;) )
  • $MIX_IMGx_SOURCE_y : Finally the Elements...

All these "tags" aren't optionnal... If one or more missing it can crash your template (and make your computer burn in hell ^^)

Elements part :

This is an element : $MIX_IMG1_SOURCE_1 = 'screenTEMP|GameMAX|medias/media_screenshot|path:image|%0.9|%0.85|CENTER|UP'

An "Element" have several "attributs", This is a list of all the attributs and what you can put in it ;) For information there is 2 Types of Elements : The Picture Elements, who have a picture. And the Fonction Elements, who apply a modification to the Picture Elements.

  • Attribut 1 : The name

It's the name of the attribut (And the name of the temporary picture before the mix). Easy. But it have a fonction. If you give the same name to 2 Elements, only one will work. Why ? It's to make a "priority" in the media you put in your MIX. Exemple : I want a 3D box, but if there is no 3D box I want a Screenshot instead. Easy, put 2 Elements with the same name. First one is for the 3D Box and second one for the Screenshot. When UXS Try to download the screenshot, it check if there isn't already a picture with this name. If it's the case it skip the screenshot.

  • Attribut 2 : The Type

It's the attribut who say to UXS what to do.. You can have several Type, this is the list

  • Game : It download a scraped Media from the game (the sort of the media is in the 3rd Attribut ;) )
  • GameMAX : The same, but it maximize the size of the Media to feet, at least, one of the 2 dimensions without breaking the ratio (See the Exemple part)
  • Syst : It download a scraped Media from the system selected
  • SystMAX : The same, but it maximize the size of the Media like GameMAX
  • Fixe : It take a "local" Media you put in your template (The filename of the media is in the 3rd Attribut)
  • FixeMAX : Again Resizing the Media Like GameMAX or SystMAX
  • Trans : It apply a transparancy to the Picture Element just before this one. The Format is : Trans:0.85 (0 is totaly transparent, 1 is Full opacity)
  • Fus : It merge the last 2 Picture Elements. Why ? Instead of apply a transparency to 2 successiv elements, you can merge them and apply the transparency. It works too with the Cut attribut.
  • cut : It cut a hole in the Picture Element just before this one. (The size and position of the hole is precised after ;) )

This is all the type you can use. Take care of the Elements Order. It define the Z-Order of your final picture and the Function Type work with the Elements just Before.

  • Attribut 3 : The Path

This where you put what you want ^^
For a Fixe Element, simply put the filename of the Local Picture (present in your zipfile)
For a Scraped Element, this is the list of what you can have WEBAPI From Screenscraper
For Game you found them in the jeuInfos.php Part. And the format is like medias/media_boxs/media_boxs3d/media_box3d_eu
For Syst you found them in the systemesListe.php Part. And the format is like medias/media_photos/media_photo_eu

When you have differentes country Available (Like fr/eu/us/jp) You can put a %% instead like medias/media_boxs/media_boxs3d/media_box3d_%%
It use the language configuration of UXS to catch the good one with priority.
Exemple : In English the priority list is : us|origine|eu|es|fr|de|pt|jp|xx
So if he can't found a US Media, he try a ORIGINE Media, and a EU Media, and so on...

If you Use a Fonction Element, you can let this Empty

  • Attribut 4 : The path:image

This one is really easy ;) NEVER CHANGE IT ^^ it's always path:image

  • Attribut 5 and 6 : The Size

The size Is 2 Thing : The size the media will be downloaded and the size the media have in your Mix. Attribut 5 is the width and 6 is the height.
It can be :
A Statique value like 100 who mean 100Pix
A Relative Value like %0.5 who mean 50% of the final Picture. (Exemple you Final picture is in 800x600, the Element is in %0.5|%0.5 so it will be in 400x300)
A Empty value like... Bah Like nothing ^^ it's empty :p
The Empty value can do 2 things : If both are empty, it download the picture in his original size (so it's depending of the media). It can be usefull if you deforme the media (see after how) to keep the best quality.
If just one is missing, it adjust the second one to keep the ratio. (Exemple, the original size is 800x600, The Element is |300 so the image size will be 400x300)
If you use Relative value and empty value take care of your Math ;)

  • Attribut 7 and 8 : The upper left corner position

It define the first position of the Element. The upper left corner of your media.
Attribut 7 is the X position and 8 is the Y position.
It can be :
A Statique value like 100 who mean 100Pix from the upper left corner of your final picture.
A Relative Value like %0.5 who mean 50% of the final Picture so the center.
For the Attribut 7 it can be :
CENTER who calculate with the image dimension to be in the center of the final picture
LEFT to be on the left of the final picture
RIGHT to be on the right of the final picture
For the Attribut 8 it can be
CENTER who calculate with the image dimension to be in the center of the final picture
UP to be on the top of the final picture
DOWN to be on the bottom of the final picture

  • Attribut 9 and 10 : The upper right corner position

These attribut are optionnal. If you put nothing here, it use the Size of the Media to calculate the position.
But if you want to deforme the media (like a picture un diagonal) you can put information here.
They are the same as the 7 and 8 Attributs

There also an option here.
If you put ROTATION in the 9th attribut, you can do a rotation to you picture.
You put the type of rotation in the 10th attribut :
Type of rotation and flip:
0 - No rotation and no flipping (A 180-degree rotation, a horizontal flip and then a vertical flip)
1 - A 90-degree rotation without flipping (A 270-degree rotation, a horizontal flip and then a vertical flip)
2 - A 180-degree rotation without flipping (No rotation, a horizontal flip followed by a vertical flip)
3 - A 270-degree rotation without flipping (A 90-degree rotation, a horizontal flip and then a vertical flip)
4 - No rotation and a horizontal flip (A 180-degree rotation followed by a vertical flip)
5 - A 90-degree rotation followed by a horizontal flip (A 270-degree rotation followed by a vertical flip)
6 - A 180-degree rotation followed by a horizontal flip (No rotation and a vertical flip)
7 - A 270-degree rotation followed by a horizontal flip (A 90-degree rotation followed by a vertical flip)

  • Attribut 11 and 12 : The downer left corner position

Exactly the same as the 9th and 10th attribut except for the rotation.

And voila ^^

Here are some Exemple