Equim-chan / mjai-reviewer

🔍🀄️ Review mahjong game log with mjai-compatible mahjong AI.
https://mjai.ekyu.moe
Apache License 2.0
1.03k stars 120 forks source link

downloadlogs script modification for NAGA #42

Closed honvl closed 2 years ago

honvl commented 2 years ago

Can the Mahjong Soul downloadlogs script be modified to output a format that is compatible with NAGA's new custom game analysis function?

I took the JSON output from a Mahjong Soul replay using these constants: const NAMEPREF = 0; //2 for english, 1 for sane amount of weeb, 0 for japanese const VERBOSELOG = false; //dump mjs records to output - will make the file too large for tenhou.net/5 viewer const PRETTY = false; //make the written log somewhat human readable

and manually extracted each round to modify it to the below format using Notepad: https://dl.dropboxusercontent.com/s/eslbmbxzmyv1zjv/nagaformat.txt?dl=0

After fixing the yaku name to 自風 東 in Round [7,0,0] to get past NAGA's yaku name validator (https://naga.dmv.nico/static/js/tenhou_edit.js), a successful analysis report was generated:

https://naga.dmv.nico/htmls/32c05196730e76909bd0d40e15821342c05f58c90d0c8fe7b8dad0ec02604db9v2_0_0.html?tw=0

Equim-chan commented 2 years ago

I am not the author of the downloadlogs script, it is originally by anon on 4chan /mjg/.

arsdragonfly commented 2 years ago

This is indeed a very good feature to have, extending NAGA's capabilities to Mahjong soul logs.

On Tue, Dec 21, 2021, 12:11 PM honvl @.***> wrote:

Can the Mahjong Soul downloadlogs script be modified to output a format that is compatible with NAGA's custom game analysis?

I took the JSON output from a Mahjong Soul replay using these constants: const NAMEPREF = 0; //2 for english, 1 for sane amount of weeb, 0 for japanese const VERBOSELOG = false; //dump mjs records to output - will make the file too large for tenhou.net/5 viewer const PRETTY = false; //make the written log somewhat human readable

and manually extracted each round to modify it to the below format using Notepad: https://dl.dropboxusercontent.com/s/eslbmbxzmyv1zjv/nagaformat.txt?dl=0

After fixing the yaku name to 自風 東 in Round [7,0,0] to get past NAGA's yaku name validator, a successful report was generated:

https://naga.dmv.nico/htmls/32c05196730e76909bd0d40e15821342c05f58c90d0c8fe7b8dad0ec02604db9v2_0_0.html?tw=0

— Reply to this email directly, view it on GitHub https://github.com/Equim-chan/akochan-reviewer/issues/42, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7BBEPURSF64PIC2ACA4U3UR745NANCNFSM5KPGT5LA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

honvl commented 2 years ago

I was able to modify the downloadlogs script to be NAGA compatible. Please find it here: https://github.com/honvl/Majsoul-to-NAGA/blob/master/README.adoc