miijs 2.1.0 → 2.1.2
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 +2 -1
- package/defaultMii.json +188 -0
- package/fflWrapper.js +41 -0
- package/index.js +157 -271
- package/package.json +6 -3
- package/patch-ffl.js +48 -0
- package/out.txt +0 -178
- package/stuff.js +0 -208
package/index.js
CHANGED
|
@@ -16,7 +16,7 @@ const {
|
|
|
16
16
|
createCharModel, initCharModelTextures,
|
|
17
17
|
initializeFFL, exitFFL, parseHexOrB64ToUint8Array,
|
|
18
18
|
setIsWebGL1State, getCameraForViewType, ViewType
|
|
19
|
-
} = require("
|
|
19
|
+
} = require("./fflWrapper.js");
|
|
20
20
|
const ModuleFFL = require("ffl.js/examples/ffl-emscripten-single-file.js");
|
|
21
21
|
const FFLShaderMaterial = require("ffl.js/FFLShaderMaterial.js");
|
|
22
22
|
|
|
@@ -64,8 +64,11 @@ function getFFLRes() {
|
|
|
64
64
|
// If we've already tried loading, just return the result
|
|
65
65
|
if (_fflRes !== undefined) return _fflRes;
|
|
66
66
|
for (const path of [ "./FFLResHigh.dat", "./ffl/FFLResHigh.dat" ]) {
|
|
67
|
-
if (fs.existsSync(path))
|
|
68
|
-
|
|
67
|
+
if (fs.existsSync(path)) {
|
|
68
|
+
// Convert Buffer to Uint8Array explicitly
|
|
69
|
+
const buffer = fs.readFileSync(path);
|
|
70
|
+
return _fflRes = new Uint8Array(buffer);
|
|
71
|
+
}
|
|
69
72
|
}
|
|
70
73
|
// If no file found, mark as null
|
|
71
74
|
return _fflRes = null;
|
|
@@ -734,7 +737,6 @@ var convTables={
|
|
|
734
737
|
"10",9,11
|
|
735
738
|
]
|
|
736
739
|
};
|
|
737
|
-
|
|
738
740
|
const kidNames={
|
|
739
741
|
"Male":[
|
|
740
742
|
"Aaron",
|
|
@@ -1223,9 +1225,7 @@ const defaultMii={
|
|
|
1223
1225
|
"meta":{
|
|
1224
1226
|
"name": "Madison",
|
|
1225
1227
|
"creatorName": "",
|
|
1226
|
-
"console":"3ds"
|
|
1227
|
-
"miiId":"148",
|
|
1228
|
-
"systemId":"148"
|
|
1228
|
+
"console":"3ds"
|
|
1229
1229
|
},
|
|
1230
1230
|
"perms": {
|
|
1231
1231
|
"sharing": false,
|
|
@@ -1300,7 +1300,7 @@ const defaultMii={
|
|
|
1300
1300
|
"xPosition": 2,
|
|
1301
1301
|
"yPosition": 20
|
|
1302
1302
|
},
|
|
1303
|
-
"name": "
|
|
1303
|
+
"name": "",
|
|
1304
1304
|
"creatorName": ""
|
|
1305
1305
|
},
|
|
1306
1306
|
"female":{
|
|
@@ -1316,9 +1316,7 @@ const defaultMii={
|
|
|
1316
1316
|
"meta":{
|
|
1317
1317
|
"name": "Madison",
|
|
1318
1318
|
"creatorName": "",
|
|
1319
|
-
"console":"3ds"
|
|
1320
|
-
"miiId":"148",
|
|
1321
|
-
"systemId":"148"
|
|
1319
|
+
"console":"3ds"
|
|
1322
1320
|
},
|
|
1323
1321
|
"perms": {
|
|
1324
1322
|
"sharing": false,
|
|
@@ -1393,7 +1391,7 @@ const defaultMii={
|
|
|
1393
1391
|
"xPosition": 2,
|
|
1394
1392
|
"yPosition": 20
|
|
1395
1393
|
},
|
|
1396
|
-
"name": "
|
|
1394
|
+
"name": "",
|
|
1397
1395
|
"creatorName": ""
|
|
1398
1396
|
}
|
|
1399
1397
|
};
|
|
@@ -1900,171 +1898,54 @@ function convertMii(jsonIn,typeTo){
|
|
|
1900
1898
|
return jsonIn;
|
|
1901
1899
|
}
|
|
1902
1900
|
let mii=jsonIn;
|
|
1903
|
-
var miiTo=
|
|
1901
|
+
var miiTo=structuredClone(mii);
|
|
1904
1902
|
if(["wii u","3ds"].includes(typeFrom)){
|
|
1905
|
-
miiTo=
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
nose:{},
|
|
1909
|
-
mouth:{},
|
|
1910
|
-
mole:{},
|
|
1911
|
-
hair:{},
|
|
1912
|
-
eyebrows:{},
|
|
1913
|
-
eyes:{},
|
|
1914
|
-
glasses:{},
|
|
1915
|
-
facialHair:{}
|
|
1916
|
-
};
|
|
1917
|
-
miiTo.creatorName=mii.creatorName;
|
|
1918
|
-
miiTo.info.creatorName=miiTo.creatorName;
|
|
1919
|
-
miiTo.name=mii.name;
|
|
1920
|
-
miiTo.info.name=miiTo.name;
|
|
1921
|
-
miiTo.info.gender=mii.info.gender;
|
|
1922
|
-
miiTo.info.systemId="ffffffff";
|
|
1923
|
-
let miiId;
|
|
1924
|
-
switch(mii.info.type){
|
|
1925
|
-
case "Special":
|
|
1926
|
-
miiId="01000110";
|
|
1927
|
-
break;
|
|
1928
|
-
case "Foreign":
|
|
1929
|
-
miiId="11000110";
|
|
1930
|
-
break;
|
|
1931
|
-
default:
|
|
1932
|
-
miiId="10001001";
|
|
1933
|
-
break;
|
|
1934
|
-
}
|
|
1935
|
-
for(var i=0;i<3;i++){
|
|
1936
|
-
miiId+=Math.floor(Math.random()*255).toString(2).padStart(8,"0");
|
|
1937
|
-
}
|
|
1938
|
-
miiTo.info.miiId+=miiId;
|
|
1939
|
-
miiTo.info.mingle=mii.perms.copying;
|
|
1940
|
-
miiTo.info.birthMonth=mii.info.birthMonth;
|
|
1941
|
-
miiTo.info.birthday=mii.info.birthday;
|
|
1942
|
-
miiTo.info.favColor=mii.info.favColor;
|
|
1943
|
-
miiTo.info.favorited=false;
|
|
1944
|
-
miiTo.info.height=mii.info.height;
|
|
1945
|
-
miiTo.info.weight=mii.info.weight;
|
|
1946
|
-
miiTo.info.downloadedFromCheckMiiOut=false;
|
|
1947
|
-
miiTo.face.shape=convTables.face3DSToWii[mii.face.shape];
|
|
1948
|
-
miiTo.face.col=mii.face.col;
|
|
1903
|
+
miiTo.perms.mingle=mii.perms.sharing;
|
|
1904
|
+
miiTo.perms.fromCheckMiiOut=false;
|
|
1905
|
+
miiTo.face.type=convTables.face3DSToWii[mii.face.type];
|
|
1949
1906
|
//We prioritize Facial Features here because the Wii supports more of those than they do Makeup types, and is more likely to apply. The 3DS has two separate fields, so you can have makeup and wrinkles applied at the same time. The Wii only has one that covers both.
|
|
1950
|
-
if(typeof(convTables.features3DSToWii[
|
|
1951
|
-
miiTo.face.feature=
|
|
1907
|
+
if(typeof(convTables.features3DSToWii[mii.face.feature])==='string'){
|
|
1908
|
+
miiTo.face.feature=convTables.makeup3DSToWii[mii.face.makeup];
|
|
1952
1909
|
}
|
|
1953
1910
|
else{
|
|
1954
|
-
miiTo.face.feature=
|
|
1911
|
+
miiTo.face.feature=convTables.features3DSToWii[mii.face.feature];
|
|
1955
1912
|
}
|
|
1956
|
-
miiTo.nose.type=convTables.nose3DSToWii[mii.nose.
|
|
1957
|
-
miiTo.
|
|
1958
|
-
miiTo.
|
|
1959
|
-
miiTo.
|
|
1960
|
-
miiTo.
|
|
1961
|
-
miiTo.
|
|
1962
|
-
miiTo.
|
|
1963
|
-
miiTo.
|
|
1964
|
-
|
|
1965
|
-
miiTo.hair.flipped=mii.hair.flipped;
|
|
1966
|
-
miiTo.hair.type=convTables.hair3DSToWii[mii.hair.style[0]][mii.hair.style[1]];
|
|
1967
|
-
miiTo.eyebrows.type=convTables.eyebrows3DSToWii[mii.eyebrows.style[0]][mii.eyebrows.style[1]];
|
|
1968
|
-
miiTo.eyebrows.col=mii.eyebrows.col;
|
|
1969
|
-
miiTo.eyebrows.rotation=mii.eyebrows.rot;
|
|
1970
|
-
miiTo.eyebrows.size=mii.eyebrows.size;
|
|
1971
|
-
miiTo.eyebrows.yPos=mii.eyebrows.yPos;
|
|
1972
|
-
miiTo.eyebrows.distApart=mii.eyebrows.distApart;
|
|
1973
|
-
miiTo.eyes.type=convTables.eyes3DSToWii[mii.eyes.type[0]][mii.eyes.type[1]];
|
|
1974
|
-
miiTo.eyes.rotation=mii.eyes.rot;
|
|
1975
|
-
miiTo.eyes.yPos=mii.eyes.yPos;
|
|
1976
|
-
miiTo.eyes.col=mii.eyes.col;
|
|
1977
|
-
miiTo.eyes.size=mii.eyes.size;
|
|
1978
|
-
miiTo.eyes.distApart=mii.eyes.distApart;
|
|
1979
|
-
miiTo.glasses=mii.glasses;
|
|
1980
|
-
miiTo.glasses.col=wiiGlassesCols[glassesCols3DS.indexOf(mii.glasses.col)];
|
|
1981
|
-
miiTo.facialHair=mii.facialHair;
|
|
1982
|
-
if(miiTo.facialHair.mustacheType===4){
|
|
1983
|
-
miiTo.facialHair.mustacheType=2;
|
|
1913
|
+
miiTo.nose.type=convTables.nose3DSToWii[mii.nose.page][mii.nose.type];
|
|
1914
|
+
miiTo.mouth.type=convTables.mouth3DSToWii[mii.mouth.page][mii.mouth.type];
|
|
1915
|
+
miiTo.mouth.color=mii.mouth.col>2?0:mii.mouth.col;
|
|
1916
|
+
miiTo.hair.type=convTables.hair3DSToWii[mii.hair.page][mii.hair.type];
|
|
1917
|
+
miiTo.eyebrows.type=convTables.eyebrows3DSToWii[mii.eyebrows.page][mii.eyebrows.type];
|
|
1918
|
+
miiTo.eyes.type=convTables.eyes3DSToWii[mii.eyes.page][mii.eyes.type];
|
|
1919
|
+
miiTo.glasses.col=mii.glasses.col;
|
|
1920
|
+
if(miiTo.beard.mustache.type===4){
|
|
1921
|
+
miiTo.beard.mustache.type=2;
|
|
1984
1922
|
}
|
|
1985
|
-
else if(miiTo.
|
|
1986
|
-
miiTo.
|
|
1987
|
-
miiTo.
|
|
1923
|
+
else if(miiTo.beard.mustache.type===5){
|
|
1924
|
+
miiTo.beard.mustache.type=0;
|
|
1925
|
+
miiTo.beard.type=1;
|
|
1988
1926
|
}
|
|
1989
|
-
if(mii.
|
|
1990
|
-
mii.
|
|
1927
|
+
if(mii.beard.type>3){
|
|
1928
|
+
mii.beard.type=3;
|
|
1991
1929
|
}
|
|
1992
1930
|
miiTo.console="wii";
|
|
1993
1931
|
}
|
|
1994
1932
|
else if(typeFrom==="wii"){
|
|
1995
|
-
miiTo={
|
|
1996
|
-
info:{},
|
|
1997
|
-
perms:{},
|
|
1998
|
-
hair:{},
|
|
1999
|
-
face:{},
|
|
2000
|
-
eyes:{},
|
|
2001
|
-
eyebrows:{},
|
|
2002
|
-
nose:{},
|
|
2003
|
-
mouth:{},
|
|
2004
|
-
facialHair:{},
|
|
2005
|
-
glasses:{},
|
|
2006
|
-
mole:{}
|
|
2007
|
-
};
|
|
2008
|
-
miiTo.info.birthday=mii.info.birthday;
|
|
2009
|
-
miiTo.info.birthMonth=mii.info.birthMonth;
|
|
2010
|
-
miiTo.name=mii.name;
|
|
2011
|
-
miiTo.info.name=miiTo.name;
|
|
2012
|
-
miiTo.creatorName=mii.creatorName;
|
|
2013
|
-
miiTo.info.creatorName=mii.creatorName;
|
|
2014
|
-
miiTo.info.height=mii.info.height;
|
|
2015
|
-
miiTo.info.weight=mii.info.weight;
|
|
2016
|
-
miiTo.info.favColor=mii.info.favColor;
|
|
2017
|
-
miiTo.info.gender=mii.info.gender;
|
|
2018
1933
|
miiTo.perms.sharing=mii.info.mingle;
|
|
2019
1934
|
miiTo.perms.copying=mii.info.mingle;
|
|
2020
|
-
miiTo.hair.
|
|
2021
|
-
miiTo.hair.flipped=mii.hair.flipped;
|
|
2022
|
-
miiTo.hair.style=convTables.hairWiiTo3DS[+mii.hair.type[0]-1][0+(3*(+mii.hair.type[2]-1))+(+mii.hair.type[1]-1)];
|
|
1935
|
+
miiTo.hair.style=convTables.hairWiiTo3DS[mii.hair.page][mii.hair.type];
|
|
2023
1936
|
miiTo.face.shape=convTables.faceWiiTo3DS[mii.face.shape];
|
|
2024
|
-
miiTo.face.
|
|
2025
|
-
miiTo.face.
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
miiTo.face.makeup=makeups3DS[+convTables.featureWiiTo3DS[wiiFaceFeatures.indexOf(mii.face.feature)]];
|
|
1937
|
+
miiTo.face.makeup=0;
|
|
1938
|
+
miiTo.face.feature=0;
|
|
1939
|
+
if(typeof(convTables.featureWiiTo3DS[mii.face.feature])==='string'){
|
|
1940
|
+
miiTo.face.makeup=makeups3DS[+convTables.featureWiiTo3DS[mii.face.feature]];
|
|
2029
1941
|
}
|
|
2030
1942
|
else{
|
|
2031
|
-
miiTo.face.feature=faceFeatures3DS[convTables.featureWiiTo3DS[
|
|
1943
|
+
miiTo.face.feature=faceFeatures3DS[convTables.featureWiiTo3DS[mii.face.feature]];
|
|
2032
1944
|
}
|
|
2033
|
-
miiTo.eyes.col=eyeCols[eyeCols.indexOf(mii.eyes.col)];
|
|
2034
|
-
miiTo.eyes.type=[+mii.eyes.type[0]-1,(+mii.eyes.type[1]-1)+(3*(+mii.eyes.type[2]-1))];
|
|
2035
|
-
miiTo.eyes.size=mii.eyes.size;
|
|
2036
1945
|
miiTo.eyes.squash=3;
|
|
2037
|
-
miiTo.eyes.rot=mii.eyes.rotation;
|
|
2038
|
-
miiTo.eyes.distApart=mii.eyes.distApart;
|
|
2039
|
-
miiTo.eyes.yPos=mii.eyes.yPos;
|
|
2040
|
-
miiTo.eyebrows.style=[+mii.eyebrows.type[0]-1,(+mii.eyebrows.type[1]-1)+(3*(+mii.eyebrows.type[2]-1))];
|
|
2041
|
-
miiTo.eyebrows.col=hairCols[hairCols.indexOf(mii.eyebrows.col)];
|
|
2042
|
-
miiTo.eyebrows.size=mii.eyebrows.size;
|
|
2043
1946
|
miiTo.eyebrows.squash=3;
|
|
2044
|
-
miiTo.
|
|
2045
|
-
miiTo.eyebrows.distApart=mii.eyebrows.distApart;
|
|
2046
|
-
miiTo.eyebrows.yPos=mii.eyebrows.yPos;
|
|
2047
|
-
miiTo.nose.type=[0,mii.nose.type];
|
|
2048
|
-
miiTo.nose.size=mii.nose.size;
|
|
2049
|
-
miiTo.nose.yPos=mii.nose.yPos;
|
|
2050
|
-
miiTo.mouth.type=[+mii.mouth.type[0]-1,(+mii.mouth.type[1]-1)+(3*(+mii.mouth.type[2]-1))];
|
|
2051
|
-
miiTo.mouth.col=mouthCols3DS[wiiMouthColors.indexOf(mii.mouth.col)];
|
|
2052
|
-
miiTo.mouth.size=mii.mouth.size;
|
|
1947
|
+
miiTo.mouth.col=mouthCols3DS[mii.mouth.col];//qk
|
|
2053
1948
|
miiTo.mouth.squash=3;
|
|
2054
|
-
miiTo.mouth.yPos=mii.mouth.yPos;
|
|
2055
|
-
miiTo.facialHair.mustacheType=mii.facialHair.mustacheType;
|
|
2056
|
-
miiTo.facialHair.beardType=mii.facialHair.beardType;
|
|
2057
|
-
miiTo.facialHair.col=hairCols[hairCols.indexOf(mii.facialHair.col)];
|
|
2058
|
-
miiTo.facialHair.mustacheSize=mii.facialHair.mustacheSize;
|
|
2059
|
-
miiTo.facialHair.mustacheYPos=mii.facialHair.mustacheYPos;
|
|
2060
|
-
miiTo.glasses.type=mii.glasses.type;
|
|
2061
|
-
miiTo.glasses.col=glassesCols3DS[["Grey","Brown","Red","Blue","Yellow","White"].indexOf(mii.glasses.col)];
|
|
2062
|
-
miiTo.glasses.size=mii.glasses.size;
|
|
2063
|
-
miiTo.glasses.yPos=mii.glasses.yPos;
|
|
2064
|
-
miiTo.mole.on=mii.mole.on;
|
|
2065
|
-
miiTo.mole.size=mii.mole.size;
|
|
2066
|
-
miiTo.mole.xPos=mii.mole.xPos;
|
|
2067
|
-
miiTo.mole.yPos=mii.mole.yPos;
|
|
2068
1949
|
miiTo.console="3ds";
|
|
2069
1950
|
}
|
|
2070
1951
|
return miiTo;
|
|
@@ -2075,38 +1956,38 @@ function convertMiiToStudio(jsonIn) {
|
|
|
2075
1956
|
}
|
|
2076
1957
|
var mii = jsonIn;
|
|
2077
1958
|
var studioMii = new Uint8Array([0x08, 0x00, 0x40, 0x03, 0x08, 0x04, 0x04, 0x02, 0x02, 0x0c, 0x03, 0x01, 0x06, 0x04, 0x06, 0x02, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x00, 0x0a, 0x01, 0x00, 0x21, 0x40, 0x04, 0x00, 0x02, 0x14, 0x03, 0x13, 0x04, 0x17, 0x0d, 0x04, 0x00, 0x0a, 0x04, 0x01, 0x09]);
|
|
2078
|
-
studioMii[0x16] = mii.
|
|
2079
|
-
studioMii[0x15] =
|
|
2080
|
-
studioMii[0x1E] = mii.
|
|
2081
|
-
studioMii[2] = mii.
|
|
2082
|
-
studioMii[0x13] = lookupTables.faces.values[mii.face.
|
|
2083
|
-
studioMii[0x11] =
|
|
2084
|
-
studioMii[0x14] =
|
|
2085
|
-
studioMii[0x12] =
|
|
2086
|
-
studioMii[0x1D] = lookupTables.hairs.values[mii.hair.
|
|
2087
|
-
studioMii[0x1B] =
|
|
1959
|
+
studioMii[0x16] = mii.general.gender;
|
|
1960
|
+
studioMii[0x15] = mii.general.favoriteColor;
|
|
1961
|
+
studioMii[0x1E] = mii.general.height;
|
|
1962
|
+
studioMii[2] = mii.general.weight;
|
|
1963
|
+
studioMii[0x13] = lookupTables.faces.values[mii.face.type];
|
|
1964
|
+
studioMii[0x11] = mii.face.color;
|
|
1965
|
+
studioMii[0x14] = mii.face.feature;
|
|
1966
|
+
studioMii[0x12] = mii.face.makeup;
|
|
1967
|
+
studioMii[0x1D] = lookupTables.hairs.values[mii.hair.page][mii.hair.type];
|
|
1968
|
+
studioMii[0x1B] = mii.hair.color;
|
|
2088
1969
|
if (!studioMii[0x1B]) studioMii[0x1B] = 8;
|
|
2089
1970
|
studioMii[0x1C] = mii.hair.flipped ? 1 : 0;
|
|
2090
|
-
studioMii[7] = lookupTables.eyes.values[mii.eyes.
|
|
2091
|
-
studioMii[4] =
|
|
1971
|
+
studioMii[7] = lookupTables.eyes.values[mii.eyes.page][mii.eyes.type];
|
|
1972
|
+
studioMii[4] = mii.eyes.color + 8;
|
|
2092
1973
|
studioMii[6] = mii.eyes.size;
|
|
2093
1974
|
studioMii[3] = mii.eyes.squash;
|
|
2094
|
-
studioMii[5] = mii.eyes.
|
|
2095
|
-
studioMii[8] = mii.eyes.
|
|
2096
|
-
studioMii[9] = mii.eyes.
|
|
2097
|
-
studioMii[0xE] = lookupTables.eyebrows.values[mii.eyebrows.
|
|
2098
|
-
studioMii[0xB] =
|
|
1975
|
+
studioMii[5] = mii.eyes.rotation;
|
|
1976
|
+
studioMii[8] = mii.eyes.distanceApart;
|
|
1977
|
+
studioMii[9] = mii.eyes.yPosition;
|
|
1978
|
+
studioMii[0xE] = lookupTables.eyebrows.values[mii.eyebrows.page][mii.eyebrows.type];
|
|
1979
|
+
studioMii[0xB] = mii.eyebrows.color;
|
|
2099
1980
|
if (!studioMii[0xB]) studioMii[0xB] = 8;
|
|
2100
1981
|
studioMii[0xD] = mii.eyebrows.size;
|
|
2101
1982
|
studioMii[0xA] = mii.eyebrows.squash;
|
|
2102
|
-
studioMii[0xC] = mii.eyebrows.
|
|
2103
|
-
studioMii[0xF] = mii.eyebrows.
|
|
2104
|
-
studioMii[0x10] = mii.eyebrows.
|
|
2105
|
-
studioMii[0x2C] = lookupTables.noses.values[mii.nose.
|
|
1983
|
+
studioMii[0xC] = mii.eyebrows.rotation;
|
|
1984
|
+
studioMii[0xF] = mii.eyebrows.distanceApart;
|
|
1985
|
+
studioMii[0x10] = mii.eyebrows.yPosition + 3;
|
|
1986
|
+
studioMii[0x2C] = lookupTables.noses.values[mii.nose.page][mii.nose.type];
|
|
2106
1987
|
studioMii[0x2B] = mii.nose.size;
|
|
2107
|
-
studioMii[0x2D] = mii.nose.
|
|
2108
|
-
studioMii[0x26] = lookupTables.mouths.values[mii.mouth.
|
|
2109
|
-
studioMii[0x24] =
|
|
1988
|
+
studioMii[0x2D] = mii.nose.yPosition;
|
|
1989
|
+
studioMii[0x26] = lookupTables.mouths.values[mii.mouth.page][mii.mouth.type];
|
|
1990
|
+
studioMii[0x24] = mii.mouth.color;
|
|
2110
1991
|
if (studioMii[0x24] < 4) {
|
|
2111
1992
|
studioMii[0x24] += 19;
|
|
2112
1993
|
} else {
|
|
@@ -2114,15 +1995,15 @@ function convertMiiToStudio(jsonIn) {
|
|
|
2114
1995
|
}
|
|
2115
1996
|
studioMii[0x25] = mii.mouth.size;
|
|
2116
1997
|
studioMii[0x23] = mii.mouth.squash;
|
|
2117
|
-
studioMii[0x27] = mii.mouth.
|
|
2118
|
-
studioMii[0x29] = mii.
|
|
2119
|
-
studioMii[1] = mii.
|
|
2120
|
-
studioMii[0] =
|
|
1998
|
+
studioMii[0x27] = mii.mouth.yPosition;
|
|
1999
|
+
studioMii[0x29] = mii.beard.mustache.type;
|
|
2000
|
+
studioMii[1] = mii.beard.beardType;
|
|
2001
|
+
studioMii[0] = mii.beard.color;
|
|
2121
2002
|
if (!studioMii[0]) studioMii[0] = 8;
|
|
2122
|
-
studioMii[0x28] = mii.
|
|
2123
|
-
studioMii[0x2A] = mii.
|
|
2003
|
+
studioMii[0x28] = mii.beard.mustache.size;
|
|
2004
|
+
studioMii[0x2A] = mii.beard.mustache.yPosition;
|
|
2124
2005
|
studioMii[0x19] = mii.glasses.type;
|
|
2125
|
-
studioMii[0x17] =
|
|
2006
|
+
studioMii[0x17] = mii.glasses.color;
|
|
2126
2007
|
if (!studioMii[0x17]) {
|
|
2127
2008
|
studioMii[0x17] = 8;
|
|
2128
2009
|
} else if (studioMii[0x17] < 6) {
|
|
@@ -2131,11 +2012,11 @@ function convertMiiToStudio(jsonIn) {
|
|
|
2131
2012
|
studioMii[0x17] = 0;
|
|
2132
2013
|
}
|
|
2133
2014
|
studioMii[0x18] = mii.glasses.size;
|
|
2134
|
-
studioMii[0x1A] = mii.glasses.
|
|
2015
|
+
studioMii[0x1A] = mii.glasses.yPosition;
|
|
2135
2016
|
studioMii[0x20] = mii.mole.on ? 1 : 0;
|
|
2136
2017
|
studioMii[0x1F] = mii.mole.size;
|
|
2137
|
-
studioMii[0x21] = mii.mole.
|
|
2138
|
-
studioMii[0x22] = mii.mole.
|
|
2018
|
+
studioMii[0x21] = mii.mole.xPosition;
|
|
2019
|
+
studioMii[0x22] = mii.mole.yPosition;
|
|
2139
2020
|
return encodeStudio(studioMii);
|
|
2140
2021
|
}
|
|
2141
2022
|
async function readWiiBin(binOrPath) {
|
|
@@ -2185,7 +2066,7 @@ async function renderMiiWithStudio(jsonIn){
|
|
|
2185
2066
|
if(!["3ds","wii u"].includes(jsonIn.console?.toLowerCase())){
|
|
2186
2067
|
jsonIn=convertMii(jsonIn);
|
|
2187
2068
|
}
|
|
2188
|
-
var studioMii=
|
|
2069
|
+
var studioMii=convertMiiToStudio(jsonIn);
|
|
2189
2070
|
return await downloadImage('https://studio.mii.nintendo.com/miis/image.png?data=' + studioMii + "&width=270&type=face");
|
|
2190
2071
|
}
|
|
2191
2072
|
async function createFFLMiiIcon(data, width, height, fflRes) {
|
|
@@ -2236,16 +2117,20 @@ async function createFFLMiiIcon(data, width, height, fflRes) {
|
|
|
2236
2117
|
|
|
2237
2118
|
let ffl, currentCharModel;
|
|
2238
2119
|
|
|
2239
|
-
|
|
2240
|
-
|
|
2120
|
+
const _realConsoleDebug = console.debug;
|
|
2121
|
+
console.debug = () => { };
|
|
2241
2122
|
try {
|
|
2242
2123
|
// Initialize FFL
|
|
2243
2124
|
ffl = await initializeFFL(fflRes, ModuleFFL);
|
|
2244
2125
|
|
|
2245
2126
|
// Create Mii model and add to the scene.
|
|
2246
2127
|
const studioRaw = parseHexOrB64ToUint8Array(data); // Parse studio data
|
|
2247
|
-
|
|
2248
|
-
|
|
2128
|
+
|
|
2129
|
+
// Convert Uint8Array to Buffer for struct-fu compatibility
|
|
2130
|
+
const studioBuffer = Buffer.from(studioRaw);
|
|
2131
|
+
|
|
2132
|
+
currentCharModel = createCharModel(studioBuffer, null,
|
|
2133
|
+
FFLShaderMaterial, ffl.module);
|
|
2249
2134
|
initCharModelTextures(currentCharModel, renderer); // Initialize fully
|
|
2250
2135
|
scene.add(currentCharModel.meshes); // Add to scene
|
|
2251
2136
|
|
|
@@ -2291,13 +2176,13 @@ async function createFFLMiiIcon(data, width, height, fflRes) {
|
|
|
2291
2176
|
}
|
|
2292
2177
|
}
|
|
2293
2178
|
async function renderMii(jsonIn, fflRes=getFFLRes()){
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2179
|
+
if(!["3ds","wii u"].includes(jsonIn.console?.toLowerCase())){
|
|
2180
|
+
jsonIn=convertMii(jsonIn);
|
|
2181
|
+
}
|
|
2182
|
+
const studioMii = convertMiiToStudio(jsonIn);
|
|
2183
|
+
const width = height = 600;
|
|
2299
2184
|
|
|
2300
|
-
|
|
2185
|
+
return createFFLMiiIcon(studioMii, width, height, fflRes);
|
|
2301
2186
|
}
|
|
2302
2187
|
async function writeWiiBin(jsonIn, outPath) {
|
|
2303
2188
|
if (jsonIn.console?.toLowerCase() !== "wii") {
|
|
@@ -2520,52 +2405,53 @@ function make3DSChild(dad,mom,options={}){
|
|
|
2520
2405
|
function generateInstructions(mii,full){
|
|
2521
2406
|
let type=mii.console?.toLowerCase();
|
|
2522
2407
|
if(type.toLowerCase()==="wii"){
|
|
2408
|
+
var typeCheat=[1,2,3,1,2,3,1,2,3,1,2,3];
|
|
2523
2409
|
var instrs={
|
|
2524
|
-
"base":`Select "${mii.
|
|
2525
|
-
"col":`On the info page (first tab), set the Favorite Color to ${mii.
|
|
2526
|
-
"heightWeight":`On the build page (second tab), set the height to ${Math.round((100/128)*mii.
|
|
2527
|
-
"faceShape":`On the face page (third tab), set the shape to the one ${Math.floor(mii.face.
|
|
2528
|
-
"skinCol":`On the face page (third tab), set the color to the one ${
|
|
2529
|
-
"makeup":`On the face page's makeup tab, set the makeup to
|
|
2530
|
-
"hairStyle":`On the hair page (fourth tab), set the hair style to the one ${mii.hair.type
|
|
2410
|
+
"base":`Select "${mii.general.gender}", and then "Start from Scratch".`,
|
|
2411
|
+
"col":`On the info page (first tab), set the Favorite Color to ${lookupTables.favCols[mii.general.favoriteColor]} (${mii.general.favoriteColor<=5?mii.general.favoriteColor+1:mii.general.favoriteColor-5} from the left, ${mii.general.favoriteColor>5?"bottom":"top"} row).`,
|
|
2412
|
+
"heightWeight":`On the build page (second tab), set the height to ${Math.round((100/128)*mii.general.height)}%, and the weight to ${Math.round((100/128)*mii.general.weight)}%.`,
|
|
2413
|
+
"faceShape":`On the face page (third tab), set the shape to the one ${Math.floor(mii.face.type/2)+1} from the top, in the ${mii.face.type%2===0?"left":"right"} column.`,
|
|
2414
|
+
"skinCol":`On the face page (third tab), set the color to the one ${mii.face.color+mii.face.color>2?-2:1} from the left, on the ${mii.face.color>2?`bottom`:`top`} row.`,
|
|
2415
|
+
"makeup":`On the face page's makeup tab, set the makeup to the one ${Math.ceil((mii.face.feature+1)/3)} from the top, and ${typeCheat[mii.face.feature]} from the left.`,
|
|
2416
|
+
"hairStyle":`On the hair page (fourth tab), set the hair style to the one ${typeCheat[mii.hair.type]} from the left, ${Math.ceil((mii.hair.type+1)/3)} from the top, on page ${mii.hair.page}.`,
|
|
2531
2417
|
"hairFlipped":`${mii.hair.flipped?`On the hair page (fourth tab), press the button to flip the hair.`:``}`,
|
|
2532
|
-
"hairColor":`On the hair page (fourth tab), set the hair color to the one ${
|
|
2533
|
-
"eyebrowStyle":`On the eyebrow page (fifth tab), set the eyebrow style to the one ${mii.eyebrows.type
|
|
2534
|
-
"eyebrowColor":`On the eyebrow page (fifth tab), set the eyebrow color to the one ${
|
|
2535
|
-
"eyebrowY":`${mii.eyebrows.yPos!==7?`On the eyebrow page (fifth tab), `:``}${mii.eyebrows.
|
|
2418
|
+
"hairColor":`On the hair page (fourth tab), set the hair color to the one ${mii.hair.col+(mii.hair.col>3?-3:1)} from the left, on the ${mii.hair.col>3?`bottom`:`top`} row.`,
|
|
2419
|
+
"eyebrowStyle":`On the eyebrow page (fifth tab), set the eyebrow style to the one ${typeCheat[mii.eyebrows.type]} from the left, ${Math.ceil((mii.eyebrows.type+1)/3)} from the top, on page ${mii.eyebrows.page}.`,
|
|
2420
|
+
"eyebrowColor":`On the eyebrow page (fifth tab), set the eyebrow color to the one ${mii.eyebrows.color+(mii.eyebrows.color>3?-3:1)} from the left, on the ${mii.eyebrows.color>3?`bottom`:`top`} row.`,
|
|
2421
|
+
"eyebrowY":`${mii.eyebrows.yPos!==7?`On the eyebrow page (fifth tab), `:``}${mii.eyebrows.yPosition<7?`press the up button ${7-mii.eyebrows.yPosition} times.`:mii.eyebrows.yPosition>7?`press the down button ${mii.eyebrows.yPosition-7} times.`:``}`,
|
|
2536
2422
|
"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.`:``}`,
|
|
2537
2423
|
"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.`:``}`,
|
|
2538
|
-
"eyebrowDist":`${mii.eyebrows.distApart!==2?`On the eyebrow page (fifth tab), `:``}${mii.eyebrows.
|
|
2539
|
-
"eyeType":`On the eye page (sixth tab), set the eye type to the one ${mii.eyes.type
|
|
2540
|
-
"eyeColor":`On the eye page (sixth tab), set the color to the one ${
|
|
2541
|
-
"eyeY":`${mii.eyes.yPos!==12?`On the eye page (sixth tab), `:``}${mii.eyes.
|
|
2424
|
+
"eyebrowDist":`${mii.eyebrows.distApart!==2?`On the eyebrow page (fifth tab), `:``}${mii.eyebrows.distanceApart<2?`press the closer-together button ${2-mii.eyebrows.distanceApart} times.`:mii.eyebrows.distanceApart>2?`press the further-apart button ${mii.eyebrows.distanceApart-2} times.`:``}`,
|
|
2425
|
+
"eyeType":`On the eye page (sixth tab), set the eye type to the one ${typeCheat[mii.eyes.type]} from the left, ${Math.ceil((mii.eyes.type+1)/3)} from the top, on page ${mii.eyes.page}.`,
|
|
2426
|
+
"eyeColor":`On the eye page (sixth tab), set the color to the one ${mii.eyes.color+(mii.eyes.color>2?-2:1)} from the left, on the ${mii.eyes.color>2?`bottom`:`top`} row.`,
|
|
2427
|
+
"eyeY":`${mii.eyes.yPos!==12?`On the eye page (sixth tab), `:``}${mii.eyes.yPosition<12?`press the up button ${12-mii.eyes.yPosition} times.`:mii.eyes.yPosition>12?`press the down button ${mii.eyes.yPosition-12} times.`:``}`,
|
|
2542
2428
|
"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.`:``}`,
|
|
2543
|
-
"eyeRot":`${mii.eyes.rotation!==(mii.
|
|
2544
|
-
"eyeDist":`${mii.eyes.
|
|
2545
|
-
"noseType":`On the nose page (seventh tab), set the nose to the one ${Math.ceil((mii.nose.type+1)/3)} from the top, and ${[
|
|
2546
|
-
"noseY":`${mii.nose.
|
|
2429
|
+
"eyeRot":`${mii.eyes.rotation!==(mii.general.gender==="Female"?3:4)?`On the eye page (sixth tab), `:``}${mii.eyes.rotation<(mii.general.gender==="Female"?3:4)?`press the rotate clockwise button ${(mii.general.gender==="Female"?3:4)-mii.eyes.rotation} times.`:mii.eyes.rotation>(mii.general.gender==="Female"?3:4)?`press the rotate counter-clockwise button ${mii.eyes.rotation-(mii.general.gender==="Female"?3:4)} times.`:``}`,
|
|
2430
|
+
"eyeDist":`${mii.eyes.distanceApart!==2?`On the eye page (sixth tab), `:``}${mii.eyes.distanceApart<2?`press the closer-together button ${2-mii.eyes.distanceApart} times.`:mii.eyes.distanceApart>2?`press the further-apart button ${mii.eyes.distanceApart-2} times.`:``}`,
|
|
2431
|
+
"noseType":`On the nose page (seventh tab), set the nose to the one ${Math.ceil((mii.nose.type+1)/3)} from the top, and ${typeCheat[mii.nose.type]} from the left.`,
|
|
2432
|
+
"noseY":`${mii.nose.yPosition!==9?`On the nose page (seventh tab), `:``}${mii.nose.yPosition<9?`press the up button ${9-mii.nose.yPosition} times.`:mii.nose.yPosition>9?`press the down button ${mii.nose.yPosition-9} times.`:``}`,
|
|
2547
2433
|
"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.`:``}`,
|
|
2548
|
-
"mouthType":`On the mouth page (eighth tab), set the mouth type to the one ${mii.mouth.type
|
|
2549
|
-
"mouthCol":`On the mouth page (eighth tab), set the color to the one ${
|
|
2550
|
-
"mouthY":`${mii.mouth.
|
|
2434
|
+
"mouthType":`On the mouth page (eighth tab), set the mouth type to the one ${typeCheat[mii.mouth.type]} from the left, ${Math.ceil((mii.mouth.type+1)/3)} from the top, on page ${mii.mouth.page}.`,
|
|
2435
|
+
"mouthCol":`On the mouth page (eighth tab), set the color to the one ${mii.mouth.col+1} from the left.`,
|
|
2436
|
+
"mouthY":`${mii.mouth.yPosition!==13?`On the mouth page (eighth tab), `:``}${mii.mouth.yPosition<13?`press the up button ${13-mii.mouth.yPosition} times.`:mii.mouth.yPosition>13?`press the down button ${mii.mouth.yPosition-13} times.`:``}`,
|
|
2551
2437
|
"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.`:``}`,
|
|
2552
|
-
"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 ${[
|
|
2553
|
-
"glassesCol":`On the glasses page (within the ninth tab), set the color to the one ${
|
|
2554
|
-
"glassesY":`${mii.glasses.
|
|
2438
|
+
"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 ${typeCheat[mii.glasses.type]} from the left.`,
|
|
2439
|
+
"glassesCol":`On the glasses page (within the ninth tab), set the color to the one ${mii.glasses.color+(mii.glasses.color>2?-2:1)} from the left, on the ${mii.glasses.color>2?`bottom`:`top`} row.`,
|
|
2440
|
+
"glassesY":`${mii.glasses.yPosition!==10?`On the glasses page (within the ninth tab), `:``}${mii.glasses.yPosition<10?`press the up button ${10-mii.glasses.yPosition} times.`:mii.glasses.yPosition>10?`press the down button ${mii.glasses.yPosition-10} times.`:``}`,
|
|
2555
2441
|
"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.`:``}`,
|
|
2556
|
-
"stache":`On the mustache page (within the ninth tab), set the mustache to the one on the ${[0,1].includes(mii.
|
|
2557
|
-
"stacheY":`${mii.
|
|
2558
|
-
"stacheSize":`${mii.
|
|
2442
|
+
"stache":`On the mustache page (within the ninth tab), set the mustache to the one on the ${[0,1].includes(mii.beard.mustache.type)?`top`:`bottom`}-${[0,2].includes(mii.beard.mustache.type)?`left`:`right`}.`,
|
|
2443
|
+
"stacheY":`${mii.beard.mustache.yPosition!==10?`On the mustache page (within the ninth tab), press the `:``}${mii.beard.mustache.yPos>10?`down button ${mii.beard.mustache.yPos-10} times.`:mii.beard.mustache.yPos<10?`up button ${10-mii.beard.mustache.yPos} times.`:``}`,
|
|
2444
|
+
"stacheSize":`${mii.beard.mustache.size!==4?`On the mustache page (within the ninth tab), `:``}${mii.beard.mustache.size<4?`press the shrink button ${4-mii.beard.mustache.size} times.`:mii.beard.mustache.size>4?`press the enlarge button ${mii.beard.mustache.size-4} times.`:``}`,
|
|
2559
2445
|
"mole":`${mii.mole.on?`On the mole page (within the ninth tab), turn the mole on.`:``}`,
|
|
2560
|
-
"moleX":`${mii.mole.
|
|
2561
|
-
"moleY":`${mii.mole.
|
|
2446
|
+
"moleX":`${mii.mole.xPosition!==2?`On the mole page (within the ninth tab), press the `:``}${mii.mole.xPosition>2?`right button ${mii.mole.xPosition-2} times.`:mii.mole.xPosition<2?`left button ${2-mii.mole.xPosition} times.`:``}`,
|
|
2447
|
+
"moleY":`${mii.mole.yPosition!==20?`On the mole page (within the ninth tab), press the `:``}${mii.mole.yPosition>20?`down button ${mii.mole.yPosition-20} times.`:mii.mole.yPosition<20?`up button ${20-mii.mole.yPosition} times.`:``}`,
|
|
2562
2448
|
"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.`:``}`,
|
|
2563
|
-
"beard":`On the beard page (within the ninth tab), set the beard to the one on the ${[0,1].includes(mii.
|
|
2564
|
-
"beardCol":`On the mustache OR beard pages (within the ninth tab), set the color to the one ${
|
|
2449
|
+
"beard":`On the beard page (within the ninth tab), set the beard to the one on the ${[0,1].includes(mii.beard.type)?`top`:`bottom`}-${[0,2].includes(mii.beard.type)?`left`:`right`}.`,
|
|
2450
|
+
"beardCol":`On the mustache OR beard pages (within the ninth tab), set the color to the one ${mii.beard.col+(mii.beard.col>3?-3:1)} from the left, on the ${mii.facialHair.col>3?`bottom`:`top`} row.`,
|
|
2565
2451
|
"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}.`:``}`
|
|
2566
2452
|
};
|
|
2567
2453
|
if(!full){
|
|
2568
|
-
var defaultMiiInstrs=structuredClone(mii.
|
|
2454
|
+
var defaultMiiInstrs=structuredClone(mii.general.gender==="Male"?defaultInstrs.wii.male:defaultInstrs.wii.female);
|
|
2569
2455
|
Object.keys(instrs).forEach(instr=>{
|
|
2570
2456
|
if(instrs[instr]===defaultMiiInstrs[instr]){
|
|
2571
2457
|
delete instrs[instr];
|
|
@@ -2576,55 +2462,55 @@ function generateInstructions(mii,full){
|
|
|
2576
2462
|
}
|
|
2577
2463
|
else{
|
|
2578
2464
|
var instrs={
|
|
2579
|
-
"base":`Select "Start from Scratch", and then "${mii.
|
|
2580
|
-
"faceShape":`On the face page (first tab), set the face shape to the one ${Math.ceil((mii.face.
|
|
2581
|
-
"skinCol":`On the face page (first tab), set the color to the one ${
|
|
2582
|
-
"makeup":`On the face page's makeup tab, set the makeup to
|
|
2583
|
-
"feature":`On the face page's wrinkles tab, set the facial feature to
|
|
2584
|
-
"hairStyle":`On the hair page (second tab), set the hair style to the one ${Math.ceil((mii.hair.
|
|
2465
|
+
"base":`Select "Start from Scratch", and then "${mii.general.gender}".`,
|
|
2466
|
+
"faceShape":`On the face page (first tab), set the face shape to the one ${Math.ceil((mii.face.type+1)/3)} from the top, and ${typeCheat[mii.face.type]} from the left.`,
|
|
2467
|
+
"skinCol":`On the face page (first tab), set the color to the one ${mii.face.color+1} from the top.`,
|
|
2468
|
+
"makeup":`On the face page's makeup tab, set the makeup to the one ${Math.ceil((mii.face.makeup+1)/3)} from the top, and ${typeCheat[mii.face.makeup]} from the left.`,
|
|
2469
|
+
"feature":`On the face page's wrinkles tab, set the facial feature to the one ${Math.ceil((mii.face.feature+1)/3)+1} from the top, and ${typeCheat[mii.face.makeup]} from the left.`,
|
|
2470
|
+
"hairStyle":`On the hair page (second tab), set the hair style to the one ${Math.ceil((mii.hair.type+1)/3)} from the top, and ${typeCheat[mii.hair.type]} from the left, on page ${mii.hair.page+1}.`,
|
|
2585
2471
|
"hairFlipped":`${mii.hair.flipped?`On the hair page (second tab), press the button to flip the hair.`:``}`,
|
|
2586
|
-
"hairColor":`On the hair page (second tab), set the hair color to the one ${
|
|
2587
|
-
"eyebrowStyle":`On the eyebrow page (third tab), set the eyebrow style to the one ${[
|
|
2588
|
-
"eyebrowColor":`On the eyebrow page (third tab), set the eyebrow color to the one ${
|
|
2589
|
-
"eyebrowY":`${mii.eyebrows.
|
|
2472
|
+
"hairColor":`On the hair page (second tab), set the hair color to the one ${mii.hair.color+1} from the top.`,
|
|
2473
|
+
"eyebrowStyle":`On the eyebrow page (third tab), set the eyebrow style to the one ${typeCheat[mii.eyebrows.type]} from the left, ${Math.ceil((mii.eyebrows.type+1)/3)} from the top, on page ${mii.eyebrows.page+1}.`,
|
|
2474
|
+
"eyebrowColor":`On the eyebrow page (third tab), set the eyebrow color to the one ${mii.eyebrows.color+1} from the top.`,
|
|
2475
|
+
"eyebrowY":`${mii.eyebrows.yPosition!==7?`On the eyebrow page (third tab), `:``}${mii.eyebrows.yPosition<7?`press the up button ${7-mii.eyebrows.yPosition} times.`:mii.eyebrows.yPosition>7?`press the down button ${mii.eyebrows.yPosition-7} times.`:``}`,
|
|
2590
2476
|
"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.`:``}`,
|
|
2591
|
-
"eyebrowRot":`${mii.eyebrows.
|
|
2592
|
-
"eyebrowDist":`${mii.eyebrows.
|
|
2477
|
+
"eyebrowRot":`${mii.eyebrows.rotation!==6?`On the eyebrow page (third 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.`:``}`,
|
|
2478
|
+
"eyebrowDist":`${mii.eyebrows.distanceApart!==2?`On the eyebrow page (third tab), `:``}${mii.eyebrows.distanceApart<2?`press the closer-together button ${2-mii.eyebrows.distanceApart} times.`:mii.eyebrows.distanceApart>2?`press the further-apart button ${mii.eyebrows.distanceApart-2} times.`:``}`,
|
|
2593
2479
|
"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.`:``}`,
|
|
2594
|
-
"eyeType":`On the eye page (fourth tab), set the eye type to the one ${[
|
|
2595
|
-
"eyeColor":`On the eye page (fourth tab), set the color to the one ${
|
|
2596
|
-
"eyeY":`${mii.eyes.
|
|
2480
|
+
"eyeType":`On the eye page (fourth tab), set the eye type to the one ${typeCheat[mii.eyes.type]} from the left, ${Math.ceil((mii.eyes.type+1)/3)} from the top, on page ${mii.eyes.page+1}.`,
|
|
2481
|
+
"eyeColor":`On the eye page (fourth tab), set the color to the one ${mii.eyes.col+1} from the top.`,
|
|
2482
|
+
"eyeY":`${mii.eyes.yPosition!==12?`On the eye page (fourth tab), `:``}${mii.eyes.yPosition<12?`press the up button ${12-mii.eyes.yPosition} times.`:mii.eyes.yPosition>12?`press the down button ${mii.eyes.yPosition-12} times.`:``}`,
|
|
2597
2483
|
"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.`:``}`,
|
|
2598
|
-
"eyeRot":`${mii.eyes.
|
|
2599
|
-
"eyeDist":`${mii.eyes.
|
|
2484
|
+
"eyeRot":`${mii.eyes.rotation!==(mii.general.gender==="Female"?3:4)?`On the eye page (fourth tab), `:``}${mii.eyes.rotation<(mii.general.gender==="Female"?3:4)?`press the rotate clockwise button ${(mii.general.gender==="Female"?3:4)-mii.eyes.rotation} times.`:mii.eyes.rotation>(mii.general.gender==="Female"?3:4)?`press the rotate counter-clockwise button ${mii.eyes.rotation-(mii.general.gender==="Female"?3:4)} times.`:``}`,
|
|
2485
|
+
"eyeDist":`${mii.eyes.distanceApart!==2?`On the eye page (fourth tab), `:``}${mii.eyes.distanceApart<2?`press the closer-together button ${2-mii.eyes.distanceApart} times.`:mii.eyes.distanceApart>2?`press the further-apart button ${mii.eyes.distanceApart-2} times.`:``}`,
|
|
2600
2486
|
"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.`:``}`,
|
|
2601
|
-
"noseType":`On the nose page (fifth tab), set the nose to the one ${Math.ceil((mii.nose.type
|
|
2602
|
-
"noseY":`${mii.nose.
|
|
2487
|
+
"noseType":`On the nose page (fifth tab), set the nose to the one ${Math.ceil((mii.nose.type+1)/3)} from the top, and ${typeCheat[mii.nose.type]} from the left, on page ${mii.nose.page}.`,
|
|
2488
|
+
"noseY":`${mii.nose.yPosition!==9?`On the nose page (fifth tab), `:``}${mii.nose.yPosition<9?`press the up button ${9-mii.nose.yPosition} times.`:mii.nose.yPosition>9?`press the down button ${mii.nose.yPosition-9} times.`:``}`,
|
|
2603
2489
|
"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.`:``}`,
|
|
2604
|
-
"mouthType":`On the mouth page (sixth tab), set the mouth type to the one ${[
|
|
2605
|
-
"mouthCol":`On the mouth page (sixth tab), set the color to the one ${
|
|
2606
|
-
"mouthY":`${mii.mouth.
|
|
2490
|
+
"mouthType":`On the mouth page (sixth tab), set the mouth type to the one ${typeCheat[mii.mouth.type]} from the left, ${Math.ceil((mii.mouth.type+1)/3)} from the top, on page ${mii.mouth.page+1}.`,
|
|
2491
|
+
"mouthCol":`On the mouth page (sixth tab), set the color to the one ${mii.mouth.color+1} from the top.`,
|
|
2492
|
+
"mouthY":`${mii.mouth.yPosition!==13?`On the mouth page (sixth tab), `:``}${mii.mouth.yPosition<13?`press the up button ${13-mii.mouth.yPosition} times.`:mii.mouth.yPosition>13?`press the down button ${mii.mouth.yPosition-13} times.`:``}`,
|
|
2607
2493
|
"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.`:``}`,
|
|
2608
2494
|
"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.`:``}`,
|
|
2609
|
-
"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 ${[
|
|
2610
|
-
"glassesCol":`On the glasses page (within the seventh tab), set the color to the one ${
|
|
2611
|
-
"glassesY":`${mii.glasses.
|
|
2495
|
+
"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 ${typeCheat[mii.glasses.type]} from the left.`,
|
|
2496
|
+
"glassesCol":`On the glasses page (within the seventh tab), set the color to the one ${mii.glasses.col+1} from the top.`,
|
|
2497
|
+
"glassesY":`${mii.glasses.yPosition!==10?`On the glasses page (within the seventh tab), `:``}${mii.glasses.yPosition<10?`press the up button ${10-mii.glasses.yPosition} times.`:mii.glasses.yPosition>10?`press the down button ${mii.glasses.yPosition-10} times.`:``}`,
|
|
2612
2498
|
"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.`:``}`,
|
|
2613
|
-
"stache":`On the mustache page (within the seventh tab), set the mustache to the one on the ${[0,1].includes(mii.
|
|
2614
|
-
"stacheY":`${mii.
|
|
2615
|
-
"stacheSize":`${mii.
|
|
2499
|
+
"stache":`On the mustache page (within the seventh tab), set the mustache to the one on the ${[0,1].includes(mii.beard.mustache.type)?`top`:[2,3].includes(mii.beard.mustache.type)?`middle`:`bottom`}-${[0,2,4].includes(mii.beard.mustache.type)?`left`:`right`}.`,
|
|
2500
|
+
"stacheY":`${mii.beard.mustache.yPosition!==10?`On the mustache page (within the seventh tab), press the `:``}${mii.beard.mustache.yPosition>10?`down button ${mii.beard.mustache.yPosition-10} times.`:mii.beard.mustache.yPosition<10?`up button ${10-mii.beard.mustache.yPosition} times.`:``}`,
|
|
2501
|
+
"stacheSize":`${mii.beard.mustache.size!==4?`On the mustache page (within the seventh tab), `:``}${mii.beard.mustache.size<4?`press the shrink button ${4-mii.beard.mustache.size} times.`:mii.beard.mustache.size>4?`press the enlarge button ${mii.beard.mustache.size-4} times.`:``}`,
|
|
2616
2502
|
"mole":`${mii.mole.on?`On the mole page (within the seventh tab), turn the mole on.`:``}`,
|
|
2617
|
-
"moleX":`${mii.mole.
|
|
2618
|
-
"moleY":`${mii.mole.
|
|
2503
|
+
"moleX":`${mii.mole.xPosition!==2?`On the mole page (within the seventh tab), press the `:``}${mii.mole.xPosition>2?`right button ${mii.mole.xPosition-2} times.`:mii.mole.xPosition<2?`left button ${2-mii.mole.xPosition} times.`:``}`,
|
|
2504
|
+
"moleY":`${mii.mole.yPosition!==20?`On the mole page (within the seventh tab), press the `:``}${mii.mole.yPosition>20?`down button ${mii.mole.yPosition-20} times.`:mii.mole.yPosition<20?`up button ${20-mii.mole.yPosition} times.`:``}`,
|
|
2619
2505
|
"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.`:``}`,
|
|
2620
|
-
"beard":`On the beard page (within the seventh tab), set the beard to the one on the ${[0,1].includes(mii.
|
|
2621
|
-
"beardCol":`On the mustache OR beard pages (within the seventh tab), set the color to the one ${
|
|
2622
|
-
"heightWeight":`On the build page (eighth tab), set the height to ${Math.round((100/128)*mii.
|
|
2623
|
-
"col":`On the info page (after pressing "Next"), set the Favorite Color to ${mii.
|
|
2624
|
-
"other":`The Nickname of this Mii is ${mii.
|
|
2506
|
+
"beard":`On the beard page (within the seventh tab), set the beard to the one on the ${[0,1].includes(mii.beard.type)?`top`:[2,3].includes(mii.beard.type)?`middle`:`bottom`}-${[0,2].includes(mii.beard.type)?`left`:`right`}.`,
|
|
2507
|
+
"beardCol":`On the mustache OR beard pages (within the seventh tab), set the color to the one ${mii.beard.color+1} from the top.`,
|
|
2508
|
+
"heightWeight":`On the build page (eighth tab), set the height to ${Math.round((100/128)*mii.general.height)}%, and the weight to ${Math.round((100/128)*mii.general.weight)}%.`,
|
|
2509
|
+
"col":`On the info page (after pressing "Next"), set the Favorite Color to ${mii.general.favoriteColor} (${mii.general.favoriteColor<=5?mii.general.favoriteColor+1:mii.general.favoriteColor-5} from the left, ${mii.general.favoriteColor>5?"bottom":"top"} row).`,
|
|
2510
|
+
"other":`The Nickname of this Mii is ${mii.general.name}.${mii.general.creatorName?` The creator was ${mii.general.creatorName}.`:``} ${mii.general.birthday!==0?` Its birthday is ${["","January","February","March","April","May","June","July","August","September","October","November","December"][mii.general.birthMonth]} ${mii.general.birthday}.`:``}`
|
|
2625
2511
|
};
|
|
2626
2512
|
if(!full){
|
|
2627
|
-
var defaultMiiInstrs=structuredClone(mii.
|
|
2513
|
+
var defaultMiiInstrs=structuredClone(mii.general.gender==="Male"?defaultInstrs["3ds"].male:defaultInstrs["3ds"].female);
|
|
2628
2514
|
Object.keys(instrs).forEach(instr=>{
|
|
2629
2515
|
if(instrs[instr]===defaultMiiInstrs[instr]){
|
|
2630
2516
|
delete instrs[instr];
|