miijs 1.7.1 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -7
- package/index.js +357 -63
- package/package.json +35 -35
package/README.md
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
# MiiJS
|
|
2
2
|
Read, Edit, Write, and make Special Miis from a Wiimote binary file or 3DS QR Code to a binary file or QR code
|
|
3
3
|
|
|
4
|
+
|
|
5
|
+
Note: The 3DS and Wii U do the same things with Miis. The Wii U does not however support Special Miis, and so 3DS is the name used for the 3DS/Wii U generation of Miis throughout this project. However, as long as you are not hoping to use Special Miis on the Wii U, as it cannot, the **3DS and Wii U are completely interchangeable** as far as Miis go otherwise.
|
|
6
|
+
|
|
4
7
|
## Installation
|
|
5
8
|
`npm i miijs` OR `npm install miijs`
|
|
6
9
|
|
|
7
10
|
## Making a Special Mii
|
|
8
11
|
To make a special Mii, read in the file using the appropriate function, set `mii.info.type="Special";`, and then write a new file with the appropriate function.
|
|
12
|
+
-# The Wii U does not support Special Miis.
|
|
9
13
|
|
|
10
14
|
# Functions
|
|
11
15
|
- async read3DSQR(pathToQR), returns JSON
|
|
@@ -14,21 +18,31 @@ To make a special Mii, read in the file using the appropriate function, set `mii
|
|
|
14
18
|
- writeWiiBin(miiJSON, path), writes new bin to the path specified
|
|
15
19
|
- render3DSMiiFromJSON(miiJSON, path), writes PNG representation of Mii's face to the path specified
|
|
16
20
|
- convertMii(miiJson, whatConsoleItIsForOriginallly ("3ds" or "wii")), converts the Mii JSON format
|
|
21
|
+
- generateInstructions(miiJson, whatConsoleTheMiiIsFor, fullInstructions), returns a JSON object of different instruction fields. If full is not set, only the instructions that differ from a default Mii will be returned.
|
|
17
22
|
|
|
18
|
-
|
|
19
|
-
All of these discrepancies
|
|
23
|
+
## Discrepancies in `convertMii` function
|
|
24
|
+
All of these discrepancies __only__ apply when converting from the **3DS to the Wii**, converting from the Wii to the 3DS should be a perfect conversion.
|
|
20
25
|
There is a reason that the Wii supports sending Miis to the 3DS, but not vice versa. Many of the fields on the 3DS are new, and not present on the Wii. This function does its absolute best to backport 3DS Miis, but it *is not perfect and never will be*. If you rely heavily on 3DS exclusive options in your Mii, the outputted Mii will likely not be satisfactory.
|
|
21
26
|
|
|
22
27
|
Here is a list of discrepancies this function attempts to handle.
|
|
23
|
-
- The 3DS has four more face shapes, thus some are converted to the closest possible for the Wii
|
|
24
|
-
- The 3DS allows you to set Makeup and Wrinkles
|
|
25
|
-
- The 3DS has 6 extra nose types, all on the second page - these are mapped to similar noses on the first page that the Wii has
|
|
28
|
+
- The 3DS has four more face shapes, thus some are converted to the closest possible for the Wii.
|
|
29
|
+
- The 3DS allows you to set Makeup and Wrinkles seperately, as well as having 7 more "makeup" (including beard shadow and freckles) types and 5 more wrinkle types. This is probably one of the messiest conversions since one field has to be ignored entirely if both are set. Since the 3DS has some that are not even close to anything the Wii has, it will ignore these if the other field is set, allowing for the other field to be added in its place, prioritizing wrinkles over makeup. The outputted Mii will almost certainly require further editing to be satisfactory if these fields are used.
|
|
30
|
+
- The 3DS has 6 extra nose types, all on the second page - these are mapped to similar noses on the first page that the Wii has.
|
|
26
31
|
- The 3DS has an extra page of mouth types containing 12 extra mouth types. These are mapped to similar mouths on the other two pages that the Wii supports.
|
|
27
32
|
- The 3DS has two extra lip colors. These are changed into the default Orangey lip color if used since both of the extra colors are closest to this.
|
|
28
33
|
- The Wii does not have the option to "squish" parts to be thinner. This function ignores this field as a result.
|
|
29
|
-
- The 3DS has 60 extra hairstyles. These are mapped to hairstyles the Wii does have
|
|
34
|
+
- The 3DS has 60 extra hairstyles. These are mapped to hairstyles the Wii does have. This will not be a perfect conversion and has a decent chance of needing a manual change.
|
|
30
35
|
- The 3DS has an extra page of eye types that the Wii does not, which the function maps to a similar eye type that the Wii does support if used. Will likely require a manual edit.
|
|
31
36
|
- The 3DS has two extra mustaches and two extra beards. These are mapped to a similar beard or mustache if used - the two extra beards will likely need a manual change if used.
|
|
32
37
|
|
|
38
|
+
## Transferring Miis to and from the System
|
|
39
|
+
- Wii
|
|
40
|
+
- Method 1 (Recommended, doesn't require homebrew): Connect the Wiimote to your PC, Dolphin seems to be the easiest way to do so though there are some more difficult ways to do so, and use [WDMLMiiTransfer](https://sourceforge.net/projects/wdml/files/WDML%20-%20MiiTransfer/). Open the `readSlotX.bat` file for the slot you're trying to read from (Array notation, 0=1, 1=2, 2=3, and so on). The Mii will be in the same directory under the name `miiX.mii`, where X is the same number as the readSlot you opened. If you used `readSlotAll.bat`, then there will be 10 Miis (0-9) in the directory. Note that if no Mii was ever present in that slot ever on the Wiimote, it will still output a `miiX.mii` file, though it will not contain the Mii data correctly. To write to the Wiimote, make sure the Mii you're writing is in the same directory and named `miiX.mii`, where X is the slot you're writing to, and open `writeSlotX.bat`, where X is the slot you're writing to (in array notation). You can transfer Miis on and off the Wiimote from the Wii by using the Wiimote icon in the top right of Mii Maker.
|
|
41
|
+
- Method 2 (Requires Homebrew, is untested by me): [Mii Installer](https://wiibrew.org/wiki/Mii_Installer) for writing from the SD card to the Wii, and [Mii Extractor](https://wiibrew.org/wiki/Mii_Extractor) for reading from the Wii.
|
|
42
|
+
- 3DS and Wii U
|
|
43
|
+
- Open Mii Maker, select "QR Code/Image Options", and then select the respective QR Code option, be it scanning a QR code or saving a Mii as a QR code.
|
|
44
|
+
|
|
45
|
+
-# If you are unable to transfer to the console you wish to, you can use the `generateInstructions` function provided here and manually recreate the Mii on the console using the provided instructions.
|
|
46
|
+
|
|
33
47
|
# Credits
|
|
34
|
-
- [kazuki-4ys' MiiInfoEditorCTR](https://github.com/kazuki-4ys/kazuki-4ys.github.io/tree/master/web_apps/MiiInfoEditorCTR), I
|
|
48
|
+
- [kazuki-4ys' MiiInfoEditorCTR](https://github.com/kazuki-4ys/kazuki-4ys.github.io/tree/master/web_apps/MiiInfoEditorCTR), I repurposed how to decrypt and reencrypt the QR codes from here, including repurposing the asmCrypto.js file in its entirety with very small modifications. I believe I also modified the code for rendering the Mii using Nintendo's Mii Studio from here as well, though I do not remember for certain.
|
package/index.js
CHANGED
|
@@ -82,12 +82,12 @@ function downloadImage(url, filepath) {
|
|
|
82
82
|
});
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
|
-
var
|
|
85
|
+
var favCols=["Red","Orange","Yellow","Lime","Green","Blue","Cyan","Pink","Purple","Brown","White","Black"];
|
|
86
|
+
var skinCols=["White","Tanned White","Darker White","Tanned Darker","Mostly Black","Black"];
|
|
87
|
+
var hairCols=["Black","Brown","Red","Reddish Brown","Grey","Light Brown","Dark Blonde","Blonde"];
|
|
88
|
+
var eyeCols=["Black","Grey","Brown","Lime","Blue","Green"];
|
|
86
89
|
var wiiFaceFeatures=["None","Blush","Makeup and Blush","Freckles","Bags","Wrinkles on Cheeks","Wrinkles near Eyes","Chin Wrinkle","Makeup","Stubble","Wrinkles near Mouth","Wrinkles"];
|
|
87
|
-
var wiiSkinColors=["White","Tanned White","Darker Skin","Tanned Darker","Mostly Black","Black"];
|
|
88
90
|
var wiiMouthColors=["Peach","Red","Pink"];
|
|
89
|
-
var wiiHairCols=["Black","Brown","Red","Reddish Brown","Grey","Light Brown","Dark Blonde","Blonde"];
|
|
90
|
-
var wiiEyeCols=["Black","Grey","Brown","Lime","Blue","Green"];
|
|
91
91
|
var wiiGlassesCols=["Grey","Brown","Red","Blue","Yellow","White"];
|
|
92
92
|
var wiiNoses={
|
|
93
93
|
'0': 1,
|
|
@@ -279,12 +279,8 @@ var hairTable={
|
|
|
279
279
|
'70': '132',
|
|
280
280
|
'71': '633'
|
|
281
281
|
};
|
|
282
|
-
var cols3DS=["Red","Orange","Yellow","Lime","Green","Blue","Cyan","Pink","Purple","Brown","White","Black"];
|
|
283
|
-
var skinCols3DS=["White","Tanned White","Darker White","Tanned Darker","Mostly Black","Black"];
|
|
284
282
|
var faceFeatures3DS=["None","Near Eye Creases","Cheek Creases","Far Eye Creases","Near Nose Creases","Giant Bags","Cleft Chin","Chin Crease","Sunken Eyes","Far Cheek Creases","Lines Near Eyes","Wrinkles"];
|
|
285
283
|
var makeups3DS=["None","Blush","Orange Blush","Blue Eyes","Blush 2","Orange Blush 2","Blue Eyes and Blush","Orange Eyes and Blush","Purple Eyes and Blush 2","Freckles","Beard Stubble","Beard and Mustache Stubble"];
|
|
286
|
-
var eyeCols3DS=["Black","Grey","Brown","Lime","Blue","Green"];
|
|
287
|
-
var hairCols3DS=["Black","Brown","Red","Reddish Brown","Grey","Light Brown","Dark Blonde","Blonde"];
|
|
288
284
|
var mouthCols3DS=["Orange","Red","Pink","Peach","Black"];
|
|
289
285
|
var glassesCols3DS=["Black","Brown","Red","Blue","Yellow","Grey"];
|
|
290
286
|
|
|
@@ -882,6 +878,188 @@ var kidNames={
|
|
|
882
878
|
"Taylor"
|
|
883
879
|
]
|
|
884
880
|
};
|
|
881
|
+
var defaultInstrs={
|
|
882
|
+
wii:{
|
|
883
|
+
male:{
|
|
884
|
+
"col": "On the info page (first tab), set the Favorite Color to Red (1 from the left, top row).",
|
|
885
|
+
"heightWeight": "On the build page (second tab), set the height to 50%, and the weight to 50%.",
|
|
886
|
+
"faceShape": "On the face page (third tab), set the shape to the one 1 from the top, in the left column.",
|
|
887
|
+
"skinCol": "On the face page (third tab), set the color to the one 1 from the left, on the top row.",
|
|
888
|
+
"makeup": "On the face page's makeup tab, set the makeup to \"None\" (the one 1 from the top, and 1 from the left).",
|
|
889
|
+
"hairStyle": "On the hair page (fourth tab), set the hair style to the one 1 from the left, 1 from the top, on page 1.",
|
|
890
|
+
"hairFlipped": "",
|
|
891
|
+
"hairColor": "On the hair page (fourth tab), set the hair color to the one 2 from the left, on the top row.",
|
|
892
|
+
"eyebrowStyle": "On the eyebrow page (fifth tab), set the eyebrow style to the one 1 from the left, 1 from the top, on page 1.",
|
|
893
|
+
"eyebrowColor": "On the eyebrow page (fifth tab), set the eyebrow color to the one 2 from the left, on the top row.",
|
|
894
|
+
"eyebrowY": "",
|
|
895
|
+
"eyebrowSize": "",
|
|
896
|
+
"eyebrowRot": "",
|
|
897
|
+
"eyebrowDist": "",
|
|
898
|
+
"eyeType": "On the eye page (sixth tab), set the eye type to the one 1 from the left, 1 from the top, on page 1.",
|
|
899
|
+
"eyeColor": "On the eye page (sixth tab), set the color to the one 1 from the left, on the top row.",
|
|
900
|
+
"eyeY": "",
|
|
901
|
+
"eyeSize": "",
|
|
902
|
+
"eyeRot": "",
|
|
903
|
+
"eyeDist": "",
|
|
904
|
+
"noseType": "On the nose page (seventh tab), set the nose to the one 1 from the top, and 1 from the left.",
|
|
905
|
+
"noseY": "",
|
|
906
|
+
"noseSize": "",
|
|
907
|
+
"mouthType": "On the mouth page (eighth tab), set the mouth type to the one 1 from the left, 1 from the top, on page 1.",
|
|
908
|
+
"mouthCol": "On the mouth page (eighth tab), set the color to the one 1 from the left.",
|
|
909
|
+
"mouthY": "",
|
|
910
|
+
"mouthSize": "",
|
|
911
|
+
"glasses": "On the glasses page (within the ninth tab), set the glasses to the one 1 from the top, and 1 from the left.",
|
|
912
|
+
"glassesCol": "On the glasses page (within the ninth tab), set the color to the one 1 from the left, on the top row.",
|
|
913
|
+
"glassesY": "",
|
|
914
|
+
"glassesSize": "",
|
|
915
|
+
"stache": "On the mustache page (within the ninth tab), set the mustache to the one on the top-left.",
|
|
916
|
+
"stacheY": "",
|
|
917
|
+
"stacheSize": "",
|
|
918
|
+
"mole": "",
|
|
919
|
+
"moleX": "",
|
|
920
|
+
"moleY": "",
|
|
921
|
+
"moleSize": "",
|
|
922
|
+
"beard": "On the beard page (within the ninth tab), set the beard to the one on the top-left.",
|
|
923
|
+
"beardCol": "On the mustache OR beard pages (within the ninth tab), set the color to the one 1 from the left, on the top row."
|
|
924
|
+
},
|
|
925
|
+
female:{
|
|
926
|
+
"col": "On the info page (first tab), set the Favorite Color to Red (1 from the left, top row).",
|
|
927
|
+
"heightWeight": "On the build page (second tab), set the height to 50%, and the weight to 50%.",
|
|
928
|
+
"faceShape": "On the face page (third tab), set the shape to the one 1 from the top, in the left column.",
|
|
929
|
+
"skinCol": "On the face page (third tab), set the color to the one 1 from the left, on the top row.",
|
|
930
|
+
"makeup": "On the face page's makeup tab, set the makeup to \"None\" (the one 1 from the top, and 1 from the left).",
|
|
931
|
+
"hairStyle": "On the hair page (fourth tab), set the hair style to the one 1 from the left, 1 from the top, on page 4.",
|
|
932
|
+
"hairFlipped": "",
|
|
933
|
+
"hairColor": "On the hair page (fourth tab), set the hair color to the one 2 from the left, on the top row.",
|
|
934
|
+
"eyebrowStyle": "On the eyebrow page (fifth tab), set the eyebrow style to the one 2 from the left, 1 from the top, on page 1.",
|
|
935
|
+
"eyebrowColor": "On the eyebrow page (fifth tab), set the eyebrow color to the one 2 from the left, on the top row.",
|
|
936
|
+
"eyebrowY": "",
|
|
937
|
+
"eyebrowSize": "",
|
|
938
|
+
"eyebrowRot": "",
|
|
939
|
+
"eyebrowDist": "",
|
|
940
|
+
"eyeType": "On the eye page (sixth tab), set the eye type to the one 2 from the left, 1 from the top, on page 1.",
|
|
941
|
+
"eyeColor": "On the eye page (sixth tab), set the color to the one 1 from the left, on the top row.",
|
|
942
|
+
"eyeY": "",
|
|
943
|
+
"eyeSize": "",
|
|
944
|
+
"eyeRot": "On the eye page (sixth tab), press the rotate clockwise button 1 times.",
|
|
945
|
+
"eyeDist": "",
|
|
946
|
+
"noseType": "On the nose page (seventh tab), set the nose to the one 0 from the top, and 1 from the left.",
|
|
947
|
+
"noseY": "",
|
|
948
|
+
"noseSize": "",
|
|
949
|
+
"mouthType": "On the mouth page (eighth tab), set the mouth type to the one 1 from the left, 1 from the top, on page 1.",
|
|
950
|
+
"mouthCol": "On the mouth page (eighth tab), set the color to the one 1 from the left.",
|
|
951
|
+
"mouthY": "",
|
|
952
|
+
"mouthSize": "",
|
|
953
|
+
"glasses": "On the glasses page (within the ninth tab), set the glasses to the one 1 from the top, and 1 from the left.",
|
|
954
|
+
"glassesCol": "On the glasses page (within the ninth tab), set the color to the one 1 from the left, on the top row.",
|
|
955
|
+
"glassesY": "",
|
|
956
|
+
"glassesSize": "",
|
|
957
|
+
"stache": "On the mustache page (within the ninth tab), set the mustache to the one on the top-left.",
|
|
958
|
+
"stacheY": "",
|
|
959
|
+
"stacheSize": "",
|
|
960
|
+
"mole": "",
|
|
961
|
+
"moleX": "",
|
|
962
|
+
"moleY": "",
|
|
963
|
+
"moleSize": "",
|
|
964
|
+
"beard": "On the beard page (within the ninth tab), set the beard to the one on the top-left.",
|
|
965
|
+
"beardCol": "On the mustache OR beard pages (within the ninth tab), set the color to the one 1 from the left, on the top row."
|
|
966
|
+
}
|
|
967
|
+
},
|
|
968
|
+
"3ds":{
|
|
969
|
+
"male":{
|
|
970
|
+
"faceShape": "On the face page (first tab), set the face shape to the one 1 from the top, and 1 from the left.",
|
|
971
|
+
"skinCol": "On the face page (first tab), set the color to the one 1 from the top.",
|
|
972
|
+
"makeup": "On the face page's makeup tab, set the makeup to \"None\" (the one 1 from the top, and 1 from the left).",
|
|
973
|
+
"feature": "On the face page's wrinkles tab, set the facial feature to \"None\" (the one 2 from the top, and 1 from the left).",
|
|
974
|
+
"hairStyle": "On the hair page (second tab), set the hair style to the one 1 from the top, and 1 from the left, on page 1.",
|
|
975
|
+
"hairFlipped": "",
|
|
976
|
+
"hairColor": "On the hair page (second tab), set the hair color to the one 2 from the top.",
|
|
977
|
+
"eyebrowStyle": "On the eyebrow page (third tab), set the eyebrow style to the one 1 from the left, 1 from the top, on page 1.",
|
|
978
|
+
"eyebrowColor": "On the eyebrow page (third tab), set the eyebrow color to the one 2 from the top.",
|
|
979
|
+
"eyebrowY": "",
|
|
980
|
+
"eyebrowSize": "",
|
|
981
|
+
"eyebrowRot": "",
|
|
982
|
+
"eyebrowDist": "",
|
|
983
|
+
"eyebrowSquash": "",
|
|
984
|
+
"eyeType": "On the eye page (fourth tab), set the eye type to the one 1 from the left, 1 from the top, on page 1.",
|
|
985
|
+
"eyeColor": "On the eye page (fourth tab), set the color to the one 1 from the top.",
|
|
986
|
+
"eyeY": "",
|
|
987
|
+
"eyeSize": "",
|
|
988
|
+
"eyeRot": "",
|
|
989
|
+
"eyeDist": "",
|
|
990
|
+
"eyeSquash": "",
|
|
991
|
+
"noseType": "On the nose page (fifth tab), set the nose to the one 1 from the top, and 1 from the left, on page 0.",
|
|
992
|
+
"noseY": "",
|
|
993
|
+
"noseSize": "",
|
|
994
|
+
"mouthType": "On the mouth page (sixth tab), set the mouth type to the one 1 from the left, 1 from the top, on page 1.",
|
|
995
|
+
"mouthCol": "On the mouth page (sixth tab), set the color to the one 1 from the top.",
|
|
996
|
+
"mouthY": "",
|
|
997
|
+
"mouthSize": "",
|
|
998
|
+
"mouthSquash": "",
|
|
999
|
+
"glasses": "On the glasses page (within the seventh tab), set the glasses to the one 1 from the top, and 1 from the left.",
|
|
1000
|
+
"glassesCol": "On the glasses page (within the seventh tab), set the color to the one 1 from the top.",
|
|
1001
|
+
"glassesY": "",
|
|
1002
|
+
"glassesSize": "",
|
|
1003
|
+
"stache": "On the mustache page (within the seventh tab), set the mustache to the one on the top-left.",
|
|
1004
|
+
"stacheY": "",
|
|
1005
|
+
"stacheSize": "",
|
|
1006
|
+
"mole": "",
|
|
1007
|
+
"moleX": "",
|
|
1008
|
+
"moleY": "",
|
|
1009
|
+
"moleSize": "",
|
|
1010
|
+
"beard": "On the beard page (within the seventh tab), set the beard to the one on the top-left.",
|
|
1011
|
+
"beardCol": "On the mustache OR beard pages (within the seventh tab), set the color to the one 1 from the top.",
|
|
1012
|
+
"heightWeight": "On the build page (eighth tab), set the height to 50%, and the weight to 50%.",
|
|
1013
|
+
"col": "On the info page (after pressing \"Next\"), set the Favorite Color to Red (1 from the left, top row)."
|
|
1014
|
+
},
|
|
1015
|
+
"female":{
|
|
1016
|
+
"faceShape": "On the face page (first tab), set the face shape to the one 1 from the top, and 1 from the left.",
|
|
1017
|
+
"skinCol": "On the face page (first tab), set the color to the one 1 from the top.",
|
|
1018
|
+
"makeup": "On the face page's makeup tab, set the makeup to \"None\" (the one 1 from the top, and 1 from the left).",
|
|
1019
|
+
"feature": "On the face page's wrinkles tab, set the facial feature to \"None\" (the one 2 from the top, and 1 from the left).",
|
|
1020
|
+
"hairStyle": "On the hair page (second tab), set the hair style to the one 3 from the top, and 1 from the left, on page 5.",
|
|
1021
|
+
"hairFlipped": "",
|
|
1022
|
+
"hairColor": "On the hair page (second tab), set the hair color to the one 2 from the top.",
|
|
1023
|
+
"eyebrowStyle": "On the eyebrow page (third tab), set the eyebrow style to the one 2 from the left, 1 from the top, on page 1.",
|
|
1024
|
+
"eyebrowColor": "On the eyebrow page (third tab), set the eyebrow color to the one 2 from the top.",
|
|
1025
|
+
"eyebrowY": "",
|
|
1026
|
+
"eyebrowSize": "",
|
|
1027
|
+
"eyebrowRot": "",
|
|
1028
|
+
"eyebrowDist": "",
|
|
1029
|
+
"eyebrowSquash": "",
|
|
1030
|
+
"eyeType": "On the eye page (fourth tab), set the eye type to the one 2 from the left, 1 from the top, on page 1.",
|
|
1031
|
+
"eyeColor": "On the eye page (fourth tab), set the color to the one 1 from the top.",
|
|
1032
|
+
"eyeY": "",
|
|
1033
|
+
"eyeSize": "",
|
|
1034
|
+
"eyeRot": "",
|
|
1035
|
+
"eyeDist": "",
|
|
1036
|
+
"eyeSquash": "",
|
|
1037
|
+
"noseType": "On the nose page (fifth tab), set the nose to the one 1 from the top, and 1 from the left, on page 0.",
|
|
1038
|
+
"noseY": "",
|
|
1039
|
+
"noseSize": "",
|
|
1040
|
+
"mouthType": "On the mouth page (sixth tab), set the mouth type to the one 1 from the left, 1 from the top, on page 1.",
|
|
1041
|
+
"mouthCol": "On the mouth page (sixth tab), set the color to the one 1 from the top.",
|
|
1042
|
+
"mouthY": "",
|
|
1043
|
+
"mouthSize": "",
|
|
1044
|
+
"mouthSquash": "",
|
|
1045
|
+
"glasses": "On the glasses page (within the seventh tab), set the glasses to the one 1 from the top, and 1 from the left.",
|
|
1046
|
+
"glassesCol": "On the glasses page (within the seventh tab), set the color to the one 1 from the top.",
|
|
1047
|
+
"glassesY": "",
|
|
1048
|
+
"glassesSize": "",
|
|
1049
|
+
"stache": "On the mustache page (within the seventh tab), set the mustache to the one on the top-left.",
|
|
1050
|
+
"stacheY": "",
|
|
1051
|
+
"stacheSize": "",
|
|
1052
|
+
"mole": "",
|
|
1053
|
+
"moleX": "",
|
|
1054
|
+
"moleY": "",
|
|
1055
|
+
"moleSize": "",
|
|
1056
|
+
"beard": "On the beard page (within the seventh tab), set the beard to the one on the top-left.",
|
|
1057
|
+
"beardCol": "On the mustache OR beard pages (within the seventh tab), set the color to the one 1 from the top.",
|
|
1058
|
+
"heightWeight": "On the build page (eighth tab), set the height to 50%, and the weight to 50%.",
|
|
1059
|
+
"col": "On the info page (after pressing \"Next\"), set the Favorite Color to Red (1 from the left, top row)."
|
|
1060
|
+
}
|
|
1061
|
+
}
|
|
1062
|
+
};
|
|
885
1063
|
module.exports={
|
|
886
1064
|
readWiiBin:function(binOrPath){
|
|
887
1065
|
var thisMii={
|
|
@@ -919,7 +1097,7 @@ module.exports={
|
|
|
919
1097
|
thisMii.info.systemId=parseInt(getBinaryFromAddress(0x1C),2).toString(16)+parseInt(getBinaryFromAddress(0x1D),2).toString(16)+parseInt(getBinaryFromAddress(0x1E),2).toString(16)+parseInt(getBinaryFromAddress(0x1F),2).toString(16);
|
|
920
1098
|
var temp=getBinaryFromAddress(0x20);
|
|
921
1099
|
thisMii.face.shape=parseInt(temp.slice(0,3),2);//0-7
|
|
922
|
-
thisMii.face.col=
|
|
1100
|
+
thisMii.face.col=skinCols[parseInt(temp.slice(3,6),2)];//0-5
|
|
923
1101
|
temp=getBinaryFromAddress(0x21);
|
|
924
1102
|
thisMii.face.feature=wiiFaceFeatures[parseInt(getBinaryFromAddress(0x20).slice(6,8)+temp.slice(0,2),2)];//0-11
|
|
925
1103
|
thisMii.info.mingle=temp[5]==="0";//0 for Mingle, 1 for Don't Mingle
|
|
@@ -930,7 +1108,7 @@ module.exports={
|
|
|
930
1108
|
}
|
|
931
1109
|
}
|
|
932
1110
|
thisMii.nose.size=parseInt(temp.slice(4,8),2);
|
|
933
|
-
thisMii.nose.
|
|
1111
|
+
thisMii.nose.yPos=parseInt(getBinaryFromAddress(0x2D).slice(0,5),2);//From top to bottom, 0-18, default 9
|
|
934
1112
|
temp=getBinaryFromAddress(0x2E);
|
|
935
1113
|
thisMii.mouth.type=mouthTable[""+parseInt(temp.slice(0,5),2)];//0-23, Needs lookup table
|
|
936
1114
|
thisMii.mouth.col=wiiMouthColors[parseInt(temp.slice(5,7),2)];//0-2, refer to mouthColors array
|
|
@@ -941,7 +1119,7 @@ module.exports={
|
|
|
941
1119
|
var temp2=getBinaryFromAddress(0x01);
|
|
942
1120
|
thisMii.info.birthMonth=parseInt(temp.slice(2,6),2);
|
|
943
1121
|
thisMii.info.birthday=parseInt(temp.slice(6,8)+temp2.slice(0,3),2);
|
|
944
|
-
thisMii.info.favColor=
|
|
1122
|
+
thisMii.info.favColor=favCols[parseInt(temp2.slice(3,7),2)];//0-11, refer to cols array
|
|
945
1123
|
thisMii.info.favorited=temp2[7]==="0"?false:true;
|
|
946
1124
|
thisMii.info.height=parseInt(getBinaryFromAddress(0x16),2);//0-127
|
|
947
1125
|
thisMii.info.weight=parseInt(getBinaryFromAddress(0x17),2);//0-127
|
|
@@ -955,7 +1133,7 @@ module.exports={
|
|
|
955
1133
|
temp=getBinaryFromAddress(0x22);
|
|
956
1134
|
temp2=getBinaryFromAddress(0x23);
|
|
957
1135
|
thisMii.hair.type=hairTable[""+parseInt(temp.slice(0,7),2)];//0-71, Needs lookup table
|
|
958
|
-
thisMii.hair.col=
|
|
1136
|
+
thisMii.hair.col=hairCols[parseInt(temp[7]+temp2.slice(0,2),2)];//0-7, refer to hairCols array
|
|
959
1137
|
thisMii.hair.flipped=temp2[2]==="0"?false:true;
|
|
960
1138
|
temp=getBinaryFromAddress(0x24);
|
|
961
1139
|
temp2=getBinaryFromAddress(0x25);
|
|
@@ -963,7 +1141,7 @@ module.exports={
|
|
|
963
1141
|
thisMii.eyebrows.rotation=parseInt(temp.slice(6,8)+temp2.slice(0,2),2);//0-11, default varies based on eyebrow type
|
|
964
1142
|
temp=getBinaryFromAddress(0x26);
|
|
965
1143
|
temp2=getBinaryFromAddress(0x27);
|
|
966
|
-
thisMii.eyebrows.col=
|
|
1144
|
+
thisMii.eyebrows.col=hairCols[parseInt(temp.slice(0,3),2)];
|
|
967
1145
|
thisMii.eyebrows.size=parseInt(temp.slice(3,7),2);//0-8, default 4
|
|
968
1146
|
thisMii.eyebrows.yPos=(parseInt(temp[7]+temp2.slice(0,4),2))-3;//0-15, default 10
|
|
969
1147
|
thisMii.eyebrows.distApart=parseInt(temp2.slice(4,8),2);//0-12, default 2
|
|
@@ -972,7 +1150,7 @@ module.exports={
|
|
|
972
1150
|
thisMii.eyes.rotation=parseInt(temp.slice(0,3),2);//0-7, default varies based on eye type
|
|
973
1151
|
thisMii.eyes.yPos=parseInt(temp.slice(3,8),2);//0-18, default 12, top to bottom
|
|
974
1152
|
temp=getBinaryFromAddress(0x2A);
|
|
975
|
-
thisMii.eyes.col=
|
|
1153
|
+
thisMii.eyes.col=eyeCols[parseInt(temp.slice(0,3),2)];//0-5
|
|
976
1154
|
thisMii.eyes.size=parseInt(temp.slice(4,7),2);//0-7, default 4
|
|
977
1155
|
temp2=getBinaryFromAddress(0x2B);
|
|
978
1156
|
thisMii.eyes.distApart=parseInt(temp[7]+temp2.slice(0,3),2);//0-12, default 2
|
|
@@ -986,7 +1164,7 @@ module.exports={
|
|
|
986
1164
|
temp2=getBinaryFromAddress(0x33);
|
|
987
1165
|
thisMii.facialHair.mustacheType=parseInt(temp.slice(0,2),2);//0-3
|
|
988
1166
|
thisMii.facialHair.beardType=parseInt(temp.slice(2,4),2);//0-3
|
|
989
|
-
thisMii.facialHair.col=
|
|
1167
|
+
thisMii.facialHair.col=hairCols[parseInt(temp.slice(4,7),2)];//0-7
|
|
990
1168
|
thisMii.facialHair.mustacheSize=parseInt(temp[7]+temp2.slice(0,3),2);//0-30, default 20
|
|
991
1169
|
thisMii.facialHair.mustacheYPos=parseInt(temp2.slice(3,8),2);//0-16, default 2
|
|
992
1170
|
return thisMii;
|
|
@@ -1034,20 +1212,20 @@ module.exports={
|
|
|
1034
1212
|
miiJson.info.gender=temp[7]==="1"?"Female":"Male";
|
|
1035
1213
|
temp=getBinaryFromAddress(0x30);
|
|
1036
1214
|
miiJson.perms.sharing=temp[7]==="1"?false:true;
|
|
1037
|
-
miiJson.info.favColor=
|
|
1215
|
+
miiJson.info.favColor=favCols[parseInt(temp2.slice(2,6),2)];
|
|
1038
1216
|
miiJson.perms.copying=getBinaryFromAddress(0x01)[7]==="1"?true:false;
|
|
1039
1217
|
miiJson.hair.style=lookupTable("hairs",parseInt(getBinaryFromAddress(0x32),2),true);
|
|
1040
1218
|
miiJson.face.shape=lookupTable("faces",parseInt(temp.slice(3,7),2),false);
|
|
1041
|
-
miiJson.face.col=
|
|
1219
|
+
miiJson.face.col=skinCols[parseInt(temp.slice(0,3),2)];
|
|
1042
1220
|
temp=getBinaryFromAddress(0x31);
|
|
1043
1221
|
miiJson.face.feature=faceFeatures3DS[parseInt(temp.slice(4,8),2)];
|
|
1044
1222
|
miiJson.face.makeup=makeups3DS[parseInt(temp.slice(0,4),2)];
|
|
1045
1223
|
temp=getBinaryFromAddress(0x34);
|
|
1046
1224
|
miiJson.eyes.type=lookupTable("eyes",parseInt(temp.slice(2,8),2),true);
|
|
1047
1225
|
temp2=getBinaryFromAddress(0x33);
|
|
1048
|
-
miiJson.hair.col=
|
|
1226
|
+
miiJson.hair.col=hairCols[parseInt(temp2.slice(5,8),2)];
|
|
1049
1227
|
miiJson.hair.flipped=temp2[4]==="0"?false:true;
|
|
1050
|
-
miiJson.eyes.col=
|
|
1228
|
+
miiJson.eyes.col=eyeCols[parseInt(getBinaryFromAddress(0x35)[7]+temp.slice(0,2),2)];
|
|
1051
1229
|
temp=getBinaryFromAddress(0x35);
|
|
1052
1230
|
miiJson.eyes.size=parseInt(temp.slice(3,7),2);
|
|
1053
1231
|
miiJson.eyes.squash=parseInt(temp.slice(0,3),2);
|
|
@@ -1058,7 +1236,7 @@ module.exports={
|
|
|
1058
1236
|
miiJson.eyes.yPos=parseInt(temp2.slice(2,7),2);
|
|
1059
1237
|
temp=getBinaryFromAddress(0x38);
|
|
1060
1238
|
miiJson.eyebrows.style=lookupTable("eyebrows",parseInt(temp.slice(3,8),2),true);
|
|
1061
|
-
miiJson.eyebrows.col=
|
|
1239
|
+
miiJson.eyebrows.col=hairCols[parseInt(temp.slice(0,3),2)];
|
|
1062
1240
|
temp=getBinaryFromAddress(0x39);
|
|
1063
1241
|
miiJson.eyebrows.size=parseInt(temp.slice(4,8),2);
|
|
1064
1242
|
miiJson.eyebrows.squash=parseInt(temp.slice(1,4),2);
|
|
@@ -1083,7 +1261,7 @@ module.exports={
|
|
|
1083
1261
|
miiJson.facialHair.mustacheType=parseInt(temp.slice(0,3),2);
|
|
1084
1262
|
temp=getBinaryFromAddress(0x42);
|
|
1085
1263
|
miiJson.facialHair.beardType=parseInt(temp.slice(5,8),2);
|
|
1086
|
-
miiJson.facialHair.col=
|
|
1264
|
+
miiJson.facialHair.col=hairCols[parseInt(temp.slice(2,5),2)];
|
|
1087
1265
|
temp2=getBinaryFromAddress(0x43);
|
|
1088
1266
|
miiJson.facialHair.mustacheSize=parseInt(temp2.slice(6,8)+temp.slice(0,2),2);
|
|
1089
1267
|
miiJson.facialHair.mustacheYPos=parseInt(temp2.slice(1,6),2);
|
|
@@ -1133,7 +1311,7 @@ module.exports={
|
|
|
1133
1311
|
miiBin+=mii.info.gender==="Male"?"0":"1";
|
|
1134
1312
|
miiBin+=mii.info.birthMonth.toString(2).padStart(4,"0");
|
|
1135
1313
|
miiBin+=mii.info.birthday.toString(2).padStart(5,"0");
|
|
1136
|
-
miiBin+=
|
|
1314
|
+
miiBin+=favCols.indexOf(mii.info.favColor).toString(2).padStart(4,"0");
|
|
1137
1315
|
miiBin+=mii.info.favorited?1:0;
|
|
1138
1316
|
for(var i=0;i<10;i++){
|
|
1139
1317
|
miiBin+="00000000";
|
|
@@ -1164,7 +1342,7 @@ module.exports={
|
|
|
1164
1342
|
miiBin+=miiId;
|
|
1165
1343
|
miiBin+="11111111".repeat(4);//System ID
|
|
1166
1344
|
miiBin+=mii.face.shape.toString(2).padStart(3,"0");
|
|
1167
|
-
miiBin+=
|
|
1345
|
+
miiBin+=skinCols.indexOf(mii.face.col).toString(2).padStart(3,"0");
|
|
1168
1346
|
miiBin+=wiiFaceFeatures.indexOf(mii.face.feature).toString(2).padStart(4,"0");
|
|
1169
1347
|
miiBin+="000";
|
|
1170
1348
|
if(mii.info.mingle&&mii.info.type==="Special"){
|
|
@@ -1175,14 +1353,14 @@ module.exports={
|
|
|
1175
1353
|
miiBin+="0";
|
|
1176
1354
|
miiBin+=mii.info.downloadedFromCheckMiiOut?"1":"0";
|
|
1177
1355
|
miiBin+=(+getKeyByValue(hairTable,mii.hair.type)).toString(2).padStart(7,"0");
|
|
1178
|
-
miiBin+=
|
|
1356
|
+
miiBin+=hairCols.indexOf(mii.hair.col).toString(2).padStart(3,"0");
|
|
1179
1357
|
miiBin+=mii.hair.flipped?"1":"0";
|
|
1180
1358
|
miiBin+="00000";
|
|
1181
1359
|
miiBin+=(+getKeyByValue(eyebrowTable,mii.eyebrows.type)).toString(2).padStart(5,"0");
|
|
1182
1360
|
miiBin+="0";
|
|
1183
1361
|
miiBin+=mii.eyebrows.rotation.toString(2).padStart(4,"0");
|
|
1184
1362
|
miiBin+="000000";
|
|
1185
|
-
miiBin+=
|
|
1363
|
+
miiBin+=hairCols.indexOf(mii.eyebrows.col).toString(2).padStart(3,"0");
|
|
1186
1364
|
miiBin+=mii.eyebrows.size.toString(2).padStart(4,"0");
|
|
1187
1365
|
miiBin+=(mii.eyebrows.yPos+3).toString(2).padStart(5,"0");
|
|
1188
1366
|
miiBin+=mii.eyebrows.distApart.toString(2).padStart(4,"0");
|
|
@@ -1190,14 +1368,14 @@ module.exports={
|
|
|
1190
1368
|
miiBin+="00";
|
|
1191
1369
|
miiBin+=mii.eyes.rotation.toString(2).padStart(3,"0");
|
|
1192
1370
|
miiBin+=mii.eyes.yPos.toString(2).padStart(5,"0");
|
|
1193
|
-
miiBin+=
|
|
1371
|
+
miiBin+=eyeCols.indexOf(mii.eyes.col).toString(2).padStart(3,"0");
|
|
1194
1372
|
miiBin+="0";
|
|
1195
1373
|
miiBin+=mii.eyes.size.toString(2).padStart(3,"0");
|
|
1196
1374
|
miiBin+=mii.eyes.distApart.toString(2).padStart(4,"0");
|
|
1197
1375
|
miiBin+="00000";
|
|
1198
1376
|
miiBin+=wiiNoses[mii.nose.type].toString(2).padStart(4,"0");
|
|
1199
1377
|
miiBin+=mii.nose.size.toString(2).padStart(4,"0");
|
|
1200
|
-
miiBin+=mii.nose.
|
|
1378
|
+
miiBin+=mii.nose.yPos.toString(2).padStart(5,"0");
|
|
1201
1379
|
miiBin+="000";
|
|
1202
1380
|
miiBin+=(+getKeyByValue(mouthTable,mii.mouth.type)).toString(2).padStart(5,"0");
|
|
1203
1381
|
miiBin+=wiiMouthColors.indexOf(mii.mouth.col).toString(2).padStart(2,"0");
|
|
@@ -1207,10 +1385,10 @@ module.exports={
|
|
|
1207
1385
|
miiBin+=wiiGlassesCols.indexOf(mii.glasses.col).toString(2).padStart(3,"0");
|
|
1208
1386
|
miiBin+="0";
|
|
1209
1387
|
miiBin+=mii.glasses.size.toString(2).padStart(3,"0");
|
|
1210
|
-
miiBin+=
|
|
1388
|
+
miiBin+=mii.glasses.yPos.toString(2).padStart(5,"0");
|
|
1211
1389
|
miiBin+=mii.facialHair.mustacheType.toString(2).padStart(2,"0");
|
|
1212
1390
|
miiBin+=mii.facialHair.beardType.toString(2).padStart(2,"0");
|
|
1213
|
-
miiBin+=
|
|
1391
|
+
miiBin+=hairCols.indexOf(mii.facialHair.col).toString(2).padStart(3,"0");
|
|
1214
1392
|
miiBin+=mii.facialHair.mustacheSize.toString(2).padStart(4,"0");
|
|
1215
1393
|
miiBin+=mii.facialHair.mustacheYPos.toString(2).padStart(5,"0");
|
|
1216
1394
|
miiBin+=mii.mole.on?"1":"0";
|
|
@@ -1259,7 +1437,7 @@ module.exports={
|
|
|
1259
1437
|
miiBin+=mii.info.birthMonth.toString(2).padStart(4,"0");
|
|
1260
1438
|
miiBin+=mii.info.gender==="Male"?"0":"1";
|
|
1261
1439
|
miiBin+="00";
|
|
1262
|
-
miiBin+=
|
|
1440
|
+
miiBin+=favCols.indexOf(mii.info.favColor).toString(2).padStart(4,"0");
|
|
1263
1441
|
miiBin+=mii.info.birthday.toString(2).padStart(5,"0").slice(0,2);
|
|
1264
1442
|
for(var i=0;i<10;i++){
|
|
1265
1443
|
if(i<mii.name.length){
|
|
@@ -1272,7 +1450,7 @@ module.exports={
|
|
|
1272
1450
|
}
|
|
1273
1451
|
miiBin+=mii.info.height.toString(2).padStart(8,"0");
|
|
1274
1452
|
miiBin+=mii.info.weight.toString(2).padStart(8,"0");
|
|
1275
|
-
miiBin+=
|
|
1453
|
+
miiBin+=skinCols.indexOf(mii.face.col).toString(2).padStart(3,"0");
|
|
1276
1454
|
miiBin+=tables.faces[mii.face.shape].toString(2).padStart(4,"0");
|
|
1277
1455
|
miiBin+=mii.perms.sharing?"0":"1";
|
|
1278
1456
|
miiBin+=makeups3DS.indexOf(mii.face.makeup).toString(2).padStart(4,"0");
|
|
@@ -1280,18 +1458,18 @@ module.exports={
|
|
|
1280
1458
|
miiBin+=tables.hairs[mii.hair.style[0]][mii.hair.style[1]].toString(2).padStart(8,"0");
|
|
1281
1459
|
miiBin+="0000";
|
|
1282
1460
|
miiBin+=mii.hair.flipped?"1":"0";
|
|
1283
|
-
miiBin+=
|
|
1284
|
-
miiBin+=
|
|
1461
|
+
miiBin+=hairCols.indexOf(mii.hair.col).toString(2).padStart(3,"0");
|
|
1462
|
+
miiBin+=eyeCols.indexOf(mii.eyes.col).toString(2).padStart(3,"0").slice(1,3);
|
|
1285
1463
|
miiBin+=tables.eyes[mii.eyes.type[0]][mii.eyes.type[1]].toString(2).padStart(6,"0");
|
|
1286
1464
|
miiBin+=mii.eyes.squash.toString(2).padStart(3,"0");
|
|
1287
1465
|
miiBin+=mii.eyes.size.toString(2).padStart(4,"0");
|
|
1288
|
-
miiBin+=
|
|
1466
|
+
miiBin+=eyeCols.indexOf(mii.eyes.col).toString(2).padStart(3,"0")[0];
|
|
1289
1467
|
miiBin+=mii.eyes.distApart.toString(2).padStart(4,"0").slice(1,4);
|
|
1290
1468
|
miiBin+=mii.eyes.rot.toString(2).padStart(5,"0");
|
|
1291
1469
|
miiBin+="00";
|
|
1292
1470
|
miiBin+=mii.eyes.yPos.toString(2).padStart(5,"0");
|
|
1293
1471
|
miiBin+=mii.eyes.distApart.toString(2).padStart(4,"0")[0];
|
|
1294
|
-
miiBin+=
|
|
1472
|
+
miiBin+=hairCols.indexOf(mii.eyebrows.col).toString(2).padStart(3,"0");
|
|
1295
1473
|
miiBin+=tables.eyebrows[mii.eyebrows.style[0]][mii.eyebrows.style[1]].toString(2).padStart(5,"0");
|
|
1296
1474
|
miiBin+="0";
|
|
1297
1475
|
miiBin+=mii.eyebrows.squash.toString(2).padStart(3,"0");
|
|
@@ -1316,7 +1494,7 @@ module.exports={
|
|
|
1316
1494
|
miiBin+=mii.mouth.yPos.toString(2).padStart(5,"0");
|
|
1317
1495
|
miiBin+="00000000";
|
|
1318
1496
|
miiBin+=mii.facialHair.mustacheSize.toString(2).padStart(4,"0").slice(2,4);
|
|
1319
|
-
miiBin+=
|
|
1497
|
+
miiBin+=hairCols.indexOf(mii.facialHair.col).toString(2).padStart(3,"0");
|
|
1320
1498
|
miiBin+=mii.facialHair.beardType.toString(2).padStart(3,"0");
|
|
1321
1499
|
miiBin+="0";
|
|
1322
1500
|
miiBin+=mii.facialHair.mustacheYPos.toString(2).padStart(5,"0");
|
|
@@ -1376,32 +1554,32 @@ module.exports={
|
|
|
1376
1554
|
return dest;
|
|
1377
1555
|
}
|
|
1378
1556
|
studioMii[0x16] = mii.info.gender==="Male"?0:1;
|
|
1379
|
-
studioMii[0x15] =
|
|
1557
|
+
studioMii[0x15] = favCols.indexOf(mii.info.favColor);
|
|
1380
1558
|
studioMii[0x1E] = mii.info.height;
|
|
1381
1559
|
studioMii[2] = mii.info.weight;
|
|
1382
1560
|
studioMii[0x13] = tables.faces[mii.face.shape];
|
|
1383
|
-
studioMii[0x11] =
|
|
1561
|
+
studioMii[0x11] = skinCols.indexOf(mii.face.col);
|
|
1384
1562
|
studioMii[0x14] = faceFeatures3DS.indexOf(mii.face.feature);
|
|
1385
1563
|
studioMii[0x12] = makeups3DS.indexOf(mii.face.makeup);
|
|
1386
1564
|
studioMii[0x1D] = tables.hairs[mii.hair.style[0]][mii.hair.style[1]];
|
|
1387
|
-
studioMii[0x1B] =
|
|
1565
|
+
studioMii[0x1B] = hairCols.indexOf(mii.hair.col);
|
|
1388
1566
|
if (!studioMii[0x1B]) studioMii[0x1B] = 8;
|
|
1389
1567
|
studioMii[0x1C] = mii.hair.flipped?1:0;
|
|
1390
1568
|
studioMii[7] = tables.eyes[mii.eyes.type[0]][mii.eyes.type[1]];
|
|
1391
|
-
studioMii[4] =
|
|
1569
|
+
studioMii[4] = eyeCols.indexOf(mii.eyes.col) + 8;
|
|
1392
1570
|
studioMii[6] = mii.eyes.size;
|
|
1393
1571
|
studioMii[3] = mii.eyes.squash;
|
|
1394
1572
|
studioMii[5] = mii.eyes.rot;
|
|
1395
1573
|
studioMii[8] = mii.eyes.distApart;
|
|
1396
1574
|
studioMii[9] = mii.eyes.yPos;
|
|
1397
1575
|
studioMii[0xE] = tables.eyebrows[mii.eyebrows.style[0]][mii.eyebrows.style[1]];
|
|
1398
|
-
studioMii[0xB] =
|
|
1576
|
+
studioMii[0xB] = hairCols.indexOf(mii.eyebrows.col);
|
|
1399
1577
|
if (!studioMii[0xB]) studioMii[0xB] = 8;
|
|
1400
1578
|
studioMii[0xD] = mii.eyebrows.size;
|
|
1401
1579
|
studioMii[0xA] = mii.eyebrows.squash;
|
|
1402
1580
|
studioMii[0xC] = mii.eyebrows.rot;
|
|
1403
1581
|
studioMii[0xF] = mii.eyebrows.distApart;
|
|
1404
|
-
studioMii[0x10] = mii.eyebrows.yPos
|
|
1582
|
+
studioMii[0x10] = mii.eyebrows.yPos+3;
|
|
1405
1583
|
studioMii[0x2C] = tables.noses[mii.nose.type[0]][mii.nose.type[1]];
|
|
1406
1584
|
studioMii[0x2B] = mii.nose.size;
|
|
1407
1585
|
studioMii[0x2D] = mii.nose.yPos;
|
|
@@ -1417,7 +1595,7 @@ module.exports={
|
|
|
1417
1595
|
studioMii[0x27] = mii.mouth.yPos;
|
|
1418
1596
|
studioMii[0x29] = mii.facialHair.mustacheType;
|
|
1419
1597
|
studioMii[1] = mii.facialHair.beardType;
|
|
1420
|
-
studioMii[0] =
|
|
1598
|
+
studioMii[0] = hairCols.indexOf(mii.facialHair.col);
|
|
1421
1599
|
if (!studioMii[0]) studioMii[0] = 8;
|
|
1422
1600
|
studioMii[0x28] = mii.facialHair.mustacheSize;
|
|
1423
1601
|
studioMii[0x2A] = mii.facialHair.mustacheYPos;
|
|
@@ -1491,26 +1669,26 @@ module.exports={
|
|
|
1491
1669
|
return dest;
|
|
1492
1670
|
}
|
|
1493
1671
|
studioMii[0x16] = mii.info.gender==="Male"?0:1;
|
|
1494
|
-
studioMii[0x15] =
|
|
1672
|
+
studioMii[0x15] = favCols.indexOf(mii.info.favColor);
|
|
1495
1673
|
studioMii[0x1E] = mii.info.height;
|
|
1496
1674
|
studioMii[2] = mii.info.weight;
|
|
1497
1675
|
studioMii[0x13] = tables.faces[mii.face.shape];
|
|
1498
|
-
studioMii[0x11] =
|
|
1676
|
+
studioMii[0x11] = skinCols.indexOf(mii.face.col);
|
|
1499
1677
|
studioMii[0x14] = faceFeatures3DS.indexOf(mii.face.feature);
|
|
1500
1678
|
studioMii[0x12] = makeups3DS.indexOf(mii.face.makeup);
|
|
1501
1679
|
studioMii[0x1D] = tables.hairs[mii.hair.style[0]][mii.hair.style[1]];
|
|
1502
|
-
studioMii[0x1B] =
|
|
1680
|
+
studioMii[0x1B] = hairCols.indexOf(mii.hair.col);
|
|
1503
1681
|
if (!studioMii[0x1B]) studioMii[0x1B] = 8;
|
|
1504
1682
|
studioMii[0x1C] = mii.hair.flipped?1:0;
|
|
1505
1683
|
studioMii[7] = tables.eyes[mii.eyes.type[0]][mii.eyes.type[1]];
|
|
1506
|
-
studioMii[4] =
|
|
1684
|
+
studioMii[4] = eyeCols.indexOf(mii.eyes.col) + 8;
|
|
1507
1685
|
studioMii[6] = mii.eyes.size;
|
|
1508
1686
|
studioMii[3] = mii.eyes.squash;
|
|
1509
1687
|
studioMii[5] = mii.eyes.rot;
|
|
1510
1688
|
studioMii[8] = mii.eyes.distApart;
|
|
1511
1689
|
studioMii[9] = mii.eyes.yPos;
|
|
1512
1690
|
studioMii[0xE] = tables.eyebrows[mii.eyebrows.style[0]][mii.eyebrows.style[1]];
|
|
1513
|
-
studioMii[0xB] =
|
|
1691
|
+
studioMii[0xB] = hairCols.indexOf(mii.eyebrows.col);
|
|
1514
1692
|
if (!studioMii[0xB]) studioMii[0xB] = 8;
|
|
1515
1693
|
studioMii[0xD] = mii.eyebrows.size;
|
|
1516
1694
|
studioMii[0xA] = mii.eyebrows.squash;
|
|
@@ -1532,7 +1710,7 @@ module.exports={
|
|
|
1532
1710
|
studioMii[0x27] = mii.mouth.yPos;
|
|
1533
1711
|
studioMii[0x29] = mii.facialHair.mustacheType;
|
|
1534
1712
|
studioMii[1] = mii.facialHair.beardType;
|
|
1535
|
-
studioMii[0] =
|
|
1713
|
+
studioMii[0] = hairCols.indexOf(mii.facialHair.col);
|
|
1536
1714
|
if (!studioMii[0]) studioMii[0] = 8;
|
|
1537
1715
|
studioMii[0x28] = mii.facialHair.mustacheSize;
|
|
1538
1716
|
studioMii[0x2A] = mii.facialHair.mustacheYPos;
|
|
@@ -1611,7 +1789,7 @@ module.exports={
|
|
|
1611
1789
|
}
|
|
1612
1790
|
miiTo.nose.type=convTables.nose3DSToWii[mii.nose.type[0]][mii.nose.type[1]];
|
|
1613
1791
|
miiTo.nose.size=mii.nose.size;
|
|
1614
|
-
miiTo.nose.
|
|
1792
|
+
miiTo.nose.yPos=mii.nose.yPos;
|
|
1615
1793
|
miiTo.mouth.type=convTables.mouth3DSToWii[mii.mouth.type[0]][mii.mouth.type[1]];
|
|
1616
1794
|
miiTo.mouth.col=wiiMouthColors[mouthCols3DS.indexOf(mii.mouth.col)>2?0:mouthCols3DS.indexOf(mii.mouth.col)];
|
|
1617
1795
|
miiTo.mouth.size=mii.mouth.size;
|
|
@@ -1672,11 +1850,11 @@ module.exports={
|
|
|
1672
1850
|
miiTo.info.gender=mii.info.gender;
|
|
1673
1851
|
miiTo.perms.sharing=mii.info.mingle;
|
|
1674
1852
|
miiTo.perms.copying=mii.info.mingle;
|
|
1675
|
-
miiTo.hair.col=
|
|
1853
|
+
miiTo.hair.col=hairCols[hairCols.indexOf(mii.hair.col)];
|
|
1676
1854
|
miiTo.hair.flipped=mii.hair.flipped;
|
|
1677
1855
|
miiTo.hair.style=convTables.hairWiiTo3DS[+mii.hair.type[0]-1][0+(3*(+mii.hair.type[2]-1))+(+mii.hair.type[1]-1)];
|
|
1678
1856
|
miiTo.face.shape=convTables.faceWiiTo3DS[mii.face.shape];
|
|
1679
|
-
miiTo.face.col=
|
|
1857
|
+
miiTo.face.col=skinCols[skinCols.indexOf(mii.face.col)];
|
|
1680
1858
|
miiTo.face.makeup="None";
|
|
1681
1859
|
miiTo.face.feature="None";
|
|
1682
1860
|
if(typeof(convTables.featureWiiTo3DS[wiiFaceFeatures.indexOf(mii.face.feature)])==='string'){
|
|
@@ -1685,7 +1863,7 @@ module.exports={
|
|
|
1685
1863
|
else{
|
|
1686
1864
|
miiTo.face.feature=faceFeatures3DS[convTables.featureWiiTo3DS[wiiFaceFeatures.indexOf(mii.face.feature)]];
|
|
1687
1865
|
}
|
|
1688
|
-
miiTo.eyes.col=
|
|
1866
|
+
miiTo.eyes.col=eyeCols[eyeCols.indexOf(mii.eyes.col)];
|
|
1689
1867
|
miiTo.eyes.type=[+mii.eyes.type[0]-1,(+mii.eyes.type[1]-1)+(3*(+mii.eyes.type[2]-1))];
|
|
1690
1868
|
miiTo.eyes.size=mii.eyes.size;
|
|
1691
1869
|
miiTo.eyes.squash=3;
|
|
@@ -1693,15 +1871,15 @@ module.exports={
|
|
|
1693
1871
|
miiTo.eyes.distApart=mii.eyes.distApart;
|
|
1694
1872
|
miiTo.eyes.yPos=mii.eyes.yPos;
|
|
1695
1873
|
miiTo.eyebrows.style=[+mii.eyebrows.type[0]-1,(+mii.eyebrows.type[1]-1)+(3*(+mii.eyebrows.type[2]-1))];
|
|
1696
|
-
miiTo.eyebrows.col=
|
|
1874
|
+
miiTo.eyebrows.col=hairCols[hairCols.indexOf(mii.eyebrows.col)];
|
|
1697
1875
|
miiTo.eyebrows.size=mii.eyebrows.size;
|
|
1698
1876
|
miiTo.eyebrows.squash=3;
|
|
1699
1877
|
miiTo.eyebrows.rot=mii.eyebrows.rotation;
|
|
1700
1878
|
miiTo.eyebrows.distApart=mii.eyebrows.distApart;
|
|
1701
|
-
miiTo.eyebrows.yPos=mii.eyebrows.yPos
|
|
1879
|
+
miiTo.eyebrows.yPos=mii.eyebrows.yPos;
|
|
1702
1880
|
miiTo.nose.type=[0,mii.nose.type];
|
|
1703
1881
|
miiTo.nose.size=mii.nose.size;
|
|
1704
|
-
miiTo.nose.yPos=mii.nose.
|
|
1882
|
+
miiTo.nose.yPos=mii.nose.yPos;
|
|
1705
1883
|
miiTo.mouth.type=[+mii.mouth.type[0]-1,(+mii.mouth.type[1]-1)+(3*(+mii.mouth.type[2]-1))];
|
|
1706
1884
|
miiTo.mouth.col=mouthCols3DS[wiiMouthColors.indexOf(mii.mouth.col)];
|
|
1707
1885
|
miiTo.mouth.size=mii.mouth.size;
|
|
@@ -1709,7 +1887,7 @@ module.exports={
|
|
|
1709
1887
|
miiTo.mouth.yPos=mii.mouth.yPos;
|
|
1710
1888
|
miiTo.facialHair.mustacheType=mii.facialHair.mustacheType;
|
|
1711
1889
|
miiTo.facialHair.beardType=mii.facialHair.beardType;
|
|
1712
|
-
miiTo.facialHair.col=
|
|
1890
|
+
miiTo.facialHair.col=hairCols[hairCols.indexOf(mii.facialHair.col)];
|
|
1713
1891
|
miiTo.facialHair.mustacheSize=mii.facialHair.mustacheSize;
|
|
1714
1892
|
miiTo.facialHair.mustacheYPos=mii.facialHair.mustacheYPos;
|
|
1715
1893
|
miiTo.glasses.type=mii.glasses.type;
|
|
@@ -1734,16 +1912,16 @@ module.exports={
|
|
|
1734
1912
|
"creatorName":"",
|
|
1735
1913
|
"gender":g,
|
|
1736
1914
|
"name":options.name||kidNames[g][Math.floor(Math.random()*kidNames[g].length)],
|
|
1737
|
-
"favColor":options.favColor||
|
|
1915
|
+
"favColor":options.favColor||favCols[Math.floor(Math.random()*favCols.length)]
|
|
1738
1916
|
},
|
|
1739
1917
|
"perms":{
|
|
1740
1918
|
"sharing":true,
|
|
1741
1919
|
"copying":true
|
|
1742
1920
|
},
|
|
1743
1921
|
"hair":{
|
|
1744
|
-
"style":[8,3]
|
|
1922
|
+
"style":[8,3],//Hardcoded
|
|
1745
1923
|
"col":Math.floor(Math.random()*2)===1?dad.hair.col:mom.hair.col,
|
|
1746
|
-
"flipped":false
|
|
1924
|
+
"flipped":Math.floor(Math.random()*2)===0?true:false
|
|
1747
1925
|
},
|
|
1748
1926
|
"face":{
|
|
1749
1927
|
"shape":Math.floor(Math.random()*2)===1?dad.face.shape:mom.face.shape,
|
|
@@ -1766,13 +1944,129 @@ module.exports={
|
|
|
1766
1944
|
"creatorName":""
|
|
1767
1945
|
};
|
|
1768
1946
|
child.eyebrows.col=child.hair.col;
|
|
1769
|
-
var c=[
|
|
1947
|
+
var c=[skinCols.indexOf(mom.face.col),skinCols.indexOf(dad.face.col)];
|
|
1770
1948
|
if(c[0]>c[1]){
|
|
1771
1949
|
c[1]=c[0];
|
|
1772
|
-
c[0]=
|
|
1950
|
+
c[0]=skinCols.indexOf(dad.face.col);
|
|
1773
1951
|
}
|
|
1774
|
-
child.face.col=
|
|
1952
|
+
child.face.col=skinCols[c[0]+Math.round((c[1]-c[0])/2)];
|
|
1775
1953
|
child.name=child.info.name;
|
|
1776
1954
|
return child;
|
|
1955
|
+
},
|
|
1956
|
+
generateInstructions:function(mii,type,full){
|
|
1957
|
+
if(type.toLowerCase()==="wii"){
|
|
1958
|
+
var instrs={
|
|
1959
|
+
"base":`Select "${mii.info.gender}", and then "Start from Scratch".`,
|
|
1960
|
+
"col":`On the info page (first tab), set the Favorite Color to ${mii.info.favColor} (${favCols.indexOf(mii.info.favColor)<=5?favCols.indexOf(mii.info.favColor)+1:favCols.indexOf(mii.info.favColor)-5} from the left, ${favCols.indexOf(mii.info.favColor)>5?"bottom":"top"} row).`,
|
|
1961
|
+
"heightWeight":`On the build page (second tab), set the height to ${Math.round((100/128)*mii.info.height)}%, and the weight to ${Math.round((100/128)*mii.info.weight)}%.`,
|
|
1962
|
+
"faceShape":`On the face page (third tab), set the shape to the one ${Math.floor(mii.face.shape/2)+1} from the top, in the ${mii.face.shape%2===0?"left":"right"} column.`,
|
|
1963
|
+
"skinCol":`On the face page (third tab), set the color to the one ${skinCols.indexOf(mii.face.col)+skinCols.indexOf(mii.face.col)>2?-2:1} from the left, on the ${skinCols.indexOf(mii.face.col)>2?`bottom`:`top`} row.`,
|
|
1964
|
+
"makeup":`On the face page's makeup tab, set the makeup to \"${mii.face.feature}\" (the one ${Math.ceil((wiiFaceFeatures.indexOf(mii.face.feature)+1)/3)} from the top, and ${[1,2,3,1,2,3,1,2,3,1,2,3][wiiFaceFeatures.indexOf(mii.face.feature)]} from the left).`,
|
|
1965
|
+
"hairStyle":`On the hair page (fourth tab), set the hair style to the one ${mii.hair.type[1]} from the left, ${mii.hair.type[2]} from the top, on page ${mii.hair.type[0]}.`,
|
|
1966
|
+
"hairFlipped":`${mii.hair.flipped?`On the hair page (fourth tab), press the button to flip the hair.`:``}`,
|
|
1967
|
+
"hairColor":`On the hair page (fourth tab), set the hair color to the one ${hairCols.indexOf(mii.hair.col)+(hairCols.indexOf(mii.hair.col)>3?-3:1)} from the left, on the ${hairCols.indexOf(mii.hair.col)>3?`bottom`:`top`} row.`,
|
|
1968
|
+
"eyebrowStyle":`On the eyebrow page (fifth tab), set the eyebrow style to the one ${mii.eyebrows.type[1]} from the left, ${mii.eyebrows.type[2]} from the top, on page ${mii.eyebrows.type[0]}.`,
|
|
1969
|
+
"eyebrowColor":`On the eyebrow page (fifth tab), set the eyebrow color to the one ${hairCols.indexOf(mii.eyebrows.col)+(hairCols.indexOf(mii.eyebrows.col)>3?-3:1)} from the left, on the ${hairCols.indexOf(mii.eyebrows.col)>3?`bottom`:`top`} row.`,
|
|
1970
|
+
"eyebrowY":`${mii.eyebrows.yPos!==7?`On the eyebrow page (fifth tab), `:``}${mii.eyebrows.yPos<7?`press the up button ${7-mii.eyebrows.yPos} times.`:mii.eyebrows.yPos>7?`press the down button ${mii.eyebrows.yPos-7} times.`:``}`,
|
|
1971
|
+
"eyebrowSize":`${mii.eyebrows.size!==4?`On the eyebrow page (fifth tab), `:``}${mii.eyebrows.size<4?`press the shrink button ${4-mii.eyebrows.size} times.`:mii.eyebrows.size>4?`press the enlarge button ${mii.eyebrows.size-4} times.`:``}`,
|
|
1972
|
+
"eyebrowRot":`${mii.eyebrows.rotation!==6?`On the eyebrow page (fifth tab), `:``}${mii.eyebrows.rotation<6?`press the rotate clockwise button ${6-mii.eyebrows.rotation} times.`:mii.eyebrows.rotation>6?`press the rotate counter-clockwise button ${mii.eyebrows.rotation-6} times.`:``}`,
|
|
1973
|
+
"eyebrowDist":`${mii.eyebrows.distApart!==2?`On the eyebrow page (fifth tab), `:``}${mii.eyebrows.distApart<2?`press the closer-together button ${2-mii.eyebrows.distApart} times.`:mii.eyebrows.distApart>2?`press the further-apart button ${mii.eyebrows.distApart-2} times.`:``}`,
|
|
1974
|
+
"eyeType":`On the eye page (sixth tab), set the eye type to the one ${mii.eyes.type[1]} from the left, ${mii.eyes.type[2]} from the top, on page ${mii.eyes.type[0]}.`,
|
|
1975
|
+
"eyeColor":`On the eye page (sixth tab), set the color to the one ${eyeCols.indexOf(mii.eyes.col)+(eyeCols.indexOf(mii.eyes.col)>2?-2:1)} from the left, on the ${eyeCols.indexOf(mii.eyes.col)>2?`bottom`:`top`} row.`,
|
|
1976
|
+
"eyeY":`${mii.eyes.yPos!==12?`On the eye page (sixth tab), `:``}${mii.eyes.yPos<12?`press the up button ${12-mii.eyes.yPos} times.`:mii.eyes.yPos>12?`press the down button ${mii.eyes.yPos-12} times.`:``}`,
|
|
1977
|
+
"eyeSize":`${mii.eyes.size!==4?`On the eye page (sixth tab), `:``}${mii.eyes.size<4?`press the shrink button ${4-mii.eyes.size} times.`:mii.eyes.size>4?`press the enlarge button ${mii.eyes.size-4} times.`:``}`,
|
|
1978
|
+
"eyeRot":`${mii.eyes.rotation!==(mii.info.gender==="Female"?3:4)?`On the eye page (sixth tab), `:``}${mii.eyes.rotation<(mii.info.gender==="Female"?3:4)?`press the rotate clockwise button ${(mii.info.gender==="Female"?3:4)-mii.eyes.rotation} times.`:mii.eyes.rotation>(mii.info.gender==="Female"?3:4)?`press the rotate counter-clockwise button ${mii.eyes.rotation-(mii.info.gender==="Female"?3:4)} times.`:``}`,
|
|
1979
|
+
"eyeDist":`${mii.eyes.distApart!==2?`On the eye page (sixth tab), `:``}${mii.eyes.distApart<2?`press the closer-together button ${2-mii.eyes.distApart} times.`:mii.eyes.distApart>2?`press the further-apart button ${mii.eyes.distApart-2} times.`:``}`,
|
|
1980
|
+
"noseType":`On the nose page (seventh tab), set the nose to the one ${Math.ceil((mii.nose.type+1)/3)} from the top, and ${[1,2,3,1,2,3,1,2,3,1,2,3][mii.nose.type]} from the left.`,
|
|
1981
|
+
"noseY":`${mii.nose.yPos!==9?`On the nose page (seventh tab), `:``}${mii.nose.yPos<9?`press the up button ${9-mii.nose.yPos} times.`:mii.nose.yPos>9?`press the down button ${mii.nose.yPos-9} times.`:``}`,
|
|
1982
|
+
"noseSize":`${mii.nose.size!==4?`On the nose page (seventh tab), `:``}${mii.nose.size<4?`press the shrink button ${4-mii.nose.size} times.`:mii.nose.size>4?`press the enlarge button ${mii.nose.size-4} times.`:``}`,
|
|
1983
|
+
"mouthType":`On the mouth page (eighth tab), set the mouth type to the one ${mii.mouth.type[1]} from the left, ${mii.mouth.type[2]} from the top, on page ${mii.mouth.type[0]}.`,
|
|
1984
|
+
"mouthCol":`On the mouth page (eighth tab), set the color to the one ${wiiMouthColors.indexOf(mii.mouth.col)+1} from the left.`,
|
|
1985
|
+
"mouthY":`${mii.mouth.yPos!==13?`On the mouth page (eighth tab), `:``}${mii.mouth.yPos<13?`press the up button ${13-mii.mouth.yPos} times.`:mii.mouth.yPos>13?`press the down button ${mii.mouth.yPos-13} times.`:``}`,
|
|
1986
|
+
"mouthSize":`${mii.mouth.size!==4?`On the mouth page (eighth tab), `:``}${mii.mouth.size<4?`press the shrink button ${4-mii.mouth.size} times.`:mii.mouth.size>4?`press the enlarge button ${mii.mouth.size-4} times.`:``}`,
|
|
1987
|
+
"glasses":`On the glasses page (within the ninth tab), set the glasses to the one ${Math.ceil((mii.glasses.type+1)/3)} from the top, and ${[1,2,3,1,2,3,1,2,3,1,2,3][mii.glasses.type]} from the left.`,
|
|
1988
|
+
"glassesCol":`On the glasses page (within the ninth tab), set the color to the one ${wiiGlassesCols.indexOf(mii.glasses.col)+(wiiGlassesCols.indexOf(mii.glasses.col)>2?-2:1)} from the left, on the ${wiiGlassesCols.indexOf(mii.glasses.col)>2?`bottom`:`top`} row.`,
|
|
1989
|
+
"glassesY":`${mii.glasses.yPos!==10?`On the glasses page (within the ninth tab), `:``}${mii.glasses.yPos<10?`press the up button ${10-mii.glasses.yPos} times.`:mii.glasses.yPos>10?`press the down button ${mii.glasses.yPos-10} times.`:``}`,
|
|
1990
|
+
"glassesSize":`${mii.glasses.size!==4?`On the glasses page (within the ninth tab), `:``}${mii.glasses.size<4?`press the shrink button ${4-mii.glasses.size} times.`:mii.glasses.size>4?`press the enlarge button ${mii.glasses.size-4} times.`:``}`,
|
|
1991
|
+
"stache":`On the mustache page (within the ninth tab), set the mustache to the one on the ${[0,1].includes(mii.facialHair.mustacheType)?`top`:`bottom`}-${[0,2].includes(mii.facialHair.mustacheType)?`left`:`right`}.`,
|
|
1992
|
+
"stacheY":`${mii.facialHair.mustacheYPos!==10?`On the mustache page (within the ninth tab), press the `:``}${mii.facialHair.mustacheYPos>10?`down button ${mii.facialHair.mustacheYPos-10} times.`:mii.facialHair.mustacheYPos<10?`up button ${10-mii.facialHair.mustacheYPos} times.`:``}`,
|
|
1993
|
+
"stacheSize":`${mii.facialHair.mustacheSize!==4?`On the mustache page (within the ninth tab), `:``}${mii.facialHair.mustacheSize<4?`press the shrink button ${4-mii.facialHair.mustacheSize} times.`:mii.facialHair.mustacheSize>4?`press the enlarge button ${mii.facialHair.mustacheSize-4} times.`:``}`,
|
|
1994
|
+
"mole":`${mii.mole.on?`On the mole page (within the ninth tab), turn the mole on.`:``}`,
|
|
1995
|
+
"moleX":`${mii.mole.xPos!==2?`On the mole page (within the ninth tab), press the `:``}${mii.mole.xPos>2?`right button ${mii.mole.xPos-2} times.`:mii.mole.xPos<2?`left button ${2-mii.mole.xPos} times.`:``}`,
|
|
1996
|
+
"moleY":`${mii.mole.yPos!==20?`On the mole page (within the ninth tab), press the `:``}${mii.mole.yPos>20?`down button ${mii.mole.yPos-20} times.`:mii.mole.yPos<20?`up button ${20-mii.mole.yPos} times.`:``}`,
|
|
1997
|
+
"moleSize":`${mii.mole.size!==4?`On the mole page (within the ninth tab), `:``}${mii.mole.size<4?`press the shrink button ${4-mii.mole.size} times.`:mii.mole.size>4?`press the enlarge button ${mii.mole.size-4} times.`:``}`,
|
|
1998
|
+
"beard":`On the beard page (within the ninth tab), set the beard to the one on the ${[0,1].includes(mii.facialHair.beardType)?`top`:`bottom`}-${[0,2].includes(mii.facialHair.beardType)?`left`:`right`}.`,
|
|
1999
|
+
"beardCol":`On the mustache OR beard pages (within the ninth tab), set the color to the one ${hairCols.indexOf(mii.facialHair.col)+(hairCols.indexOf(mii.facialHair.col)>3?-3:1)} from the left, on the ${hairCols.indexOf(mii.facialHair.col)>3?`bottom`:`top`} row.`,
|
|
2000
|
+
"other":`The Nickname of this Mii is ${mii.info.name}.${mii.info.creatorName?` The creator was ${mii.info.creatorName}.`:``} Mingle was turned ${mii.info.mingle?`on`:`off`}.${mii.info.birthday!==0?` Its birthday is ${["","January","February","March","April","May","June","July","August","September","October","November","December"][mii.info.birthMonth]} ${mii.info.birthday}.`:``}`
|
|
2001
|
+
};
|
|
2002
|
+
if(!full){
|
|
2003
|
+
var defaultMiiInstrs=structuredClone(mii.info.gender==="Male"?defaultInstrs.wii.male:defaultInstrs.wii.female);
|
|
2004
|
+
Object.keys(instrs).forEach(instr=>{
|
|
2005
|
+
if(instrs[instr]===defaultMiiInstrs[instr]){
|
|
2006
|
+
delete instrs[instr];
|
|
2007
|
+
}
|
|
2008
|
+
});
|
|
2009
|
+
}
|
|
2010
|
+
return instrs;
|
|
2011
|
+
}
|
|
2012
|
+
else{
|
|
2013
|
+
var instrs={
|
|
2014
|
+
"base":`Select "Start from Scratch", and then "${mii.info.gender}".`,
|
|
2015
|
+
"faceShape":`On the face page (first tab), set the face shape to the one ${Math.ceil((mii.face.shape+1)/3)} from the top, and ${[1,2,3,1,2,3,1,2,3,1,2,3][mii.face.shape]} from the left.`,
|
|
2016
|
+
"skinCol":`On the face page (first tab), set the color to the one ${skinCols.indexOf(mii.face.col)+1} from the top.`,
|
|
2017
|
+
"makeup":`On the face page's makeup tab, set the makeup to \"${mii.face.makeup}\" (the one ${Math.ceil((makeups3DS.indexOf(mii.face.makeup)+1)/3)} from the top, and ${[1,2,3,1,2,3,1,2,3,1,2,3][makeups3DS.indexOf(mii.face.makeup)]} from the left).`,
|
|
2018
|
+
"feature":`On the face page's wrinkles tab, set the facial feature to \"${mii.face.feature}\" (the one ${Math.ceil((faceFeatures3DS.indexOf(mii.face.feature)+1)/3)+1} from the top, and ${[1,2,3,1,2,3,1,2,3,1,2,3][makeups3DS.indexOf(mii.face.makeup)]} from the left).`,
|
|
2019
|
+
"hairStyle":`On the hair page (second tab), set the hair style to the one ${Math.ceil((mii.hair.style[1]+1)/3)} from the top, and ${[1,2,3,1,2,3,1,2,3,1,2,3][mii.hair.style[1]]} from the left, on page ${mii.hair.style[0]+1}.`,
|
|
2020
|
+
"hairFlipped":`${mii.hair.flipped?`On the hair page (second tab), press the button to flip the hair.`:``}`,
|
|
2021
|
+
"hairColor":`On the hair page (second tab), set the hair color to the one ${hairCols.indexOf(mii.hair.col)+1} from the top.`,
|
|
2022
|
+
"eyebrowStyle":`On the eyebrow page (third tab), set the eyebrow style to the one ${[1,2,3,1,2,3,1,2,3,1,2,3][mii.eyebrows.style[1]]} from the left, ${Math.ceil((mii.eyebrows.style[1]+1)/3)} from the top, on page ${mii.eyebrows.style[0]+1}.`,
|
|
2023
|
+
"eyebrowColor":`On the eyebrow page (third tab), set the eyebrow color to the one ${hairCols.indexOf(mii.eyebrows.col)+1} from the top.`,
|
|
2024
|
+
"eyebrowY":`${mii.eyebrows.yPos!==7?`On the eyebrow page (third tab), `:``}${mii.eyebrows.yPos<7?`press the up button ${7-mii.eyebrows.yPos} times.`:mii.eyebrows.yPos>7?`press the down button ${mii.eyebrows.yPos-7} times.`:``}`,
|
|
2025
|
+
"eyebrowSize":`${mii.eyebrows.size!==4?`On the eyebrow page (third tab), `:``}${mii.eyebrows.size<4?`press the shrink button ${4-mii.eyebrows.size} times.`:mii.eyebrows.size>4?`press the enlarge button ${mii.eyebrows.size-4} times.`:``}`,
|
|
2026
|
+
"eyebrowRot":`${mii.eyebrows.rot!==6?`On the eyebrow page (third tab), `:``}${mii.eyebrows.rot<6?`press the rotate clockwise button ${6-mii.eyebrows.rot} times.`:mii.eyebrows.rot>6?`press the rotate counter-clockwise button ${mii.eyebrows.rot-6} times.`:``}`,
|
|
2027
|
+
"eyebrowDist":`${mii.eyebrows.distApart!==2?`On the eyebrow page (third tab), `:``}${mii.eyebrows.distApart<2?`press the closer-together button ${2-mii.eyebrows.distApart} times.`:mii.eyebrows.distApart>2?`press the further-apart button ${mii.eyebrows.distApart-2} times.`:``}`,
|
|
2028
|
+
"eyebrowSquash":`${mii.eyebrows.squash!==3?`On the eyebrow page (third tab), `:``}${mii.eyebrows.squash<3?`press the squish button ${3-mii.eyebrows.squash} times.`:mii.eyebrows.squash>3?`press the un-squish button ${mii.eyebrows.squash-3} times.`:``}`,
|
|
2029
|
+
"eyeType":`On the eye page (fourth tab), set the eye type to the one ${[1,2,3,1,2,3,1,2,3,1,2,3][mii.eyes.type[1]]} from the left, ${Math.ceil((mii.eyes.type[1]+1)/3)} from the top, on page ${mii.eyes.type[0]+1}.`,
|
|
2030
|
+
"eyeColor":`On the eye page (fourth tab), set the color to the one ${eyeCols.indexOf(mii.eyes.col)+1} from the top.`,
|
|
2031
|
+
"eyeY":`${mii.eyes.yPos!==12?`On the eye page (fourth tab), `:``}${mii.eyes.yPos<12?`press the up button ${12-mii.eyes.yPos} times.`:mii.eyes.yPos>12?`press the down button ${mii.eyes.yPos-12} times.`:``}`,
|
|
2032
|
+
"eyeSize":`${mii.eyes.size!==4?`On the eye page (fourth tab), `:``}${mii.eyes.size<4?`press the shrink button ${4-mii.eyes.size} times.`:mii.eyes.size>4?`press the enlarge button ${mii.eyes.size-4} times.`:``}`,
|
|
2033
|
+
"eyeRot":`${mii.eyes.rot!==(mii.info.gender==="Female"?3:4)?`On the eye page (fourth tab), `:``}${mii.eyes.rot<(mii.info.gender==="Female"?3:4)?`press the rotate clockwise button ${(mii.info.gender==="Female"?3:4)-mii.eyes.rot} times.`:mii.eyes.rot>(mii.info.gender==="Female"?3:4)?`press the rotate counter-clockwise button ${mii.eyes.rot-(mii.info.gender==="Female"?3:4)} times.`:``}`,
|
|
2034
|
+
"eyeDist":`${mii.eyes.distApart!==2?`On the eye page (fourth tab), `:``}${mii.eyes.distApart<2?`press the closer-together button ${2-mii.eyes.distApart} times.`:mii.eyes.distApart>2?`press the further-apart button ${mii.eyes.distApart-2} times.`:``}`,
|
|
2035
|
+
"eyeSquash":`${mii.eyes.squash!==3?`On the eye page (fourth tab), `:``}${mii.eyes.squash<3?`press the squish button ${3-mii.eyes.squash} times.`:mii.eyes.squash>3?`press the un-squish button ${mii.eyes.squash-3} times.`:``}`,
|
|
2036
|
+
"noseType":`On the nose page (fifth tab), set the nose to the one ${Math.ceil((mii.nose.type[1]+1)/3)} from the top, and ${[1,2,3,1,2,3,1,2,3,1,2,3][mii.nose.type[1]]} from the left, on page ${mii.nose.type[0]}.`,
|
|
2037
|
+
"noseY":`${mii.nose.yPos!==9?`On the nose page (fifth tab), `:``}${mii.nose.yPos<9?`press the up button ${9-mii.nose.yPos} times.`:mii.nose.yPos>9?`press the down button ${mii.nose.yPos-9} times.`:``}`,
|
|
2038
|
+
"noseSize":`${mii.nose.size!==4?`On the nose page (fifth tab), `:``}${mii.nose.size<4?`press the shrink button ${4-mii.nose.size} times.`:mii.nose.size>4?`press the enlarge button ${mii.nose.size-4} times.`:``}`,
|
|
2039
|
+
"mouthType":`On the mouth page (sixth tab), set the mouth type to the one ${[1,2,3,1,2,3,1,2,3,1,2,3][mii.mouth.type[1]]} from the left, ${Math.ceil((mii.mouth.type[1]+1)/3)} from the top, on page ${mii.mouth.type[0]+1}.`,
|
|
2040
|
+
"mouthCol":`On the mouth page (sixth tab), set the color to the one ${mouthCols3DS.indexOf(mii.mouth.col)+1} from the top.`,
|
|
2041
|
+
"mouthY":`${mii.mouth.yPos!==13?`On the mouth page (sixth tab), `:``}${mii.mouth.yPos<13?`press the up button ${13-mii.mouth.yPos} times.`:mii.mouth.yPos>13?`press the down button ${mii.mouth.yPos-13} times.`:``}`,
|
|
2042
|
+
"mouthSize":`${mii.mouth.size!==4?`On the mouth page (sixth tab), `:``}${mii.mouth.size<4?`press the shrink button ${4-mii.mouth.size} times.`:mii.mouth.size>4?`press the enlarge button ${mii.mouth.size-4} times.`:``}`,
|
|
2043
|
+
"mouthSquash":`${mii.mouth.squash!==3?`On the mouth page (sixth tab), `:``}${mii.mouth.squash<3?`press the squish button ${3-mii.mouth.squash} times.`:mii.mouth.squash>3?`press the un-squish button ${mii.mouth.squash-3} times.`:``}`,
|
|
2044
|
+
"glasses":`On the glasses page (within the seventh tab), set the glasses to the one ${Math.ceil((mii.glasses.type+1)/3)} from the top, and ${[1,2,3,1,2,3,1,2,3,1,2,3][mii.glasses.type]} from the left.`,
|
|
2045
|
+
"glassesCol":`On the glasses page (within the seventh tab), set the color to the one ${glassesCols3DS.indexOf(mii.glasses.col)+1} from the top.`,
|
|
2046
|
+
"glassesY":`${mii.glasses.yPos!==10?`On the glasses page (within the seventh tab), `:``}${mii.glasses.yPos<10?`press the up button ${10-mii.glasses.yPos} times.`:mii.glasses.yPos>10?`press the down button ${mii.glasses.yPos-10} times.`:``}`,
|
|
2047
|
+
"glassesSize":`${mii.glasses.size!==4?`On the glasses page (within the seventh tab), `:``}${mii.glasses.size<4?`press the shrink button ${4-mii.glasses.size} times.`:mii.glasses.size>4?`press the enlarge button ${mii.glasses.size-4} times.`:``}`,
|
|
2048
|
+
"stache":`On the mustache page (within the seventh tab), set the mustache to the one on the ${[0,1].includes(mii.facialHair.mustacheType)?`top`:[2,3].includes(mii.facialHair.mustacheType)?`middle`:`bottom`}-${[0,2,4].includes(mii.facialHair.mustacheType)?`left`:`right`}.`,
|
|
2049
|
+
"stacheY":`${mii.facialHair.mustacheYPos!==10?`On the mustache page (within the seventh tab), press the `:``}${mii.facialHair.mustacheYPos>10?`down button ${mii.facialHair.mustacheYPos-10} times.`:mii.facialHair.mustacheYPos<10?`up button ${10-mii.facialHair.mustacheYPos} times.`:``}`,
|
|
2050
|
+
"stacheSize":`${mii.facialHair.mustacheSize!==4?`On the mustache page (within the seventh tab), `:``}${mii.facialHair.mustacheSize<4?`press the shrink button ${4-mii.facialHair.mustacheSize} times.`:mii.facialHair.mustacheSize>4?`press the enlarge button ${mii.facialHair.mustacheSize-4} times.`:``}`,
|
|
2051
|
+
"mole":`${mii.mole.on?`On the mole page (within the seventh tab), turn the mole on.`:``}`,
|
|
2052
|
+
"moleX":`${mii.mole.xPos!==2?`On the mole page (within the seventh tab), press the `:``}${mii.mole.xPos>2?`right button ${mii.mole.xPos-2} times.`:mii.mole.xPos<2?`left button ${2-mii.mole.xPos} times.`:``}`,
|
|
2053
|
+
"moleY":`${mii.mole.yPos!==20?`On the mole page (within the seventh tab), press the `:``}${mii.mole.yPos>20?`down button ${mii.mole.yPos-20} times.`:mii.mole.yPos<20?`up button ${20-mii.mole.yPos} times.`:``}`,
|
|
2054
|
+
"moleSize":`${mii.mole.size!==4?`On the mole page (within the seventh tab), `:``}${mii.mole.size<4?`press the shrink button ${4-mii.mole.size} times.`:mii.mole.size>4?`press the enlarge button ${mii.mole.size-4} times.`:``}`,
|
|
2055
|
+
"beard":`On the beard page (within the seventh tab), set the beard to the one on the ${[0,1].includes(mii.facialHair.beardType)?`top`:[2,3].includes(mii.facialHair.beardType)?`middle`:`bottom`}-${[0,2].includes(mii.facialHair.beardType)?`left`:`right`}.`,
|
|
2056
|
+
"beardCol":`On the mustache OR beard pages (within the seventh tab), set the color to the one ${hairCols.indexOf(mii.facialHair.col)+1} from the top.`,
|
|
2057
|
+
"heightWeight":`On the build page (eighth tab), set the height to ${Math.round((100/128)*mii.info.height)}%, and the weight to ${Math.round((100/128)*mii.info.weight)}%.`,
|
|
2058
|
+
"col":`On the info page (after pressing "Next"), set the Favorite Color to ${mii.info.favColor} (${favCols.indexOf(mii.info.favColor)<=5?favCols.indexOf(mii.info.favColor)+1:favCols.indexOf(mii.info.favColor)-5} from the left, ${favCols.indexOf(mii.info.favColor)>5?"bottom":"top"} row).`,
|
|
2059
|
+
"other":`The Nickname of this Mii is ${mii.info.name}.${mii.info.creatorName?` The creator was ${mii.info.creatorName}.`:``} ${mii.info.birthday!==0?` Its birthday is ${["","January","February","March","April","May","June","July","August","September","October","November","December"][mii.info.birthMonth]} ${mii.info.birthday}.`:``}`
|
|
2060
|
+
};
|
|
2061
|
+
if(!full){
|
|
2062
|
+
var defaultMiiInstrs=structuredClone(mii.info.gender==="Male"?defaultInstrs["3ds"].male:defaultInstrs["3ds"].female);
|
|
2063
|
+
Object.keys(instrs).forEach(instr=>{
|
|
2064
|
+
if(instrs[instr]===defaultMiiInstrs[instr]){
|
|
2065
|
+
delete instrs[instr];
|
|
2066
|
+
}
|
|
2067
|
+
});
|
|
2068
|
+
}
|
|
2069
|
+
return instrs;
|
|
2070
|
+
}
|
|
1777
2071
|
}
|
|
1778
2072
|
}
|
package/package.json
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "miijs",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Read, Edit, Write, and make Special Miis from a Wiimote binary file or 3DS QR Code to a binary file or QR code",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
-
},
|
|
9
|
-
"repository": {
|
|
10
|
-
"type": "git",
|
|
11
|
-
"url": "git+https://github.com/SMOMusic/MiiJS.git"
|
|
12
|
-
},
|
|
13
|
-
"keywords": [
|
|
14
|
-
"Mii",
|
|
15
|
-
"QR",
|
|
16
|
-
"3DS",
|
|
17
|
-
"Wii",
|
|
18
|
-
"Remote",
|
|
19
|
-
"Special"
|
|
20
|
-
],
|
|
21
|
-
"author": "Kestron",
|
|
22
|
-
"license": "ISC",
|
|
23
|
-
"bugs": {
|
|
24
|
-
"url": "https://github.com/SMOMusic/MiiJS/issues"
|
|
25
|
-
},
|
|
26
|
-
"homepage": "https://github.com/SMOMusic/MiiJS#readme",
|
|
27
|
-
"dependencies": {
|
|
28
|
-
"canvas": "^2.11.2",
|
|
29
|
-
"fs": "^0.0.1-security",
|
|
30
|
-
"https": "^1.0.0",
|
|
31
|
-
"jimp": "^0.22.7",
|
|
32
|
-
"jsqr": "^1.4.0",
|
|
33
|
-
"qrcode": "^1.5.3"
|
|
34
|
-
}
|
|
35
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "miijs",
|
|
3
|
+
"version": "1.8.0",
|
|
4
|
+
"description": "Read, Edit, Write, and make Special Miis from a Wiimote binary file or 3DS QR Code to a binary file or QR code",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
+
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/SMOMusic/MiiJS.git"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [
|
|
14
|
+
"Mii",
|
|
15
|
+
"QR",
|
|
16
|
+
"3DS",
|
|
17
|
+
"Wii",
|
|
18
|
+
"Remote",
|
|
19
|
+
"Special"
|
|
20
|
+
],
|
|
21
|
+
"author": "Kestron",
|
|
22
|
+
"license": "ISC",
|
|
23
|
+
"bugs": {
|
|
24
|
+
"url": "https://github.com/SMOMusic/MiiJS/issues"
|
|
25
|
+
},
|
|
26
|
+
"homepage": "https://github.com/SMOMusic/MiiJS#readme",
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"canvas": "^2.11.2",
|
|
29
|
+
"fs": "^0.0.1-security",
|
|
30
|
+
"https": "^1.0.0",
|
|
31
|
+
"jimp": "^0.22.7",
|
|
32
|
+
"jsqr": "^1.4.0",
|
|
33
|
+
"qrcode": "^1.5.3"
|
|
34
|
+
}
|
|
35
|
+
}
|