BLO file

From Pikmin Technical Knowledge Base
Revision as of 18:01, 15 February 2019 by PikHacker (talk | contribs) (thanks Ambrosia)
Jump to navigation Jump to search

Types of BLO

A blo file is used by several nintendo games such as Pikmin, Pikmin 2, Super Mario Sunshine, and Wind Waker to control screen data, such as which sprites appear and where. The main issue though, is that there are 3 types of blo, scrnblo1 (which Sunshine and Wind Waker use), scrnblo2 (which Pikmin 2 uses), and another format used by pikmin 1, sometimes called scrnblo0. There are several differences between them and they cant just be swapped. This page will focus on scrnblo2, so information here wont apply much for other blo types. Pikmin 2 blos are found in root/new_screen/eng/*screen szs*/screen"

TEX1

The first main segment of a blo2 file, this is where the game loads BTI textures in root/new_screen/eng/*screen szs*/timg". You can change these names, and possibly add or remove entries. At 0x11 from the start of TEX1, is the number of textures to load, so remember that if you try it. That being said, this probably isnt what you would want to edit. The important stuff is the PAN2 segments described below

FNT1

This is very similar to the last segment, but for loading fonts. In Pikmin 2, this only ever loads piki2_font00.bfn which is strange as that is not the file name of the used font. I'm not exactly sure how this all works, but you shouldnt have to mess with it.

MAT1

This segment creates screen "objects" with internal names that the game uses to control them. Its by far the biggest segment of the blo, but most of it seems to be some sort of padding.The important part is where the names of the materials are listed. They always follow the naming convention of mat_name_v. Unfortunately, the developers didn't make the names easy to identify.


PAN2

This segment acts like a group, it holds many pic2and tbx2 segments together so you can easily move a whole object as one piece. There is always one called ROOT in every blo, and usually some more. Every PIC2 segment has "pan2" in it, so dont get confused by that. Here are offsets for stuff you can do with a PAN2 group.
0x12 The name of the material being controlled.
0x20 2 floats representing x and y something. Dont seems to do anything.
0x28 2 floats representing x and y scale. Usually 1.
0x3C 2 floats representing x and y coordinates relative to root.
They seem to always end with a BGN1, but I'm not sure what its for.

PIC2

This is very similar to the last segment, but for an individual sprite object. They are notably longer than PAN2 segments. You probably shouldn't change their parameters if you have the option to edit their whole PAN2 segment instead. Heres some info about them:
0x07 string for pan2, could be what connects the single pic2 to a pan2.
0x19 Name of material being edited, its likes to have "RE" before it, but thats not part of the name.
0x28 2 more floats, again not sure what they do.
0x30 x and y scale
0x45 x and y coordinates relative to PAN2 entry
After that is some data I dont get then a whole row of FFs.


TBX2

These are a lot like PIC2, and are also part of a PAN2. The difference is they write text using the loaded font.
0x07 string for pan2, could be what connects the single tbx2 to a pan2.
0x1A internal name of material being used.
0x21 text ID used. The developers like to put placeholder text IDs here when the screen could show multiple messages, so its only really works for fully static text.
0x27 x and y coordinates?
0x30 x and y scale
0x43 more x and y stuff.
After that is some random data, followed by the text itself, in an early version where things like color and size change and text box terminators are called by their internal names. Can show early scripts of the games text in some areas.


Ending

After the last PIC2 or TBX2 is multiple END1 and an EXT1 with padding to align it. If theres anything i need to correct, let me know on the Discord. Thanks for Reading! PikHacker