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)
k3heap is a binary min heap implemented with reference

k3heap k3heap is a binary min heap implemented with reference k3heap is a component of pykit3 project: a python3 toolkit set. In this module RefHeap i

pykit3 1 Nov 13, 2021
SCTYMN is a GitHub repository that includes some simple scripts(currently only python scripts) that can be useful.

Simple Codes That You Might Need SCTYMN is a GitHub repository that includes some simple scripts(currently only python scripts) that can be useful. In

CodeWriter21 2 Jan 21, 2022
30 days of Python programming challenge is a step-by-step guide to learn the Python programming language in 30 days

30 days of Python programming challenge is a step-by-step guide to learn the Python programming language in 30 days. This challenge may take more than100 days, follow your own pace.

Asabeneh 17.7k Jan 07, 2023
The sarge package provides a wrapper for subprocess which provides command pipeline functionality.

Overview The sarge package provides a wrapper for subprocess which provides command pipeline functionality. This package leverages subprocess to provi

Vinay Sajip 14 Dec 18, 2022
Fastest Git client for Emacs.

EAF Git Client EAF Git is git client application for the Emacs Application Framework. The advantages of EAF Git are: Large log browse: support 1 milli

Emacs Application Framework 31 Dec 02, 2022
Automated Integration Testing and Live Documentation for your API

Automated Integration Testing and Live Documentation for your API

ScanAPI 1.3k Dec 30, 2022
🌱 Complete API wrapper of Seedr.cc

Python API Wrapper of Seedr.cc Table of Contents Installation How I got the API endpoints? Start Guide Getting Token Logging with Username and Passwor

Hemanta Pokharel 43 Dec 26, 2022
Que es S4K Builder?, Fácil un constructor de tokens grabbers con muchas opciones, como BTC Miner, Clipper, shutdown PC, Y más! Disfrute el proyecto. <3

S4K Builder Este script Python 3 de código abierto es un constructor del muy popular registrador de tokens que está en [mi GitHub] (https://github.com

SadicX 1 Oct 22, 2021
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
Types that make coding in Python quick and safe.

Type[T] Types that make coding in Python quick and safe. Type[T] works best with Python 3.6 or later. Prior to 3.6, object types must use comment type

Contains 17 Aug 01, 2022
The project that powers MDN.

Kuma Kuma is the platform that powers MDN (developer.mozilla.org) Development Code: https://github.com/mdn/kuma Issues: P1 Bugs (to be fixed ASAP) P2

MDN Web Docs 1.9k Dec 26, 2022
DeltaPy - Tabular Data Augmentation (by @firmai)

DeltaPy⁠⁠ — Tabular Data Augmentation & Feature Engineering Finance Quant Machine Learning ML-Quant.com - Automated Research Repository Introduction T

Derek Snow 470 Dec 28, 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
🧙 A simple, typed and monad-based Result type for Python.

meiga 🧙 A simple, typed and monad-based Result type for Python. Table of Contents Installation 💻 Getting Started 📈 Example Features Result Function

Alice Biometrics 31 Jan 08, 2023
EasyModerationKit is an open-source framework designed to moderate and filter inappropriate content.

EasyModerationKit is a public transparency statement. It declares any repositories and legalities used in the EasyModeration system. It allows for implementing EasyModeration into an advanced charact

Aarav 1 Jan 16, 2022
Python document object mapper (load python object from JSON and vice-versa)

lupin is a Python JSON object mapper lupin is meant to help in serializing python objects to JSON and unserializing JSON data to python objects. Insta

Aurélien Amilin 24 Nov 09, 2022
An awesome Data Science repository to learn and apply for real world problems.

AWESOME DATA SCIENCE An open source Data Science repository to learn and apply towards solving real world problems. This is a shortcut path to start s

Academic.io 20.3k Jan 09, 2023
Simple yet powerful CAD (Computer Aided Design) library, written with Python.

Py-MADCAD it's time to throw parametric softwares out ! Simple yet powerful CAD (Computer Aided Design) library, written with Python. Installation

jimy byerley 124 Jan 06, 2023
Data science Python notebooks: Deep learning (TensorFlow, Theano, Caffe, Keras), scikit-learn, Kaggle, big data (Spark, Hadoop MapReduce, HDFS), matplotlib, pandas, NumPy, SciPy, Python essentials, AWS, and various command lines.

Data science Python notebooks: Deep learning (TensorFlow, Theano, Caffe, Keras), scikit-learn, Kaggle, big data (Spark, Hadoop MapReduce, HDFS), matplotlib, pandas, NumPy, SciPy, Python essentials, A

Donne Martin 24.5k Jan 09, 2023
A comprehensive and FREE Online Python Development tutorial going step-by-step into the world of Python.

FREE Reverse Engineering Self-Study Course HERE Fundamental Python The book and code repo for the FREE Fundamental Python book by Kevin Thomas. FREE B

Kevin Thomas 7 Mar 19, 2022