Jump to content

Nn::mii::CharInfo: Difference between revisions

From Mii Technical Wiki
No edit summary
No edit summary
Line 1: Line 1:
This is the [[Mii Character Data|Mii data format]] used on [[nn::mii|Nintendo Switch]] and later.
This is the [[Mii Character Data|Mii data format]] used on [[nn::mii|Nintendo Switch]] and later.
== Struct Pattern ==
== Struct Pattern ==
This sample is in the ImHex Pattern<ref>https://imhex.werwolv.net/</ref> format.<syntaxhighlight lang="c">
{| class="wikitable mw-collapsible"
|+
!Offset
!Data Type
!Name
!Notes
|-
|0x0
|u8[16]
|create_id
|Crc?
|-
|0x10
|u16[11]
|nickname
|Null terminated
|-
|0x26
|u8
|font
|
|-
|0x27
|u8
|favorite_color
|[[Favorite Color Table]] index
|-
|0x28
|u8
|gender
|0 = male
1 = female
|-
|0x29
|u8
|height
|
|-
|0x2A
|u8
|build
|"weight"
|-
|0x2B
|u8
|type
|?
|-
|0x2C
|u8
|region_move
|?
|-
|0x2D
|u8
|faceline_type
|[[Faceline]] type index
|-
|0x2E
|u8
|faceline_color
|[[Common Color Table]] index(?)
|-
|0x2F
|u8
|faceline_wrinkle
|[[Faceline]] wrinkle index
|-
|0x30
|u8
|faceline_make
|[[Faceline]] makeup index
|-
|0x31
|u8
|hair_type
|[[Hair]] type index
|-
|0x32
|u8
|hair_color
|[[Common Color Table]] index(?)
|-
|0x33
|u8
|hair_flip
|Boolean, [[Hair]] y-flip
|-
|0x34
|u8
|eye_type
|[[Eye]] type index
|-
|0x35
|u8
|eye_type
|[[Common Color Table]] index(?)
Main indices are [x,y,z, etc]
|-
|0x36
|u8
|eye_scale
|[[Eye]] x and y scale
|-
|0x37
|u8
|eye_aspect
|[[Eye]] y scale
|-
|0x38
|u8
|eye_rotate
|[[Eye]] rotation
|-
|0x39
|u8
|eye_x
|[[Eye]] x position
|-
|0x3A
|u8
|eye_y
|[[Eye]] y position
|-
|..
|u8
|eyebrow_type
|
|-
|..
|u8
|eyebrow_color
|
|-
|..
|u8
|eyebrow_scale
|
|-
|..
|u8
|eyebrow_aspect
|
|-
|..
|u8
|eyebrow_rotate
|
|-
|..
|u8
|nose_type
|
|-
|..
|u8
|nose_scale
|
|-
|..
|u8
|nose_y
|
|-
|..
|u8
|mouth_type
|
|-
|..
|u8
|mouth_color
|
|-
|..
|u8
|mouth_scale
|
|-
|..
|u8
|mouth_aspect
|
|-
|..
|u8
|mouth_y
|
|-
|..
|u8
|beard_color
|
|-
|..
|u8
|beard_type
|
|-
|..
|u8
|mustache_type
|
|-
|..
|u8
|mustache_scale
|
|-
|..
|u8
|mustache_y
|
|-
|..
|u8
|glass_type
|[[Glass]]
|-
|..
|u8
|glass_color
|[[Glass]]
|-
|..
|u8
|glass_scale
|[[Glass]]
|-
|..
|u8
|glass_y
|[[Glass]]
|-
|..
|u8
|mole_type
|
|-
|..
|u8
|mole_scale
|
|-
|..
|u8
|mole_x
|
|-
|..
|u8
|mole_y
|
|-
|..
|u8
|reverved
|always 0?
|}
 
Above table is derived from below sample.
 
This sample is in the ImHex Pattern<ref>https://imhex.werwolv.net/</ref> format.
 
<syntaxhighlight lang="c">
struct Mii {
struct Mii {
     u8 create_id[16];
     u8 create_id[16];

Revision as of 20:42, 23 September 2025

This is the Mii data format used on Nintendo Switch and later.

Struct Pattern

Offset Data Type Name Notes
0x0 u8[16] create_id Crc?
0x10 u16[11] nickname Null terminated
0x26 u8 font
0x27 u8 favorite_color Favorite Color Table index
0x28 u8 gender 0 = male

1 = female

0x29 u8 height
0x2A u8 build "weight"
0x2B u8 type ?
0x2C u8 region_move ?
0x2D u8 faceline_type Faceline type index
0x2E u8 faceline_color Common Color Table index(?)
0x2F u8 faceline_wrinkle Faceline wrinkle index
0x30 u8 faceline_make Faceline makeup index
0x31 u8 hair_type Hair type index
0x32 u8 hair_color Common Color Table index(?)
0x33 u8 hair_flip Boolean, Hair y-flip
0x34 u8 eye_type Eye type index
0x35 u8 eye_type Common Color Table index(?)

Main indices are [x,y,z, etc]

0x36 u8 eye_scale Eye x and y scale
0x37 u8 eye_aspect Eye y scale
0x38 u8 eye_rotate Eye rotation
0x39 u8 eye_x Eye x position
0x3A u8 eye_y Eye y position
.. u8 eyebrow_type
.. u8 eyebrow_color
.. u8 eyebrow_scale
.. u8 eyebrow_aspect
.. u8 eyebrow_rotate
.. u8 nose_type
.. u8 nose_scale
.. u8 nose_y
.. u8 mouth_type
.. u8 mouth_color
.. u8 mouth_scale
.. u8 mouth_aspect
.. u8 mouth_y
.. u8 beard_color
.. u8 beard_type
.. u8 mustache_type
.. u8 mustache_scale
.. u8 mustache_y
.. u8 glass_type Glass
.. u8 glass_color Glass
.. u8 glass_scale Glass
.. u8 glass_y Glass
.. u8 mole_type
.. u8 mole_scale
.. u8 mole_x
.. u8 mole_y
.. u8 reverved always 0?

Above table is derived from below sample.

This sample is in the ImHex Pattern[1] format.

struct Mii {
    u8 create_id[16];
    u16 nick[11];
    u8 font;
    u8 col;
    u8 gend;
    u8 height;
    u8 build;
    u8 type; // Special or not
    u8 region_move;
    u8 faceline_type;
    u8 faceline_color;
    u8 faceline_wrinkle;
    u8 faceline_make;
    u8 hair_type;
    u8 hair_color;
    u8 hair_flip;
    u8 eye_type;
    u8 eye_color;
    u8 eye_scale;
    u8 eye_aspect;
    u8 eye_rotate;
    u8 eye_x;
    u8 eye_y;
    u8 eyebrow_type;
    u8 eyebrow_color;
    u8 eyebrow_scale;
    u8 eyebrow_aspect;
    u8 eyebrow_rotate;
    u8 eyebrow_x;
    u8 eyebrow_y;
    u8 nose_type;
    u8 nose_scale;
    u8 nose_y;
    u8 mouth_type;
    u8 mouth_color;
    u8 mouth_scale;
    u8 mouth_aspect;
    u8 mouth_y;
    u8 beard_color;
    u8 beard_type;
    u8 mustache_type;
    u8 mustache_scale;
    u8 mustache_y;
    u8 glass_type;
    u8 glass_color;
    u8 glass_scale;
    u8 glass_y;
    u8 mole_type;
    u8 mole_scale;
    u8 mole_x;
    u8 mole_y;
    u8 reserved; /* always zero */
};

Mii mii_at_0x00 @ 0x00;

In codebases

  1. Vee Face Library (Unofficial)

References