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)
The OpenAPI Specification Repository

The OpenAPI Specification The OpenAPI Specification is a community-driven open specification within the OpenAPI Initiative, a Linux Foundation Collabo

OpenAPI Initiative 25.5k Dec 29, 2022
Python code for working with NFL play by play data.

nfl_data_py nfl_data_py is a Python library for interacting with NFL data sourced from nflfastR, nfldata, dynastyprocess, and Draft Scout. Includes im

82 Jan 05, 2023
A simple tutorial to get you started with Discord and it's Python API

Hello there Feel free to fork and star, open issues if there are typos or you have a doubt. I decided to make this post because as a newbie I never fo

Sachit 1 Nov 01, 2021
Flask-Rebar combines flask, marshmallow, and swagger for robust REST services.

Flask-Rebar Flask-Rebar combines flask, marshmallow, and swagger for robust REST services. Features Request and Response Validation - Flask-Rebar reli

PlanGrid 223 Dec 19, 2022
Run `black` on python code blocks in documentation files

blacken-docs Run black on python code blocks in documentation files. install pip install blacken-docs usage blacken-docs provides a single executable

Anthony Sottile 460 Dec 23, 2022
Visualizacao-dados-dell - Repositório com as atividades desenvolvidas no curso de Visualização de Dados

📚 Descrição Neste curso da Dell trabalhamos com a visualização de dados. 🖥️ Aulas 1.1 - Explorando conjuntos de dados 1.2 - Fundamentos de visualiza

Claudia dos Anjos 1 Dec 28, 2021
Pydantic model generator for easy conversion of JSON, OpenAPI, JSON Schema, and YAML data sources.

datamodel-code-generator This code generator creates pydantic model from an openapi file and others. Help See documentation for more details. Supporte

Koudai Aono 1.3k Dec 29, 2022
Hjson for Python

hjson-py Hjson, a user interface for JSON Hjson works with Python 2.5+ and Python 3.3+ The Python implementation of Hjson is based on simplejson. For

Hjson 185 Dec 13, 2022
YAML metadata extension for Python-Markdown

YAML metadata extension for Python-Markdown This extension adds YAML meta data handling to markdown with all YAML features. As in the original, metada

Nikita Sivakov 14 Dec 30, 2022
Python Deep Dive Course - Accompanying Materials

Python Deep Dive Various Jupyter notebooks and Python sources associated with my Udemy Python 3 Deep Dive course series: Part 1: Mainly functional pro

Fred Baptiste 1.1k Dec 30, 2022
Xanadu Quantum Codebook is an experimental, exercise-based introduction to quantum computing using PennyLane.

Xanadu Quantum Codebook The Xanadu Quantum Codebook is an experimental, exercise-based introduction to quantum computing using PennyLane. This reposit

Xanadu 43 Dec 09, 2022
A collection of online resources to help you on your Tech journey.

Everything Tech Resources & Projects About The Project Coming from an engineering background and looking to up skill yourself on a new field can be di

Mohamed A 396 Dec 31, 2022
A course-planning, course-map rendering and GPA-calculation web service, designed for the SFU (Simon Fraser University) student.

SFU Course Planner What is the overall goal of the project (i.e. what does it do, or what problem is it solving)? As the title suggests, this project

Ash Peng 1 Oct 21, 2021
A python package to avoid writing and maintaining duplicated python docstrings.

docstring-inheritance is a python package to avoid writing and maintaining duplicated python docstrings.

Antoine Dechaume 15 Dec 07, 2022
CoderByte | Practice, Tutorials & Interview Preparation Solutions|

CoderByte | Practice, Tutorials & Interview Preparation Solutions This repository consists of solutions to CoderByte practice, tutorials, and intervie

Eda AYDIN 6 Aug 09, 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
Manage your WordPress installation directly from SublimeText SideBar and Command Palette.

WordpressPluginManager Manage your WordPress installation directly from SublimeText SideBar and Command Palette. Installation Dependencies You will ne

Art-i desenvolvimento 1 Dec 14, 2021
A collection and example code of every topic you need to know about in the basics of Python.

The Python Beginners Guide: Master The Python Basics Tonight This guide is a collection of every topic you need to know about in the basics of Python.

Ahmed Baari 1 Dec 19, 2021
My Sublime Text theme

rsms sublime text theme Install: cd path/to/your/sublime/packages git clone https://github.com/rsms/sublime-theme.git rsms-theme You'll also need the

Rasmus 166 Jan 04, 2023
Exercism exercises in Python.

Exercism exercises in Python.

Exercism 1.3k Jan 04, 2023