vivaria / tja2fumen

Mod tool to convert TJA chart files (.tja) into .bin files compatible with official games
https://pypi.org/project/tja2fumen/
MIT License
13 stars 1 forks source link

Investigate simpler method for computing HP/soul gauge bytes #48

Closed vivaria closed 1 year ago

vivaria commented 1 year ago

In https://github.com/vivaria/tja2fumen/issues/14, I painstakingly graphed 1800+ fumens and created lookup tables using interpolation between known values.

This is an accurate method, but it's also a little inelegant to use, since I need to package up the .csv files and parse them at runtime.

In the document I received on Discord, it contained a little writeup about alternate ways to compute these values:

HP calculation:
良:
Find out when the gauge is maxed out and divide 10000 by the combo amount at which the gauge hits max. Round up the value.
可: (these give very close to official values)
_e = 0.75(良)
_n = 0.75(良) 
_h = 0.75(良)
_m = 0.5(良) -> rounded up
ex = 0.5(良) -> rounded down
不可: (these give not-so-close to original values except for _e, _n and ex_)
_e = -(良/2)
_n = -(良)
_h = -(1.25x良)
_m = -(2良)
ex = -(2良)
Round up before changing the sign.

I'm curious about just how accurate these methods are (vs. my LUT method). In my method, I found that not just the difficulty, but also the n_stars has a big impact on which curves are used.

vivaria commented 1 year ago

Alternatively, I could just work to simplify the storage and parsing. :shrug: