decode Touhou Shooting Game's replay files and get the infomation in it
Project description
一、介绍
threp用于解析东方project系列游戏的replay文件,即游戏回放文件,可以获取replay文件的通关情况,机师,难度,通关情况,机体,处理落,日期,屏幕移动,按键记录。 支持TH6、7、10-16整数作以及TH12.5、TH12.8、TH14.3(即除TH8、9以及9.5之外,其他非黑历史的东方STG全部支持)。
二、安装方法
在 Python 3.5+ 下使用,用 pip 安装:
pip install threp
三、使用方法
from threp import THReplay
# 载入一个replay文件,参数为路径 tr=THReplay(‘th14_03.rpy’)
# 获取rep基本信息,包含机体,难度,通关情况,字符串 # etc. Reimu A normal all print(tr.getBaseInfo())
# 获取rep每个stage的分数,list,包含一串整数 # etc. [13434600, 50759200, 103025260, 152519820, 230440680, 326777480] print(tr.getStageScore())
# 获取rep的屏幕移动,list,包含一些字符串 # etc. # 其中一个字符串:[0 ]→→→→→→→→→→→→→→→→↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↖↖↖↖↖↖↖↖↖↑↑○○○○○○○○○○○○○○○○○○ # 开头括号里的数字表示这是在该stage的第几帧,箭头表示方向,圆圈表示不动 print(tr.getScreenAction())
# 获取rep的按键记录,list,包含一些子list,每个子list包含60个字符串,代表一秒 # etc. # 其中一个子list:[’→’, ‘→’, ‘→’, ‘→’, ‘→’, ‘→’, ‘→’, ‘→’, ‘→’, ‘→’, ‘→’, ‘→’, ‘→’, ‘→’, ‘→’, ‘→’, ‘↑’, ‘↑’, ‘↑’, ‘↑’, ‘↑’, ‘↑’, ‘↑’, ‘↑’, ‘↑’, ‘↑’, ‘↑’, ‘↑’, ‘↑’, ‘↑’, ‘↑’, ‘↑←’, ‘↑←’, ‘↑←’, ‘↑←’, ‘↑←’, ‘↑←’, ‘↑←’, ‘↑←’, ‘↑←’, ‘↑’, ‘↑’, ‘○’, ‘○’, ‘○’, ‘○’, ‘○’, ‘○’, ‘○’, ‘○’, ‘○’, ‘○’, ‘○’, ‘○’, ‘○’, ‘○’, ‘○’, ‘○’, ‘○’, ‘○’] # 每个字符串记录了这帧按下的方向键,箭头表示方向,圆圈表示没按 print(tr.getKeyboardAction())
# 获取rep的机签,字符串 # etc. WASUP print(tr.getPlayer())
# 获取rep的处理落,浮点数 # etc. 0.03 print(tr.getSlowRate())
# 获取rep的时间,字符串 # etc. 2015/02/17 22:23 print(tr.getDate())
#载入一个新的replay文件,参数为路径 tr.reload_replay(“th15_02.rpy”)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file threp-0.2.0.tar.gz.
File metadata
- Download URL: threp-0.2.0.tar.gz
- Upload date:
- Size: 11.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da047f52357886b42a74a929c2630c1661d257d34ded2a23870df667859d4e7d
|
|
| MD5 |
2e83a4bb20ec924c67b2a08514f01661
|
|
| BLAKE2b-256 |
cd11e069e4304a571571eade35476307ee3fb6814b36e5f7fba7c58ea85430f3
|
File details
Details for the file threp-0.2.0-py3-none-any.whl.
File metadata
- Download URL: threp-0.2.0-py3-none-any.whl
- Upload date:
- Size: 13.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc460d89d6c6c6915e3f68a2496f0bc20fd0cb08e33401d12420cc0138467e75
|
|
| MD5 |
aeba2b013e3ca5da2abcb8243282d0b8
|
|
| BLAKE2b-256 |
05b784b2b131c1f0211563a74b429e7824982bda782eede346b8626fc81a7541
|