07th-mod / 07th-mod/python-patcher

First-Install detection and global.dat replacement

Đang mở
#242 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
enhancement
Ngôn ngữ chính
JavaScript
Star
214
Fork
12
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

> I wonder if we should try one suggestion I gave a long time ago, that was supplying our own configuration file during installation. Might be useful at least for the console arcs

### For windows

- when any higurashi game is installed, check the %appdata%\Mangagamer\higurashi04 folder (where the last part changes for each game)
- if there exists a `global.dat.backup` file, then this is a re-install/upgrade. Take no action
- if there is no `global.dat.backup` file, rename the old `global.dat` to `global.dat.backup` and copy in the desired `global.dat`

### For DRM Free mac:

same as above, but use path:

DRM Free Mac version saves to `~/Library/Application Support/unity.MangaGamer.Higurashi When They Cry - Ch.4 Himatsubushi/` but I'd feel better about reading the `CFBundleIdentifier` from the `Info.plist` to get that last directory's name. You can use `defaults read CFBundleIdentifier` to get this.

### For DRM Free Linux:

same as above, but use path:

DRM Free Linux version saves to `~/.config/unity3d/MangaGamer/` though I don't remember the exact capitalization used for the full game name

### For steam linux/mac:

For steam, I would guess Linux will be the same (it's based off a file in the game assets) but for the Mac one, since it sounds like they name the main application bundle differently, the may have changed the bundle identifier too. If someone with the mac steam version could upload the Info.plist files from some of their games (located at `gamename.app/Contents/Info.plist`) that would be helpful.

#### Actual code used in the game to access save files

https://github.com/07th-mod/higurashi-assembly/blob/tsumi-mg/Assets.Scripts.Core/MGHelper.cs#L181 idealpersona - "I think the Application class is Unity, so you may have to replace those references with new code according to their docs"

----

I'm writing this up for when/if we make a cross-platform python script. For now will jsut be implemented by modifying our existing windows only batch files.

NOTE to any other developers: feel free to edit this comment if some of the information is wrong.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Issue này mô tả một tập lệnh Python đa nền tảng để phát hiện lần cài đặt trò chơi đầu tiên và thay thế các tệp global.dat. Hãy bắt đầu bằng cách kiểm tra các tệp batch Windows hiện có trong kho lưu trữ để hiểu logic hiện tại. Xem lại tệp MGHelper.cs được liên kết để xem Unity truy cập các đường dẫn lưu như thế nào. Đối với mỗi nền tảng (Windows, Mac không DRM, Linux không DRM, Steam), hãy triển khai logic phát hiện đường dẫn và sao lưu/sao chép tệp như đã chỉ định. Việc kiểm tra sẽ yêu cầu mô phỏng các trạng thái cài đặt khác nhau.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
python, shell
Lĩnh vực
cli, tooling
Loại issue
Tính năng
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
45/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.