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)
DataRisk Detection Learning Resources

DataRisk Detection Learning Resources Data security: Based on the "data-centric security system" position, it generally refers to the entire security

Liao Wenzhe 59 Dec 05, 2022
Valentine-with-Python - A Python program generates an animation of a heart with cool texts of your loved one

Valentine with Python Valentines with Python is a mini fun project I have coded.

Niraj Tiwari 4 Dec 31, 2022
EasyMultiClipboard - Python script written to handle more than 1 string in clipboard

EasyMultiClipboard - Python script written to handle more than 1 string in clipboard

WVlab 1 Jun 18, 2022
Deduplicating archiver with compression and authenticated encryption.

More screencasts: installation, advanced usage What is BorgBackup? BorgBackup (short: Borg) is a deduplicating backup program. Optionally, it supports

BorgBackup 9k Jan 09, 2023
An open source utility for creating publication quality LaTex figures generated from OpenFOAM data files.

foamTEX An open source utility for creating publication quality LaTex figures generated from OpenFOAM data files. Explore the docs » Report Bug · Requ

1 Dec 19, 2021
This contains timezone mapping information for when preprocessed from the geonames data

when-data This contains timezone mapping information for when preprocessed from the geonames data. It exists in a separate repository so that one does

Armin Ronacher 2 Dec 07, 2021
📘 OpenAPI/Swagger-generated API Reference Documentation

Generate interactive API documentation from OpenAPI definitions This is the README for the 2.x version of Redoc (React-based). The README for the 1.x

Redocly 19.2k Jan 02, 2023
A `:github:` role for Sphinx

sphinx-github-role A github role for Sphinx. Usage Basic usage MyST: :caption: index.md See {github}`astrojuanlu/sphinx-github-role#1`. reStructuredT

Juan Luis Cano Rodríguez 4 Nov 22, 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
Poetry plugin to export the dependencies to various formats

Poetry export plugin This package is a plugin that allows the export of locked packages to various formats. Note: For now, only the requirements.txt f

Poetry 90 Jan 05, 2023
Leetcode Practice

LeetCode Practice Description This is my LeetCode Practice. Visit LeetCode Website for detailed question description. The code in this repository has

Leo Hsieh 75 Dec 27, 2022
A Python library that simplifies the extraction of datasets from XML content.

xmldataset: simple xml parsing 🗃️ XML Dataset: simple xml parsing Documentation: https://xmldataset.readthedocs.io A Python library that simplifies t

James Spurin 75 Dec 30, 2022
Numpy's Sphinx extensions

numpydoc -- Numpy's Sphinx extensions This package provides the numpydoc Sphinx extension for handling docstrings formatted according to the NumPy doc

NumPy 234 Dec 26, 2022
Zero configuration Airflow plugin that let you manage your DAG files.

simple-dag-editor SimpleDagEditor is a zero configuration plugin for Apache Airflow. It provides a file managing interface that points to your dag_fol

30 Jul 20, 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
Data-Scrapping SEO - the project uses various data scrapping and Google autocompletes API tools to provide relevant points of different keywords so that search engines can be optimized

Data-Scrapping SEO - the project uses various data scrapping and Google autocompletes API tools to provide relevant points of different keywords so that search engines can be optimized; as this infor

Vibhav Kumar Dixit 2 Jul 18, 2022
Near Zero-Overhead Python Code Coverage

Slipcover: Near Zero-Overhead Python Code Coverage by Juan Altmayer Pizzorno and Emery Berger at UMass Amherst's PLASMA lab. About Slipcover Slipcover

PLASMA @ UMass 325 Dec 28, 2022
Uses diff command to compare expected output with student's submission output

AUTOGRADER for GRADESCOPE using diff with partial grading Description: Uses diff command to compare expected output with student's submission output U

2 Jan 11, 2022
🏆 A ranked list of awesome python developer tools and libraries. Updated weekly.

Best-of Python Developer Tools 🏆 A ranked list of awesome python developer tools and libraries. Updated weekly. This curated list contains 250 awesom

Machine Learning Tooling 646 Jan 07, 2023
ACPOA plugin creation helper

ACPOA Plugin What is ACPOA ACPOA is the acronym for "Application Core for Plugin Oriented Applications". It's a tool to create flexible and extendable

Leikt Sol'Reihin 1 Oct 20, 2021