Coder Social home page Coder Social logo

saccharomyces-cerevisiae's Introduction

Saccharomyces-cerevisiae

An OpenCV & PIL(Pillow) based sdvx@asphyxia score checker

Introduction

Simple python application to generate game record images to help you analyze your ability.

You can download a built version directly. Also, it can run independently as python code in your IDE.

Special thanks to Achernar (with an unknown GitHub account XD). Amazing jobs were done by her, which helps me a lot in designing gen6.plot_summary.

Features

1. System scale

  1. Replaceable skins
    Skin can be simply replaced through the config.cfg. Considering that designing and coding a new skin is such a backbreaking task, there is only one default skin by now.

  2. One file solution
    It can do all the things with only one file initially. Thanks to ifstools which can draw images from HDD game data.

  3. Automatic upgrade (be in line with game version)
    Once you received your newest and hottest game, it will check the "ext" number in ea3-config and upgrade its database.

  4. Multi-language support Support EN (English), ZH (Simplified Chinese) for users around the world.

2. Score checker function

  1. Best 50 Songs
    Generate a list that lists your best 50 scores, sorted in VOLFORCE. Also, it shows elements related to VF——score, clear mark, and grade mark. This is the very fundamental function of this score checker. It was partially inspired by some ARCAEA score checker. Meanwhile, it was the initial impetus for me to start this project.

  2. User summary
    Generate an analytical summary. For each level you have chosen, It will generate pie graphs in both clear mark field and grade mark field. It will also plot a histogram to show the distribution of the score towards a specific level. In the end, a VF-Score joint graph and a score violin graph will be generated. They are comprehensive tools to help you analyze your ability.

  3. Recent play record
    Generate the music record you have just played. It follows exactly the official style, making it resemble an in-game screenshot.

  4. Specific song record
    Generate the chosen child. You can use this function with the help of "[8] Search mid".

  5. Score list
    Choose a level and the limits of the scores. The function will generate a list that contains the songs at this level and amid the limits. This was inspired by an IMPERIAL who needs to check her 19 S accomplishment.

3. Universal function

  1. Search mid
    Enter anything related to the song, like the name, the author, or the memes. Besides, I raised a project to collect those SDVX song memes to contribute to this function. You can join it if you have some memes to share.

    The search result also shows the level, release date, and Yomigana name at one time. This will help you to pin a song quickly when someone orders a specific song.

  2. FAQ
    Well, it might be unqualified as a usable function.

How to use

Before using

  • The software will try to extract skin ingredients from game files during the initialization. Thus, a Gen 6 game (Exceed Gear) is requisite.

  • Make sure there are no non-ASCII characters in your filepath.

  • There are 2 ways to update the software's database (a few .npy tables). If you set the "config.cfg -> Init -> is initialized" to "0" or "False", the software will update both image archive and database, and it takes a lot of time to update images. If you set the "config.cfg -> Init -> version" to a smaller number, the software will only update the database.

  • Considering that the structure of .npy may change through software updates, you should give the software a soft update (through edit version number in config.cfg) each time you have downloaded the latest build. Otherwise, the software may not work as expected.

I only use the built version

  1. Run the bare .exe, it will generate a config.cfg and shut itself down.

  2. Fill up the config.cfg under the instruction, examples are given there.

  3. Run the software again, it will initialize some data and an image archive automatically from your HDD game.

  4. Enter the number that corresponds to the function you want. It has no interactive interface, thus you should input your operating number and press enter.

I want it run on my IDE

  1. Using pip install -r requirement.txt to build a corresponding environment.

  2. Set the "test_mode" to "1" in cfg_read, otherwise the software won't be able to find the correct path.

Behind the code

Finally, a makeshift (using base64 encoding to convert common byte files into UTF-8 coded python variable) was found to pack all ingredients into one .exe file. Unfortunately, the .exe build become ungodly big. Nonetheless, this helps the software avoid the issue "BEMANI will sue".

I use matplotlib and seaborn to generate graphs, which make the summary more like an academic report than a game profile. Fortunately, I can soon use them in my diploma paper. XD

用英语写README感觉自己像个文盲

不用UTF-8都得下地狱

saccharomyces-cerevisiae's People

Contributors

nyanm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

saccharomyces-cerevisiae's Issues

Bugs in plot function

Error Reported by Pre-built exe version 1.22:

libpng warning: iCCP: known incorrect sRGB profile
[WARNING] Something wrong happens in the plot function, only will the text message be returned.
Traceback (most recent call last):
File "genre\gen6\main.py", line 408, in plot_b50
File "genre\gen6\tools.py", line 291, in generate_std_profile
cv2.error: OpenCV(4.5.3) C:\Users\runneradmin\AppData\Local\Temp\pip-req-build-c2l3r8zm\opencv\modules\imgproc\src\resize.cpp:4051: error: (-215:Assertion failed) !ssize.empty() in function 'cv::resize'

donno think this is my fault lo
btw 世宇什么时候更新啊不会真摆了吧不会吧不会吧

invalid literal for int() with base 10: '' 错误

当我尝试生成best 50的时候会遇到这个错误

2022/09/04 10:40:35 [DEBUG] app.py(276) - Get user operator 1
2022/09/04 10:40:35 [ERROR] app.py(291) - Fatal error occurs, please report the following message to developer.
Traceback (most recent call last):
  File "app.py", line 289, in <module>
  File "app.py", line 278, in input_handler
  File "app.py", line 49, in _1_get_b50
  File "app.py", line 32, in _get_b50
  File "genre\gen6\main.py", line 365, in plot_b50
  File "genre\gen6\tools.py", line 118, in get_diff
ValueError: invalid literal for int() with base 10: ''

莫名 diff_table[int(inf_ver) - 2][m_type] 这里的inf_ver是一个空字符。
有人遇到过这个问题嘛!谢谢大佬们了!

version:2023120500 IndexError: list index out of range

[INFO] FileHandler.encoding = utf-8
[INFO] TEST_MODE on
[INFO] config.cfg load complete.
map size :2000
card num :A59A6D749842E3B8
db dir :C:/ArcadeHDD/Network/SDVX/savedata/[email protected]
game dir :C:/ArcadeHDD/SDVX/EXCEEDGEAR/contents/data
output :C:/ArcadeHDD/SDVX
skin name :gen6
language :ZH
is init :True
version :2023120500
[INFO] Load aka_db, level_table, search_db from ./data
Traceback (most recent call last):
File "app.py", line 14, in
from genre import packet
File "C:\ArcadeHDD\SDVX\TOOLS\Saccharomyces-cerevisiae-mod\genre_init_.py", line 1, in
from genre import gen5, gen6
File "C:\ArcadeHDD\SDVX\TOOLS\Saccharomyces-cerevisiae-mod\genre\gen6_init_.py", line 1, in
from genre.gen6 import main
File "C:\ArcadeHDD\SDVX\TOOLS\Saccharomyces-cerevisiae-mod\genre\gen6\main.py", line 12, in
from parse import npdb
File "C:\ArcadeHDD\SDVX\TOOLS\Saccharomyces-cerevisiae-mod\parse_init_.py", line 2, in
from .asp import asp
File "C:\ArcadeHDD\SDVX\TOOLS\Saccharomyces-cerevisiae-mod\parse\asp.py", line 157, in
asp = ASPParser(db_dir=cfg.db_dir, map_size=cfg.map_size, card_num=cfg.card_num)
File "C:\ArcadeHDD\SDVX\TOOLS\Saccharomyces-cerevisiae-mod\parse\asp.py", line 67, in init
self.music_map[cur_index][0] = True
IndexError: list index out of range

XCD Diff Not Supported

When querying songs by score ranges, if an XCD chart is included then the plot function will crash with index_out_of_bound.
其实应该抓个XCD的图然后改一下main.py的649行就好了,但我太懒了直接强行
level_box = level_list[m_type + min(int(inf_ver), len(level_list)-m_type-1)] lolll
这样会把XCD强行显示成VVD,不过好歹可以plot。
有空的话可以考虑加上一下。非常感谢这个小工具,特别酷!
error

运行错误

More information at https://github.com/Nyanm/Saccharomyces-cerevisiae
[INFO] FileHandler.encoding = utf-8
[INFO] TEST_MODE on
[INFO] config.cfg load complete.
map size  :2000
card num  :E0044E2BDCA0A557
db dir    :D:/Games/asphyxia-core-win-x64/savedata/[email protected]
game dir  :D:/Games/SDVX IV/SDVX IV/data
output    :D:/Games/score
skin name :gen6
language  :ZH
is init   :False
version   :2019020600
Traceback (most recent call last):
  File "d:\Games\score\Saccharomyces-cerevisiae\app.py", line 9, in <module>
    from utli.cfg_read import cfg
  File "d:\Games\score\Saccharomyces-cerevisiae\utli\cfg_read.py", line 124, in <module>
    cfg = Config()
  File "d:\Games\score\Saccharomyces-cerevisiae\utli\cfg_read.py", line 42, in __init__
    tree = parse(ea3_path)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\xml\etree\ElementTree.py", line 1224, in parse
    tree.parse(source, parser)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\xml\etree\ElementTree.py", line 580, in parse
    self._root = parser._parse_whole(source)
ValueError: multi-byte encodings are not supported
[Search]
map size = 2000
card num = E0044E2BDCA0A557


[Directory]
db path = D:\Games\asphyxia-core-win-x64\savedata\[email protected]

game path = D:\Games\SDVX IV\SDVX IV\data

output path = D:\Games\score


[Plot]
skin name = gen6
language = ZH


[Init]
is initialized = False

version = 2019020600

根据bing的搜索结果貌似是xml解析的问题

appeal card 读取错误,无法生成plot

libpng warning: iCCP: known incorrect sRGB profile
[WARNING] Something wrong happens in the plot function, only will the text message be returned.
Traceback (most recent call last):
  File "genre\gen6\main.py", line 410, in plot_b50
    std_profile = generate_std_profile(profile, vol_force)
  File "genre\gen6\tools.py", line 294, in generate_std_profile
cv2.error: OpenCV(4.5.3) C:\Users\runneradmin\AppData\Local\Temp\pip-req-build-sn_xpupm\opencv\modules\imgproc\src\resize.cpp:4051: error: (-215:Assertion failed) !ssize.empty() in function 'cv::resize'

查了一下应该是tools.py的问题,我头像ID是0607,也就是ap_03_R0107
但是tools.py里get_ap_card只有第二位是5的时候才会加R

不PR了 因为好像没有人看
交PR了

Vol force calculation needs to be modified

游戏里单曲vf是目前1.2.3版本生成的单曲vf*2再截取到小数点后一位,总vf是前50vf加起来除以100
我尝试修改了计算vf的代码使其能够生成正确的vf数值,不知道能否给作者的项目pull request

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.