Yu-Gi-Oh! Master Duel translation script

Overview

Yu-Gi-Oh! Master Duel 中文卡查

Yu-Gi-Oh! Master Duel translation script

  • 高正确性,除非卡图数据本身有错。
  • 超快识别率,低于0.000001s。
  • 极低占用,CPU占用忽略不计。
  • 直接使用win32api,不使用第三方dll。
  • 开源,你可以直接执行源代码。
  • 高兼容性,点开即用。

Download

你可以在Releases下载预打包的版本。

如果是windows7用户请使用后缀win7的版本。

Usage

  1. 打开游戏后
  2. 使用管理员权限运行mdt.exe,根据提示使用快捷键。
快捷键 功能
ctrl+s 切换检测卡组/决斗模式
ctrl+p 暂停检测
ctrl+q 退出程序
  1. 可在config.ini文件中进行功能配置。以下是一份样例,可以直接复制粘贴。

    如果要进行窗口置顶设置,尤其要注意窗口名(lp_window_name)选项。使用默认配置文件时可以把软件放在C:\mdt 目录下即可。

[config] 
; 基本设置
cards_db = cards.json
; 翻译文件名
pause_hotkey = ctrl+p
; 暂停快捷键
exit_hotkey = ctrl+q
; 退出快捷键
switch_hotkey = ctrl+s
; 切换模式快捷键
window_on_top = 1
; 是否开启窗口置顶 1开启 0关闭
lp_window_name = C:\mdt\mdt.exe
; 开启窗口置顶时需要提供窗口名,一般是软件安装路径
; 参考路径格式 C:\mdt\mdt.exe
; 直接运行py源代码时一般为 C:\WINDOWS\py.exe
window_pos_x = 400
window_pos_y = 400
window_pos_cx = 400
window_pos_cy = 400
; 这四个参数是控制窗口置顶时默认的窗口大小,分别代表窗口左侧坐标,窗口顶部坐标,窗口宽度,窗口高度。取值为整数。

4.视频演示

v0.1.2版本

Contributing

有其他指针可以提交issue或PR。

你也可以通过TwitterNGA进行反馈

Related Efforts

License

GPLv3

Disclaimers

This project is not affiliated with or sponsored by Konami or its licensors.

Assets

Card texts come from ygocdb.com

Comments
  • [Feature request] 我希望我能够协助增加自动导入YDK卡包的功能,所以我先来占一个坑

    [Feature request] 我希望我能够协助增加自动导入YDK卡包的功能,所以我先来占一个坑

    Is your feature request related to a problem? Please describe.

    Describe the solution you'd like

    1. 作者仓库里面已经有两份数据库,我考虑使用python用的那一个数据库将YDK卡密转化成外文。
    2. 如何判断客户端语言暂时还没想到解决办法。
    3. 游戏内输入框点击与卡片选择应该是用最基础的图像模板匹配方案。

    这里先占个坑,希望听一下作者的意见。

    enhancement 
    opened by chunibyo-wly 8
  • 0.2.12版新增的图像识别模式在特定情况下无法工作

    0.2.12版新增的图像识别模式在特定情况下无法工作

    • 问题描述:

    0.2.12版本新增的图像识别模式不能用于比赛历史(即Match History)中的对手卡组,必须要点开对应的卡片才能显示,如下图所示(设置界面是我先点了卡片没反应以后才点开的,用于展示目前确实是图像模式): image

    我选了雷击但是并没有识别出对应的卡片,必须要点开才可以识别: image

    但是在编辑自己的卡组的时候,图像模式并没有类似的问题(即只需要点选卡片就可以识别,不需要点开)。

    • 复现方法:

    (以下以英文版操作为例) 确认MDT使用图像模式后,进行如下操作:

    主界面->DUEL->Ranked Duel->Match History->任选一局比赛历史->Confirm Opponent's Deck

    即可复现

    • 相关版本信息:

    OS:Windows 10 21H2 19044.1566 MD版本:1.0.2 MDT版本:0.2.12

    • 相关建议: 虽然内存模式并没有类似的问题,但是我更希望使用图像模式(毕竟能支持更多的场景)。 如果修复起来比较困难是否可以考虑增加图像/内存模式快速切换的功能?比如说界面上做一个按钮切换模式之类的? 最后感谢大大能做出的这么好用的工具~
    enhancement good first issue 
    opened by wtof1996 8
  • 关于卡组导入,卡组导入只能导入英文版的,但是pc换语言需要重新下载游戏,希望能增加导入日语版的功能

    关于卡组导入,卡组导入只能导入英文版的,但是pc换语言需要重新下载游戏,希望能增加导入日语版的功能

    Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

    Describe the solution you'd like A clear and concise description of what you want to happen.

    Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

    Additional context Add any other context or screenshots about the feature request here.

    opened by woyongyuanxihuaneve 6
  • Add new cards hash (include 4 new OCG card image hash).

    Add new cards hash (include 4 new OCG card image hash).

    除了灵摆的卡,新卡的hash都是通过拆包后的原始卡图(512x512)计算得出,但是灵摆的卡图(512x1024)由于直接计算后得出的hash不能做匹配,因此4张新的灵摆卡(14343、16213、16219、16428)我是通过screenshot函数在4k分辨率下直接从游戏中截图取的哈希,不过经测试目前也是可以用的。 目前还不太清楚灵摆的卡图需要如何处理,目前先这样用着吧,后续待改进。

    good first issue 
    opened by wtof1996 5
  • Fix

    Fix

    改了get_cid里一个typo

    Deck的cid信息在退出deck界面的时候依然保留在内存里,所以光靠valid_cid来判断始终会返回true,导致看回放的时候无法查询卡组,而是始终显示退出deck界面时查看的最后一张。 gui显示的逻辑比较合理,所以直接让console显示和gui一致

    以及,今天玩solo,发现oppo的指针同时也负责solo里的rent以及AI对手的卡组显示,可以加进说明文档里。

    bug duplicate good first issue 
    opened by zealyahweh 3
  • bug: 获取正确的客户端画面分辨率应该使用GetClientRect方法

    bug: 获取正确的客户端画面分辨率应该使用GetClientRect方法

    https://github.com/SkywalkerJi/mdt/blob/89f086b95bbf04987021216aacecf95b914740cb/mdt_cv.py#L87 GetWindowRect获得的分辨率应该是包含标题栏的,这个会导致使用模板匹配方法的时候难以正常的将屏幕位置算出来。 这里的box大小如果客户端设置的是1600x900,打印出来应该就是这个值。 如果需要用到屏幕坐标,再通过win32gui.ClientToScreen(hWnd, (0, 0))方法获得Client位置就行了。

    不过这个有一个问题是看起来这里取得的值是和大佬你的图像hash绑定的,所以我就不方便直接修改了。

    opened by chunibyo-wly 2
  • 在其它工作目录下无法通过绝对路径运行mdt GUI

    在其它工作目录下无法通过绝对路径运行mdt GUI

    Describe the bug 在其它工作路径下以绝对路径运行(如通过Everything搜索mdt.exe运行)会报错 因为mdt_cv.py的第81行是以相对路径加载文件'./data/hash.json'的

    调用栈

    Traceback (most recent call last):
      File "mdt_gui.py", line 15, in <module>
      File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
      File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
      File "PyInstaller\loader\pyimod03_importers.py", line 495, in exec_module
      File "mdt_service.py", line 4, in <module>
      File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
      File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
      File "PyInstaller\loader\pyimod03_importers.py", line 495, in exec_module
      File "mdt.py", line 11, in <module>
      File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
      File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
      File "PyInstaller\loader\pyimod03_importers.py", line 495, in exec_module
      File "mdt_cv.py", line 81, in <module>
    FileNotFoundError: [Errno 2] No such file or directory: './data/hash.json'
    

    To Reproduce 在其它的工作路径下通过绝对路径运行mdt.exe 如通过Everything搜索mdt.exe运行 或者在powershell里以绝对路径运行mdt.exe

    Expected behavior 可以在其它目录下运行mdt.exe

    Screenshots

    Desktop (please complete the following information):

    • OS: Windows 10

    Additional context Add any other context about the problem here.

    opened by rumia-san 0
Releases(V0.2.27)
Python Tool to Easily Generate Multiple Documents

Python Tool to Easily Generate Multiple Documents Running the script doesn't require internet Max Generation is set to 10k to avoid lagging/crashing R

2 Apr 27, 2022
MonsterManualPlus - An advanced monster manual for Tower of the Sorcerer.

Monster Manual + This is an advanced monster manual for Tower of the Sorcerer mods. Users can get a plenty of extra imformation for decision making wh

Yifan Zhou 1 Jan 01, 2022
Loudchecker - Python script to check files for earrape

loudchecker python script to check files for earrape automatically installs depe

1 Jan 22, 2022
100 Days of Code Learning program to keep a habit of coding daily and learn things at your own pace with help from our remote community.

100 Days of Code Learning program to keep a habit of coding daily and learn things at your own pace with help from our remote community.

Git Commit Show by Invide 41 Dec 30, 2022
Showing potential issues with merge strategies

Showing potential issues with merge strategies Context There are two branches in this repo: main and a feature branch feat/inverting-method (not the b

Rubén 2 Dec 20, 2021
A module filled with many useful functions and modules in various subjects.

Usefulpy Check out the Usefulpy site Usefulpy site is not always up to date Download and Import download and install with with pip download usefulpyth

Austin Garcia 1 Dec 28, 2021
Repository for tutorials, examples and starter scripts for using the MTU HPC cluster

MTU-HPC-Starter Repository for tutorials, examples and starter scripts for using the MTU HPC cluster Connecting to the MTU HPC cluster Within the coll

1 Jan 31, 2022
VSCode extension that generates docstrings for python files

VSCode Python Docstring Generator Visual Studio Code extension to quickly generate docstrings for python functions. Features Quickly generate a docstr

Nils Werner 506 Jan 03, 2023
Python 3 wrapper for the Vultr API v2.0

Vultr Python Python wrapper for the Vultr API. https://www.vultr.com https://www.vultr.com/api This is currently a WIP and not complete, but has some

CSSNR 6 Apr 28, 2022
Convenient tools for using Swagger to define and validate your interfaces in a Pyramid webapp.

Convenient tools for using Swagger to define and validate your interfaces in a Pyramid webapp.

Scott Triglia 64 Sep 18, 2022
Python-samples - This project is to help someone need some practices when learning python language

Python-samples - This project is to help someone need some practices when learning python language

Gui Chen 0 Feb 14, 2022
💯 Coolest snippets

nvim-snippets This was originally included in my personal Neovim setup, but I didn't like having all the snippets there so I decided to have them sepa

Eliaz Bobadilla 6 Aug 31, 2022
A web app builds using streamlit API with python backend to analyze and pick insides from multiple data formats.

Data-Analysis-Web-App Data Analysis Web App can analysis data in multiple formates(csv, txt, xls, xlsx, ods, odt) and gives shows you the analysis in

Kumar Saksham 19 Dec 09, 2022
Paper and Code for "Curriculum Learning by Optimizing Learning Dynamics" (AISTATS 2021)

Curriculum Learning by Optimizing Learning Dynamics (DoCL) AISTATS 2021 paper: Title: Curriculum Learning by Optimizing Learning Dynamics [pdf] [appen

Tianyi Zhou 15 Dec 06, 2022
Source Code for 'Practical Python Projects' (video) by Sunil Gupta

Apress Source Code This repository accompanies %Practical Python Projects by Sunil Gupta (Apress, 2021). Download the files as a zip using the green b

Apress 2 Jun 01, 2022
204-python-string-21BCA90 created by GitHub Classroom

204-Python This repository is created for subject "204 Programming Skill" Python Programming. This Repository contain list of programs of python progr

VIDYABHARTI TRUST COLLEGE OF BCA 6 Mar 31, 2022
🍭 epub generator for lightnovel.us 轻之国度 epub 生成器

lightnovel_epub 本工具用于基于轻之国度网页生成epub小说。 注意:本工具仅作学习交流使用,作者不对内容和使用情况付任何责任! 原理 直接抓取 HTML,然后将其中的图片下载至本地,随后打包成 EPUB。

gyro永不抽风 188 Dec 30, 2022
Data science on SDGs - Udemy Online Course Material: Data Science on Sustainable Development Goals

Data Science on Sustainable Development Goals (SDGs) Udemy Online Course Material: Data Science on Sustainable Development Goals https://bit.ly/data_s

Frank Kienle 1 Jan 04, 2022
Netbox Dns is a netbox plugin for managing zone, nameserver and record inventory.

Netbox DNS Netbox Dns is a netbox plugin for managing zone, nameserver and record inventory. Features Manage zones (domains) you have. Manage nameserv

Aurora Research Lab 155 Jan 06, 2023
✨ Real-life Data Analysis and Model Training Workshop by Global AI Hub.

🎓 Data Analysis and Model Training Course by Global AI Hub Syllabus: Day 1 What is Data? Multimedia Structured and Unstructured Data Data Types Data

Global AI Hub 71 Oct 28, 2022