Website Faviconnotations

Notations and some important data structures used in Habbo Hotel

View the Project on GitHub Habbianos/notations

Habbo Avatar Figure Notation (HAFN) v2.0

Table of Contents

1. Introduction

1.1. Abstract

Habbo Avatar Figure Notation (HAFN) v2 is a standard for the text-based string notation designed to represent Habbo avatar appearances using compact, dot-separated codes. Each string encodes structured data that represents figure parts, set IDs, and optional color IDs, and it is based on the data exposed by the figuredata currently available.

While HAFN v2 reflects how avatar figures are encoded in Habbo URLs and backend systems, it is not an official Sulake notation, and future changes may not be adopted by Sulake.

1.2. Scope and Intent

1.2.1. This Document

This specification exists to formalize and document how Habbo encodes avatar figure strings for rendering and customization purposes. It is:

1.2.2. The Notation

HAFN v2 is a textual representation of avatar configuration that enables:

It DOES NOT include aditional elements such as avatar actions and visual effects, as described in Section 8.

1.3. Audience

This document is aimed at developers, archivists, modders, and enthusiasts in the Habbo community working on avatar-related tools and experiences. Familiarity with string manipulation and XML parsing (for reading figuredata) is recommended.


2. Status of This Document

HAFN v2.0 defines the current known structure of Habbo avatar strings, based on the parsing behavior seen in Habbo Hotel and customizable through the figuredata file.

HAFN is community-maintained. While it matches current usage patterns, Sulake may change the format at any time. Future extensions will aim to preserve backward compatibility whenever possible.


3. Normative Language

The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in RFC 2119.


4. Conformance

An implementation is considered HAFN v2.0 compliant if it adheres to the syntax, validation logic, and resolution rules defined in this document. A conforming parser implementation:

A valid HAFN v2.0 string MUST:

  1. Follow the syntax definition in Section 5.
  2. Reference only known part types, set IDs, and color IDs defined in figuredata.
  3. Be fully validated before processing to avoid undefined or malformed avatar configurations.

5. Syntax Definition

5.1. Overview

An HAFN v2 string encodes the full appearance of a Habbo avatar. It consists of multiple figure parts, separated by dots (.). Each part encodes a type, set ID, and up to two color IDs.

5.2. Grammar

The following Extended Backus-Naur Form (EBNF) defines the syntax of HAFN v2.0:

<figure>    ::= <part> ("." <part>)*
<part>      ::= <type> "-" <setId> [ "-" <colorId1> [ "-" <colorId2> ] ]
<type>      ::= "hr" | "hd" | "ch" | "lg" | "sh" | "ea" | "cc" | ... ; (see figuredata)
<setId>     ::= <positiveInteger>
<colorId1>  ::= <positiveInteger>
<colorId2>  ::= <positiveInteger>

5.3. Lexical Constraints

Field Type Description
type String A valid part type as defined in figuredata
setId Integer A valid set ID belonging to the specified part type
colorId1 Integer A valid first color ID (MAY be required depending on the part)
colorId2 Integer A valid second color ID, OPTIONAL (for parts with two color layers)

Each part MUST match an existing set entry in the figuredata file under the corresponding <settype type="...">.

5.4. Regular Expression (Simplified)

The following regular expression can be used to validate the general structure of an HAFN v2.0 string:

(?:[a-z]{2}-\d+(?:-\d+(?:-\d+)?)?)(?:\.(?:[a-z]{2}-\d+(?:-\d+(?:-\d+)?)?))*


6. Processing Model

6.1. Dot-separated Parts

Each part is separated by a dot (.). The parser MUST:

6.2. Validation Rules

6.3. Optional Components

6.4. Error Handling

Error Code Description
ERR_UNKNOWN_TYPE type not found in current figuredata
ERR_INVALID_SETID Set ID not defined for given type
ERR_INVALID_COLOR Color ID not valid for palette used in set
ERR_FORMAT_SYNTAX Missing -, bad delimiter use, invalid part format
ERR_PART_INCOMPLETE Missing required set ID or color ID

An HAFN-compliant parser MUST reject invalid strings and report an appropriate error.


7. Example Entries

7.1. Basic Example

Consider the following example HAFN v2.0 string:

hr-890-45.hd-600-10.ch-665-1408.lg-716-1408-1408

Avatar Image of `alynva` in `hhus`

Explanation:

7.2. Complete Example

The avatar could have way more parts defined:

hr-802-37.hd-180-1.ch-3030-1408.lg-3023-64.sh-3068-1408-64.ea-1403-1408.cc-3280-64-1408.cp-3284-64

Avatar Image of `alynva` in `hhus`

Explanation:

7.3. Other Examples

Avatar Image of `alynva` in `hhbr` Avatar Image of `SweetLiah` in `hhbr` Avatar Image of `GuReiPanda` in `hhbr` Avatar Image of `sirjonasxxx` Avatar Image of `matheusferraz` in `hhbr`


8. Additional Elements

There are other aspects related to the avatar figure that are not covered by this specification, such as clothing items that uses multiple parts, avatar actions (e.g., laying, sitting, waving, dancing), and visual effects. These elements are not present in the notation itself and should be considered as purely informative in this document, they do not define or alter the notation in any way.

Below are links to relevant data sources used to compute or render these elements. Further documentation may be written to explain them in more detail:


9. Extensibility and Future Work

Future versions MAY include:

  1. Support for unknown part types with fallback rendering
  2. Named sets or mapping helpers for user-friendly representations
  3. A compressed or tokenized version of the figure string for use in URLs

Revisions to the specification SHALL be versioned appropriately, and backward compatibility MAY be maintained where possible.


10. Security Considerations

Although HAFN v2 is a textual notation and does not execute code, implementations MUST sanitize and validate input strings rigorously to prevent issues such as:

Important

HAFN v2 strings do not verify clothes or color ownership. They represent appearance only and should not be used to enforce access or ownership of figure parts.

Strict adherence to the syntax and processing guidelines is required for safe implementation.


11. References


12. Contributors

This document was developed with contributions from:


13. Changelog


14. Appendices

14.1. Appendix A. Figure Part Categories

The following table lists the currently supported two-letter identifiers used for avatar figure parts, along with their names, icons, and examples.

Category Name Category Icon Subcategory Identifier ▲ Subcategory Name Subcategory Icon Examples
Torso Torso Icon ca Jewelry (top accessories) Top Accessories Icon Top Accessories Outline Icon Jewelry 1 Jewelry 2
Torso Torso Icon cc Jackets Top Jacket Icon Top Jacket Outline Icon Jackets 1 Jackets 2
Torso Torso Icon ch Shirts Top Shirt Icon Top Shirt Outline Icon Shirts 1 Shirts 2
Torso Torso Icon cp Prints Top Prints Icon Top Prints Outline Icon Prints 1 Prints 2
Head Head Icon ea Goggles (eyewear) Head Eyewear Icon Head Eyewear Outline Icon Goggles 1 Goggles 2
Head Head Icon fa Masks (face accessories) Head Face Accessories Icon Head Face Accessories Outline Icon Masks 1 Masks 2
Head Head Icon ha Hats Head Hats Icon Head Hats Outline Icon Hats 1 Hats 2
Body Generic Icon hd Face & Body Gender Male Icon Gender Male Outline Icon Gender Female Icon Gender Female Outline Icon Face & Body 1 Face & Body 2
Head Head Icon he Accessories Head Accessories Icon Head Accessories Outline Icon Accessories 1 Accessories 2
Head Head Icon hr Hair Head Hair Icon Head Hair Outline Icon Hair 1 Hair 2
Legs Legs Icon lg Trousers Bttom Trousers Icon Bttom Trousers Outline Icon Trousers 1 Trousers 2
Legs Legs Icon sh Shoes Bottom Shoes Icon Bottom Shoes Outline Icon Shoes 1 Shoes 2
Legs Legs Icon wa Belts (bottom accessories) Bottom Accessories Icon Bottom Accessories Outline Icon Belts 1 Belts 2
⬆️ Back to top

✏️ Edit this page on GitHub