lamadaemon / phigros-save-manager

A Typescript library for parse and modify the save file of game Phigros
17 stars 1 forks source link

Some problems about class definition #2

Closed BlingCc233 closed 6 months ago

BlingCc233 commented 7 months ago

in record.ts ,there's a constructor that records the geme records. i found this is only effective for EZ level , whose 'songName' is ended with .0

  {
      type: 'byte',
      field: 'fcFlag'
  }, 

so i wonder if there's a way to make any level fc.

lamadaemon commented 7 months ago

All songName end with .0. I have totally no idea why they put .0 there. fcFlag should be a "mask value", which means it stores binary data by using bits. Similar to a regular Boolean field. You may set fc status for a difficulty by fcFlag |= 1 << n, which n is the difficulty index.

I should consider add more high level APIs to this library.

BlingCc233 commented 7 months ago

In other words, I am modifying the allphi method to implement an allfc method. The score is a random number greater than 980,000, and the acc is calculated through the score. But I found that if you do this, only ez difficulty will succeed.

lamadaemon commented 7 months ago

Have you tried to set fcFlag to 0xFF?

BlingCc233 commented 7 months ago

All songName end with .0. I have totally no idea why they put .0 there. fcFlag should be a "mask value", which means it stores binary data by using bits. Similar to a regular Boolean field. You may set fc status for a difficulty by fcFlag |= 1 << n, which n is the difficulty index.

I should consider add more high level APIs to this library.

Thank you for your answer. When I understand all this code, I will make a pull request to realize the custom function. Meanwhile,I'm looking for other github repos that implement api parsing to improve the customization function. Anyway, thank you

BlingCc233 commented 7 months ago

Have you tried to set fcFlag to 0xFF?

I'll try again tomorrow. Now I need to rest.

BlingCc233 commented 7 months ago

Thank you for your answer. When I understand all this code, I will make a pull request to realize the custom function. Meanwhile,I'm looking for other github repos that implement api parsing to improve the customization function. Anyway, thank you

I found a repo that might be useful, but I haven't started to study it yet. Let's have a look tomorrow.phi

BlingCc233 commented 7 months ago

Have you tried to set fcFlag to 0xFF?

ive tried, Now the problem goes back to last issue caused by the new version.

lamadaemon commented 7 months ago

After #1 getting resolved, this issue should be fixed. Next version of psm will be out soon