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)
Owner
null
Python script to generate Vale linting rules from word usage guidance in the Red Hat Supplementary Style Guide

ssg-vale-rules-gen Python script to generate Vale linting rules from word usage guidance in the Red Hat Supplementary Style Guide. These rules are use

Vale at Red Hat 1 Jan 13, 2022
An open-source script written in python just for fun

Owersite Owersite is an open-source script written in python just for fun. It do

大きなペニスを持つ少年 7 Sep 21, 2022
Mkdocs obsidian publish - Publish your obsidian vault through a python script

Mkdocs Obsidian Mkdocs Obsidian is an association between a python script and a

Mara 49 Jan 9, 2023
Loudchecker - Python script to check files for earrape

loudchecker python script to check files for earrape automatically installs depe

null 1 Jan 22, 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
script to calculate total GPA out of 4, based on input gpa.csv

gpa_calculator script to calculate total GPA out of 4 based on input gpa.csv to use, create a total.csv file containing only one integer showing the t

Mohamad Bastin 1 Feb 7, 2022
Master Duel Card Translator Project

Master Duel Card Translator Project A tool for translating card effects in Yu-Gi-Oh! Master Duel. Quick Start (for Chinese version only) Download the

null 67 Dec 23, 2022
I3-master-layout - Simple master and stack layout script

Simple master and stack layout script | ------ | ----- | | | | | Ma

Tobias S 18 Dec 5, 2022
I decide to sync up this repo and self-critical.pytorch. (The old master is in old master branch for archive)

An Image Captioning codebase This is a codebase for image captioning research. It supports: Self critical training from Self-critical Sequence Trainin

Ruotian(RT) Luo 1.3k Dec 31, 2022
An Undertale RPG Discord bot to fight monsters, bosses, level up and duel with other players

UNDERTALE-RPG An Undertale RPG Discord bot to fight monsters, bosses, level up and duel with other players!. Explanation you can collect gold which is

null 2 Oct 21, 2021
Code for the paper "MASTER: Multi-Aspect Non-local Network for Scene Text Recognition" (Pattern Recognition 2021)

MASTER-PyTorch PyTorch reimplementation of "MASTER: Multi-Aspect Non-local Network for Scene Text Recognition" (Pattern Recognition 2021). This projec

Wenwen Yu 255 Dec 29, 2022
The Doodle Master seeks to turn your UI mockups into real code.

Doodle Master The Doodle Master seeks to turn your UI mockups into real code. Currently this repository just serves to demonstrate a Proof Of Concept

Karanbir Chahal 2.4k Dec 9, 2022
This is an online course where you can learn and master the skill of low-level performance analysis and tuning.

Performance Ninja Class This is an online course where you can learn to find and fix low-level performance issues, for example CPU cache misses and br

Denis Bakhvalov 1.2k Dec 30, 2022
This project is a re-implementation of MASTER: Multi-Aspect Non-local Network for Scene Text Recognition by MMOCR

This project is a re-implementation of MASTER: Multi-Aspect Non-local Network for Scene Text Recognition by MMOCR,which is an open-source toolbox based on PyTorch. The overall architecture will be shown below.

Jianquan Ye 82 Nov 17, 2022
Step by Step Guide To Install Discord Py Master Branch on Replit

Guide to Install Discord Py Master Branch on Replit Step 1 Create an empty repl on replit Step 2 Add this Basic Code to the file main.py so as to chec

Pranav Saxena 7 Nov 18, 2022
Make your master artistic punk avatar through machine learning world famous paintings

Master-art-punk Make your master artistic punk avatar through machine learning world famous paintings. 通过机器学习世界名画制作属于你的大师级艺术朋克头像 Nowadays, NFT is beco

蒋虎成 23 Jan 4, 2022
libsigrok stacked Protocol Decoder for TPM 2.0 transactions from an SPI bus. BitLocker Volume Master Key (VMK) are automatically extracted.

libsigrok stacked Protocol Decoder for TPM 2.0 transactions from an SPI bus. BitLocker Volume Master Key (VMK) are automatically extracted.

Jordan Ovrè 9 Dec 26, 2022
Web-Scraping using Selenium Master

Web-Scraping using Selenium What is the need of Selenium? Some websites don't like to be scrapped and in that case you need to disguise your webscrapi

Md Rashidul Islam 1 Oct 26, 2021
Implementation of the master's thesis "Temporal copying and local hallucination for video inpainting".

Temporal copying and local hallucination for video inpainting This repository contains the implementation of my master's thesis "Temporal copying and

David Álvarez de la Torre 1 Dec 2, 2022