EasyRPG / Player

RPG Maker 2000/2003 and EasyRPG games interpreter
https://easyrpg.org/player/
GNU General Public License v3.0
1.01k stars 193 forks source link

Simplified Chinese and Traditional Chinese Characters game is break about input for passwords #2656

Open Helloworld996 opened 3 years ago

Helloworld996 commented 3 years ago

Name of the #game:

buried barry(Traditional Chinese); ib(simplified Chinese);nightmare game(simplified Chinese);Labyrinth of poverty(simplified Chinese);FULLMETALPANZERS_105 (Traditional Chinese)

Player platform:

Windows, Android

Describe the issue in detail and how to reproduce it:

2522 It can be concluded from the following instructions that simplified Chinese game passwords are entered using half-width symbols, while traditional Chinese symbols are entered using full-width symbols.

The input font of simplified Chinese and traditional Chinese games has been changed, so that the correct Chinese characters cannot be found.This problem exists in simplified Chinese, traditional Chinese, original or translated games. bug02-2

Snipaste_2021-09-26_15-13-36

This is a traditional Chinese version of the game.I use RPGMaker2003 to find full-width characters used in alphabetic and numeric passwords. In addition, I check that the traditional Chinese games whose passwords cannot be passed also use full-width characters. I used RPGMaker2003 to find the full-width characters used in the passwords of letters and numbers in traditional Chinese games.

buried barry(Traditional Chinese) the input password is keeper: https://drive.google.com/file/d/18Goagg7GhIeoGeuMd9bwWHGPZTT-ng2e/view?usp=drivesdk

RPGMaker2003 engine(CHS): https://drive.google.com/file/d/11lrwa89B1HTN-uOrkIM5ZK481_4wqqXp/view?usp=sharing In addition, I used RPGMaker2003 to change the password of the game to the half-corner letter 'keeper', and successfully entered it.I guess it's because easyRPG doesn't support full-width characters.

To test this point, I used simplified Chinese games. I found that simplified Chinese games all use half-width characters. So I entered a game that needed a password for numeric letters and successfully verified it.

For example, Labyrinth of poverty . Labyrinth of poverty is simplified Chinese,the download link(the input password is COOLPIZ): https://drive.google.com/file/d/14YLIpH6-kSjwnomSI-G64E_hebma67e4/view?usp=drivesdk

Reproduce video: https://drive.google.com/file/d/15BfWsYQdkrrdCz7mXBTC2zIN95U6VXq6/view?usp=drivesdk

But it is a pity that the passwords of most Chinese games are Chinese characters, not letters or numbers. So I'm going to miss a lot of games. This is the nightmare game(simplified Chinese) download link: https://www.dropbox.com/s/40yxzl3bde5rq8w/nightmare%20game.zip?dl=0 bug02-3

This is the ib(simplified Chinese) download link(the input password is 深海之世): https://drive.google.com/file/d/18n80sqpelNJE_jnUBtZCx-k7Y0DnM_6H/view?usp=drivesdk

Most of the game password input font will be destroyed.There is only one game whose font has not been destroyed, and I don't know exactly why. But I hope it can help you. FULLMETALPANZERS_105 (Traditional Chinese) is translated version: https://drive.google.com/file/d/14VfuPKwaHI373JjQbLr4XvAhjLTgV9xq/view?usp=drivesdk FULLMETALPANZERS_105 Original edition: https://drive.google.com/file/d/14V0hYgqAAnGPB1A0fC2eJlT7L3FPwWKF/view?usp=drivesdk Reproduce video: https://drive.google.com/file/d/159mOqtbKacqbqwQcdVHs_aNSo7cfxLvN/view?usp=drivesdk

fdelapena commented 2 years ago

A portable fix compatible with all patched (and unpacked) RPG_RT.exe variants would be a binary parser (this part is not a Win32 PE resource element), finding the TLcfNameScene and check from there the offsets for characters to consume them. Character glyphs may require UCS-2 decoding (I'm not sure which encoding is used there actually, not tested).

Mimigris commented 1 year ago

Just did a check for the keyboards of these games and for some others related: The reason why Full Metal Panzers works correctly is that it uses a Japanese encoding for both the Japanese and Simplified Chinese translation (the executable is an unedited version of the Japanese one), hence why nothing is broken there since the keyboard used is the Japanese one.

The Traditional Chinese version of Buried Barry uses the following keyboards and layouts (with <確定> for confirmation):

    {
        "<頁1>",
        { // Trad. Chinese Buried Barry 1
            {"A", "B", "C", "D", "E", "F", "G", "H", "I", "J"},
            {"K", "L", "M", "N", "O", "P", "Q", "R", "S", "T"},
            {"U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d"},
            {"e", "f", "g", "h", "i", "j", "k", "l", "m", "n"},
            {"o", "p", "q", "r", "s", "t", "u", "v", "w", "x"},
            {"y", "z", "子", "力", "小", "大", "天", "中", "太", "夫"},
            {"月", "幻", "日", "毛", "文", "古", "艾", "白", "玉", "世"},
            {"冬", "加", "卡", "平", "多", "巧", "弗", "米", "西", "安"},
            {"伊", "亨", "克", "里", "坎", "阿", NEXT_PAGE, "", DONE}
        }
    },
    {
        "<頁2>",
        { // Trad. Chinese Buried Barry 2
            {"貝", "利", "芙", "芬", "拉", "欣", "東", "雨", "依", "武"},
            {"秀", "金", "耶", "肯", "青", "法", "奇", "皇", "宜", "兒"},
            {"昂", "哈", "思", "紅", "香", "茱", "美", "南", "威", "珍"},
            {"迪", "風", "哥", "席", "真", "修", "恩", "倫", "格", "亞"},
            {"海", "特", "夏", "娜", "莉", "球", "彩", "菲", "雪", "飛"},
            {"萊", "梅", "琴", "凱", "斯", "晴", "黑", "絲", "塔", "葛"},
            {"葉", "斐", "雅", "瑟", "瑞", "雷", "豪", "維", "赫", "爾"},
            {"德", "蓮", "瑪", "嘉", "歐", "蕾", "龍", "瓊", "黛", "藍"},
            {"薩", "蘇", "寶", "羅", "麗", "蘭", NEXT_PAGE, "", DONE}
        }
    },

The Simplified Chinese version of Buried Barry (mentioned in #2522 ) uses the following keyboards and layouts (with <确定> for confirmation):

    {
        "<翻页>",
        { // Simp. Chinese Buried Barry 1
            {"越", "鸟", "从", "南", "来", "胡", "鹰", "亦", "北", "度"},
            {"旧", "户", "闲", "花", "草", "驯", "鸽", "傍", "檐", "隙"},
            {"狗", "吠", "深", "巷", "中", "鸡", "鸣", "桑", "树", "颠"},
            {"烽", "火", "连", "三", "月", "家", "书", "抵", "万", "金"},
            {"石", "角", "恣", "幽", "步", "长", "乌", "遂", "遐", "征"},
            {"自", "倚", "能", "歌", "日", "先", "皇", "掌", "上", "怜"},
            {"控", "弦", "破", "左", "的", "右", "发", "摧", "月", "支"},
            {"嗟", "余", "有", "两", "耳", "未", "省", "听", "丝", "篁"},
            {"小", "桥", "流", "水", "人", "家", NEXT_PAGE, "", DONE}
        }
    },
    {
        "<翻页>",
        { // Simp. Chinese Buried Barry 2
            {"知", "音", "者", "诚", "希", "念", "子", "不", "能", "别"},
            {"义", "公", "习", "禅", "寂", "结", "宇", "依", "空", "林"},
            {"山", "阴", "遇", "羽", "客", "爱", "此", "好", "鹅", "宾"},
            {"潜", "身", "猫", "相", "雀", "引", "喙", "禽", "呼", "偶"},
            {"绕", "堤", "龙", "骨", "冷", "拂", "岸", "鸭", "头", "香"},
            {"昨", "日", "登", "高", "罢", "今", "朝", "更", "举", "觞"},
            {"吴", "江", "赋", "鹦", "鹉", "落", "笔", "超", "群", "英"},
            {"清", "水", "出", "芙", "蓉", "天", "然", "去", "雕", "饰"},
            {"枯", "藤", "老", "树", "昏", "鸦", NEXT_PAGE, "", DONE}
        }
    },

The Simplified Chinese version of Ib uses the following keyboards and layouts (with <确定> for confirmation):

    {
        "<翻页>",
        { // Simp. Chinese Ib 1
            {"泉", "声", "咽", "危", "石", "日", "色", "冷", "青", "松"},
            {"薄", "暮", "空", "潭", "曲", "安", "禅", "制", "毒", "龙"},
            {"海", "内", "存", "知", "己", "天", "涯", "若", "比", "邻"},
            {"燕", "草", "如", "碧", "丝", "秦", "桑", "低", "绿", "枝"},
            {"当", "君", "怀", "归", "日", "是", "妾", "断", "肠", "时"},
            {"当", "路", "谁", "相", "假", "知", "音", "世", "所", "稀"},
            {"只", "应", "守", "寂", "寞", "还", "掩", "故", "园", "扉"},
            {"坐", "观", "垂", "钓", "者", "-", "~", "·", "=", "☆"},
            {"徒", "有", "羡", "鱼", "情", "的", NEXT_PAGE, "", DONE}
        }
    },
    {
        "<翻页>",
        { // Simp. Chinese Ib 2
            {"几", "行", "归", "塞", "尽", "念", "尔", "独", "何", "之"},
            {"暮", "雨", "相", "呼", "失", "寒", "塘", "欲", "下", "迟"},
            {"霞", "光", "连", "碧", "彩", "湖", "岸", "水", "连", "滩"},
            {"天", "地", "丹", "青", "绘", "人", "间", "锦", "绣", "看"},
            {"返", "景", "入", "深", "林", "复", "照", "青", "苔", "上"},
            {"中", "岁", "颇", "好", "道", "晚", "家", "南", "山", "陲"},
            {"兴", "来", "每", "独", "往", "胜", "事", "空", "自", "知"},
            {"遥", "夜", "泛", "清", "瑟", "-", "~", "·", "=", "☆"},
            {"瑟", "风", "生", "翠", "萝", "的", NEXT_PAGE, "", DONE}
        }
    },

This one was not reported, though it may also be used in other games so I'm also listing it, but the Simplified Chinese translation of Yume 2kki uses the following keyboards and layouts (with <确定> for confirmation):

    {
        "<翻页>",
        { // Simp. Chinese Yume 2kki 1
            {"阿", "伊", "乌", "俄", "欧", "安", "英", "奥", "恩", "翁"},
            {"卡", "奇", "库", "克", "寇", "加", "吉", "古", "格", "果"},
            {"萨", "斯", "苏", "瑟", "索", "扎", "兹", "祖", "泽", "佐"},
            {"塔", "提", "图", "特", "托", "达", "迪", "杜", "德", "多"},
            {"纳", "尼", "努", "奈", "诺", "哈", "希", "胡", "赫", "霍"},
            {"法", "菲", "福", "芬", "佛", "巴", "比", "布", "贝", "波"},
            {"马", "米", "穆", "梅", "莫", "帕", "皮", "普", "培", "坡"},
            {"亚", "约", "云", "耶", "尤", "瓦", "维", "温", "尔", "沃"},
            {"拉", "利", "鲁", "勒", "罗", "·", NEXT_PAGE, "", DONE}
        }
    },
    {
        "<翻页>",
        { // Simp. Chinese Yume 2kki 2
            {"A", "B", "C", "D", "E", "F", "G", "H", "I", "J"},
            {"K", "L", "M", "N", "O", "P", "Q", "R", "S", "T"},
            {"U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d"},
            {"e", "f", "g", "h", "i", "j", "k", "l", "m", "n"},
            {"o", "p", "q", "r", "s", "t", "u", "v", "w", "x"},
            {"y", "z", "艾", "莉", "酱", "芭", "蒂", "蕾", "莲", "萝"},
            {"芙", "莎", "琴", "妮", "娅", "娃", "娜", "黛", "丝", "御"},
            {"美", "兰", "玛", "琳", "珊", "瓦", "维", "温", "尔", "沃"},
            {"珍", "坂", "朵", "露", "琪", "·", NEXT_PAGE, "", DONE}
        }
    },

There would need to parse the executable to recognize the keyboards as mentioned by fdelapena to make them work. As you can see, some characters are only used in one set, so it is not really possible to do a keyboard for all, so we will likely have to cover individual keyboards. If you want my opinion on parsing, it would probably be better to include just a way to recognize it, and then choosing which one to use that has been coded, otherwise games made to use these keyboards will not be able to be migrated to the webplayer/EasyRPG executable if someone would like to do so without editing the game, though I'm not the public aimed for this so don't take it for something that must necessary be done. Now, time for the more edge-case situations:

The Simplified Chinese Nightmare Game (also called Secret Memory) as well as the games generated by the RPG Maker that you shared (they don't share the same executable so here is a testgame made with it for example) use something a bit more specific: those are the normal Hiragana and Katana keyboards from the Japanese version, with the characters ー, ~, ・, = replaced by -, ~, ■, =, in addition to the change of text for the next pages and for the done text <确认> (also, note that the original engine could allow you to type broken characters after trying these characters previously mentioned outside of ■, though it is partially unrelated).

    {
        "<平假>",
        { // Hiragana zh Secret Memory/RPG Maker 2003
            {"あ", "い", "う", "え", "お", "が", "ぎ", "ぐ", "げ", "ご"},
            {"か", "き", "く", "け", "こ", "ざ", "じ", "ず", "ぜ", "ぞ"},
            {"さ", "し", "す", "せ", "そ", "だ", "ぢ", "づ", "で", "ど"},
            {"た", "ち", "つ", "て", "と", "ば", "び", "ぶ", "べ", "ぼ"},
            {"な", "に", "ぬ", "ね", "の", "ぱ", "ぴ", "ぷ", "ぺ", "ぽ"},
            {"は", "ひ", "ふ", "へ", "ほ", "ぁ", "ぃ", "ぅ", "ぇ", "ぉ"},
            {"ま", "み", "む", "め", "も", "っ", "ゃ", "ゅ", "ょ", "ゎ"},
            {"や", "ゆ", "よ", "わ", "ん", "-", "~", "■", "=", "☆"},
            {"ら", "り", "る", "れ", "ろ", "ヴ", NEXT_PAGE, "", DONE}
        }
    },
    {
        "<片假>",
        { // Katakana zh RPG_RT Secret Memory/RPG Maker 2003
            {"ア", "イ", "ウ", "エ", "オ", "ガ", "ギ", "グ", "ゲ", "ゴ"},
            {"カ", "キ", "ク", "ケ", "コ", "ザ", "ジ", "ズ", "ゼ", "ゾ"},
            {"サ", "シ", "ス", "セ", "ソ", "ダ", "ヂ", "ヅ", "デ", "ド"},
            {"タ", "チ", "ツ", "テ", "ト", "バ", "ビ", "ブ", "ベ", "ボ"},
            {"ナ", "ニ", "ヌ", "ネ", "ノ", "パ", "ピ", "プ", "ペ", "ポ"},
            {"ハ", "ヒ", "フ", "ヘ", "ホ", "ァ", "ィ", "ゥ", "ェ", "ォ"},
            {"マ", "ミ", "ム", "メ", "モ", "ッ", "ャ", "ュ", "ョ", "ヮ"},
            {"ヤ", "ユ", "ヨ", "ワ", "ン", "-", "~", "■", "=", "☆"},
            {"ラ", "リ", "ル", "レ", "ロ", "ヴ", NEXT_PAGE, "", DONE}
        }
    },

Labyrinth of Poverty on the other hand, uses an edited version of the English 2k3 RPG_RT and did not edited the layout of the keyboard, which worked on the first page but does not worked for the second page: image image

We don't have it coded yet (refer to issue #1618 ) but for reference here is the layout (with <OK!> for the confirmation):

    {
        "<ABC>",
        { // Letter RPG2k3e (~ and = are reversed compared to 2ke, the * was a ? reversed with @)
            {"A", "B", "C", "D", "E", "F", "G", "H", "I", "J"},
            {"K", "L", "M", "N", "O", "P", "Q", "R", "S", "T"},
            {"U", "V", "W", "X", "Y", "Z", "(", ")", "=", "~"},
            {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j"},
            {"k", "l", "m", "n", "o", "p", "q", "r", "s", "t"},
            {"u", "v", "w", "x", "y", "z", ":", ";", "!", "?"},
            {"1", "2", "3", "4", "5", "6", "7", "8", "9", "0"},
            {"\"", "*", "+", "&", "/", ".", ",", "-", "'", "_"},
            {"|" , "[", "]", "@", "°", " ", NEXT_PAGE, "", DONE}
        }
    },
    {
        "<Sym>",
        { // Symbol RPG2ke (while the comma and cedilla use the exact same visual in the original engine, those two are different characters)
            {"À", "Á", "Â", "Ã", "Ä", "Å", "ƒ", "Æ", "Ç", "È"},
            {"É", "Ê", "Ë", "Ì", "Í", "Î", "Ï", "Ð", "Ñ", "Ò"},
            {"Ó", "Ô", "Õ", "Ö", "©", "Ø", "Ù", "Ú", "Û", "Ü"},
            {"Ý", "Þ", "ß", "{", "}", "•", "§", "€", "£", "¥"},
            {"à", "á", "â", "ã", "ä", "å", "¸", "æ", "ç", "è"},
            {"é", "ê", "ë", "ì", "í", "î", "ï", "ð", "ñ", "ò"},
            {"ó", "ô", "õ", "ö", "®", "ø", "ù", "ú", "û", "ü"},
            {"ý", "þ", "ÿ", "¿", "¡", ".", ",", "-", "'", "_"},
            {"†" , "‡", "%", "…", "μ", " ", NEXT_PAGE, "", DONE}
        }
    }

With cases like those, it means that the parsing of the executable must have priority over choosing which keyboard must be used from just the encoding since it may not necessary corresponds to what the encoding would say, and they should as such be used for fallback.

Partially unrelated for this case but I hope it may be useful, but I've made a branch to list some keyboards that I found in games using specific keyboards, see here and here, it could be useful if we want to make sure to have correct keyboards and match with different RPG_RTs.

Ghabry commented 2 months ago

KotatsuAkira provided this address list where the name input keyboard layout in RPG_RT is located.

As there are so many patched RPG_RT.exe are floating around the only feasible solution is by now extracting the keys from RPG_RT...

[EHN list of letter-string-pointers is starting at...] (VIRTUAL ADDRESS)
2000-03-06 (2000-1.00) ~ 2001-05-05 (2000-1.10): 0x49A604
2003-03-27 (2000-1.50) ~ 2015-07-05 (2000-1.60): 0x49F608
2015-09-15 (2000-1.61) & 2017-09-14 (2000-1.62): 0x4A0608 (0x9F608)
RPG2003 NoVerInfo 1.00: 0x4C27C4
RPG2003 NoVerInfo (1): 0x4C44AC
RPG2003 NoVerInfo (2): 0x4C34B4
RPG2003 1.0.2.1-1.0.2.1 & 1.0.3.0-1.0.3.0_1: 0x4C44B4
RPG2003 1.0.3.0-1.0.3.0_2 & 1.0.3.0-1.0.4.0: 0x4C54B4
RPG2003 1.0.5.0-1.0.5.0_1 & ~_2: 0x4CC6B8
RPG2003 1.0.6.0-1.0.6.0 and beyond: 0x4CD6B8