diff --git a/data/Map006.json b/data/Map006.json
index 16d22ea..90b22b4 100644
--- a/data/Map006.json
+++ b/data/Map006.json
@@ -1,6 +1,6 @@
{
"autoplayBgm":true,"autoplayBgs":false,"battleback1Name":"Wood2","battleback2Name":"Room1","bgm":{"name":"Castle1","pan":0,"pitch":100,"volume":20},"bgs":{"name":"","pan":0,"pitch":100,"volume":90},"disableDashing":false,"displayName":"Tavern","encounterList":[],"encounterStep":30,"height":40,"note":"","parallaxLoopX":false,"parallaxLoopY":false,"parallaxName":"","parallaxShow":true,"parallaxSx":0,"parallaxSy":0,"scrollType":0,"specifyBattleback":true,"tilesetId":3,"width":40,
-"data":[1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,6832,1536,1536,6834,6820,6821,6833,6833,6833,6833,6823,6833,6833,6833,6833,6833,6833,6833,6833,6833,6822,6820,6820,6820,6820,6820,6820,6820,6820,6820,6820,6820,6820,6820,6820,6820,6820,6820,6820,6820,6826,1536,1536,6816,6800,6824,7043,7042,7042,7046,6832,7043,7042,7042,7042,7042,7042,7042,7042,7042,6816,6804,6828,6828,6828,6828,6828,6828,6828,6828,6828,6828,6828,6828,6828,6828,6828,6828,6808,6800,6824,1536,1536,6816,6800,6824,7049,7048,7048,7052,6832,7048,7048,7048,7048,7048,7048,7048,7048,7048,6816,6824,7043,7042,7042,7042,7042,7042,7042,7042,7042,7042,7042,7042,7042,7042,7042,7042,6816,6800,6824,1536,1536,6818,6828,6838,2946,2932,2932,2948,6832,3234,3220,3220,3220,3220,3220,3220,3220,3236,6840,6838,7049,7048,7048,7048,7048,7048,7048,7048,7048,7048,7048,7048,7048,7048,7048,7048,6840,6808,6824,1536,1536,6832,7043,7046,2928,2912,2912,2936,6832,3216,3200,3200,3200,3200,3200,3200,3200,3202,3220,3220,3220,3236,4098,4084,4084,4084,4084,4084,4084,4084,4084,4084,4084,4084,4100,3242,7043,6816,6824,1536,1536,6832,7049,7052,2952,2940,2940,2950,6844,3216,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3224,4080,4064,4064,4064,4064,4064,4064,4064,4064,4064,4064,4064,4088,3232,7049,6816,6824,1536,1536,6832,3234,3220,3220,3220,3220,3221,3233,3209,3200,3200,3200,3200,3200,3200,3200,3200,3204,3228,3208,3224,4080,4064,4064,4064,4064,4064,4064,4064,4064,4064,4064,4064,4088,3217,3236,6816,6824,1536,1536,6832,3240,3228,3228,3212,3228,3238,6842,3216,3200,3200,3200,3200,3200,3200,3200,3200,3224,6842,3240,3238,4104,4092,4092,4092,4092,4092,4092,4092,4092,4092,4092,4092,4102,3216,3224,6816,6824,1536,1536,6819,6833,6833,6845,3232,6843,6833,6827,3240,3208,3200,3200,3200,3200,3200,3200,3200,3224,6819,6833,6833,6833,6833,6833,6837,3243,3233,3233,3233,3233,3233,3233,3233,3233,3229,3238,6816,6824,1536,1536,6832,7043,7042,7046,3232,7043,7042,6841,6837,3216,3200,3200,3200,3200,3200,3200,3200,3224,6832,7042,7042,7042,7042,7042,6841,6833,6833,6833,6833,6833,6833,6833,6833,6833,6833,6833,6809,6824,1536,1536,6832,7049,7048,7052,3232,7049,7048,7043,6832,3216,3200,3200,3200,3200,3200,3200,3200,3224,6832,7048,7048,7048,7048,7048,7043,7042,7042,7042,7042,7042,7042,7042,7042,7042,7042,7042,6816,6824,1536,1536,6832,3234,3220,3220,3203,3220,3236,7049,6832,3216,3200,3200,3200,3200,3200,3200,3200,3224,6832,3234,3220,3220,3220,3236,7049,7048,7048,7048,7048,7048,7048,7048,7048,7048,7048,7048,6816,6824,1536,1536,6832,3216,3200,3200,3200,3200,3202,3236,6832,3216,3200,3200,3200,3200,3200,3200,3200,3224,6832,3218,3228,3228,3228,3230,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3237,6816,6824,1536,1536,6832,3240,3228,3208,3200,3200,3200,3224,6832,3216,3200,3200,3200,3200,3200,3200,3200,3224,6832,3232,3714,3700,3700,3700,3700,3700,3700,3700,3700,3700,3700,3700,3700,3700,3716,3232,6816,6824,1536,1536,6817,6820,6836,3216,3200,3200,3200,3224,6832,3216,3200,3200,3200,3200,3200,3200,3200,3224,6832,3232,3696,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3704,3232,6816,6824,1536,1536,6816,6800,6824,3216,3200,3200,3204,3238,6832,3216,3200,3200,3200,3200,3200,3200,3200,3224,6832,3232,3696,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3704,3232,6816,6824,1536,1536,6816,6800,6824,3216,3200,3200,3224,6834,6826,3216,3200,3200,3200,3200,3200,3200,3200,3224,6844,3232,3696,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3704,3232,6816,6824,1536,1536,6816,6800,6824,3216,3200,3200,3224,6818,6838,3216,3200,3200,3200,3200,3200,3200,3200,3224,7047,3232,3696,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3704,3232,6816,6824,1536,1536,6816,6800,6824,3216,3200,3200,3224,6832,7046,3216,3200,3200,3200,3200,3200,3200,3200,3224,7053,3232,3696,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3704,3232,6816,6824,1536,1536,6816,6800,6824,3216,3200,3200,3224,6832,7052,3216,3200,3200,3200,3200,3200,3200,3200,3202,3220,3226,3696,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3704,3232,6816,6824,1536,1536,6816,6800,6824,3216,3200,3200,3224,6832,3234,3201,3200,3200,3200,3200,3200,3200,3200,3200,3200,3224,3696,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3704,3232,6816,6824,1536,1536,6816,6800,6824,3216,3200,3200,3224,6832,3216,3200,3200,3200,3200,3200,3200,3204,3228,3228,3228,3225,3696,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3704,3232,6816,6824,1536,1536,6816,6800,6824,3216,3200,3200,3224,6832,3216,3200,3200,3200,3200,3200,3200,3224,6843,6833,6845,3232,3696,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3704,3232,6816,6824,1536,1536,6816,6800,6824,3216,3200,3200,3224,6832,3216,3200,3200,3200,3200,3200,3200,3224,7043,7042,7046,3232,3720,3708,3708,3708,3708,3708,3708,3708,3708,3708,3708,3708,3708,3708,3718,3232,6816,6824,1536,1536,6816,6800,6824,3216,3200,3200,3224,6832,3216,3200,3200,3200,3200,3200,3200,3224,7049,7048,7052,3217,3220,3220,3220,3220,3220,3221,3233,3233,3233,3233,3233,3233,3233,3233,3233,3239,6816,6824,1536,1536,6816,6800,6824,3216,3200,3200,3224,6832,3216,3200,3200,3200,3200,3200,3200,3202,3220,3220,3220,3201,3200,3200,3200,3200,3200,3224,6835,6833,6833,6833,6833,6833,6833,6833,6833,6833,6809,6824,1536,1536,6816,6800,6824,3240,3228,3228,3238,6832,3216,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3224,6832,7042,7042,7042,7042,7042,7042,7042,7042,7042,6816,6824,1536,1536,6816,6800,6802,6820,6820,6820,6820,6826,3240,3228,3228,3228,3228,3228,3228,3228,3228,3208,3200,3200,3200,3200,3200,3200,3200,3224,6832,7048,7048,7048,7048,7048,7048,7048,7048,7048,6816,6824,1536,1536,6816,6800,6800,6800,6804,6828,6828,6830,6833,6833,6833,6833,6833,6833,6833,6833,6837,3216,3200,3200,3200,3200,3200,3200,3200,3224,6832,1574,1574,1574,1574,1574,1574,1574,1574,1574,6816,6824,1536,1536,6816,6800,6800,6800,6824,7042,7042,7042,7042,7046,7050,7043,7042,7042,7042,7046,6832,3216,3200,3200,3200,3200,3200,3200,3200,3224,6832,1574,1574,1574,1574,1574,1574,1574,1574,1574,6816,6824,1536,1536,6816,6800,6800,6800,6824,7048,7048,7048,7048,7052,3242,7049,7048,7048,7048,7048,6832,3216,3200,3200,3200,3200,3200,3200,3200,3224,6832,1574,1574,1574,1574,1574,1574,1574,1574,1574,6816,6824,1536,1536,6816,6800,6800,6804,6838,3234,3220,3220,3220,3220,3203,3220,3220,3220,3220,3236,6844,3216,3200,3200,3200,3200,3200,3200,3200,3224,6832,1574,1574,1574,1574,1574,1574,1574,1574,1574,6816,6824,1536,1536,6816,6800,6800,6824,7047,3240,3228,3228,3228,3228,3228,3228,3228,3228,3228,3230,3233,3209,3200,3200,3200,3200,3200,3200,3200,3224,6832,1574,1574,1574,1574,1574,1574,1574,1574,1574,6816,6824,1536,1536,6816,6800,6800,6824,7052,2955,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2957,3216,3200,3200,3200,3200,3200,3200,3200,3224,6844,1574,1574,1574,1574,1574,1574,1574,1574,1574,6816,6824,1536,1536,6816,6800,6800,6824,3234,3220,3220,3220,3220,3220,3220,3220,3220,3220,3220,3220,3220,3201,3200,3200,3200,3200,3200,3200,3200,3224,7047,1574,1574,1574,1574,1574,1574,1574,1574,1574,6816,6824,1536,1536,6816,6800,6800,6824,3216,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3224,7053,1574,1574,1574,1574,1574,1574,1574,1574,1574,6816,6824,1536,1536,6816,6800,6800,6824,3240,3228,3228,3228,3228,3228,3228,3228,3228,3228,3228,3228,3228,3212,3228,3228,3228,3228,3228,3228,3228,3230,3245,1574,1574,1574,1574,1574,1574,1574,1574,1574,6816,6824,1536,1536,6840,6828,6828,6830,6833,6833,6833,6833,6833,6833,6833,6833,6833,6833,6833,6833,6845,3244,6843,6833,6833,6833,6833,6833,6833,6833,6833,6833,6833,6833,6833,6833,6833,6833,6833,6833,6829,6838,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33,0,33,0,0,0,32,0,0,32,0,131,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41,0,41,51,0,0,40,0,0,40,124,139,40,0,0,0,70,71,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,80,108,80,59,0,115,113,112,115,113,112,115,113,112,0,0,78,79,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,88,0,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,81,82,0,81,82,0,81,82,0,81,82,0,81,82,0,0,0,0,0,0,0,0,0,0,0,0,0,114,114,114,114,114,114,114,114,114,0,0,0,0,89,90,0,89,90,0,89,90,0,89,90,0,89,90,0,0,0,0,0,0,340,122,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,319,104,0,0,0,96,0,0,104,104,104,104,0,104,104,104,104,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,292,0,300,0,0,291,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,104,104,104,104,0,104,104,104,104,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,226,227,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,129,130,0,0,0,0,0,0,0,0,0,0,0,234,235,0,0,0,0,0,0,104,104,104,104,0,104,104,104,104,0,0,0,0,0,0,0,0,0,136,137,138,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,226,227,0,300,0,294,0,0,302,0,295,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,209,209,0,0,0,234,235,0,104,104,104,104,0,104,104,104,104,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,226,227,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,281,0,0,0,0,0,0,0,0,0,208,0,0,234,235,0,104,104,104,104,0,104,104,104,104,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,210,0,0,0,0,0,0,293,306,0,0,0,289,292,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,265,0,0,0,0,0,0,0,0,0,209,0,0,0,0,0,104,104,104,104,0,104,104,104,104,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,201,0,0,242,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,274,0,0,0,0,0,0,0,0,0,200,0,0,250,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,242,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
+"data":[1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,6832,1536,1536,6834,6820,6821,6833,6833,6833,6833,6823,6833,6833,6833,6833,6833,6833,6833,6833,6833,6822,6820,6820,6820,6820,6820,6820,6820,6820,6820,6820,6820,6820,6820,6820,6820,6820,6820,6820,6820,6826,1536,1536,6816,6800,6824,7043,7042,7042,7046,6832,7043,7042,7042,7042,7042,7042,7042,7042,7042,6816,6804,6828,6828,6828,6828,6828,6828,6828,6828,6828,6828,6828,6828,6828,6828,6828,6828,6808,6800,6824,1536,1536,6816,6800,6824,7049,7048,7048,7052,6832,7048,7048,7048,7048,7048,7048,7048,7048,7048,6816,6824,7043,7042,7042,7042,7042,7042,7042,7042,7042,7042,7042,7042,7042,7042,7042,7042,6816,6800,6824,1536,1536,6818,6828,6838,2946,2932,2932,2948,6832,3234,3220,3220,3220,3220,3220,3220,3220,3236,6840,6838,7049,7048,7048,7048,7048,7048,7048,7048,7048,7048,7048,7048,7048,7048,7048,7048,6840,6808,6824,1536,1536,6832,7043,7046,2928,2912,2912,2936,6832,3216,3200,3200,3200,3200,3200,3200,3200,3202,3220,3220,3220,3236,4098,4084,4084,4084,4084,4084,4084,4084,4084,4084,4084,4084,4100,3242,7043,6816,6824,1536,1536,6832,7049,7052,2952,2940,2940,2950,6844,3216,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3224,4080,4064,4064,4064,4064,4064,4064,4064,4064,4064,4064,4064,4088,3232,7049,6816,6824,1536,1536,6832,3234,3220,3220,3220,3220,3221,3233,3209,3200,3200,3200,3200,3200,3200,3200,3200,3204,3228,3208,3224,4080,4064,4064,4064,4064,4064,4064,4064,4064,4064,4064,4064,4088,3217,3236,6816,6824,1536,1536,6832,3240,3228,3228,3212,3228,3238,6842,3216,3200,3200,3200,3200,3200,3200,3200,3200,3224,6842,3240,3238,4104,4092,4092,4092,4092,4092,4092,4092,4092,4092,4092,4092,4102,3216,3224,6816,6824,1536,1536,6819,6833,6833,6845,3232,6843,6833,6827,3240,3208,3200,3200,3200,3200,3200,3200,3200,3224,6819,6833,6833,6833,6833,6833,6837,3243,3233,3233,3233,3233,3233,3233,3233,3233,3229,3238,6816,6824,1536,1536,6832,7043,7042,7046,3232,7043,7042,6841,6837,3216,3200,3200,3200,3200,3200,3200,3200,3224,6832,7042,7042,7042,7042,7042,6841,6833,6833,6833,6833,6833,6833,6833,6833,6833,6833,6833,6809,6824,1536,1536,6832,7049,7048,7052,3232,7049,7048,7043,6832,3216,3200,3200,3200,3200,3200,3200,3200,3224,6832,7048,7048,7048,7048,7048,7043,7042,7042,7042,7042,7042,7042,7042,7042,7042,7042,7042,6816,6824,1536,1536,6832,3234,3220,3220,3203,3220,3236,7049,6832,3216,3200,3200,3200,3200,3200,3200,3200,3224,6832,3234,3220,3220,3220,3236,7049,7048,7048,7048,7048,7048,7048,7048,7048,7048,7048,7048,6816,6824,1536,1536,6832,3216,3200,3200,3200,3200,3202,3236,6832,3216,3200,3200,3200,3200,3200,3200,3200,3224,6832,3218,3228,3228,3228,3230,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3233,3237,6816,6824,1536,1536,6832,3240,3228,3208,3200,3200,3200,3224,6832,3216,3200,3200,3200,3200,3200,3200,3200,3224,6832,3232,3714,3700,3700,3700,3700,3700,3700,3700,3700,3700,3700,3700,3700,3700,3716,3232,6816,6824,1536,1536,6817,6820,6836,3216,3200,3200,3200,3224,6832,3216,3200,3200,3200,3200,3200,3200,3200,3224,6832,3232,3696,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3704,3232,6816,6824,1536,1536,6816,6800,6824,3216,3200,3200,3204,3238,6832,3216,3200,3200,3200,3200,3200,3200,3200,3224,6832,3232,3696,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3704,3232,6816,6824,1536,1536,6816,6800,6824,3216,3200,3200,3224,6834,6826,3216,3200,3200,3200,3200,3200,3200,3200,3224,6844,3232,3696,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3704,3232,6816,6824,1536,1536,6816,6800,6824,3216,3200,3200,3224,6818,6838,3216,3200,3200,3200,3200,3200,3200,3200,3224,7047,3232,3696,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3704,3232,6816,6824,1536,1536,6816,6800,6824,3216,3200,3200,3224,6832,7046,3216,3200,3200,3200,3200,3200,3200,3200,3224,7053,3232,3696,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3704,3232,6816,6824,1536,1536,6816,6800,6824,3216,3200,3200,3224,6832,7052,3216,3200,3200,3200,3200,3200,3200,3200,3202,3220,3226,3696,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3704,3232,6816,6824,1536,1536,6816,6800,6824,3216,3200,3200,3224,6832,3234,3201,3200,3200,3200,3200,3200,3200,3200,3200,3200,3224,3696,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3704,3232,6816,6824,1536,1536,6816,6800,6824,3216,3200,3200,3224,6832,3216,3200,3200,3200,3200,3200,3200,3204,3228,3228,3228,3225,3696,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3704,3232,6816,6824,1536,1536,6816,6800,6824,3216,3200,3200,3224,6832,3216,3200,3200,3200,3200,3200,3200,3224,6843,6833,6845,3232,3696,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3680,3704,3232,6816,6824,1536,1536,6816,6800,6824,3216,3200,3200,3224,6832,3216,3200,3200,3200,3200,3200,3200,3224,7043,7042,7046,3232,3720,3708,3708,3708,3708,3708,3708,3708,3708,3708,3708,3708,3708,3708,3718,3232,6816,6824,1536,1536,6816,6800,6824,3216,3200,3200,3224,6832,3216,3200,3200,3200,3200,3200,3200,3224,7049,7048,7052,3217,3220,3220,3220,3220,3220,3221,3233,3233,3233,3233,3233,3233,3233,3233,3233,3239,6816,6824,1536,1536,6816,6800,6824,3216,3200,3200,3224,6832,3216,3200,3200,3200,3200,3200,3200,3202,3220,3220,3220,3201,3200,3200,3200,3200,3200,3224,6835,6833,6833,6833,6833,6833,6833,6833,6833,6833,6809,6824,1536,1536,6816,6800,6824,3240,3228,3228,3238,6832,3216,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3224,6832,7042,7042,7042,7042,7042,7042,7042,7042,7042,6816,6824,1536,1536,6816,6800,6802,6820,6820,6820,6820,6826,3240,3228,3228,3228,3228,3228,3228,3228,3228,3208,3200,3200,3200,3200,3200,3200,3200,3224,6832,7048,7048,7048,7048,7048,7048,7048,7048,7048,6816,6824,1536,1536,6816,6800,6800,6800,6804,6828,6828,6830,6833,6833,6833,6833,6833,6833,6833,6833,6837,3216,3200,3200,3200,3200,3200,3200,3200,3224,6832,1574,1574,1574,1574,1574,1574,1574,1574,1574,6816,6824,1536,1536,6816,6800,6800,6800,6824,7042,7042,7042,7042,7046,7050,7043,7042,7042,7042,7046,6832,3216,3200,3200,3200,3200,3200,3200,3200,3224,6832,1574,1574,1574,1574,1574,1574,1574,1574,1574,6816,6824,1536,1536,6816,6800,6800,6800,6824,7048,7048,7048,7048,7052,3242,7049,7048,7048,7048,7048,6832,3216,3200,3200,3200,3200,3200,3200,3200,3224,6832,1574,1574,1574,1574,1574,1574,1574,1574,1574,6816,6824,1536,1536,6816,6800,6800,6804,6838,3234,3220,3220,3220,3220,3203,3220,3220,3220,3220,3236,6844,3216,3200,3200,3200,3200,3200,3200,3200,3224,6832,1574,1574,1574,1574,1574,1574,1574,1574,1574,6816,6824,1536,1536,6816,6800,6800,6824,7047,3240,3228,3228,3228,3228,3228,3228,3228,3228,3228,3230,3233,3209,3200,3200,3200,3200,3200,3200,3200,3224,6832,1574,1574,1574,1574,1574,1574,1574,1574,1574,6816,6824,1536,1536,6816,6800,6800,6824,7052,2955,2945,2945,2945,2945,2945,2945,2945,2945,2945,2945,2957,3216,3200,3200,3200,3200,3200,3200,3200,3224,6844,1574,1574,1574,1574,1574,1574,1574,1574,1574,6816,6824,1536,1536,6816,6800,6800,6824,3234,3220,3220,3220,3220,3220,3220,3220,3220,3220,3220,3220,3220,3201,3200,3200,3200,3200,3200,3200,3200,3224,7047,1574,1574,1574,1574,1574,1574,1574,1574,1574,6816,6824,1536,1536,6816,6800,6800,6824,3216,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3224,7053,1574,1574,1574,1574,1574,1574,1574,1574,1574,6816,6824,1536,1536,6816,6800,6800,6824,3240,3228,3228,3228,3228,3228,3228,3228,3228,3228,3228,3228,3228,3212,3228,3228,3228,3228,3228,3228,3228,3230,3245,1574,1574,1574,1574,1574,1574,1574,1574,1574,6816,6824,1536,1536,6840,6828,6828,6830,6833,6833,6833,6833,6833,6833,6833,6833,6833,6833,6833,6833,6845,3244,6843,6833,6833,6833,6833,6833,6833,6833,6833,6833,6833,6833,6833,6833,6833,6833,6833,6833,6829,6838,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3187,3197,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0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113,112,115,113,112,0,0,78,79,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,88,0,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,81,82,0,81,82,0,81,82,0,81,82,0,81,82,0,0,0,0,0,0,0,0,0,0,0,0,0,114,114,114,114,114,114,114,114,114,0,0,0,0,89,90,0,89,90,0,89,90,0,89,90,0,89,90,0,0,0,0,0,0,340,122,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,319,104,0,0,0,96,0,0,104,104,104,104,0,104,104,104,104,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,292,0,300,0,0,291,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,104,104,104,104,0,104,104,104,104,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,226,227,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,129,130,0,0,0,0,0,0,0,0,0,0,0,234,235,0,0,0,0,0,0,104,104,104,104,0,104,104,104,104,0,0,0,0,0,0,0,0,0,136,137,138,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,226,227,0,300,0,294,0,0,302,0,295,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,209,209,0,0,0,234,235,0,104,104,104,104,0,104,104,104,104,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,226,227,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,281,0,0,0,0,0,0,0,0,0,208,0,0,234,235,0,104,104,104,104,0,104,104,104,104,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,210,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0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
"events":[
null,
{"id":1,"name":"EV001","note":"","pages":[{"conditions":{"actorId":1,"actorValid":false,"itemId":1,"itemValid":false,"selfSwitchCh":"A","selfSwitchValid":false,"switch1Id":1,"switch1Valid":false,"switch2Id":1,"switch2Valid":false,"variableId":1,"variableValid":false,"variableValue":0},"directionFix":true,"image":{"tileId":0,"characterName":"!Flame","direction":4,"pattern":1,"characterIndex":1},"list":[{"code":0,"indent":0,"parameters":[]}],"moveFrequency":3,"moveRoute":{"list":[{"code":0,"parameters":[]}],"repeat":true,"skippable":false,"wait":false},"moveSpeed":3,"moveType":0,"priorityType":1,"stepAnime":true,"through":false,"trigger":0,"walkAnime":true}],"x":26,"y":11},
@@ -40,6 +40,12 @@ null,
{"id":35,"name":"gust_10","note":"","pages":[{"conditions":{"actorId":1,"actorValid":false,"itemId":1,"itemValid":false,"selfSwitchCh":"A","selfSwitchValid":false,"switch1Id":1,"switch1Valid":false,"switch2Id":1,"switch2Valid":false,"variableId":1,"variableValid":false,"variableValue":0},"directionFix":false,"image":{"tileId":0,"characterName":"Actor2","direction":8,"pattern":1,"characterIndex":6},"list":[{"code":0,"indent":0,"parameters":[]}],"moveFrequency":3,"moveRoute":{"list":[{"code":0,"parameters":[]}],"repeat":true,"skippable":false,"wait":false},"moveSpeed":3,"moveType":0,"priorityType":1,"stepAnime":false,"through":false,"trigger":0,"walkAnime":true}],"x":12,"y":5},
{"id":36,"name":"gust_10","note":"","pages":[{"conditions":{"actorId":1,"actorValid":false,"itemId":1,"itemValid":false,"selfSwitchCh":"A","selfSwitchValid":false,"switch1Id":1,"switch1Valid":false,"switch2Id":1,"switch2Valid":false,"variableId":1,"variableValid":false,"variableValue":0},"directionFix":false,"image":{"tileId":0,"characterName":"Actor2","direction":8,"pattern":1,"characterIndex":6},"list":[{"code":0,"indent":0,"parameters":[]}],"moveFrequency":3,"moveRoute":{"list":[{"code":0,"parameters":[]}],"repeat":true,"skippable":false,"wait":false},"moveSpeed":3,"moveType":0,"priorityType":1,"stepAnime":false,"through":false,"trigger":0,"walkAnime":true}],"x":14,"y":5},
{"id":37,"name":"EV037","note":"","pages":[{"conditions":{"actorId":1,"actorValid":false,"itemId":1,"itemValid":false,"selfSwitchCh":"A","selfSwitchValid":false,"switch1Id":1,"switch1Valid":false,"switch2Id":1,"switch2Valid":false,"variableId":1,"variableValid":false,"variableValue":0},"directionFix":false,"image":{"tileId":0,"characterName":"People2","direction":2,"pattern":1,"characterIndex":2},"list":[{"code":0,"indent":0,"parameters":[]}],"moveFrequency":3,"moveRoute":{"list":[{"code":0,"parameters":[]}],"repeat":true,"skippable":false,"wait":false},"moveSpeed":3,"moveType":0,"priorityType":1,"stepAnime":false,"through":false,"trigger":0,"walkAnime":true}],"x":30,"y":17},
-{"id":38,"name":"gust_10","note":"","pages":[{"conditions":{"actorId":1,"actorValid":false,"itemId":1,"itemValid":false,"selfSwitchCh":"A","selfSwitchValid":false,"switch1Id":1,"switch1Valid":false,"switch2Id":1,"switch2Valid":false,"variableId":1,"variableValid":false,"variableValue":0},"directionFix":false,"image":{"tileId":0,"characterName":"Actor2","direction":8,"pattern":1,"characterIndex":6},"list":[{"code":0,"indent":0,"parameters":[]}],"moveFrequency":3,"moveRoute":{"list":[{"code":0,"parameters":[]}],"repeat":true,"skippable":false,"wait":false},"moveSpeed":3,"moveType":0,"priorityType":1,"stepAnime":false,"through":false,"trigger":0,"walkAnime":true}],"x":16,"y":5}
+{"id":38,"name":"gust_10","note":"","pages":[{"conditions":{"actorId":1,"actorValid":false,"itemId":1,"itemValid":false,"selfSwitchCh":"A","selfSwitchValid":false,"switch1Id":1,"switch1Valid":false,"switch2Id":1,"switch2Valid":false,"variableId":1,"variableValid":false,"variableValue":0},"directionFix":false,"image":{"tileId":0,"characterName":"Actor2","direction":8,"pattern":1,"characterIndex":6},"list":[{"code":0,"indent":0,"parameters":[]}],"moveFrequency":3,"moveRoute":{"list":[{"code":0,"parameters":[]}],"repeat":true,"skippable":false,"wait":false},"moveSpeed":3,"moveType":0,"priorityType":1,"stepAnime":false,"through":false,"trigger":0,"walkAnime":true}],"x":16,"y":5},
+{"id":39,"name":"EV039","note":"","pages":[{"conditions":{"actorId":1,"actorValid":false,"itemId":1,"itemValid":false,"selfSwitchCh":"A","selfSwitchValid":false,"switch1Id":1,"switch1Valid":false,"switch2Id":1,"switch2Valid":false,"variableId":1,"variableValid":false,"variableValue":0},"directionFix":false,"image":{"tileId":0,"characterName":"People1","direction":8,"pattern":0,"characterIndex":3},"list":[{"code":0,"indent":0,"parameters":[]}],"moveFrequency":3,"moveRoute":{"list":[{"code":0,"parameters":[]}],"repeat":true,"skippable":false,"wait":false},"moveSpeed":3,"moveType":0,"priorityType":1,"stepAnime":false,"through":false,"trigger":0,"walkAnime":true}],"x":24,"y":19},
+{"id":40,"name":"EV040","note":"","pages":[{"conditions":{"actorId":1,"actorValid":false,"itemId":1,"itemValid":false,"selfSwitchCh":"A","selfSwitchValid":false,"switch1Id":1,"switch1Valid":false,"switch2Id":1,"switch2Valid":false,"variableId":1,"variableValid":false,"variableValue":0},"directionFix":false,"image":{"tileId":0,"characterName":"People2","direction":8,"pattern":1,"characterIndex":3},"list":[{"code":0,"indent":0,"parameters":[]}],"moveFrequency":3,"moveRoute":{"list":[{"code":0,"parameters":[]}],"repeat":true,"skippable":false,"wait":false},"moveSpeed":3,"moveType":0,"priorityType":1,"stepAnime":false,"through":false,"trigger":0,"walkAnime":true}],"x":28,"y":20},
+{"id":41,"name":"EV041","note":"","pages":[{"conditions":{"actorId":1,"actorValid":false,"itemId":1,"itemValid":false,"selfSwitchCh":"A","selfSwitchValid":false,"switch1Id":1,"switch1Valid":false,"switch2Id":1,"switch2Valid":false,"variableId":1,"variableValid":false,"variableValue":0},"directionFix":false,"image":{"tileId":0,"characterName":"People1","direction":2,"pattern":1,"characterIndex":6},"list":[{"code":0,"indent":0,"parameters":[]}],"moveFrequency":3,"moveRoute":{"list":[{"code":0,"parameters":[]}],"repeat":true,"skippable":false,"wait":false},"moveSpeed":3,"moveType":0,"priorityType":1,"stepAnime":false,"through":false,"trigger":0,"walkAnime":true}],"x":31,"y":20},
+{"id":42,"name":"EV042","note":"","pages":[{"conditions":{"actorId":1,"actorValid":false,"itemId":1,"itemValid":false,"selfSwitchCh":"A","selfSwitchValid":false,"switch1Id":1,"switch1Valid":false,"switch2Id":1,"switch2Valid":false,"variableId":1,"variableValid":false,"variableValue":0},"directionFix":false,"image":{"tileId":0,"characterName":"People1","direction":2,"pattern":2,"characterIndex":2},"list":[{"code":0,"indent":0,"parameters":[]}],"moveFrequency":3,"moveRoute":{"list":[{"code":0,"parameters":[]}],"repeat":true,"skippable":false,"wait":false},"moveSpeed":3,"moveType":0,"priorityType":1,"stepAnime":false,"through":false,"trigger":0,"walkAnime":true}],"x":24,"y":22},
+null,
+{"id":44,"name":"EV044","note":"","pages":[{"conditions":{"actorId":1,"actorValid":false,"itemId":1,"itemValid":false,"selfSwitchCh":"A","selfSwitchValid":false,"switch1Id":1,"switch1Valid":false,"switch2Id":1,"switch2Valid":false,"variableId":1,"variableValid":false,"variableValue":0},"directionFix":false,"image":{"tileId":0,"characterName":"People4","direction":2,"pattern":0,"characterIndex":7},"list":[{"code":0,"indent":0,"parameters":[]}],"moveFrequency":3,"moveRoute":{"list":[{"code":0,"parameters":[]}],"repeat":true,"skippable":false,"wait":false},"moveSpeed":3,"moveType":0,"priorityType":1,"stepAnime":false,"through":false,"trigger":0,"walkAnime":true}],"x":26,"y":17}
]
}
\ No newline at end of file
diff --git a/data/System.json b/data/System.json
index 1893f57..6dbfa3d 100644
--- a/data/System.json
+++ b/data/System.json
@@ -1 +1 @@
-{"airship":{"bgm":{"name":"Ship3","pan":0,"pitch":100,"volume":90},"characterIndex":3,"characterName":"Vehicle","startMapId":0,"startX":0,"startY":0},"armorTypes":["","General Armor","Magic Armor","Light Armor","Heavy Armor","Small Shield","Large Shield"],"attackMotions":[{"type":0,"weaponImageId":0},{"type":1,"weaponImageId":1},{"type":1,"weaponImageId":2},{"type":1,"weaponImageId":3},{"type":1,"weaponImageId":4},{"type":1,"weaponImageId":5},{"type":1,"weaponImageId":6},{"type":2,"weaponImageId":7},{"type":2,"weaponImageId":8},{"type":2,"weaponImageId":9},{"type":0,"weaponImageId":10},{"type":0,"weaponImageId":11},{"type":0,"weaponImageId":12}],"battleBgm":{"name":"Battle3","pan":0,"pitch":100,"volume":25},"battleback1Name":"Grassland","battleback2Name":"Grassland","battlerHue":0,"battlerName":"Dragon","boat":{"bgm":{"name":"Ship1","pan":0,"pitch":100,"volume":90},"characterIndex":0,"characterName":"Vehicle","startMapId":0,"startX":0,"startY":0},"currencyUnit":"G","defeatMe":{"name":"Defeat1","pan":0,"pitch":100,"volume":90},"editMapId":6,"elements":["","Physical","Fire","Ice","Thunder","Water","Earth","Wind","Light","Darkness"],"equipTypes":["","Weapon","Shield","Head","Body","Accessory"],"gameTitle":"The Bards Tale: The Juicy Mango","gameoverMe":{"name":"Gameover2","pan":0,"pitch":100,"volume":25},"locale":"en_US","magicSkills":[1],"menuCommands":[false,true,false,true,false,true],"optDisplayTp":true,"optDrawTitle":true,"optExtraExp":false,"optFloorDeath":false,"optFollowers":false,"optSideView":true,"optSlipDeath":false,"optTransparent":false,"partyMembers":[1],"ship":{"bgm":{"name":"Ship2","pan":0,"pitch":100,"volume":90},"characterIndex":1,"characterName":"Vehicle","startMapId":0,"startX":0,"startY":0},"skillTypes":["","Magic","Special"],"sounds":[{"name":"Cursor2","pan":0,"pitch":120,"volume":55},{"name":"Decision1","pan":0,"pitch":100,"volume":90},{"name":"Cancel2","pan":0,"pitch":100,"volume":90},{"name":"Buzzer1","pan":0,"pitch":100,"volume":90},{"name":"Equip1","pan":0,"pitch":100,"volume":90},{"name":"Save","pan":0,"pitch":100,"volume":90},{"name":"Load","pan":0,"pitch":100,"volume":90},{"name":"Battle1","pan":0,"pitch":100,"volume":90},{"name":"Run","pan":0,"pitch":100,"volume":90},{"name":"Attack3","pan":0,"pitch":100,"volume":90},{"name":"Damage4","pan":0,"pitch":100,"volume":90},{"name":"Collapse1","pan":0,"pitch":100,"volume":90},{"name":"Collapse2","pan":0,"pitch":100,"volume":90},{"name":"Collapse3","pan":0,"pitch":100,"volume":90},{"name":"Damage5","pan":0,"pitch":100,"volume":90},{"name":"Collapse4","pan":0,"pitch":100,"volume":90},{"name":"Recovery","pan":0,"pitch":100,"volume":90},{"name":"Miss","pan":0,"pitch":100,"volume":90},{"name":"Evasion1","pan":0,"pitch":100,"volume":90},{"name":"Evasion2","pan":0,"pitch":100,"volume":90},{"name":"Reflection","pan":0,"pitch":100,"volume":90},{"name":"Shop1","pan":0,"pitch":100,"volume":90},{"name":"Item3","pan":0,"pitch":100,"volume":90},{"name":"Item3","pan":0,"pitch":100,"volume":90}],"startMapId":1,"startX":5,"startY":3,"switches":["","kagetest1","Andreas","Alex","Andreas","Alex","Andreas","Alex","Andreas","Alex","Andreas","Alex","Andreas","Alex","Andreas","Alex","Andreas","Alex","Andreas","Alex","Andreas","Alex","Andreas","Alex","Andreas","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"terms":{"basic":["Level","Lv","HP","HP","MP","MP","TP","TP","EXP","EXP"],"commands":["Fight","Escape","Attack","Guard","Item","Skill","Equip","Status","Formation","Save","Game End","Options","Weapon","Armor","Key Item","Equip","Optimize","Clear","New Game","Continue",null,"To Title","Cancel",null,"Buy","Sell"],"params":["Max HP","Max MP","Attack","Defense","M.Attack","M.Defense","Agility","Luck","Hit","Evasion"],"messages":{"actionFailure":"There was no effect on %1!","actorDamage":"%1 took %2 damage!","actorDrain":"%1 was drained of %2 %3!","actorGain":"%1 gained %2 %3!","actorLoss":"%1 lost %2 %3!","actorNoDamage":"%1 took no damage!","actorNoHit":"Miss! %1 took no damage!","actorRecovery":"%1 recovered %2 %3!","alwaysDash":"Always Dash","bgmVolume":"BGM Volume","bgsVolume":"BGS Volume","buffAdd":"%1's %2 went up!","buffRemove":"%1's %2 returned to normal!","commandRemember":"Command Remember","counterAttack":"%1 counterattacked!","criticalToActor":"A painful blow!!","criticalToEnemy":"An excellent hit!!","debuffAdd":"%1's %2 went down!","defeat":"%1 was defeated.","emerge":"%1 emerged!","enemyDamage":"%1 took %2 damage!","enemyDrain":"%1 was drained of %2 %3!","enemyGain":"%1 gained %2 %3!","enemyLoss":"%1 lost %2 %3!","enemyNoDamage":"%1 took no damage!","enemyNoHit":"Miss! %1 took no damage!","enemyRecovery":"%1 recovered %2 %3!","escapeFailure":"However, it was unable to escape!","escapeStart":"%1 has started to escape!","evasion":"%1 evaded the attack!","expNext":"To Next %1","expTotal":"Current %1","file":"File","levelUp":"%1 is now %2 %3!","loadMessage":"Load which file?","magicEvasion":"%1 nullified the magic!","magicReflection":"%1 reflected the magic!","meVolume":"ME Volume","obtainExp":"%1 %2 received!","obtainGold":"%1\\G found!","obtainItem":"%1 found!","obtainSkill":"%1 learned!","partyName":"%1's Party","possession":"Possession","preemptive":"%1 got the upper hand!","saveMessage":"Save to which file?","seVolume":"SE Volume","substitute":"%1 protected %2!","surprise":"%1 was surprised!","useItem":"%1 uses %2!","victory":"%1 was victorious!"}},"testBattlers":[{"actorId":1,"equips":[1,1,2,3,0],"level":1},{"actorId":2,"equips":[2,1,2,3,0],"level":1},{"actorId":3,"equips":[3,0,2,3,4],"level":1},{"actorId":4,"equips":[4,0,2,3,4],"level":1}],"testTroopId":4,"title1Name":"Castle","title2Name":"","titleBgm":{"name":"Town1","pan":0,"pitch":100,"volume":10},"variables":["","","","","","","","","","","","","","","","","","","","",""],"versionId":84945219,"victoryMe":{"name":"Victory1","pan":0,"pitch":100,"volume":40},"weaponTypes":["","Dagger","Sword","Flail","Axe","Whip","Cane","Bow","Crossbow","Gun","Claw","Glove","Spear"],"windowTone":[-255,34,187,0]}
\ No newline at end of file
+{"airship":{"bgm":{"name":"Ship3","pan":0,"pitch":100,"volume":90},"characterIndex":3,"characterName":"Vehicle","startMapId":0,"startX":0,"startY":0},"armorTypes":["","General Armor","Magic Armor","Light Armor","Heavy Armor","Small Shield","Large Shield"],"attackMotions":[{"type":0,"weaponImageId":0},{"type":1,"weaponImageId":1},{"type":1,"weaponImageId":2},{"type":1,"weaponImageId":3},{"type":1,"weaponImageId":4},{"type":1,"weaponImageId":5},{"type":1,"weaponImageId":6},{"type":2,"weaponImageId":7},{"type":2,"weaponImageId":8},{"type":2,"weaponImageId":9},{"type":0,"weaponImageId":10},{"type":0,"weaponImageId":11},{"type":0,"weaponImageId":12}],"battleBgm":{"name":"Battle3","pan":0,"pitch":100,"volume":25},"battleback1Name":"Grassland","battleback2Name":"Grassland","battlerHue":0,"battlerName":"Dragon","boat":{"bgm":{"name":"Ship1","pan":0,"pitch":100,"volume":90},"characterIndex":0,"characterName":"Vehicle","startMapId":0,"startX":0,"startY":0},"currencyUnit":"G","defeatMe":{"name":"Defeat1","pan":0,"pitch":100,"volume":90},"editMapId":6,"elements":["","Physical","Fire","Ice","Thunder","Water","Earth","Wind","Light","Darkness"],"equipTypes":["","Weapon","Shield","Head","Body","Accessory"],"gameTitle":"The Bards Tale: The Juicy Mango","gameoverMe":{"name":"Gameover2","pan":0,"pitch":100,"volume":25},"locale":"en_US","magicSkills":[1],"menuCommands":[false,true,false,true,false,true],"optDisplayTp":true,"optDrawTitle":true,"optExtraExp":false,"optFloorDeath":false,"optFollowers":false,"optSideView":true,"optSlipDeath":false,"optTransparent":false,"partyMembers":[1],"ship":{"bgm":{"name":"Ship2","pan":0,"pitch":100,"volume":90},"characterIndex":1,"characterName":"Vehicle","startMapId":0,"startX":0,"startY":0},"skillTypes":["","Magic","Special"],"sounds":[{"name":"Cursor2","pan":0,"pitch":120,"volume":55},{"name":"Decision1","pan":0,"pitch":100,"volume":90},{"name":"Cancel2","pan":0,"pitch":100,"volume":90},{"name":"Buzzer1","pan":0,"pitch":100,"volume":90},{"name":"Equip1","pan":0,"pitch":100,"volume":90},{"name":"Save","pan":0,"pitch":100,"volume":90},{"name":"Load","pan":0,"pitch":100,"volume":90},{"name":"Battle1","pan":0,"pitch":100,"volume":90},{"name":"Run","pan":0,"pitch":100,"volume":90},{"name":"Attack3","pan":0,"pitch":100,"volume":90},{"name":"Damage4","pan":0,"pitch":100,"volume":90},{"name":"Collapse1","pan":0,"pitch":100,"volume":90},{"name":"Collapse2","pan":0,"pitch":100,"volume":90},{"name":"Collapse3","pan":0,"pitch":100,"volume":90},{"name":"Damage5","pan":0,"pitch":100,"volume":90},{"name":"Collapse4","pan":0,"pitch":100,"volume":90},{"name":"Recovery","pan":0,"pitch":100,"volume":90},{"name":"Miss","pan":0,"pitch":100,"volume":90},{"name":"Evasion1","pan":0,"pitch":100,"volume":90},{"name":"Evasion2","pan":0,"pitch":100,"volume":90},{"name":"Reflection","pan":0,"pitch":100,"volume":90},{"name":"Shop1","pan":0,"pitch":100,"volume":90},{"name":"Item3","pan":0,"pitch":100,"volume":90},{"name":"Item3","pan":0,"pitch":100,"volume":90}],"startMapId":1,"startX":5,"startY":3,"switches":["","kagetest1","Andreas","Alex","Andreas","Alex","Andreas","Alex","Andreas","Alex","Andreas","Alex","Andreas","Alex","Andreas","Alex","Andreas","Alex","Andreas","Alex","Andreas","Alex","Andreas","Alex","Andreas","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"terms":{"basic":["Level","Lv","HP","HP","MP","MP","TP","TP","EXP","EXP"],"commands":["Fight","Escape","Attack","Guard","Item","Skill","Equip","Status","Formation","Save","Game End","Options","Weapon","Armor","Key Item","Equip","Optimize","Clear","New Game","Continue",null,"To Title","Cancel",null,"Buy","Sell"],"params":["Max HP","Max MP","Attack","Defense","M.Attack","M.Defense","Agility","Luck","Hit","Evasion"],"messages":{"actionFailure":"There was no effect on %1!","actorDamage":"%1 took %2 damage!","actorDrain":"%1 was drained of %2 %3!","actorGain":"%1 gained %2 %3!","actorLoss":"%1 lost %2 %3!","actorNoDamage":"%1 took no damage!","actorNoHit":"Miss! %1 took no damage!","actorRecovery":"%1 recovered %2 %3!","alwaysDash":"Always Dash","bgmVolume":"BGM Volume","bgsVolume":"BGS Volume","buffAdd":"%1's %2 went up!","buffRemove":"%1's %2 returned to normal!","commandRemember":"Command Remember","counterAttack":"%1 counterattacked!","criticalToActor":"A painful blow!!","criticalToEnemy":"An excellent hit!!","debuffAdd":"%1's %2 went down!","defeat":"%1 was defeated.","emerge":"%1 emerged!","enemyDamage":"%1 took %2 damage!","enemyDrain":"%1 was drained of %2 %3!","enemyGain":"%1 gained %2 %3!","enemyLoss":"%1 lost %2 %3!","enemyNoDamage":"%1 took no damage!","enemyNoHit":"Miss! %1 took no damage!","enemyRecovery":"%1 recovered %2 %3!","escapeFailure":"However, it was unable to escape!","escapeStart":"%1 has started to escape!","evasion":"%1 evaded the attack!","expNext":"To Next %1","expTotal":"Current %1","file":"File","levelUp":"%1 is now %2 %3!","loadMessage":"Load which file?","magicEvasion":"%1 nullified the magic!","magicReflection":"%1 reflected the magic!","meVolume":"ME Volume","obtainExp":"%1 %2 received!","obtainGold":"%1\\G found!","obtainItem":"%1 found!","obtainSkill":"%1 learned!","partyName":"%1's Party","possession":"Possession","preemptive":"%1 got the upper hand!","saveMessage":"Save to which file?","seVolume":"SE Volume","substitute":"%1 protected %2!","surprise":"%1 was surprised!","useItem":"%1 uses %2!","victory":"%1 was victorious!"}},"testBattlers":[{"actorId":1,"equips":[1,1,2,3,0],"level":1},{"actorId":2,"equips":[2,1,2,3,0],"level":1},{"actorId":3,"equips":[3,0,2,3,4],"level":1},{"actorId":4,"equips":[4,0,2,3,4],"level":1}],"testTroopId":4,"title1Name":"Castle","title2Name":"","titleBgm":{"name":"Town1","pan":0,"pitch":100,"volume":10},"variables":["","","","","","","","","","","","","","","","","","","","",""],"versionId":69335001,"victoryMe":{"name":"Victory1","pan":0,"pitch":100,"volume":40},"weaponTypes":["","Dagger","Sword","Flail","Axe","Whip","Cane","Bow","Crossbow","Gun","Claw","Glove","Spear"],"windowTone":[-255,34,187,0]}
\ No newline at end of file
diff --git a/js/plugins.js b/js/plugins.js
index 04d5b05..9c4d948 100644
--- a/js/plugins.js
+++ b/js/plugins.js
@@ -2,4 +2,6 @@
// Do not edit this file directly.
var $plugins =
[
+{"name":"YEP_MessageCore","status":true,"description":"v1.13 Adds more features to the Message Window to customized\nthe way your messages appear and functions.","parameters":{"---General---":"","Default Rows":"4","Default Width":"Graphics.boxWidth","Face Indent":"Window_Base._faceWidth + 24","Fast Forward Key":"pagedown","Enable Fast Forward":"true","Word Wrapping":"false","Description Wrap":"false","Word Wrap Space":"false","---Font---":"","Font Name":"GameFont","Font Size":"28","Font Size Change":"12","Font Changed Max":"96","Font Changed Min":"12","Font Outline":"4","Maintain Font":"false","---Name Box---":"","Name Box Buffer X":"-28","Name Box Buffer Y":"0","Name Box Padding":"this.standardPadding() * 4","Name Box Color":"0","Name Box Clear":"false","Name Box Added Text":"\\c[6]"}},
+{"name":"YEP_X_ExtMesPack1","status":true,"description":"v1.08 (Requires YEP_MessageCore.js) Letter Sounds, NameBox\nBackground Types, Choice Control, and more!","parameters":{"---Letter Sounds---":"","Enable Sound":"true","Sound Name":"Cursor1","Sound Volume":"50","Sound Pitch":"100","Pitch Variance":"10","Sound Pan":"0","Pan Variance":"10","Sound Interval":"2","Reset Sounds":"false","---Message Anchor---":"","Default X":"center","Default Y":"bottom","Auto Row Full Face":"false","---Message Choices---":"","Max Rows":"6","Choice 1 Show Switch":"0","Choice 2 Show Switch":"0","Choice 3 Show Switch":"0","Choice 4 Show Switch":"0","Choice 5 Show Switch":"0","Choice 6 Show Switch":"0","Choice 7 Show Switch":"0","Choice 8 Show Switch":"0","Choice 9 Show Switch":"0","Choice 10 Show Switch":"0","Choice 11 Show Switch":"0","Choice 12 Show Switch":"0","Choice 13 Show Switch":"0","Choice 14 Show Switch":"0","Choice 15 Show Switch":"0","Choice 16 Show Switch":"0","Choice 17 Show Switch":"0","Choice 18 Show Switch":"0","Choice 19 Show Switch":"0","Choice 20 Show Switch":"0","Choice 1 On Switch":"0","Choice 2 On Switch":"0","Choice 3 On Switch":"0","Choice 4 On Switch":"0","Choice 5 On Switch":"0","Choice 6 On Switch":"0","Choice 7 On Switch":"0","Choice 8 On Switch":"0","Choice 9 On Switch":"0","Choice 10 On Switch":"0","Choice 11 On Switch":"0","Choice 12 On Switch":"0","Choice 13 On Switch":"0","Choice 14 On Switch":"0","Choice 15 On Switch":"0","Choice 16 On Switch":"0","Choice 17 On Switch":"0","Choice 18 On Switch":"0","Choice 19 On Switch":"0","Choice 20 On Switch":"0"}}
];
diff --git a/js/plugins/YEP_MessageCore.js b/js/plugins/YEP_MessageCore.js
new file mode 100644
index 0000000..2a4ee67
--- /dev/null
+++ b/js/plugins/YEP_MessageCore.js
@@ -0,0 +1,1218 @@
+//=============================================================================
+// Yanfly Engine Plugins - Message Core
+// YEP_MessageCore.js
+//=============================================================================
+
+var Imported = Imported || {};
+Imported.YEP_MessageCore = true;
+
+var Yanfly = Yanfly || {};
+Yanfly.Message = Yanfly.Message || {};
+
+//=============================================================================
+ /*:
+ * @plugindesc v1.13 Adds more features to the Message Window to customized
+ * the way your messages appear and functions.
+ * @author Yanfly Engine Plugins
+ *
+ * @param ---General---
+ * @default
+ *
+ * @param Default Rows
+ * @desc This is default amount of rows the message box will have.
+ * Default: 4
+ * @default 4
+ *
+ * @param Default Width
+ * @desc This is default width for the message box in pixels.
+ * Default: Graphics.boxWidth
+ * @default Graphics.boxWidth
+ *
+ * @param Face Indent
+ * @desc If using a face graphic, this is how much text indents by.
+ * Default: Window_Base._faceWidth + 24
+ * @default Window_Base._faceWidth + 24
+ *
+ * @param Fast Forward Key
+ * @desc This is the key used for fast forwarding.
+ * @default pagedown
+ *
+ * @param Enable Fast Forward
+ * @desc Enable fast forward button for your messages by default?
+ * NO - false YES - true
+ * @default true
+ *
+ * @param Word Wrapping
+ * @desc Use this to enable or disable word wrapping by default.
+ * OFF - false ON - true
+ * @default false
+ *
+ * @param Description Wrap
+ * @desc Enable or disable word wrapping for descriptions.
+ * OFF - false ON - true
+ * @default false
+ *
+ * @param Word Wrap Space
+ * @desc Insert a space with manual line breaks?
+ * NO - false YES - true
+ * @default false
+ *
+ * @param ---Font---
+ * @default
+ *
+ * @param Font Name
+ * @desc This is the default font used for the Message Window.
+ * Default: GameFont
+ * @default GameFont
+ *
+ * @param Font Size
+ * @desc This is the default font size used for the Message Window.
+ * Default: 28
+ * @default 28
+ *
+ * @param Font Size Change
+ * @desc Whenever \{ and \} are used, they adjust by this value.
+ * Default: 12
+ * @default 12
+ *
+ * @param Font Changed Max
+ * @desc This is the maximum size achieved by \{.
+ * Default: 96
+ * @default 96
+ *
+ * @param Font Changed Min
+ * @desc This is the minimum size achieved by \{.
+ * Default: 12
+ * @default 12
+ *
+ * @param Font Outline
+ * @desc This is the default font outline width for messages.
+ * Default: 4
+ * @default 4
+ *
+ * @param Maintain Font
+ * @desc When changing the font name or size, maintain for following
+ * messages. NO - false YES - true
+ * @default false
+ *
+ * @param ---Name Box---
+ * @default
+ *
+ * @param Name Box Buffer X
+ * @desc This is the buffer for the x location of the Name Box.
+ * @default -28
+ *
+ * @param Name Box Buffer Y
+ * @desc This is the buffer for the y location of the Name Box.
+ * @default 0
+ *
+ * @param Name Box Padding
+ * @desc This is the value for the padding of the Name Box.
+ * @default this.standardPadding() * 4
+ *
+ * @param Name Box Color
+ * @desc This is the text color used for the Name Box.
+ * @default 0
+ *
+ * @param Name Box Clear
+ * @desc Do you wish for the Name Box window to be clear?
+ * NO - false YES - true
+ * @default false
+ *
+ * @param Name Box Added Text
+ * @desc This text is always added whenever the name box is used.
+ * This can be used to automatically set up colors.
+ * @default \c[6]
+ *
+ * @help
+ * ============================================================================
+ * Introduction
+ * ============================================================================
+ *
+ * While RPG Maker MV Ace certainly improved the message system a whole lot, it
+ * wouldn't hurt to add in a few more features, such as name windows,
+ * converting textcodes to write out the icons and/or names of items, weapons,
+ * armours, and* more in quicker fashion. This script also gives the developer
+ * the ability to adjust the size of the message window during the game, give
+ * it a separate font, and to give the player a text fast-forward feature.
+ *
+ * ============================================================================
+ * Word Wrapping
+ * ============================================================================
+ *
+ * Word wrapping is now possible through the message system. You can enable and
+ * disable Word wrap using Plugin Commands. While using word wrap, if the word
+ * is to extend past the message window's area, it will automatically go to the
+ * following line. That said, word wrap will disable the editor's line breaks
+ * and will require you to use the ones provided by the plugin:
+ *
+ *
or is text code to apply a line break. Use this before or
+ * after a part in which you wish to start a new line.
+ *
+ * Keep in mind word wrapping is mostly for message windows. However, in other
+ * places that you'd like to see word wrapping, such as item descriptions,
+ * insert at the beginning of the text to enable it.
+ *
+ * ============================================================================
+ * Text Codes
+ * ============================================================================
+ *
+ * By using certain text codes in your messages, you can have the game replace
+ * them with the following:
+ *
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ *
+ * Text Code Function
+ * \V[n] Replaced by the value of the nth variable.
+ * \N[n] Replaced by the name of the nth actor.
+ * \P[n] Replaced by the name of the nth party member.
+ * \G Replaced by the currency unit.
+ * \C[n] Draw the subsequent text in the nth color.
+ * \I[n] Draw the nth icon.
+ * \{ Increases the text size by one step.
+ * \} Decreases the text size by one step.
+ * \\ Replaced with the backslash character.
+ * \$ Opens the gold window.
+ * \. Waits 1/4th seconds.
+ * \| Waits 1 second.
+ * \! Waits for button input.
+ * \> Display remaining text on same line all at once.
+ * \< Cancel the effect that displays text all at once.
+ * \^ Do not wait for input after displaying text.
+ *
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ *
+ * Wait: Effect:
+ * \w[x] - Waits x frames (60 frames = 1 second). Message window only.
+ *
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ *
+ * NameWindow: Effect:
+ * \n - Creates a name box with x string. Left side. *Note
+ * \nc - Creates a name box with x string. Centered. *Note
+ * \nr - Creates a name box with x string. Right side. *Note
+ *
+ * *Note: Works for message window only.
+ *
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ *
+ * Line Break Effect:
+ *
- If using word wrap mode, this will cause a line break.
+ *
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ *
+ * Position: Effect:
+ * \px[x] - Sets x position of text to x.
+ * \py[x] - Sets y position of text to y.
+ *
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ *
+ * Outline: Effect:
+ * \oc[x] - Sets outline colour to x.
+ * \ow[x] - Sets outline width to x.
+ *
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ *
+ * Font: Effect:
+ * \fr - Resets all font changes.
+ * \fs[x] - Changes font size to x.
+ * \fn - Changes font name to x.
+ * \fb - Toggles font boldness.
+ * \fi - Toggles font italic.
+ *
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ *
+ * Actor: Effect:
+ * \af[x] - Shows face of actor x. *Note
+ * \ac[x] - Writes out actor's class name.
+ * \an[x] - Writes out actor's nickname.
+ *
+ * *Note: Works for message window only.
+ *
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ *
+ * Party: Effect:
+ * \pf[x] - Shows face of party member x. *Note
+ * \pc[x] - Writes out party member x's class name.
+ * \pn[x] - Writes out party member x's nickname.
+ *
+ * *Note: Works for message window only.
+ *
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ *
+ * Names: Effect:
+ * \nc[x] - Writes out class x's name.
+ * \ni[x] - Writes out item x's name.
+ * \nw[x] - Writes out weapon x's name.
+ * \na[x] - Writes out armour x's name.
+ * \ns[x] - Writes out skill x's name.
+ * \nt[x] - Writes out state x's name.
+ *
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ *
+ * Icon Names: Effect:
+ * \ii[x] - Writes out item x's name including icon.
+ * \iw[x] - Writes out weapon x's name including icon.
+ * \ia[x] - Writes out armour x's name including icon.
+ * \is[x] - Writes out skill x's name including icon.
+ * \it[x] - Writes out state x's name including icon.
+ *
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ *
+ * And those are the text codes added with this script. Keep in mind that some
+ * of these text codes only work for the Message Window. Otherwise, they'll
+ * work for help descriptions, actor biographies, and others.
+ *
+ * ============================================================================
+ * Plugin Commands
+ * ============================================================================
+ *
+ * The following are some plugin commands you can use through the Event Editor
+ * to change various aspects about the Message system.
+ *
+ * Plugin Comand
+ * MessageRows 6
+ * - Changes the Message Rows displayed to 6. If you are using continuous
+ * Show Text events, this will continue displaying the following lines's
+ * texts until it hits the row limit. Anything after that is cut off until
+ * the next message starts to avoid accidental overlap.
+ *
+ * MessageWidth 400
+ * - Changes the Message Window Width to 400 pixels. This will cut off any
+ * words that are shown too far to the right so adjust accordingly!
+ *
+ * EnableWordWrap
+ * - Enables wordwrapping. If a word extends past the window size, it will
+ * automatically move onto the next line. Keep in mind, you will need to use
+ * \br to perform line breaks.
+ *
+ * DisableWordWrap
+ * - This disables wordwrapping. Line breaks will be automatic at points
+ * where a new line is started in the editor.
+ *
+ * EnableFastForward
+ * - Enables Fast Forward key from working with messages.
+ *
+ * DisableFastForward
+ * - Disables Fast Forward key from working with messages.
+ *
+ * ============================================================================
+ * Changelog
+ * ============================================================================
+ *
+ * Version 1.13:
+ * - Added 'Maintain Font' plugin parameter under the Font category. This will
+ * allow you to use text codes \fn and \fs[x] to permanently change the font
+ * of your messages until you use it again. \fr will reset them to the plugin's
+ * default parameter settings.
+ *
+ * Version 1.12:
+ * - 'Word Wrap Space' parameter no longer leaves a space at the beginning of
+ * each message.
+ *
+ * Version 1.11:
+ * - Added 'Font Outline' parameter for the plugin parameters. This adjusts the
+ * font outline width used by default for only message fonts.
+ *
+ * Version 1.10:
+ * - Updated the Message Row system for Extended Message Pack 1's Autosizing
+ * feature to work with extended heights.
+ *
+ * Version 1.09:
+ * - Replaced 'Fast Forward' parameter with the 'Fast Forward Key' parameter
+ * and 'Enable Fast Forward' parameter. Two new Plugin Commands are added. They
+ * are 'EnableFastForward' and 'DisableFastForward' for control over when fast
+ * forwarding is allowed as to not cause timed cutscenes to desynch.
+ *
+ * Version 1.08:
+ * - Fixed a bug regarding Input Number positioning when the Message Window's
+ * position was middle.
+ *
+ * Version 1.07:
+ * - Added 'Word Wrap Space' for word wrap users. This parameter will leave a
+ * space behind for those who want a space left behind.
+ *
+ * Version 1.06:
+ * - Fixed a bug that would cause masking problems with mobile devices.
+ *
+ * Version 1.05:
+ * - Fixed a bug that would cause the namebox window to appear distorted.
+ *
+ * Version 1.04:
+ * - Fixed a bug that captured too many text codes with the namebox window.
+ * - Timed Name Window's closing speed with main window's closing speed.
+ *
+ * Verison 1.03:
+ * - Fixed a bug with textcodes that messed up wordwrapping.
+ * - Fixed a bug with font reset, italic, and bold textcodes.
+ *
+ * Version 1.02:
+ * - Namebox Window's overlap feature that's in every MV window is now disabled
+ * to allow for overlapping with main message window.
+ * - Updated window positioning for Branch Choices, Number Input, and Item
+ * Selection windows.
+ *
+ * Version 1.01:
+ * - Added 'Description Wrap' into the parameters to allow for all item
+ * descriptions to be automatically processed with word wrapping.
+ *
+ * Version 1.00:
+ * - Finished plugin!
+ */
+//=============================================================================
+
+//=============================================================================
+// Parameter Variables
+//=============================================================================
+
+Yanfly.Parameters = PluginManager.parameters('YEP_MessageCore');
+Yanfly.Param = Yanfly.Param || {};
+
+Yanfly.Param.MSGDefaultRows = String(Yanfly.Parameters['Default Rows']);
+Yanfly.Param.MSGDefaultWidth = String(Yanfly.Parameters['Default Width']);
+Yanfly.Param.MSGFaceIndent = String(Yanfly.Parameters['Face Indent']);
+Yanfly.Param.MSGFastForwardKey = String(Yanfly.Parameters['Fast Forward Key']);
+Yanfly.Param.MSGFFOn = eval(String(Yanfly.Parameters['Enable Fast Forward']));
+Yanfly.Param.MSGWordWrap = String(Yanfly.Parameters['Word Wrapping']);
+Yanfly.Param.MSGDescWrap = String(Yanfly.Parameters['Description Wrap']);
+Yanfly.Param.MSGWrapSpace = eval(String(Yanfly.Parameters['Word Wrap Space']));
+
+Yanfly.Param.MSGFontName = String(Yanfly.Parameters['Font Name']);
+Yanfly.Param.MSGFontSize = Number(Yanfly.Parameters['Font Size']);
+Yanfly.Param.MSGFontSizeChange = String(Yanfly.Parameters['Font Size Change']);
+Yanfly.Param.MSGFontChangeMax = String(Yanfly.Parameters['Font Changed Max']);
+Yanfly.Param.MSGFontChangeMin = String(Yanfly.Parameters['Font Changed Min']);
+Yanfly.Param.MSGFontOutline = Number(Yanfly.Parameters['Font Outline']) || 4;
+Yanfly.Param.MSGFontMaintain = eval(String(Yanfly.Parameters['Maintain Font']));
+
+Yanfly.Param.MSGNameBoxBufferX = String(Yanfly.Parameters['Name Box Buffer X']);
+Yanfly.Param.MSGNameBoxBufferY = String(Yanfly.Parameters['Name Box Buffer Y']);
+Yanfly.Param.MSGNameBoxPadding = String(Yanfly.Parameters['Name Box Padding']);
+Yanfly.Param.MSGNameBoxColor = Number(Yanfly.Parameters['Name Box Color']);
+Yanfly.Param.MSGNameBoxClear = String(Yanfly.Parameters['Name Box Clear']);
+Yanfly.Param.MSGNameBoxText = String(Yanfly.Parameters['Name Box Added Text']);
+
+//=============================================================================
+// Bitmap
+//=============================================================================
+
+Yanfly.Message.Bitmap_initialize = Bitmap.prototype.initialize;
+Bitmap.prototype.initialize = function(width, height) {
+ Yanfly.Message.Bitmap_initialize.call(this, width, height);
+ this.fontBold = false;
+};
+
+Yanfly.Message.Bitmap_makeFontNameText = Bitmap.prototype._makeFontNameText;
+Bitmap.prototype._makeFontNameText = function() {
+ if (this.fontBold) return 'Bold ' + this.fontSize + 'px ' + this.fontFace;
+ return Yanfly.Message.Bitmap_makeFontNameText.call(this);
+};
+
+//=============================================================================
+// Game_System
+//=============================================================================
+
+Yanfly.Message.Game_System_initialize = Game_System.prototype.initialize;
+Game_System.prototype.initialize = function() {
+ Yanfly.Message.Game_System_initialize.call(this);
+ this.initMessageSystem();
+ this.initMessageFontSettings();
+};
+
+Game_System.prototype.initMessageSystem = function() {
+ this._wordWrap = eval(Yanfly.Param.MSGWordWrap);
+ this._fastForward = Yanfly.Param.MSGFFOn;
+};
+
+Game_System.prototype.initMessageFontSettings = function() {
+ this._msgFontName = Yanfly.Param.MSGFontName;
+ this._msgFontSize = Yanfly.Param.MSGFontSize;
+ this._msgFontOutline = Yanfly.Param.MSGFontOutline;
+};
+
+Game_System.prototype.messageRows = function() {
+ var rows = eval(this._messageRows) || eval(Yanfly.Param.MSGDefaultRows);
+ return Math.max(1, Number(rows));
+};
+
+Game_System.prototype.messageWidth = function() {
+ return eval(this._messageWidth) || eval(Yanfly.Param.MSGDefaultWidth);
+};
+
+Game_System.prototype.wordWrap = function() {
+ if (this._wordWrap === undefined) this.initMessageSystem();
+ return this._wordWrap;
+};
+
+Game_System.prototype.setWordWrap = function(state) {
+ if (this._wordWrap === undefined) this.initMessageSystem();
+ this._wordWrap = state;
+};
+
+Game_System.prototype.isFastFowardEnabled = function() {
+ if (this._fastForward === undefined) this.initMessageSystem();
+ return this._fastForward;
+};
+
+Game_System.prototype.setFastFoward = function(state) {
+ if (this._fastForward === undefined) this.initMessageSystem();
+ this._fastForward = state;
+};
+
+Game_System.prototype.getMessageFontName = function() {
+ if (this._msgFontName === undefined) this.initMessageFontSettings();
+ return this._msgFontName;
+};
+
+Game_System.prototype.setMessageFontName = function(value) {
+ if (this._msgFontName === undefined) this.initMessageFontSettings();
+ this._msgFontName = value;
+};
+
+Game_System.prototype.getMessageFontSize = function() {
+ if (this._msgFontSize === undefined) this.initMessageFontSettings();
+ return this._msgFontSize;
+};
+
+Game_System.prototype.setMessageFontSize = function(value) {
+ if (this._msgFontSize === undefined) this.initMessageFontSettings();
+ this._msgFontSize = value;
+};
+
+Game_System.prototype.getMessageFontOutline = function() {
+ if (this._msgFontOutline === undefined) this.initMessageFontSettings();
+ return this._msgFontOutline;
+};
+
+Game_System.prototype.setMessageFontOutline = function(value) {
+ if (this._msgFontOutline === undefined) this.initMessageFontSettings();
+ this._msgFontOutline = value;
+};
+
+//=============================================================================
+// Game_Message
+//=============================================================================
+
+Game_Message.prototype.addText = function(text) {
+ if ($gameSystem.wordWrap()) text = '' + text;
+ this.add(text);
+};
+
+//=============================================================================
+// Game_Interpreter
+//=============================================================================
+
+Yanfly.Message.Game_Interpreter_pluginCommand =
+ Game_Interpreter.prototype.pluginCommand;
+Game_Interpreter.prototype.pluginCommand = function(command, args) {
+ Yanfly.Message.Game_Interpreter_pluginCommand.call(this, command, args);
+ if (command === 'MessageRows') $gameSystem._messageRows = args[0];
+ if (command === 'MessageWidth') $gameSystem._messageWidth = args[0];
+ if (command === 'EnableWordWrap') $gameSystem.setWordWrap(true);
+ if (command === 'DisableWordWrap') $gameSystem.setWordWrap(false);
+ if (command === 'EnableFastForward') $gameSystem.setFastFoward(true);
+ if (command === 'DisableFastForward') $gameSystem.setFastFoward(false);
+};
+
+Game_Interpreter.prototype.command101 = function() {
+ if (!$gameMessage.isBusy()) {
+ $gameMessage.setFaceImage(this._params[0], this._params[1]);
+ $gameMessage.setBackground(this._params[2]);
+ $gameMessage.setPositionType(this._params[3]);
+ while (this.isContinueMessageString()) {
+ this._index++;
+ if (this._list[this._index].code === 401) {
+ $gameMessage.addText(this.currentCommand().parameters[0]);
+ }
+ if ($gameMessage._texts.length >= $gameSystem.messageRows()) break;
+ }
+ switch (this.nextEventCode()) {
+ case 102:
+ this._index++;
+ this.setupChoices(this.currentCommand().parameters);
+ break;
+ case 103:
+ this._index++;
+ this.setupNumInput(this.currentCommand().parameters);
+ break;
+ case 104:
+ this._index++;
+ this.setupItemChoice(this.currentCommand().parameters);
+ break;
+ }
+ this._index++;
+ this.setWaitMode('message');
+ }
+ return false;
+};
+
+Game_Interpreter.prototype.isContinueMessageString = function() {
+ if (this.nextEventCode() === 101 && $gameSystem.messageRows() > 4) {
+ return true;
+ } else {
+ return this.nextEventCode() === 401;
+ }
+};
+
+//=============================================================================
+// Window_Base
+//=============================================================================
+
+Yanfly.Message.Window_Base_resetFontSettings =
+ Window_Base.prototype.resetFontSettings;
+Window_Base.prototype.resetFontSettings = function() {
+ Yanfly.Message.Window_Base_resetFontSettings.call(this);
+ this.contents.fontBold = false;
+ this.contents.fontItalic = false;
+ this.contents.outlineColor = 'rgba(0, 0, 0, 0.5)';
+ this.contents.outlineWidth = $gameSystem.getMessageFontOutline();
+};
+
+Window_Base.prototype.textWidthEx = function(text) {
+ return this.drawTextEx(text, 0, this.contents.height);
+};
+
+Yanfly.Message.Window_Base_convertEscapeCharacters =
+ Window_Base.prototype.convertEscapeCharacters;
+Window_Base.prototype.convertEscapeCharacters = function(text) {
+ text = this.setWordWrap(text);
+ text = Yanfly.Message.Window_Base_convertEscapeCharacters.call(this, text);
+ text = this.convertExtraEscapeCharacters(text);
+ return text;
+};
+
+Window_Base.prototype.setWordWrap = function(text) {
+ this._wordWrap = false;
+ if (text.match(/<(?:WordWrap)>/i)) {
+ this._wordWrap = true;
+ text = text.replace(/<(?:WordWrap)>/gi, '');
+ }
+ if (this._wordWrap) {
+ var replace = Yanfly.Param.MSGWrapSpace ? ' ' : '';
+ text = text.replace(/[\n\r]+/g, replace);
+ }
+ text = text.replace(/<(?:BR|line break)>/gi, '\n');
+ return text;
+};
+
+Window_Base.prototype.convertExtraEscapeCharacters = function(text) {
+ // Font Codes
+ text = text.replace(/\x1bFR/gi, '\x1bMSGCORE[0]');
+ text = text.replace(/\x1bFB/gi, '\x1bMSGCORE[1]');
+ text = text.replace(/\x1bFI/gi, '\x1bMSGCORE[2]');
+ // \AC[n]
+ text = text.replace(/\x1bAC\[(\d+)\]/gi, function() {
+ return this.actorClassName(parseInt(arguments[1]));
+ }.bind(this));
+ // \AN[n]
+ text = text.replace(/\x1bAN\[(\d+)\]/gi, function() {
+ return this.actorNickname(parseInt(arguments[1]));
+ }.bind(this));
+ // \PC[n]
+ text = text.replace(/\x1bPC\[(\d+)\]/gi, function() {
+ return this.partyClassName(parseInt(arguments[1]));
+ }.bind(this));
+ // \PN[n]
+ text = text.replace(/\x1bPN\[(\d+)\]/gi, function() {
+ return this.partyNickname(parseInt(arguments[1]));
+ }.bind(this));
+ // \NC[n]
+ text = text.replace(/\x1bNC\[(\d+)\]/gi, function() {
+ return $dataClasses[parseInt(arguments[1])].name;
+ }.bind(this));
+ // \NI[n]
+ text = text.replace(/\x1bNI\[(\d+)\]/gi, function() {
+ return $dataItems[parseInt(arguments[1])].name;
+ }.bind(this));
+ // \NW[n]
+ text = text.replace(/\x1bNW\[(\d+)\]/gi, function() {
+ return $dataWeapons[parseInt(arguments[1])].name;
+ }.bind(this));
+ // \NA[n]
+ text = text.replace(/\x1bNA\[(\d+)\]/gi, function() {
+ return $dataArmors[parseInt(arguments[1])].name;
+ }.bind(this));
+ // \NE[n]
+ text = text.replace(/\x1bNE\[(\d+)\]/gi, function() {
+ return $dataEnemies[parseInt(arguments[1])].name;
+ }.bind(this));
+ // \NS[n]
+ text = text.replace(/\x1bNS\[(\d+)\]/gi, function() {
+ return $dataSkills[parseInt(arguments[1])].name;
+ }.bind(this));
+ // \NT[n]
+ text = text.replace(/\x1bNT\[(\d+)\]/gi, function() {
+ return $dataStates[parseInt(arguments[1])].name;
+ }.bind(this));
+ // \II[n]
+ text = text.replace(/\x1bII\[(\d+)\]/gi, function() {
+ return this.escapeIconItem(arguments[1], $dataItems);
+ }.bind(this));
+ // \IW[n]
+ text = text.replace(/\x1bIW\[(\d+)\]/gi, function() {
+ return this.escapeIconItem(arguments[1], $dataWeapons);
+ }.bind(this));
+ // \IA[n]
+ text = text.replace(/\x1bIA\[(\d+)\]/gi, function() {
+ return this.escapeIconItem(arguments[1], $dataArmors);
+ }.bind(this));
+ // \IS[n]
+ text = text.replace(/\x1bIS\[(\d+)\]/gi, function() {
+ return this.escapeIconItem(arguments[1], $dataSkills);
+ }.bind(this));
+ // \IT[n]
+ text = text.replace(/\x1bIT\[(\d+)\]/gi, function() {
+ return this.escapeIconItem(arguments[1], $dataStates);
+ }.bind(this));
+ // Finish
+ return text;
+};
+
+Window_Base.prototype.actorClassName = function(n) {
+ var actor = n >= 1 ? $gameActors.actor(n) : null;
+ return actor ? actor.currentClass().name : '';
+};
+
+Window_Base.prototype.actorNickname = function(n) {
+ var actor = n >= 1 ? $gameActors.actor(n) : null;
+ return actor ? actor.nickname() : '';
+};
+
+Window_Base.prototype.partyClassName = function(n) {
+ var actor = n >= 1 ? $gameParty.members()[n - 1] : null;
+ return actor ? actor.currentClass().name : '';
+};
+
+Window_Base.prototype.partyNickname = function(n) {
+ var actor = n >= 1 ? $gameParty.members()[n - 1] : null;
+ return actor ? actor.nickname() : '';
+};
+
+Window_Base.prototype.escapeIconItem = function(n, database) {
+ return '\x1bI[' + database[n].iconIndex + ']' + database[n].name;
+};
+
+Window_Base.prototype.obtainEscapeString = function(textState) {
+ var arr = /^\<(.*?)\>/.exec(textState.text.slice(textState.index));
+ if (arr) {
+ textState.index += arr[0].length;
+ return String(arr[0].slice(1, arr[0].length - 1));
+ } else {
+ return '';
+ }
+};
+
+Yanfly.Message.Window_Base_processEscapeCharacter =
+ Window_Base.prototype.processEscapeCharacter;
+Window_Base.prototype.processEscapeCharacter = function(code, textState) {
+ switch (code) {
+ case 'MSGCORE':
+ var id = this.obtainEscapeParam(textState);
+ if (id === 0) {
+ $gameSystem.initMessageFontSettings();
+ this.resetFontSettings();
+ }
+ if (id === 1) this.contents.fontBold = !this.contents.fontBold;
+ if (id === 2) this.contents.fontItalic = !this.contents.fontItalic;
+ break;
+ case 'FS':
+ var size = this.obtainEscapeParam(textState);
+ this.contents.fontSize = size;
+ if (Yanfly.Param.MSGFontMaintain) $gameSystem.setMessageFontSize(size);
+ break;
+ case 'FN':
+ var name = this.obtainEscapeString(textState);
+ this.contents.fontFace = name;
+ if (Yanfly.Param.MSGFontMaintain) $gameSystem.setMessageFontName(name);
+ break;
+ case 'OC':
+ var id = this.obtainEscapeParam(textState);
+ this.contents.outlineColor = this.textColor(id);
+ break;
+ case 'OW':
+ this.contents.outlineWidth = this.obtainEscapeParam(textState);
+ break;
+ case 'PX':
+ textState.x = this.obtainEscapeParam(textState);
+ break;
+ case 'PY':
+ textState.y = this.obtainEscapeParam(textState);
+ break;
+ default:
+ Yanfly.Message.Window_Base_processEscapeCharacter.call(this,
+ code, textState);
+ break;
+ }
+};
+
+Window_Base.prototype.makeFontBigger = function() {
+ var size = this.contents.fontSize + eval(Yanfly.Param.MSGFontSizeChange);
+ this.contents.fontSize = Math.min(size, Yanfly.Param.MSGFontChangeMax);
+};
+
+Window_Base.prototype.makeFontSmaller = function() {
+ var size = this.contents.fontSize - eval(Yanfly.Param.MSGFontSizeChange);
+ this.contents.fontSize = Math.max(size, Yanfly.Param.MSGFontChangeMin);
+};
+
+Yanfly.Message.Window_Base_processNormalCharacter =
+ Window_Base.prototype.processNormalCharacter;
+Window_Base.prototype.processNormalCharacter = function(textState) {
+ if (this.checkWordWrap(textState)) return this.processNewLine(textState);
+ Yanfly.Message.Window_Base_processNormalCharacter.call(this, textState);
+};
+
+Window_Base.prototype.checkWordWrap = function(textState) {
+ if (!textState) return false;
+ if (!this._wordWrap) return false;
+ if (textState.text[textState.index] === ' ') {
+ var nextSpace = textState.text.indexOf(' ', textState.index + 1);
+ var nextBreak = textState.text.indexOf('\n', textState.index + 1);
+ if (nextSpace < 0) nextSpace = textState.text.length + 1;
+ if (nextBreak > 0) nextSpace = Math.min(nextSpace, nextBreak);
+ var word = textState.text.substring(textState.index, nextSpace);
+ var size = this.textWidthExCheck(word);
+ }
+ return (size + textState.x > this.contents.width);
+};
+
+Window_Base.prototype.saveCurrentWindowSettings = function(){
+ this._saveFontFace = this.contents.fontFace;
+ this._saveFontSize = this.contents.fontSize;
+ this._savetextColor = this.contents.textColor;
+ this._saveFontBold = this.contents.fontBold;
+ this._saveFontItalic = this.contents.fontItalic;
+ this._saveOutlineColor = this.contents.outlineColor;
+ this._saveOutlineWidth = this.contents.outlineWidth;
+};
+
+Window_Base.prototype.restoreCurrentWindowSettings = function(){
+ this.contents.fontFace = this._saveFontFace;
+ this.contents.fontSize = this._saveFontSize;
+ this.contents.textColor = this._savetextColor;
+ this.contents.fontBold = this._saveFontBold;
+ this.contents.fontItalic = this._saveFontItalic;
+ this.contents.outlineColor = this._saveOutlineColor;
+ this.contents.outlineWidth = this._saveOutlineWidth;
+};
+
+Window_Base.prototype.clearCurrentWindowSettings = function(){
+ this._saveFontFace = undefined;
+ this._saveFontSize = undefined;
+ this._savetextColor = undefined;
+ this._saveFontBold = undefined;
+ this._saveFontItalic = undefined;
+ this._saveOutlineColor = undefined;
+ this._saveOutlineWidth = undefined;
+};
+
+Window_Base.prototype.textWidthExCheck = function(text) {
+ var setting = this._wordWrap;
+ this._wordWrap = false;
+ this.saveCurrentWindowSettings();
+ this._checkWordWrapMode = true;
+ var value = this.drawTextEx(text, 0, this.contents.height);
+ this._checkWordWrapMode = false;
+ this.restoreCurrentWindowSettings();
+ this.clearCurrentWindowSettings();
+ this._wordWrap = setting;
+ return value;
+};
+
+//=============================================================================
+// Window_Help
+//=============================================================================
+
+Yanfly.Message.Window_Help_setItem = Window_Help.prototype.setItem;
+Window_Help.prototype.setItem = function(item) {
+ if (eval(Yanfly.Param.MSGDescWrap)) {
+ this.setText(item ? '' + item.description : '');
+ } else {
+ Yanfly.Message.Window_Help_setItem.call(this, item);
+ }
+};
+
+//=============================================================================
+// Window_ChoiceList
+//=============================================================================
+
+Window_ChoiceList.prototype.standardFontFace = function() {
+ return $gameSystem.getMessageFontName();
+};
+
+Window_ChoiceList.prototype.standardFontSize = function() {
+ return $gameSystem.getMessageFontSize();
+};
+
+Yanfly.Message.Window_ChoiceList_updatePlacement =
+ Window_ChoiceList.prototype.updatePlacement;
+Window_ChoiceList.prototype.updatePlacement = function() {
+ Yanfly.Message.Window_ChoiceList_updatePlacement.call(this);
+ var messagePosType = $gameMessage.positionType();
+ if (messagePosType === 0) {
+ this.y = this._messageWindow.height;
+ } else if (messagePosType === 2) {
+ this.y = Graphics.boxHeight - this._messageWindow.height - this.height;
+ }
+};
+
+//=============================================================================
+// Window_NumberInput
+//=============================================================================
+
+Yanfly.Message.Window_NumberInput_updatePlacement =
+ Window_NumberInput.prototype.updatePlacement;
+Window_NumberInput.prototype.updatePlacement = function() {
+ Yanfly.Message.Window_NumberInput_updatePlacement.call(this);
+ var messageY = this._messageWindow.y;
+ var messagePosType = $gameMessage.positionType();
+ if (messagePosType === 0) {
+ this.y = this._messageWindow.height;
+ } else if (messagePosType === 1) {
+ if (messageY >= Graphics.boxHeight / 2) {
+ this.y = messageY - this.height;
+ } else {
+ this.y = messageY + this._messageWindow.height;
+ }
+ } else if (messagePosType === 2) {
+ this.y = Graphics.boxHeight - this._messageWindow.height - this.height;
+ }
+};
+
+//=============================================================================
+// Window_EventItem
+//=============================================================================
+
+Yanfly.Message.Window_EventItem_updatePlacement =
+ Window_EventItem.prototype.updatePlacement;
+Window_EventItem.prototype.updatePlacement = function() {
+ Yanfly.Message.Window_EventItem_updatePlacement.call(this);
+ var messagePosType = $gameMessage.positionType();
+ if (messagePosType === 0) {
+ this.y = Graphics.boxHeight - this.height;
+ } else if (messagePosType === 2) {
+ this.y = 0;
+ }
+};
+
+//=============================================================================
+// Window_ScrollText
+//=============================================================================
+
+Window_ScrollText.prototype.standardFontFace = function() {
+ return $gameSystem.getMessageFontName();
+};
+
+Window_ScrollText.prototype.standardFontSize = function() {
+ return $gameSystem.getMessageFontSize();
+};
+
+//=============================================================================
+// Window_NameBox
+//=============================================================================
+
+Yanfly.DisableWebGLMask = false;
+
+function Window_NameBox() {
+ this.initialize.apply(this, arguments);
+}
+
+Window_NameBox.prototype = Object.create(Window_Base.prototype);
+Window_NameBox.prototype.constructor = Window_NameBox;
+
+Window_NameBox.prototype.initialize = function(parentWindow) {
+ this._parentWindow = parentWindow;
+ Window_Base.prototype.initialize.call(this, 0, 0, 240, this.windowHeight());
+ this._text = '';
+ this._openness = 0;
+ this._closeCounter = 0;
+ this.deactivate();
+ if (eval(Yanfly.Param.MSGNameBoxClear)) {
+ this.backOpacity = 0;
+ this.opacity = 0;
+ }
+ this.hide();
+};
+
+Window_NameBox.prototype.windowWidth = function() {
+ this.resetFontSettings();
+ var dw = this.textWidthEx(this._text);
+ dw += this.padding * 2;
+ var width = dw + eval(Yanfly.Param.MSGNameBoxPadding)
+ return Math.ceil(width);
+};
+
+Window_NameBox.prototype.textWidthEx = function(text) {
+ return this.drawTextEx(text, 0, this.contents.height);
+};
+
+Window_NameBox.prototype.calcNormalCharacter = function(textState) {
+ return this.textWidth(textState.text[textState.index++]);
+};
+
+Window_NameBox.prototype.windowHeight = function() {
+ return this.fittingHeight(1);
+};
+
+Window_NameBox.prototype.standardFontFace = function() {
+ return $gameSystem.getMessageFontName();
+};
+
+Window_NameBox.prototype.standardFontSize = function() {
+ return $gameSystem.getMessageFontSize();
+};
+
+Window_NameBox.prototype.update = function() {
+ Window_Base.prototype.update.call(this);
+ if (this.active) return;
+ if (this.isClosed()) return;
+ if (this.isClosing()) return;
+ if (this._closeCounter-- > 0) return;
+ if (this._parentWindow.isClosing()) {
+ this._openness = this._parentWindow.openness;
+ }
+ this.close();
+};
+
+Window_NameBox.prototype.refresh = function(text, position) {
+ this.show();
+ this._text = Yanfly.Param.MSGNameBoxText + text;
+ this._position = position;
+ this.width = this.windowWidth();
+ this.createContents();
+ this.contents.clear();
+ this.resetFontSettings();
+ this.changeTextColor(this.textColor(Yanfly.Param.MSGNameBoxColor));
+ var padding = eval(Yanfly.Param.MSGNameBoxPadding) / 2;
+ this.drawTextEx(this._text, padding, 0, this.contents.width);
+ this._parentWindow.adjustWindowSettings();
+ this._parentWindow.updatePlacement();
+ this.adjustPositionX();
+ this.adjustPositionY();
+ this.open();
+ this.activate();
+ this._closeCounter = 4;
+ return '';
+};
+
+Window_NameBox.prototype.adjustPositionX = function() {
+ if (this._position === 1) {
+ this.x = this._parentWindow.x;
+ this.x += eval(Yanfly.Param.MSGNameBoxBufferX);
+ } else if (this._position === 2) {
+ this.x = this._parentWindow.x;
+ this.x += this._parentWindow.width * 3 / 10;
+ this.x -= this.width / 2;
+ } else if (this._position === 3) {
+ this.x = this._parentWindow.x;
+ this.x += this._parentWindow.width / 2;
+ this.x -= this.width / 2;
+ } else if (this._position === 4) {
+ this.x = this._parentWindow.x;
+ this.x += this._parentWindow.width * 7 / 10;
+ this.x -= this.width / 2;
+ } else {
+ this.x = this._parentWindow.x + this._parentWindow.width;
+ this.x -= this.width;
+ this.x -= eval(Yanfly.Param.MSGNameBoxBufferX);
+ }
+ this.x = this.x.clamp(0, Graphics.boxWidth - this.width);
+};
+
+Window_NameBox.prototype.adjustPositionY = function() {
+ if ($gameMessage.positionType() === 0) {
+ this.y = this._parentWindow.y + this._parentWindow.height;
+ this.y -= eval(Yanfly.Param.MSGNameBoxBufferY);
+ } else {
+ this.y = this._parentWindow.y;
+ this.y -= this.height;
+ this.y += eval(Yanfly.Param.MSGNameBoxBufferY);
+ }
+};
+
+//=============================================================================
+// Window_Message
+//=============================================================================
+
+Yanfly.Message.Window_Message_createSubWindows =
+ Window_Message.prototype.createSubWindows;
+Window_Message.prototype.createSubWindows = function() {
+ Yanfly.Message.Window_Message_createSubWindows.call(this);
+ this._nameWindow = new Window_NameBox(this);
+ Yanfly.nameWindow = this._nameWindow;
+ var scene = SceneManager._scene;
+ scene.addChild(this._nameWindow);
+};
+
+Window_Message.prototype.numVisibleRows = function() {
+ return $gameSystem.messageRows();
+};
+
+Window_Message.prototype.windowWidth = function() {
+ return $gameSystem.messageWidth();
+};
+
+Window_Message.prototype.adjustWindowSettings = function() {
+ this.width = this.windowWidth();
+ this.height = Math.min(this.windowHeight(), Graphics.boxHeight);
+ if (Math.abs(Graphics.boxHeight - this.height) < this.lineHeight()) {
+ this.height = Graphics.boxHeight;
+ }
+ this.createContents();
+ this.x = (Graphics.boxWidth - this.width) / 2;
+};
+
+Yanfly.Message.Window_Message_startMessage =
+ Window_Message.prototype.startMessage;
+Window_Message.prototype.startMessage = function() {
+ this._nameWindow.deactivate();
+ Yanfly.Message.Window_Message_startMessage.call(this);
+};
+
+Yanfly.Message.Window_Message_terminateMessage =
+ Window_Message.prototype.terminateMessage;
+Window_Message.prototype.terminateMessage = function() {
+ this._nameWindow.deactivate();
+ Yanfly.Message.Window_Message_terminateMessage.call(this);
+};
+
+Yanfly.Message.Window_Message_newPage =
+ Window_Message.prototype.newPage;
+Window_Message.prototype.newPage = function(textState) {
+ this.adjustWindowSettings();
+ Yanfly.Message.Window_Message_newPage.call(this, textState);
+};
+
+Window_Message.prototype.standardFontFace = function() {
+ return $gameSystem.getMessageFontName();
+};
+
+Window_Message.prototype.standardFontSize = function() {
+ return $gameSystem.getMessageFontSize();
+};
+
+Window_Message.prototype.newLineX = function() {
+ if ($gameMessage.faceName() === '') {
+ return 0;
+ } else {
+ return eval(Yanfly.Param.MSGFaceIndent);
+ }
+};
+
+Window_Message.prototype.isFastForward = function() {
+ if (!$gameSystem.isFastFowardEnabled()) return false;
+ return Input.isPressed(Yanfly.Param.MSGFastForwardKey);
+};
+
+Yanfly.Message.Window_Message_updateInput =
+ Window_Message.prototype.updateInput;
+Window_Message.prototype.updateInput = function() {
+ if (this.pause && this.isFastForward()) {
+ if (!this._textState) {
+ this.pause = false;
+ this.terminateMessage();
+ }
+ }
+ return Yanfly.Message.Window_Message_updateInput.call(this);
+};
+
+Yanfly.Message.Window_Message_updateShowFast =
+ Window_Message.prototype.updateShowFast;
+Window_Message.prototype.updateShowFast = function() {
+ if (this.isFastForward()) this._showFast = true;
+ Yanfly.Message.Window_Message_updateShowFast.call(this);
+};
+
+Yanfly.Message.Window_Message_updateWait =
+ Window_Message.prototype.updateWait;
+Window_Message.prototype.updateWait = function() {
+ if (this.isFastForward()) return false;
+ return Yanfly.Message.Window_Message_updateWait.call(this);
+};
+
+Yanfly.Message.Window_Message_startWait =
+ Window_Message.prototype.startWait;
+Window_Message.prototype.startWait = function(count) {
+ if (this._checkWordWrapMode) return;
+ Yanfly.Message.Window_Message_startWait.call(this, count);
+ if (this.isFastForward()) this._waitCount = 0;
+};
+
+Yanfly.Message.Window_Message_startPause =
+ Window_Message.prototype.startPause;
+Window_Message.prototype.startPause = function() {
+ if (this._checkWordWrapMode) return;
+ Yanfly.Message.Window_Message_startPause.call(this);
+};
+
+Window_Message.prototype.convertEscapeCharacters = function(text) {
+ text = Window_Base.prototype.convertEscapeCharacters.call(this, text);
+ text = this.convertNameBox(text);
+ text = this.convertMessageCharacters(text);
+ return text;
+};
+
+Window_Message.prototype.convertNameBox = function(text) {
+ text = text.replace(/\x1bN\<(.*?)\>/gi, function() {
+ return Yanfly.nameWindow.refresh(arguments[1], 1);
+ }, this);
+ text = text.replace(/\x1bN1\<(.*?)\>/gi, function() {
+ return Yanfly.nameWindow.refresh(arguments[1], 1);
+ }, this);
+ text = text.replace(/\x1bN2\<(.*?)\>/gi, function() {
+ return Yanfly.nameWindow.refresh(arguments[1], 2);
+ }, this);
+ text = text.replace(/\x1bN3\<(.*?)\>/gi, function() {
+ return Yanfly.nameWindow.refresh(arguments[1], 3);
+ }, this);
+ text = text.replace(/\x1bNC\<(.*?)\>/gi, function() {
+ return Yanfly.nameWindow.refresh(arguments[1], 3);
+ }, this);
+ text = text.replace(/\x1bN4\<(.*?)\>/gi, function() {
+ return Yanfly.nameWindow.refresh(arguments[1], 4);
+ }, this);
+ text = text.replace(/\x1bN5\<(.*?)\>/gi, function() {
+ return Yanfly.nameWindow.refresh(arguments[1], 5);
+ }, this);
+ text = text.replace(/\x1bNR\<(.*?)\>/gi, function() {
+ return Yanfly.nameWindow.refresh(arguments[1], 5);
+ }, this);
+ return text;
+};
+
+Window_Message.prototype.convertMessageCharacters = function(text) {
+ text = text.replace(/\x1bAF\[(\d+)\]/gi, function() {
+ var i = parseInt(arguments[1]);
+ return this.convertActorFace($gameActors.actor(i));
+ }.bind(this));
+ text = text.replace(/\x1bPF\[(\d+)\]/gi, function() {
+ var i = parseInt(arguments[1]);
+ return this.convertActorFace($gameParty.members()[i - 1]);
+ }.bind(this));
+ return text;
+};
+
+Window_Message.prototype.convertActorFace = function(actor) {
+ $gameMessage.setFaceImage(actor.faceName(), actor.faceIndex());
+ return '';
+};
+
+Yanfly.Message.Window_Message_processEscapeCharacter =
+ Window_Message.prototype.processEscapeCharacter;
+Window_Message.prototype.processEscapeCharacter = function(code, textState) {
+ switch (code) {
+ case '!':
+ if (!this.isFastForward()) this.startPause();
+ break;
+ case 'W':
+ this.startWait(this.obtainEscapeParam(textState));
+ default:
+ Yanfly.Message.Window_Message_processEscapeCharacter.call(this,
+ code, textState);
+ break;
+ }
+};
+
+//=============================================================================
+// End of File
+//=============================================================================
diff --git a/js/plugins/YEP_X_ExtMesPack1.js b/js/plugins/YEP_X_ExtMesPack1.js
new file mode 100644
index 0000000..abcc541
--- /dev/null
+++ b/js/plugins/YEP_X_ExtMesPack1.js
@@ -0,0 +1,1740 @@
+//=============================================================================
+// Yanfly Engine Plugins - Message Core Extension - Extended Message Pack 1
+// YEP_X_ExtMesPack1.js
+//=============================================================================
+
+var Imported = Imported || {};
+Imported.YEP_X_ExtMesPack1 = true;
+
+var Yanfly = Yanfly || {};
+Yanfly.EMP1 = Yanfly.EMP1 || {};
+
+//=============================================================================
+ /*:
+ * @plugindesc v1.08 (Requires YEP_MessageCore.js) Letter Sounds, NameBox
+ * Background Types, Choice Control, and more!
+ * @author Yanfly Engine Plugins
+ *
+ * @param ---Letter Sounds---
+ * @default
+ *
+ * @param Enable Sound
+ * @desc Enable letter by letter sounds by default?
+ * NO - false YES - true
+ * @default true
+ *
+ * @param Sound Name
+ * @desc The filename of the SE file. This is case sensitive.
+ * Do not include file extension.
+ * @default Cursor1
+ *
+ * @param Sound Volume
+ * @desc The sound volume of the sound effect.
+ * @default 50
+ *
+ * @param Sound Pitch
+ * @desc The pitch of the sound effect.
+ * @default 100
+ *
+ * @param Pitch Variance
+ * @desc The amount of pitch variance the sound will have.
+ * @default 10
+ *
+ * @param Sound Pan
+ * @desc The pan of the sound effect.
+ * @default 0
+ *
+ * @param Pan Variance
+ * @desc The amount of pan variance the sound will have.
+ * @default 10
+ *
+ * @param Sound Interval
+ * @desc How many letters should be skipped in between sounds?
+ * @default 2
+ *
+ * @param Reset Sounds
+ * @desc Reset the letter sound at the start of each message?
+ * NO - false YES - true
+ * @default false
+ *
+ * @param ---Message Anchor---
+ * @default
+ *
+ * @param Default X
+ * @desc When using the Message Position X mods, anchor X to
+ * left center right
+ * @default center
+ *
+ * @param Default Y
+ * @desc When using the Message Position X mods, anchor X to
+ * top center bottom
+ * @default bottom
+ *
+ * @param Auto Row Full Face
+ * @desc If using auto rows, show the full face art?
+ * NO - false YES - true
+ * @default false
+ *
+ * @param ---Message Choices---
+ * @default
+ *
+ * @param Max Rows
+ * @desc The maximum amount of rows to display for your choices.
+ * Default: 6
+ * @default 6
+ *
+ * @param Choice 1 Show Switch
+ * @desc You can tie whether or not a choice is visible to a switch.
+ * Use the switch ID you wish for this choice. 0 to not use.
+ * @default 0
+ *
+ * @param Choice 2 Show Switch
+ * @desc You can tie whether or not a choice is visible to a switch.
+ * Use the switch ID you wish for this choice. 0 to not use.
+ * @default 0
+ *
+ * @param Choice 3 Show Switch
+ * @desc You can tie whether or not a choice is visible to a switch.
+ * Use the switch ID you wish for this choice. 0 to not use.
+ * @default 0
+ *
+ * @param Choice 4 Show Switch
+ * @desc You can tie whether or not a choice is visible to a switch.
+ * Use the switch ID you wish for this choice. 0 to not use.
+ * @default 0
+ *
+ * @param Choice 5 Show Switch
+ * @desc You can tie whether or not a choice is visible to a switch.
+ * Use the switch ID you wish for this choice. 0 to not use.
+ * @default 0
+ *
+ * @param Choice 6 Show Switch
+ * @desc You can tie whether or not a choice is visible to a switch.
+ * Use the switch ID you wish for this choice. 0 to not use.
+ * @default 0
+ *
+ * @param Choice 7 Show Switch
+ * @desc You can tie whether or not a choice is visible to a switch.
+ * Use the switch ID you wish for this choice. 0 to not use.
+ * @default 0
+ *
+ * @param Choice 8 Show Switch
+ * @desc You can tie whether or not a choice is visible to a switch.
+ * Use the switch ID you wish for this choice. 0 to not use.
+ * @default 0
+ *
+ * @param Choice 9 Show Switch
+ * @desc You can tie whether or not a choice is visible to a switch.
+ * Use the switch ID you wish for this choice. 0 to not use.
+ * @default 0
+ *
+ * @param Choice 10 Show Switch
+ * @desc You can tie whether or not a choice is visible to a switch.
+ * Use the switch ID you wish for this choice. 0 to not use.
+ * @default 0
+ *
+ * @param Choice 11 Show Switch
+ * @desc You can tie whether or not a choice is visible to a switch.
+ * Use the switch ID you wish for this choice. 0 to not use.
+ * @default 0
+ *
+ * @param Choice 12 Show Switch
+ * @desc You can tie whether or not a choice is visible to a switch.
+ * Use the switch ID you wish for this choice. 0 to not use.
+ * @default 0
+ *
+ * @param Choice 13 Show Switch
+ * @desc You can tie whether or not a choice is visible to a switch.
+ * Use the switch ID you wish for this choice. 0 to not use.
+ * @default 0
+ *
+ * @param Choice 14 Show Switch
+ * @desc You can tie whether or not a choice is visible to a switch.
+ * Use the switch ID you wish for this choice. 0 to not use.
+ * @default 0
+ *
+ * @param Choice 15 Show Switch
+ * @desc You can tie whether or not a choice is visible to a switch.
+ * Use the switch ID you wish for this choice. 0 to not use.
+ * @default 0
+ *
+ * @param Choice 16 Show Switch
+ * @desc You can tie whether or not a choice is visible to a switch.
+ * Use the switch ID you wish for this choice. 0 to not use.
+ * @default 0
+ *
+ * @param Choice 17 Show Switch
+ * @desc You can tie whether or not a choice is visible to a switch.
+ * Use the switch ID you wish for this choice. 0 to not use.
+ * @default 0
+ *
+ * @param Choice 18 Show Switch
+ * @desc You can tie whether or not a choice is visible to a switch.
+ * Use the switch ID you wish for this choice. 0 to not use.
+ * @default 0
+ *
+ * @param Choice 19 Show Switch
+ * @desc You can tie whether or not a choice is visible to a switch.
+ * Use the switch ID you wish for this choice. 0 to not use.
+ * @default 0
+ *
+ * @param Choice 20 Show Switch
+ * @desc You can tie whether or not a choice is visible to a switch.
+ * Use the switch ID you wish for this choice. 0 to not use.
+ * @default 0
+ *
+ * @param Choice 1 On Switch
+ * @desc You can tie whether or not a choice is enabled to a switch.
+ * Use the switch ID you wish for this choice. 0 to not use.
+ * @default 0
+ *
+ * @param Choice 2 On Switch
+ * @desc You can tie whether or not a choice is enabled to a switch.
+ * Use the switch ID you wish for this choice. 0 to not use.
+ * @default 0
+ *
+ * @param Choice 3 On Switch
+ * @desc You can tie whether or not a choice is enabled to a switch.
+ * Use the switch ID you wish for this choice. 0 to not use.
+ * @default 0
+ *
+ * @param Choice 4 On Switch
+ * @desc You can tie whether or not a choice is enabled to a switch.
+ * Use the switch ID you wish for this choice. 0 to not use.
+ * @default 0
+ *
+ * @param Choice 5 On Switch
+ * @desc You can tie whether or not a choice is enabled to a switch.
+ * Use the switch ID you wish for this choice. 0 to not use.
+ * @default 0
+ *
+ * @param Choice 6 On Switch
+ * @desc You can tie whether or not a choice is enabled to a switch.
+ * Use the switch ID you wish for this choice. 0 to not use.
+ * @default 0
+ *
+ * @param Choice 7 On Switch
+ * @desc You can tie whether or not a choice is enabled to a switch.
+ * Use the switch ID you wish for this choice. 0 to not use.
+ * @default 0
+ *
+ * @param Choice 8 On Switch
+ * @desc You can tie whether or not a choice is enabled to a switch.
+ * Use the switch ID you wish for this choice. 0 to not use.
+ * @default 0
+ *
+ * @param Choice 9 On Switch
+ * @desc You can tie whether or not a choice is enabled to a switch.
+ * Use the switch ID you wish for this choice. 0 to not use.
+ * @default 0
+ *
+ * @param Choice 10 On Switch
+ * @desc You can tie whether or not a choice is enabled to a switch.
+ * Use the switch ID you wish for this choice. 0 to not use.
+ * @default 0
+ *
+ * @param Choice 11 On Switch
+ * @desc You can tie whether or not a choice is enabled to a switch.
+ * Use the switch ID you wish for this choice. 0 to not use.
+ * @default 0
+ *
+ * @param Choice 12 On Switch
+ * @desc You can tie whether or not a choice is enabled to a switch.
+ * Use the switch ID you wish for this choice. 0 to not use.
+ * @default 0
+ *
+ * @param Choice 13 On Switch
+ * @desc You can tie whether or not a choice is enabled to a switch.
+ * Use the switch ID you wish for this choice. 0 to not use.
+ * @default 0
+ *
+ * @param Choice 14 On Switch
+ * @desc You can tie whether or not a choice is enabled to a switch.
+ * Use the switch ID you wish for this choice. 0 to not use.
+ * @default 0
+ *
+ * @param Choice 15 On Switch
+ * @desc You can tie whether or not a choice is enabled to a switch.
+ * Use the switch ID you wish for this choice. 0 to not use.
+ * @default 0
+ *
+ * @param Choice 16 On Switch
+ * @desc You can tie whether or not a choice is enabled to a switch.
+ * Use the switch ID you wish for this choice. 0 to not use.
+ * @default 0
+ *
+ * @param Choice 17 On Switch
+ * @desc You can tie whether or not a choice is enabled to a switch.
+ * Use the switch ID you wish for this choice. 0 to not use.
+ * @default 0
+ *
+ * @param Choice 18 On Switch
+ * @desc You can tie whether or not a choice is enabled to a switch.
+ * Use the switch ID you wish for this choice. 0 to not use.
+ * @default 0
+ *
+ * @param Choice 19 On Switch
+ * @desc You can tie whether or not a choice is enabled to a switch.
+ * Use the switch ID you wish for this choice. 0 to not use.
+ * @default 0
+ *
+ * @param Choice 20 On Switch
+ * @desc You can tie whether or not a choice is enabled to a switch.
+ * Use the switch ID you wish for this choice. 0 to not use.
+ * @default 0
+ *
+ * @help
+ * ============================================================================
+ * Introduction
+ * ============================================================================
+ *
+ * This plugin requires YEP_MessageCore.js to run.
+ * Place this plugin under YEP_MessageCore.js in the plugin list.
+ *
+ * This plugin extends the amount of things the Message system can do in RPG
+ * Maker MV. These features range from text sounds, more name window options,
+ * face index control, hex colors, extended choice controls, and more precise
+ * window positioning control. New text codes are also added to further ease
+ * the usage of the message window.
+ *
+ * ============================================================================
+ * Text Codes
+ * ============================================================================
+ *
+ * By using certain text codes in your messages, you can have the game replace
+ * them with the following:
+ *
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ *
+ * LetterSound Effect:
+ * \lson - Turns Letter Sounds on.
+ * \lsoff - Turns Letter Sounds off.
+ * \lsn - Changes Letter Sound to play filename. This is case
+ * sensitive. Do not include the file extension.
+ * \lsv[x] - Sets the volume of the Letter Sound to x.
+ * \lspi[x] - Sets the pitch of the Letter Sound to x.
+ * \lspiv[x] - Sets the pitch variance of the Letter Sound to x.
+ * \lspa[x] - Sets the pan of the Letter Sound to x.
+ * \lspav[x] - Sets the pan variance of the Letter Sound to x.
+ * \lsi[x] - Sets the interval the Letter Sounds play to x.
+ *
+ * *Note: Works for message window only.
+ *
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ *
+ * Enemy Name Effect:
+ * \en[x] - Gets the name of the enemy in Database position x.
+ * \et[x] - Gets the name of the enemy in Troop position x.
+ *
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ *
+ * NameWindow: Effect:
+ * \n - Creates a name box with x string. Left side.
+ * \nc - Creates a name box with x string. Centered.
+ * \nr - Creates a name box with x string. Right side.
+ *
+ * \nd - Creates a dimmed name box with x string. Left side.
+ * \ndc - Creates a dimmed name box with x string. Centered.
+ * \ndr - Creates a dimmed name box with x string. Right side.
+ *
+ * \nt - Creates a transparent name box with x string. Left side.
+ * \ntc - Creates a transparent name box with x string. Centered.
+ * \ntr - Creates a transparent name box with x string. Right side.
+ *
+ * *Note: Works for message window only.
+ *
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ *
+ * MessagePosition Effect:
+ * \msgposx[x] - Sets the X position of the Message Window to x.
+ * \msgposx[auto] - Sets the X position of the Message Window to default.
+ *
+ * \msgposy[x] - Sets the Y position of the Message Window to x.
+ * \msgposy[auto] - Sets the Y position of the Message Window to default.
+ *
+ * \msgevent[x] - Map Field Only! Positions the X and Y position of the
+ * Message Window relative to the event x's position. If you
+ * use 0, the window will be placed relative to the player's
+ * position on the map.
+ *
+ * \msgactor[x] - Requires Battle Engine Core. Battle Only! Puts the
+ * message over actor x's head if actor is in the party.
+ * Otherwise, the message will appear in normal location.
+ *
+ * \msgparty[x] - Requires Battle Engine Core. Battle Only! Puts the
+ * message over party member x's head if member is present.
+ * Otherwise, the message will appear in normal location.
+ *
+ * \msgenemy[x] - Requires Battle Engine Core. Battle Only! Puts the
+ * message over enemy member x's head if member is present.
+ * Otherwise, the message will appear in normal location.
+ *
+ * \msgwidth[x] - Sets the width of the Message Window to x.
+ * \msgwidth[auto] - Sets the width of the Message Window to fit the text.
+ * Do not use the auto function with Word Wrap.
+ *
+ * \msgrows[x] - Sets the rows of the Message Window to x.
+ * \msgrows[auto] - Sets the rows of the Message Window to text.
+ * Do not use the auto function with Word Wrap.
+ *
+ * \auto - Sets the width and rows of the Message window to fit the
+ * current message window. Do not use this with Word Wrap.
+ *
+ * \autoevent[x] - Map Field Only! Sets the width and rows of the Message
+ * window to fit the current message window and positions it
+ * relative to event x. If you use 0, the window will be
+ * placed relative to the player's position on the map. Do
+ * not use this with Word Wrap.
+ *
+ * \autoactor[x] - Requires Battle Engine Core. Battle Only! Sets the width
+ * and rows of the message window to fit the current message
+ * window and puts the message over actor x's head if actor
+ * is in the party. Otherwise, the message will appear in
+ * normal location. Do not use this with Word Wrap.
+ *
+ * \autoparty[x] - Requires Battle Engine Core. Battle Only! Sets the width
+ * and rows of the message window to fit the current message
+ * window and puts the message over party member x's head if
+ * member is present. Otherwise, the message will appear in
+ * normal location. Do not use this with Word Wrap.
+ *
+ * \autoenemy[x] - Requires Battle Engine Core. Battle Only! Sets the width
+ * and rows of the message window to fit the current message
+ * window and puts the message over enemy member x's head if
+ * member is present. Otherwise, the message will appear in
+ * normal location. Do not use this with Word Wrap.
+ *
+ * \msgreset - Resets all of the positioning settings to default.
+ *
+ * * Note: This setting change will remain for just the current message. Going
+ * to the next message will reset this setting back to whatever the default
+ * setting is in the plugin parameters for the Message Core. If you change the
+ * amount of rows past 4, it will not acquire the messages following. You will
+ * need to use the 'MessageRows x' plugin command to accomplish that. These
+ * notetags work for the message window only.
+ *
+ * Do not use the [auto] width and row functions with Word Wrap. Word wrap
+ * will cause them to behave erratically.
+ *
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ *
+ * FaceIndex Effect:
+ * \faceindex[x] - Changes the face index of the currently used face
+ * graphic to index x at the start of the message.
+ *
+ * *Note: Works for message window only.
+ *
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ *
+ * DigitGroup Effect:
+ * \dg[x] - Groups the number value x with commas. 12345 becomes 12,345.
+ *
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ *
+ * HexColor Effect:
+ * \hc[rrggbb] - Changes the text color to a hex color code using red, green,
+ * blue format. For example, pure red is \hc[ff0000].
+ *
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ *
+ * PlayTime Effect:
+ * \playtime - Displays the current playtime of the player.
+ *
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ *
+ * MapName Effect:
+ * \map[x] - Displays the map name of Map ID x. If x is 0, it will
+ * display the name of the map the player is currently on.
+ *
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ *
+ * ============================================================================
+ * Plugin Commands
+ * ============================================================================
+ *
+ * You can use the following plugin commands to adjust a few of the settings
+ * regarding the Message Window.
+ *
+ * Plugin Commands
+ *
+ * --- Letter Sounds ---
+ *
+ * EnableLetterSound
+ * DisableLetterSound
+ * - These commands will enable or disable the letter sounds respectively.
+ *
+ * LetterSoundName Cursor2
+ * - This will replace the current letter sound with the written filename.
+ * The filename is case sensitive. Do not use the file extension.
+ *
+ * LetterSoundVolume 100
+ * - This will change the letter sound volume to 100.
+ *
+ * LetterSoundPitch 125
+ * - This will change the letter sound pitch to 125.
+ *
+ * LetterSoundPitchVariance 10
+ * - This will cause the letter sound's pitch to fluctuate between -10 & 10.
+ *
+ * LetterSoundPan 0
+ * - This will change the letter sound's pan to 0.
+ *
+ * LetterSoundPanVariance 10
+ * - This will cause the letter sound's pan to fluctuate between -10 and 10.
+ *
+ * LetterSoundInterval 2
+ * - This will change the interval at which the letter sounds are played to
+ * 2 letters. Change it to 0 to play on every letter written out.
+ *
+ * LetterSoundReset
+ * - This will reset the letter sounds to their default settings.
+ *
+ * --- Choice Settings ---
+ *
+ * ChoiceRowMax 4
+ * - This will set the maximum amount of visible choices to 4.
+ *
+ * HideChoice 5
+ * - This will cause choice 5 to be hidden.
+ *
+ * ShowChoice 6
+ * - This will cause choice 6 to be shown and no longer hidden.
+ *
+ * ClearHiddenChoices
+ * - All choices become visible and are no longer hidden.
+ *
+ * DisableChoice 1
+ * - This will cause choice 1 to be disabled.
+ *
+ * EnableChoice 2
+ * - This will cause choice 2 to be enabled.
+ *
+ * ClearDisabledChoices
+ * - All choices become enabled and are no longer disabled.
+ *
+ * ClearChoiceSettings
+ * - All choices are shown and enabled.
+ *
+ * --- Message Window Positions ---
+ *
+ * MessageRows 6
+ * - Changes the Message Rows displayed to 6. If you are using continuous
+ * Show Text events, this will continue displaying the following lines's
+ * texts until it hits the row limit. Anything after that is cut off until
+ * the next message starts to avoid accidental overlap.
+ *
+ * MessageWidth 400
+ * - Changes the Message Window Width to 400 pixels. This will cut off any
+ * words that are shown too far to the right so adjust accordingly!
+ *
+ * MessagePositionX 300
+ * - Sets the Message Window's X Position to 300. This position will be
+ * relative to its horizontal anchor point.
+ *
+ * MessagePositionY 400
+ * - Sets the Message Window's Y Position to 400. This position will be
+ * relative to its vertical anchor point.
+ *
+ * MessagePositionXAuto
+ * - Sets the Message Window's X Position to be automatically fitted and not
+ * set relative to its vertical anchor point.
+ *
+ * MessagePositionYAuto
+ * - Sets the Message Window's Y Position to be automatically fitted and not
+ * set relative to its vertical anchor point.
+ *
+ * MessageAnchorX left
+ * - Sets the Message Window's x anchor to 'left', 'center', or 'right' if
+ * you are using specified coordinates.
+ *
+ * MessageAnchorY bottom
+ * - Sets the Message Window's y anchor to 'left', 'center', or 'right' if
+ * you are using specified coordinates.
+ *
+ * MessagePositionReset
+ * - Resets both the Message Window's X and Y Positions to its automatic
+ * positions and not adjusted to its anchor points. The Message Width and the
+ * Message Rows.
+ *
+ * ============================================================================
+ * Lunatic Mode - New JavaScript Functions
+ * ============================================================================
+ *
+ * For those who would like to use script calls to alter Choice Settings, you
+ * can use the following script calls:
+ *
+ * $gameSystem.hideChoice(x)
+ * - This will cause choice x to be hidden.
+ *
+ * $gameSystem.showChoice(x)
+ * - This will cause choice x to be shown.
+ *
+ * $gameSystem.clearHiddenChoices()
+ * - This will clear all of the hidden choices and they will be shown.
+ *
+ * $gameSystem.disableChoice(x)
+ * - This will cause choice x to be disabled.
+ *
+ * $gameSystem.enableChoice(x)
+ * - This will cause choice x to be enabled.
+ *
+ * $gameSystem.clearDisabledChoices()
+ * - This will clear all of the disabled choices and they will all be enabled.
+ *
+ * $gameSystem.clearChoiceSettings()
+ * - This will clear all hidden and disabled settings.
+ *
+ * ============================================================================
+ * Changelog
+ * ============================================================================
+ *
+ * Version 1.08:
+ * - Fixed a bug that caused choices from 20 and onward to be hidden/disabled.
+ *
+ * Version 1.07:
+ * - Plugin commands for hiding, showing, enabling, and disabling choices will
+ * now synch with the appropriate switch if there is a switch involved.
+ *
+ * Version 1.06:
+ * - Fixed a width issue with namebox windows used for clear and dimmed
+ * nameboxes.
+ *
+ * Version 1.05:
+ * - Added new plugin commands: HideChoice x, ShowChoice x, ClearHiddenChoices,
+ * DisableChoice x, EnableChoice x, ClearDisabledChoices, ClearChoiceSettings
+ * for those who wish to have more than 20 choices.
+ * - Added new script calls. You can find them in the Lunatic Mode section
+ * under Lunatic Mode - New JavaScript Functions. These are for people who want
+ * to use more than 20 choices.
+ *
+ * Version 1.04a:
+ * - Updated the Autosizing feature to work with \{ and \} text codes. Requires
+ * v1.10 of Message Core.
+ * - Fixed a bug that caused \msgRows[auto] to crash.
+ *
+ * Version 1.03:
+ * - Fixed a bug that caused \., \|, \w[x] to not stall the \auto notetags.
+ * - Fixed a bug involving show/enable switches.
+ *
+ * Version 1.02:
+ * - Added \en[x] and \et[x] text codes to display database enemy names and
+ * troop position enemy names respectively.
+ *
+ * Version 1.01:
+ * - Fixed a bug where using an \auto text code with a \! in the same message
+ * would cause a pause with an empty message.
+ * - When using \|, \., or \w[x], the Letter Sound intervals will reset to 0 to
+ * keep the Letter Sound feeling more natural.
+ *
+ * Version 1.00:
+ * - Finished Plugin!
+ */
+//=============================================================================
+
+if (Imported.YEP_MessageCore) {
+
+//=============================================================================
+// Parameter Variables
+//=============================================================================
+
+Yanfly.Parameters = PluginManager.parameters('YEP_X_ExtMesPack1');
+Yanfly.Param = Yanfly.Param || {};
+
+Yanfly.Param.EMP1LetterSound = eval(String(Yanfly.Parameters['Enable Sound']));
+Yanfly.Param.EMP1SoundName = String(Yanfly.Parameters['Sound Name']);
+Yanfly.Param.EMP1SoundVolume = Number(Yanfly.Parameters['Sound Volume']);
+Yanfly.Param.EMP1SoundPitch = Number(Yanfly.Parameters['Sound Pitch']);
+Yanfly.Param.EMP1PitchVar = Number(Yanfly.Parameters['Pitch Variance']);
+Yanfly.Param.EMP1SoundPan = Number(Yanfly.Parameters['Sound Pan']);
+Yanfly.Param.EMP1PanVar = Number(Yanfly.Parameters['Pan Variance']);
+Yanfly.Param.EMP1SoundInterval = Number(Yanfly.Parameters['Sound Interval']);
+Yanfly.Param.EMP1LetterReset = eval(String(Yanfly.Parameters['Reset Sounds']));
+
+Yanfly.Param.EMP1DefaultX = String(Yanfly.Parameters['Default X']);
+Yanfly.Param.EMP1DefaultY = String(Yanfly.Parameters['Default Y']);
+Yanfly.Param.EMP1FullFace =
+ eval(String(Yanfly.Parameters['Auto Row Full Face']));
+
+Yanfly.Param.EMP1MaxRows = Number(Yanfly.Parameters['Max Rows']);
+Yanfly.Param.EMP1ChoiceShow = [];
+Yanfly.Param.EMP1ChoiceOn = [];
+for (Yanfly.i = 1; Yanfly.i < 21; Yanfly.i += 1) {
+ Yanfly.sName = 'Choice ' + Yanfly.i + ' Show Switch';
+ Yanfly.oName = 'Choice ' + Yanfly.i + ' On Switch';
+ Yanfly.Param.EMP1ChoiceShow.push(Number(Yanfly.Parameters[Yanfly.sName]));
+ Yanfly.Param.EMP1ChoiceOn.push(Number(Yanfly.Parameters[Yanfly.oName]));
+};
+
+//=============================================================================
+// SoundManager
+//=============================================================================
+
+SoundManager.playMessageSound = function() {
+ AudioManager.playSe($gameSystem.getMessageSound());
+};
+
+//=============================================================================
+// Game_System
+//=============================================================================
+
+Yanfly.EMP1.Game_System_initialize = Game_System.prototype.initialize;
+Game_System.prototype.initialize = function() {
+ Yanfly.EMP1.Game_System_initialize.call(this);
+ this.initMessageSounds();
+ this.initMessageChoiceRowsMax();
+ this.initMessagePosition();
+};
+
+Game_System.prototype.initMessageSounds = function() {
+ this._msgSoundEnable = Yanfly.Param.EMP1LetterSound;
+ this._msgSoundName = Yanfly.Param.EMP1SoundName;
+ this._msgSoundVol = Yanfly.Param.EMP1SoundVolume;
+ this._msgSoundPitch = Yanfly.Param.EMP1SoundPitch;
+ this._msgSoundPitchVar = Yanfly.Param.EMP1PitchVar;
+ this._msgSoundPan = Yanfly.Param.EMP1SoundPan;
+ this._msgSoundPanVar = Yanfly.Param.EMP1PanVar;
+ this._msgSoundInterval = Yanfly.Param.EMP1SoundInterval;
+};
+
+Game_System.prototype.getMessageSound = function() {
+ if (this._msgSoundName === undefined) this.initMessageSounds();
+ var obj = {
+ name: this._msgSoundName,
+ volume: this._msgSoundVol,
+ pitch: this._msgSoundPitch,
+ pan: this._msgSoundPan
+ }
+ var max = this._msgSoundPitch + this._msgSoundPitchVar;
+ var min = this._msgSoundPitch - this._msgSoundPitchVar;
+ obj['pitch'] += Math.floor(Math.random() * ( max - min + 1) + min);
+ var max = this._msgSoundPan + this._msgSoundPanVar;
+ var min = this._msgSoundPan - this._msgSoundPanVar;
+ obj['pan'] += Math.floor(Math.random() * ( max - min + 1) + min);
+ return obj;
+};
+
+Game_System.prototype.isMessageSoundEnabled = function() {
+ if (this._msgSoundEnable === undefined) this.initMessageSounds();
+ return this._msgSoundEnable;
+};
+
+Game_System.prototype.messageSoundInterval = function() {
+ if (this._msgSoundInterval === undefined) this.initMessageSounds();
+ return this._msgSoundInterval;
+};
+
+Game_System.prototype.initMessageChoiceRowsMax = function() {
+ this._msgChoiceMax = Yanfly.Param.EMP1MaxRows;
+};
+
+Game_System.prototype.getMessageChoiceRows = function() {
+ if (this._msgChoiceMax === undefined) this.initMessageChoiceRowsMax();
+ return Math.max(1, this._msgChoiceMax);
+};
+
+Game_System.prototype.initChoiceShow = function() {
+ if (this._msgChoiceShowInitialized) return;
+ this._hideChoices = [];
+ var length = Yanfly.Param.EMP1ChoiceShow.length;
+ for (var i = 0; i < length; ++i) {
+ var switchId = Yanfly.Param.EMP1ChoiceShow[i];
+ if (switchId <= 0) continue;
+ $gameSwitches.setValue(switchId, true);
+ }
+ this._msgChoiceShowInitialized = true;
+};
+
+Game_System.prototype.initChoiceEnable = function() {
+ if (this._msgChoiceEnableInitialized) return;
+ this._disableChoices = [];
+ var length = Yanfly.Param.EMP1ChoiceOn.length;
+ for (var i = 0; i < length; ++i) {
+ var switchId = Yanfly.Param.EMP1ChoiceOn[i];
+ if (switchId <= 0) continue;
+ $gameSwitches.setValue(switchId, true);
+ }
+ this._msgChoiceEnableInitialized = true;
+};
+
+Game_System.prototype.isChoiceShown = function(id) {
+ if (this._hideChoices === undefined) this._hideChoices = [];
+ if (this._hideChoices.contains(id)) return false;
+ if (id >= 20) return true;
+ if (Yanfly.Param.EMP1ChoiceShow[id] <= 0) return true;
+ return $gameSwitches.value(Yanfly.Param.EMP1ChoiceShow[id]);
+};
+
+Game_System.prototype.hideChoice = function(id) {
+ if (this._hideChoices === undefined) this._hideChoices = [];
+ id -= 1;
+ if (id < 0) return;
+ if (this._hideChoices.contains(id)) return;
+ this._hideChoices.push(id);
+ var switchId = Yanfly.Param.EMP1ChoiceShow[id];
+ if (switchId) $gameSwitches.setValue(switchId, false);
+};
+
+Game_System.prototype.showChoice = function(id) {
+ if (this._hideChoices === undefined) this._hideChoices = [];
+ id -= 1;
+ if (id < 0) return;
+ if (!this._hideChoices.contains(id)) return;
+ var index = this._hideChoices.indexOf(id);
+ this._hideChoices.splice(index, 1);
+ var switchId = Yanfly.Param.EMP1ChoiceShow[id];
+ if (switchId) $gameSwitches.setValue(switchId, true);
+};
+
+Game_System.prototype.isChoiceEnabled = function(id) {
+ if (this._disableChoices === undefined) this._disableChoices = [];
+ if (this._disableChoices.contains(id)) return false;
+ if (id >= 20) return true;
+ if (Yanfly.Param.EMP1ChoiceOn[id] <= 0) return true;
+ return $gameSwitches.value(Yanfly.Param.EMP1ChoiceOn[id]);
+};
+
+Game_System.prototype.disableChoice = function(id) {
+ if (this._disableChoices === undefined) this._disableChoices = [];
+ id -= 1;
+ if (id < 0) return;
+ if (this._disableChoices.contains(id)) return;
+ this._disableChoices.push(id);
+ var switchId = Yanfly.Param.EMP1ChoiceOn[id];
+ if (switchId) $gameSwitches.setValue(switchId, false);
+};
+
+Game_System.prototype.enableChoice = function(id) {
+ if (this._disableChoices === undefined) this._disableChoices = [];
+ id -= 1;
+ if (id < 0) return;
+ if (!this._disableChoices.contains(id)) return;
+ var index = this._disableChoices.indexOf(id);
+ this._disableChoices.splice(index, 1);
+ var switchId = Yanfly.Param.EMP1ChoiceOn[id];
+ if (switchId) $gameSwitches.setValue(switchId, true);
+};
+
+Game_System.prototype.clearHiddenChoices = function() {
+ this._msgChoiceShowInitialized = false;
+ this.initChoiceShow();
+};
+
+Game_System.prototype.clearDisabledChoices = function() {
+ this._msgChoiceEnableInitialized = false;
+ this.initChoiceEnable();
+};
+
+Game_System.prototype.clearChoiceSettings = function() {
+ this.clearHiddenChoices();
+ this.clearDisabledChoices();
+};
+
+Game_System.prototype.initMessagePosition = function() {
+ this._msgWindowPositionX = 'auto';
+ this._msgWindowPositionY = 'auto';
+ if (Yanfly.Param.EMP1DefaultX.match(/center/i)) {
+ this._msgWindowAnchorX = 0.5;
+ } else if (Yanfly.Param.EMP1DefaultX.match(/right/i)) {
+ this._msgWindowAnchorX = 1;
+ } else {
+ this._msgWindowAnchorX = 0;
+ }
+ if (Yanfly.Param.EMP1DefaultY.match(/center/i)) {
+ this._msgWindowAnchorY = 0.5;
+ } else if (Yanfly.Param.EMP1DefaultY.match(/bottom/i)) {
+ this._msgWindowAnchorY = 1;
+ } else {
+ this._msgWindowAnchorY = 0;
+ }
+};
+
+Game_System.prototype.getMessagePositionX = function() {
+ if (this._msgWindowPositionX === undefined) this.initMessagePosition();
+ return this._msgWindowPositionX;
+};
+
+Game_System.prototype.getMessagePositionY = function() {
+ if (this._msgWindowPositionY === undefined) this.initMessagePosition();
+ return this._msgWindowPositionY;
+};
+
+Game_System.prototype.getMessageAnchorX = function() {
+ if (this._msgWindowAnchorX === undefined) this.initMessagePosition();
+ return this._msgWindowAnchorX;
+};
+
+Game_System.prototype.getMessageAnchorY = function() {
+ if (this._msgWindowAnchorY === undefined) this.initMessagePosition();
+ return this._msgWindowAnchorY;
+};
+
+Game_System.prototype.setMessagePositionX = function(value) {
+ if (this._msgWindowPositionX === undefined) this.initMessagePosition();
+ this._msgWindowPositionX = value;
+};
+
+Game_System.prototype.setMessagePositionY = function(value) {
+ if (this._msgWindowPositionY === undefined) this.initMessagePosition();
+ this._msgWindowPositionY = value;
+};
+
+Game_System.prototype.setMessageAnchorX = function(value) {
+ if (this._msgWindowAnchorX === undefined) this.initMessagePosition();
+ this._msgWindowAnchorX = value;
+};
+
+Game_System.prototype.setMessageAnchorY = function(value) {
+ if (this._msgWindowAnchorY === undefined) this.initMessagePosition();
+ this._msgWindowAnchorY = value;
+};
+
+//=============================================================================
+// Game_CharacterBase
+//=============================================================================
+
+Game_CharacterBase.prototype.spriteHeight = function() {
+ if (this._spriteHeight !== undefined) return this._spriteHeight;
+ var bitmap = ImageManager.loadCharacter(this.characterName());
+ if (!bitmap) {
+ this._spriteHeight = 0;
+ return this._spriteHeight;
+ }
+ var bigCharacter = ImageManager.isBigCharacter(this.characterName());
+ this._spriteHeight = bitmap.height;
+ this._spriteHeight /= (bigCharacter) ? 4 : 8;
+ return this._spriteHeight;
+};
+
+//=============================================================================
+// Game_Interpreter
+//=============================================================================
+
+Yanfly.EMP1.Game_Interpreter_pluginCommand =
+ Game_Interpreter.prototype.pluginCommand;
+Game_Interpreter.prototype.pluginCommand = function(command, args) {
+ Yanfly.EMP1.Game_Interpreter_pluginCommand.call(this, command, args);
+ if ($gameSystem._msgSoundEnable === undefined) {
+ $gameSystem.initMessageSounds();
+ } else if (command === 'EnableLetterSound') {
+ $gameSystem._msgSoundEnable = true;
+ } else if (command === 'DisableLetterSound') {
+ $gameSystem._msgSoundEnable = false;
+ } else if (command === 'LetterSoundName') {
+ this.changeLetterSoundName(args);
+ } else if (command === 'LetterSoundVolume') {
+ $gameSystem._msgSoundVol = parseInt(args[0]);
+ } else if (command === 'LetterSoundPitch') {
+ $gameSystem._msgSoundPitch = parseInt(args[0]);
+ } else if (command === 'LetterSoundPitchVariance') {
+ $gameSystem._msgSoundPitchVar = parseInt(args[0]);
+ } else if (command === 'LetterSoundPan') {
+ $gameSystem._msgSoundPan = parseInt(args[0]);
+ } else if (command === 'LetterSoundPanVariance') {
+ $gameSystem._msgSoundPanVar = parseInt(args[0]);
+ } else if (command === 'LetterSoundInterval') {
+ $gameSystem._msgSoundInterval = parseInt(args[0]);
+ } else if (command === 'LetterSoundReset') {
+ $gameSystem.initMessageSounds();
+ } else if (command === 'ChoiceRowMax') {
+ $gameSystem._msgChoiceMax = parseInt(args[0]);
+ } else if (command === 'HideChoice') {
+ $gameSystem.hideChoice(parseInt(args[0]));
+ } else if (command === 'ShowChoice') {
+ $gameSystem.showChoice(parseInt(args[0]));
+ } else if (command === 'ClearHiddenChoices') {
+ $gameSystem.clearHiddenChoices();
+ } else if (command === 'DisableChoice') {
+ $gameSystem.disableChoice(parseInt(args[0]));
+ } else if (command === 'EnableChoice') {
+ $gameSystem.enableChoice(parseInt(args[0]));
+ } else if (command === 'ClearDisabledChoices') {
+ $gameSystem.clearDisabledChoices();
+ } else if (command === 'ClearChoiceSettings') {
+ $gameSystem.clearChoiceSettings();
+ } else if (command === 'MessagePositionX') {
+ $gameSystem.setMessagePositionX(parseInt(args[0]));
+ } else if (command === 'MessagePositionY') {
+ $gameSystem.setMessagePositionY(parseInt(args[0]));
+ } else if (command === 'MessagePositionXAuto') {
+ $gameSystem.setMessagePositionX('auto');
+ } else if (command === 'MessagePositionYAuto') {
+ $gameSystem.setMessagePositionY('auto');
+ } else if (command === 'MessageAnchorX') {
+ this.setMessageAnchor(args[0], 'x');
+ } else if (command === 'MessageAnchorY') {
+ this.setMessageAnchor(args[0], 'y');
+ } else if (command === 'MessagePositionReset') {
+ $gameSystem.initMessagePosition();
+ $gameSystem._messageRows = eval(Yanfly.Param.MSGDefaultRows);
+ $gameSystem._messageWidth = eval(Yanfly.Param.MSGDefaultWidth);
+ }
+};
+
+Game_Interpreter.prototype.changeLetterSoundName = function(args) {
+ var text = '';
+ if (args.length === 1) {
+ $gameSystem._msgSoundName = String(args[0]);
+ return;
+ }
+ for (var i = 0; i < args.length; ++i) {
+ text = text + ' ' + args[i];
+ }
+ $gameSystem._msgSoundName = text;
+};
+
+Game_Interpreter.prototype.setMessageAnchor = function(string, type) {
+ if (type === 'x') {
+ if (string.match(/center/i)) {
+ $gameSystem.setMessageAnchorX(0.5);
+ } else if (string.match(/right/i)) {
+ $gameSystem.setMessageAnchorX(1);
+ } else {
+ $gameSystem.setMessageAnchorX(0);
+ }
+ } else {
+ if (string.match(/center/i)) {
+ $gameSystem.setMessageAnchorY(0.5);
+ } else if (string.match(/bottom/i)) {
+ $gameSystem.setMessageAnchorY(1);
+ } else {
+ $gameSystem.setMessageAnchorY(0);
+ }
+ }
+};
+
+Yanfly.EMP1.Game_Interpreter_setupChoices =
+ Game_Interpreter.prototype.setupChoices;
+Game_Interpreter.prototype.setupChoices = function(params) {
+ params = this.setupExtendedChoices();
+ Yanfly.EMP1.Game_Interpreter_setupChoices.call(this, params);
+};
+
+Game_Interpreter.prototype.setupExtendedChoices = function() {
+ this._currentIndex = this._index;
+ var totalChoices = 0;
+ ++this._index;
+ while (this._index < this._list.length) {
+ var cmd = this._list[this._index]
+ if (cmd.indent === this._indent) {
+ if (cmd.code === 404 && this._list[this._index + 1].code !== 102) {
+ break
+ } else if (cmd.code === 102) {
+ this.adjustChoiceDefault(totalChoices, cmd);
+ this.adjustChoiceCancel(totalChoices, cmd);
+ this.pushExtraChoices(cmd);
+ this._index -= 2;
+ } else if (cmd.code === 402) {
+ cmd.parameters[0] = totalChoices;
+ totalChoices += 1;
+ }
+ }
+ this._index += 1;
+ }
+ this._index = this._currentIndex;
+ return this._list[this._currentIndex].parameters;
+};
+
+Game_Interpreter.prototype.adjustChoiceDefault = function(total, cmd) {
+ if (cmd.parameters[2] < 0) return;
+ var value = cmd.parameters[2] + total;
+ this._list[this._currentIndex].parameters[2] = value;
+};
+
+Game_Interpreter.prototype.adjustChoiceCancel = function(total, cmd) {
+ if (cmd.parameters[1] >= 0) {
+ var value = cmd.parameters[1] + total;
+ this._list[this._currentIndex].parameters[1] = value;
+ } else if (cmd.parameters[1] === -2) {
+ this._list[this._currentIndex].parameters[1] = cmd.parameters[1];
+ }
+};
+
+Game_Interpreter.prototype.pushExtraChoices = function(cmd) {
+ for (var i = 0; i < cmd.parameters[0].length; i++) {
+ var choice = cmd.parameters[0][i];
+ this._list[this._currentIndex].parameters[0].push(choice);
+ }
+ this._list.splice(this._index - 1, 2)
+};
+
+//=============================================================================
+// Window_Base
+//=============================================================================
+
+Yanfly.EMP1.Window_Base_convertExtraEscapeCharacters =
+ Window_Base.prototype.convertExtraEscapeCharacters;
+Window_Base.prototype.convertExtraEscapeCharacters = function(text) {
+ text = this.convertPlaytime(text);
+ text = this.convertMapName(text);
+ text = this.convertEnemyName(text);
+ text = Yanfly.EMP1.Window_Base_convertExtraEscapeCharacters.call(this, text);
+ text = this.convertDigitGrouping(text);
+ return text;
+};
+
+Window_Base.prototype.convertPlaytime = function(text) {
+ text = text.replace(/\x1bPLAYTIME/gi, function() {
+ return $gameSystem.playtimeText();
+ }.bind(this));
+ return text;
+};
+
+Window_Base.prototype.convertMapName = function(text) {
+ text = text.replace(/\x1bMAP\[(\d+)\]/gi, function() {
+ var mapId = arguments[1];
+ if (mapId <= 0) mapId = $gameMap.mapId();
+ name = $dataMapInfos[mapId].name;
+ return name;
+ }.bind(this));
+ return text;
+};
+
+Window_Base.prototype.convertEnemyName = function(text) {
+ text = text.replace(/\x1bEN\[(\d+)\]/gi, function() {
+ var enemyId = arguments[1];
+ if (enemyId <= 0) return '';
+ name = $dataEnemies[enemyId].name;
+ return name;
+ }.bind(this));
+ text = text.replace(/\x1bET\[(\d+)\]/gi, function() {
+ var index = Math.max(1, arguments[1] - 1);
+ var enemy = $gameTroop.allMembers()[index];
+ if (enemy) {
+ return enemy.name();
+ } else {
+ return '';
+ }
+ }.bind(this));
+ return text;
+};
+
+Window_Base.prototype.convertDigitGrouping = function(text) {
+ text = text.replace(/\x1bDG\[(\d+)\]/gi, function() {
+ return this.groupDigits(parseInt(arguments[1]));
+ }.bind(this));
+ return text;
+};
+
+Window_Base.prototype.groupDigits = function(number) {
+ return Yanfly.Util.forceGroup(number);
+};
+
+Window_Base.prototype.obtainColorString = function(textState) {
+ var arr = /^\[(.*?)\]/.exec(textState.text.slice(textState.index));
+ if (arr) {
+ textState.index += arr[0].length;
+ return '#' + String(arr[0].slice(1, arr[0].length - 1));
+ } else {
+ return '#ffffff';
+ }
+};
+
+Yanfly.EMP1.Window_Base_processEscapeCharacter =
+ Window_Base.prototype.processEscapeCharacter;
+Window_Base.prototype.processEscapeCharacter = function(code, textState) {
+ switch (code) {
+ case 'HC':
+ var value = this.obtainColorString(textState).toLowerCase();
+ this.changeTextColor(value);
+ break;
+ default:
+ Yanfly.EMP1.Window_Base_processEscapeCharacter.call(this, code, textState);
+ break;
+ }
+};
+
+Window_Base.prototype.textHeightEx = function(text) {
+ return this.getTextExHeight(text, 0, 0);
+};
+
+Window_Base.prototype.getTextExHeight = function(text, x, y) {
+ if (text) {
+ var textState = { index: 0, x: x, y: y, left: x };
+ textState.text = this.convertEscapeCharacters(text);
+ textState.height = this.calcTextHeight(textState, true);
+ return textState.height;
+ } else {
+ return 0;
+ }
+};
+
+//=============================================================================
+// Window_ChoiceList
+//=============================================================================
+
+Yanfly.EMP1.Window_ChoiceList_numVisibleRows =
+ Window_ChoiceList.prototype.numVisibleRows;
+Window_ChoiceList.prototype.numVisibleRows = function() {
+ var messageY = this._messageWindow.y;
+ var messageHeight = this._messageWindow.height;
+ var centerY = Graphics.boxHeight / 2;
+ var choices = $gameMessage.choices();
+ var numLines = choices.length;
+ var maxLines = $gameSystem.getMessageChoiceRows();
+ if (messageY < centerY && messageY + messageHeight > centerY) {
+ maxLines = 4;
+ }
+ if (numLines > maxLines) {
+ numLines = maxLines;
+ }
+ return Math.max(1, numLines);
+};
+
+Window_ChoiceList.prototype.makeCommandList = function() {
+ this._cancelAllowed = true;
+ var choices = $gameMessage.choices();
+ for (var i = 0; i < choices.length; i++) {
+ if (!$gameSystem.isChoiceShown(i)) {
+ if ($gameMessage.choiceCancelType() === i) this._cancelAllowed = false;
+ continue;
+ }
+ var enabled = $gameSystem.isChoiceEnabled(i);
+ this.addCommand(choices[i], 'choice', enabled, i);
+ if (!enabled) {
+ if ($gameMessage.choiceCancelType() === i) this._cancelAllowed = false;
+ }
+ }
+};
+
+Yanfly.EMP1.Window_ChoiceList_drawItem = Window_ChoiceList.prototype.drawItem;
+Window_ChoiceList.prototype.drawItem = function(index) {
+ var enabled = this.isCommandEnabled(index);
+ this.changePaintOpacity(enabled);
+ Yanfly.EMP1.Window_ChoiceList_drawItem.call(this, index);
+};
+
+Window_ChoiceList.prototype.callOkHandler = function() {
+ $gameMessage.onChoice(this.currentExt());
+ this._messageWindow.terminateMessage();
+ this.close();
+};
+
+Yanfly.EMP1.Window_ChoiceList_isCancelEnabled =
+ Window_ChoiceList.prototype.isCancelEnabled;
+Window_ChoiceList.prototype.isCancelEnabled = function() {
+ if (!this._cancelAllowed) return false;
+ return Yanfly.EMP1.Window_ChoiceList_isCancelEnabled.call(this);
+};
+
+//=============================================================================
+// Window_NameBox
+//=============================================================================
+
+Yanfly.EMP1.Window_NameBox_refresh = Window_NameBox.prototype.refresh;
+Window_NameBox.prototype.refresh = function(text, position) {
+ var text = Yanfly.EMP1.Window_NameBox_refresh.call(this, text, position);
+ this.setBackgroundType(0);
+ if (eval(Yanfly.Param.MSGNameBoxClear)) {
+ this.backOpacity = 0;
+ this.opacity = 0;
+ } else {
+ this.backOpacity = this.standardBackOpacity();
+ this.opacity = 255;
+ }
+ return text;
+};
+
+Window_NameBox.prototype.refreshDimmed = function(text, position) {
+ var text = Yanfly.EMP1.Window_NameBox_refresh.call(this, text, position);
+ this.setBackgroundType(1);
+ return text;
+};
+
+Window_NameBox.prototype.refreshTransparent = function(text, position) {
+ var text = Yanfly.EMP1.Window_NameBox_refresh.call(this, text, position);
+ this.setBackgroundType(2);
+ return text;
+};
+
+//=============================================================================
+// Window_Message
+//=============================================================================
+
+Yanfly.EMP1.Window_Message_initialize = Window_Message.prototype.initialize;
+Window_Message.prototype.initialize = function() {
+ $gameSystem.initChoiceShow();
+ $gameSystem.initChoiceEnable();
+ this._needsMessageReset = false;
+ Yanfly.EMP1.Window_Message_initialize.call(this);
+};
+
+Yanfly.EMP1.Window_Message_update = Window_Message.prototype.update;
+Window_Message.prototype.update = function() {
+ Yanfly.EMP1.Window_Message_update.call(this);
+ if (this._lockPositionToEvent !== undefined) this.updateLockedPosition();
+};
+
+Yanfly.EMP1.Window_Message_newPage = Window_Message.prototype.newPage;
+Window_Message.prototype.newPage = function(textState) {
+ this._soundCount = 0;
+ Yanfly.EMP1.Window_Message_newPage.call(this, textState);
+};
+
+Yanfly.EMP1.Window_Message_terminateMessage =
+ Window_Message.prototype.terminateMessage;
+Window_Message.prototype.terminateMessage = function() {
+ Yanfly.EMP1.Window_Message_terminateMessage.call(this);
+ if (Yanfly.Param.EMP1LetterReset) $gameSystem.initMessageSounds();
+ if (this._needsMessageReset) this.messagePositionReset();
+ this._lockPositionToEvent = undefined;
+};
+
+Yanfly.EMP1.Window_Message_updateMessage =
+ Window_Message.prototype.updateMessage;
+Window_Message.prototype.updateMessage = function() {
+ var state = Yanfly.EMP1.Window_Message_updateMessage.call(this);
+ if (state) {
+ this._soundCount = this._soundCount || 0;
+ if (this._soundCount-- <= 0) {
+ this._soundCount = $gameSystem.messageSoundInterval();
+ if ($gameSystem.isMessageSoundEnabled()) SoundManager.playMessageSound();
+ }
+ }
+ return state;
+};
+
+Yanfly.EMP1.Window_Message_updatePlacement =
+ Window_Message.prototype.updatePlacement;
+Window_Message.prototype.updatePlacement = function() {
+ Yanfly.EMP1.Window_Message_updatePlacement.call(this);
+ this.updatePositionPlacement();
+};
+
+Window_Message.prototype.updatePositionPlacement = function() {
+ if ($gameSystem.getMessagePositionX() !== 'auto') {
+ this.updatePositionPlacementX();
+ }
+ if ($gameSystem.getMessagePositionY() !== 'auto') {
+ this.updatePositionPlacementY();
+ }
+};
+
+Window_Message.prototype.updatePositionPlacementX = function() {
+ this.x = $gameSystem.getMessagePositionX();
+ this.x -= Math.floor(this.width * $gameSystem.getMessageAnchorX())
+ this.x = Math.max(0, this.x);
+ this.x = Math.min(this.x, Graphics.boxWidth - this.width);
+};
+
+Window_Message.prototype.updatePositionPlacementY = function() {
+ this.y = $gameSystem.getMessagePositionY();
+ this.y -= Math.floor(this.height * $gameSystem.getMessageAnchorY())
+ this.y = Math.max(0, this.y);
+ this.y = Math.min(this.y, Graphics.boxHeight - this.height);
+};
+
+Yanfly.EMP1.Window_Message_convertNameBox =
+ Window_Message.prototype.convertNameBox;
+Window_Message.prototype.convertNameBox = function(text) {
+ text = this.convertMessagePositions(text);
+ text = this.convertLetterSounds(text);
+ text = this.convertExtraNameBoxEffects(text);
+ return Yanfly.EMP1.Window_Message_convertNameBox.call(this, text);
+};
+
+Window_Message.prototype.convertLetterSounds = function(text) {
+ text = text.replace(/\x1bLSON/gi, '\x1bEMP[0]');
+ text = text.replace(/\x1bLSOFF/gi, '\x1bEMP[1]');
+ text = text.replace(/\x1bLSR/gi, '\x1bEMP[2]');
+ return text;
+};
+
+Window_Message.prototype.convertMessagePositions = function(text) {
+ // MSGPOSX
+ text = text.replace(/\x1bMSGPOSX\[(.*?)\]/gi, function() {
+ var value = 0;
+ this._needsMessageReset = true;
+ value = (arguments[1].match(/auto/i)) ? 'auto' : parseInt(arguments[1]);
+ $gameSystem.setMessagePositionX(value);
+ return '';
+ }.bind(this));
+ // MSGPOSY
+ text = text.replace(/\x1bMSGPOSY\[(.*?)\]/gi, function() {
+ var value = 0;
+ this._needsMessageReset = true;
+ value = (arguments[1].match(/auto/i)) ? 'auto' : parseInt(arguments[1]);
+ $gameSystem.setMessagePositionY(value);
+ return '';
+ }.bind(this));
+ // MSGEVENT
+ text = text.replace(/\x1bMSGEVENT\[(\d+)\]/gi, function() {
+ if (!$gameParty.inBattle()) {
+ this._needsMessageReset = true;
+ this.setMessagePositionEvent(arguments[1]);
+ }
+ return '';
+ }.bind(this));
+ // MSGACTOR
+ text = text.replace(/\x1bMSGACTOR\[(\d+)\]/gi, function() {
+ if ($gameParty.inBattle()) {
+ this._needsMessageReset = true;
+ var actorId = arguments[1];
+ if (actorId === 0) actorId = $gameParty.members()[0]._actorId;
+ this.setMessagePositionEvent(actorId);
+ }
+ return '';
+ }.bind(this));
+ // MSGPARTY
+ text = text.replace(/\x1bMSGPARTY\[(\d+)\]/gi, function() {
+ if ($gameParty.inBattle()) {
+ this._needsMessageReset = true;
+ var actorId = Math.max(0, arguments[1] - 1);
+ var battler = $gameParty.allMembers()[actorId];
+ if (battler) {
+ actorId = battler._actorId;
+ } else {
+ actorId = Graphics.boxHeight * 495;
+ }
+ this.setMessagePositionEvent(actorId);
+ }
+ return '';
+ }.bind(this));
+ // MSGENEMY
+ text = text.replace(/\x1bMSGENEMY\[(\d+)\]/gi, function() {
+ if ($gameParty.inBattle()) {
+ this._needsMessageReset = true;
+ var enemyId = Math.max(0, arguments[1] - 1);
+ var battler = $gameTroop.members()[enemyId];
+ if (battler) {
+ this.setMessagePositionEvent(-enemyId);
+ }
+ }
+ return '';
+ }.bind(this));
+ // AUTOEVENT
+ text = text.replace(/\x1bAUTOEVENT\[(\d+)\]/gi, function() {
+ if (!$gameParty.inBattle() && !this._checkingWidth) {
+ this._needsMessageReset = true;
+ this.setMessagePositionEvent(arguments[1]);
+ this._checkingWidth = true;
+ this.getFittedMessageRows(text);
+ var value = this.getFittedMessageWidth(text);
+ $gameSystem._messageWidth = value;
+ this._checkingWidth = false;
+ }
+ return '';
+ }.bind(this));
+ // AUTOACTOR
+ text = text.replace(/\x1bAUTOACTOR\[(\d+)\]/gi, function() {
+ if ($gameParty.inBattle() && !this._checkingWidth) {
+ this._needsMessageReset = true;
+ var actorId = arguments[1];
+ if (actorId === 0) actorId = $gameParty.members()[0]._actorId;
+ this.setMessagePositionEvent(actorId);
+ this._checkingWidth = true;
+ this.getFittedMessageRows(text);
+ var value = this.getFittedMessageWidth(text);
+ $gameSystem._messageWidth = value;
+ this._checkingWidth = false;
+ }
+ return '';
+ }.bind(this));
+ // AUTOPARTY
+ text = text.replace(/\x1bAUTOPARTY\[(\d+)\]/gi, function() {
+ if ($gameParty.inBattle() && !this._checkingWidth) {
+ this._needsMessageReset = true;
+ var actorId = Math.max(0, arguments[1] - 1);
+ var battler = $gameParty.allMembers()[actorId];
+ if (battler) {
+ actorId = battler._actorId;
+ } else {
+ actorId = Graphics.boxHeight * 495;
+ }
+ this.setMessagePositionEvent(actorId);
+ this._checkingWidth = true;
+ this.getFittedMessageRows(text);
+ var value = this.getFittedMessageWidth(text);
+ $gameSystem._messageWidth = value;
+ this._checkingWidth = false;
+ }
+ return '';
+ }.bind(this));
+ // AUTOENEMY
+ text = text.replace(/\x1bAUTOENEMY\[(\d+)\]/gi, function() {
+ if ($gameParty.inBattle() && !this._checkingWidth) {
+ this._needsMessageReset = true;
+ var enemyId = Math.max(0, arguments[1] - 1);
+ var battler = $gameTroop.members()[enemyId];
+ if (battler) {
+ this.setMessagePositionEvent(-enemyId);
+ }
+ this._checkingWidth = true;
+ this.getFittedMessageRows(text);
+ var value = this.getFittedMessageWidth(text);
+ $gameSystem._messageWidth = value;
+ this._checkingWidth = false;
+ }
+ return '';
+ }.bind(this));
+ // MSGROWS
+ text = text.replace(/\x1bMSGROWS\[(.*?)\]/gi, function() {
+ if (!this._checkingWidth) {
+ this._checkingWidth = true;
+ this._needsMessageReset = true;
+ var value = 0;
+ value = (arguments[1].match(/auto/i)) ? 'auto' : parseInt(arguments[1]);
+ if (value === 'auto') {
+ this.getFittedMessageRows(text);
+ } else {
+ $gameSystem._messageRows = value;
+ }
+ this._checkingWidth = false;
+ }
+ return '';
+ }.bind(this));
+ // MSGWIDTH
+ text = text.replace(/\x1bMSGWIDTH\[(.*?)\]/gi, function() {
+ if (!this._checkingWidth) {
+ this._checkingWidth = true;
+ var value = 0;
+ this._needsMessageReset = true;
+ value = (arguments[1].match(/auto/i)) ? 'auto' : parseInt(arguments[1]);
+ if (value === 'auto') value = this.getFittedMessageWidth(text);
+ $gameSystem._messageWidth = value;
+ this._checkingWidth = false;
+ }
+ return '';
+ }.bind(this));
+ // AUTO
+ text = text.replace(/\x1bAUTO/gi, function() {
+ if (!this._checkingWidth) {
+ this._checkingWidth = true;
+ this._needsMessageReset = true;
+ this.getFittedMessageRows(text);
+ var value = this.getFittedMessageWidth(text);
+ $gameSystem._messageWidth = value;
+ this._checkingWidth = false;
+ }
+ return '';
+ }.bind(this));
+ // MSGRESET
+ text = text.replace(/\x1bMSGRESET/gi, function() {
+ this.messagePositionReset();
+ this._needsMessageReset = true;
+ return '';
+ }.bind(this));
+ return text;
+};
+
+Window_Message.prototype.setMessagePositionEvent = function(eventId) {
+ this._lockPositionToEvent = eventId;
+};
+
+Window_Message.prototype.getFittedMessageRows = function(text) {
+ var height = this.textHeightEx(text);
+ if (Yanfly.Param.EMP1FullFace && this.newLineX() > 0) {
+ height = Math.max(height, Window_Base._faceHeight);
+ }
+ $gameSystem._messageRows = height / this.lineHeight();
+};
+
+Window_Message.prototype.getFittedMessageWidth = function(text) {
+ var value = 0;
+ var lines = text.split('\n');
+ var length = lines.length;
+ for (var i = 0; i < length; ++i) {
+ var line = lines[i];
+ var lineWidth = this.textWidthEx(line);
+ value = Math.max(value, lineWidth);
+ }
+ value += this.newLineX();
+ value += this.standardPadding() * 2;
+ value += this.textPadding();
+ return value;
+};
+
+Window_Message.prototype.messagePositionReset = function() {
+ $gameSystem.initMessagePosition();
+ $gameSystem._messageRows = eval(Yanfly.Param.MSGDefaultRows);
+ $gameSystem._messageWidth = eval(Yanfly.Param.MSGDefaultWidth);
+ this._needsMessageReset = false;
+};
+
+Window_Message.prototype.convertExtraNameBoxEffects = function(text) {
+ // Dimmed Namebox
+ text = text.replace(/\x1bND\<(.*?)\>/gi, function() {
+ return Yanfly.nameWindow.refreshDimmed(arguments[1], 1);
+ }, this);
+ text = text.replace(/\x1bND1\<(.*?)\>/gi, function() {
+ return Yanfly.nameWindow.refreshDimmed(arguments[1], 1);
+ }, this);
+ text = text.replace(/\x1bND2\<(.*?)\>/gi, function() {
+ return Yanfly.nameWindow.refreshDimmed(arguments[1], 2);
+ }, this);
+ text = text.replace(/\x1bND3\<(.*?)\>/gi, function() {
+ return Yanfly.nameWindow.refreshDimmed(arguments[1], 3);
+ }, this);
+ text = text.replace(/\x1bNDC\<(.*?)\>/gi, function() {
+ return Yanfly.nameWindow.refreshDimmed(arguments[1], 3);
+ }, this);
+ text = text.replace(/\x1bND4\<(.*?)\>/gi, function() {
+ return Yanfly.nameWindow.refreshDimmed(arguments[1], 4);
+ }, this);
+ text = text.replace(/\x1bND5\<(.*?)\>/gi, function() {
+ return Yanfly.nameWindow.refreshDimmed(arguments[1], 5);
+ }, this);
+ text = text.replace(/\x1bNDR\<(.*?)\>/gi, function() {
+ return Yanfly.nameWindow.refreshDimmed(arguments[1], 5);
+ }, this);
+ // Transparent Namebox
+ text = text.replace(/\x1bNT\<(.*?)\>/gi, function() {
+ return Yanfly.nameWindow.refreshTransparent(arguments[1], 1);
+ }, this);
+ text = text.replace(/\x1bNT1\<(.*?)\>/gi, function() {
+ return Yanfly.nameWindow.refreshTransparent(arguments[1], 1);
+ }, this);
+ text = text.replace(/\x1bNT2\<(.*?)\>/gi, function() {
+ return Yanfly.nameWindow.refreshTransparent(arguments[1], 2);
+ }, this);
+ text = text.replace(/\x1bNT3\<(.*?)\>/gi, function() {
+ return Yanfly.nameWindow.refreshTransparent(arguments[1], 3);
+ }, this);
+ text = text.replace(/\x1bNTC\<(.*?)\>/gi, function() {
+ return Yanfly.nameWindow.refreshTransparent(arguments[1], 3);
+ }, this);
+ text = text.replace(/\x1bNT4\<(.*?)\>/gi, function() {
+ return Yanfly.nameWindow.refreshTransparent(arguments[1], 4);
+ }, this);
+ text = text.replace(/\x1bNT5\<(.*?)\>/gi, function() {
+ return Yanfly.nameWindow.refreshTransparent(arguments[1], 5);
+ }, this);
+ text = text.replace(/\x1bNTR\<(.*?)\>/gi, function() {
+ return Yanfly.nameWindow.refreshTransparent(arguments[1], 5);
+ }, this);
+ return text;
+};
+
+Window_Message.prototype.convertFaceIndexChange = function(text) {
+ // FACEINDEX
+ text = text.replace(/\x1bFACEINDEX\[(\d+)\]/gi, function() {
+ var i = parseInt(arguments[1]);
+ $gameMessage._faceIndex = i;
+ return '';
+ }.bind(this));
+ return text
+};
+
+Yanfly.EMP1.Window_Message_convertMessageCharacters =
+ Window_Message.prototype.convertMessageCharacters;
+Window_Message.prototype.convertMessageCharacters = function(text) {
+ text = Yanfly.EMP1.Window_Message_convertMessageCharacters.call(this, text);
+ text = this.convertFaceIndexChange(text);
+ return text;
+};
+
+Yanfly.EMP1.Window_Message_processEscapeCharacter =
+ Window_Message.prototype.processEscapeCharacter;
+Window_Message.prototype.processEscapeCharacter = function(code, textState) {
+ switch (code) {
+ case 'EMP':
+ var id = this.obtainEscapeParam(textState);
+ if (id === 0) $gameSystem._msgSoundEnable = true;
+ if (id === 1) $gameSystem._msgSoundEnable = false;
+ if (id === 2) $gameSystem.initMessageSounds();
+ break;
+ case 'LSN':
+ var name = this.obtainEscapeString(textState);
+ $gameSystem._msgSoundName = name;
+ break;
+ case 'LSV':
+ var value = this.obtainEscapeParam(textState);
+ $gameSystem._msgSoundVol = value;
+ break;
+ case 'LSPIV':
+ var value = this.obtainEscapeParam(textState);
+ $gameSystem._msgSoundPitchVar = value;
+ break;
+ case 'LSPI':
+ var value = this.obtainEscapeParam(textState);
+ $gameSystem._msgSoundPitch = value;
+ break;
+ case 'LSPAV':
+ var value = this.obtainEscapeParam(textState);
+ $gameSystem._msgSoundPanVar = value;
+ case 'LSPA':
+ var value = this.obtainEscapeParam(textState);
+ $gameSystem._msgSoundPan = value;
+ break;
+ case 'LSI':
+ var value = this.obtainEscapeParam(textState);
+ $gameSystem._msgSoundInterval = value;
+ break;
+ case 'LSRESET':
+ $gameSystem.initMessageSounds();
+ break;
+ default:
+ Yanfly.EMP1.Window_Message_processEscapeCharacter.call(this, code,
+ textState);
+ break;
+ }
+};
+
+Window_Message.prototype.updateLockedPosition = function() {
+ eventId = this._lockPositionToEvent;
+ var x = Graphics.boxWidth / 2;
+ var y = Graphics.boxHeight;
+ if ($gameParty.inBattle()) {
+ if (Imported.YEP_BattleEngineCore) {
+ if (eventId > 0) {
+ var battler = $gameActors.actor(eventId);
+ if (!$gameParty.battleMembers().contains(battler)) battler = null;
+ } else {
+ eventId *= -1;
+ var battler = $gameTroop.members()[eventId];
+ }
+ if (battler) {
+ x = battler.spritePosX();
+ y = battler.spritePosY() - battler.spriteHeight();
+ }
+ }
+ } else {
+ if (eventId <= 0) {
+ x = $gamePlayer.screenX();
+ y = $gamePlayer.screenY();
+ y -= $gamePlayer.spriteHeight();
+ } else {
+ var ev = $gameMap.event(eventId);
+ if (ev) {
+ x = ev.screenX();
+ y = ev.screenY();
+ y -= ev.spriteHeight();
+ }
+ }
+ }
+ $gameSystem.setMessagePositionX(x);
+ $gameSystem.setMessagePositionY(y);
+ this.updatePositionPlacement();
+ this._nameWindow.adjustPositionX();
+ this._nameWindow.adjustPositionY();
+};
+
+Yanfly.EMP1.Window_Message_startWait = Window_Message.prototype.startWait;
+Window_Message.prototype.startWait = function(count) {
+ if (this._checkingWidth) return;
+ Yanfly.EMP1.Window_Message_startWait.call(this, count);
+ this._soundCount = 0;
+};
+
+Yanfly.EMP1.Window_Message_startPause = Window_Message.prototype.startPause;
+Window_Message.prototype.startPause = function() {
+ if (this._checkingWidth) return;
+ Yanfly.EMP1.Window_Message_startPause.call(this);
+};
+
+//=============================================================================
+// Utilities
+//=============================================================================
+
+Yanfly.Util = Yanfly.Util || {};
+
+Yanfly.Util.forceGroup = function(inVal) {
+ if (typeof inVal !== 'string') { inVal = String(inVal); }
+ return inVal.replace(/(^|[^\w.])(\d{4,})/g, function($0, $1, $2) {
+ return $1 + $2.replace(/\d(?=(?:\d\d\d)+(?!\d))/g, "$&,");
+ });
+};
+
+//=============================================================================
+// End of File
+//=============================================================================
+};
\ No newline at end of file