Skip to content

.ugo menu format

james edited this page Aug 1, 2016 · 13 revisions

This page is a WIP

##Overview

The .ugo format is used for certain menus (which we call "ugomenus"), and comes in a number of different styles. It's mostly used for Flipnote grids, list-style menus, and the inbox menu.

There are a number of benefits to using ugomenus over HTML pages, most notably the much lower filesize, however they also greatly reduce HTTP requests.

The documentation on this page is extended from PBSDS' research on the hatena-server wiki.

##Structure

Ugomenus always contain a plaintext menu data section, sometimes with an additional section for embedded files if required. Embeds are usually either Flipnote .tmb files (if the menu is a Flipnote grid) or .ntft icons (if it is a list-style menu).

Header

The ugomenu header follows the same structure as the other formats:

Start Length Type Description
0 4 Magic "UGAR"
4 4 uint32 LE Section count - either 1 or 2
8 4 uint32 LE Section 1 (menu data) length
12 4 uint32 LE (OPTIONAL) Section 2 (embed data) length

Menu data

Menu data is all plaintext. It contains a number of different entries (which have differing types), all separated by newlines (\n or 0x0A in hex).

Each entry contains a number of different values, the first of which is always a number telling us what type of entry it is.

Value Entry type
0 Menu type indicator
1 Top screen contents
2 Dropdown item
3 Corner button
4 Menu item

Type 0 - Menu type indicator

This type only has one extra value; a number which gives the type of menu to use.

Value Menu Type
0 List-style, with large text. Used for index.ugo.
1 List-style, small text.
2 Grid, can be used for Flipnote grids or inbox menu.
3 Same as 1.
4 Same as 0, but different icon set.

Type 1 - Top screen contents

The first value in this entry is either 0 or 1.

If it's 0, the next values are used for top screen text. All text is UTF-16 LE, encoded unto base64. In order, they are:

Meta tag equivalent Placement
uppertitle large and centred with underline
uppersubleft medium and left aligned underneath the title
uppersubright medium and right aligned underneath the title
uppersubtop small and towards the top of the screen in a box
uppersubbottom small and centred towards the bottom of the screen

But if the first value is 1, then the following value is a plaintext absolute URL to an .nbf background image, basically the equivalent to the upperlink meta tag.

*** TODO ***

Type 2 - Dropdown item

Type 3 - Corner button

Type 4 - Menu item

Hardcoded icons are as follows:

index.ugo:

Value Icon
100 Group of people
101 TV
102 Globe
103 Search
104 Frog

menu type 1 and menu type 0 when not index.ugo:

Value Icon
100 unused
101 TV
102 - 103 unused
104 Frog
105 - 112 unused
113 6 frogs
114 Person
115 Right arrow
116 Left arrow

menu type 4:

Value Icon
100 unused
101 TV
102 - 103 unused
104 Frog
105 Send
106 Frog with heart speech bubble
107 Add stars
108 Frog with frog speech bubble
109 Frog with tv speech bubble
110 Diary/book
111 Profile
112 4 frogs
113 6 frogs

menu type 2 (needs verifying):

If url not given (using .tmb embed instead):

Value Icon
0 letter with default icon
1 read flipnote thumb with text
2 letter with default icon
3 flipnote thumb with star count
4 read flipnote thumb with text

If url given:

Value Icon
0 letter with frog stamp
1 read letter without frog stamp
2 letter with frog stamp
3 letter without frog stamp

Embed data