{"id":16517236,"url":"https://github.com/kokseen1/felinesystem2","last_synced_at":"2025-03-21T08:31:48.378Z","repository":{"id":60340681,"uuid":"534071984","full_name":"kokseen1/FelineSystem2","owner":"kokseen1","description":"An open source remake of the CatSystem2 visual novel engine.","archived":false,"fork":false,"pushed_at":"2023-06-01T13:10:59.000Z","size":445969,"stargazers_count":23,"open_issues_count":17,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-17T23:12:07.506Z","etag":null,"topics":["adventure-game-engine","c","c-plus-plus","catsystem","catsystem2","emscripten","galgame","grisaia","reverse-engineering","sdl2","visual-novel","visual-novel-engine","visual-novel-framework","wasm","webassembly"],"latest_commit_sha":null,"homepage":"https://fruit.toori.tech","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kokseen1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-08T06:01:46.000Z","updated_at":"2025-01-16T07:21:24.000Z","dependencies_parsed_at":"2024-10-28T10:14:41.298Z","dependency_job_id":"0e6e98de-130a-46bc-ae13-46e24b7edca2","html_url":"https://github.com/kokseen1/FelineSystem2","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kokseen1%2FFelineSystem2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kokseen1%2FFelineSystem2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kokseen1%2FFelineSystem2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kokseen1%2FFelineSystem2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kokseen1","download_url":"https://codeload.github.com/kokseen1/FelineSystem2/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244765440,"owners_count":20506814,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adventure-game-engine","c","c-plus-plus","catsystem","catsystem2","emscripten","galgame","grisaia","reverse-engineering","sdl2","visual-novel","visual-novel-engine","visual-novel-framework","wasm","webassembly"],"created_at":"2024-10-11T16:29:32.193Z","updated_at":"2025-03-21T08:31:47.478Z","avatar_url":"https://github.com/kokseen1.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ![icon](https://i.imgur.com/fgr54yA.png) FelineSystem2\n\nAn open source remake of the CatSystem2 visual novel engine.\n\n## Demo\n\nA makeshift demo of the current version can be [found here](https://fruit.toori.tech/).\n\n![screenshot](https://i.imgur.com/den1WpN.png) \n\n## Controls\n\n`Click`/`Scroll` - Advance text \n\n`Ctrl`/`Enter` - Advance text, hold to skip \n\n`SPACE` - Hide message window\n\n`f` - Toggle fullscreen\n\n`1-9` - Select choice\n\n`Shift + Alt` + `1-9` - Quick save to slot `1-9`\n\n`Shift` + `1-9` - Quick load from slot `1-9`\n\n## Features\n\n- Multi-platform (WASM, Windows SDL2)\n- Raw KIF archive decryption\n- HG-3 image decoding and caching\n- Custom-built CatScene recursive-descent parser\n\n## KIF Database Structure\n\nFelineSystem2 implements a custom database of the game's KIF archives and assets, stored as a binary file.\n\n### Archive Table\n\n|       Data Type | Value       | Description                                                                |\n| --------------: | :---------- | :------------------------------------------------------------------------- |\n|     `char[len]` | ArchiveName | NULL-terminated filename of the KIF archive                                |\n|        `uint32` | EntryCount  | Number of entries in archive                                               |\n| `unsigned char` | IsEncrypted | `0x01` if archive is encrypted, `0x00` otherwise                           |\n|       `byte[4]` | FileKey     | Blowfish key for decrypting entries (Only exists if IsEncrypted is `0x01`) |\n|          `0x00` | TableEnd    | Signifies end of table                                                     |\n\n### Archive Item Entry\n\n|   Data Type | Value    | Description                           |\n| ----------: | :------- | :------------------------------------ |\n| `char[len]` | FileName | NULL-terminated deobfuscated filename |\n|    `uint32` | Offset   | The offset to the entry's data        |\n|    `uint32` | Length   | The length of the entry's data        |\n\n## Notes\n\n### Parser\n\n- If statements must contain a whitespace after the closing parenthesis of the condition\n  - `if (#300==0) #(950+#300)=512`\n- Operators follow C-Style left-to-right precedence and associativity\n- Integers and strings are the only data types that exist\n  - `#300=0`\n  - `str 50 bg02`\n- Variable names can only be integers\n- Variable names can be dynamically evaluated\n  - `#(950+#300)=512`\n\n### Script\n\n- `blend` argument specifies the alpha value that the image will be displayed at \n  - `cg 0 blend 255` will display a completely opaque CG while `cg 0 blend 0` will display a completely transparent CG\n- `rdraw` command after an image specifies the duration to fade to the target opacity\n  - `rdraw 30` will take `30` frames to fade the image from alpha `0` to the target alpha (e.g. `255` by default)\n  - Units are likely in frames at `60`fps (`0.0167s/frame`) regardless of the game's refresh rate setting\n  - An `rdraw` command will apply to all images within a script block (from a user input to the next `wait` command)\n- `wait` command without arguments will block until any time-based command completes\n  - `wait` after a `rdraw 30` command will wait for the `30` frames taken to completely fade in the images before proceeding to the next command\n- `wait` with arguments behaves differently from standalone `wait`\n  - `wait 60` will block for `60` frames before proceeding to the next command\n  - `wait 60` will not be aware of any time-based commands like `rdraw` and will not block until `rdraw` completes\n  - `wait` is sometimes used along with `wait 60` consecutively\n- `cg 0 attr 1 (70+0) (80+0)`\n- `cg 0 attr 2 (75+0) (85+0)`\n  - Assigns the `BaseX`, `BaseY` values of the specified image `cg 0` to the variables `#(75+0)` and `#(85+0)` respectively\n\n## Special Thanks\n\n- [Trigger](https://github.com/trigger-segfault) for creating such an [amazingly comprehensive knowledgebase](https://github.com/trigger-segfault/TriggersTools.CatSystem2/wiki) of the CS2 engine\n- [asmodean](http://asmodean.reverse.net/pages/exkifint.html) for being a pioneer in reversing the CS2 engine\n- [Dodder](http://www.doddlercon.com/main/) for [Hacking the Grisaia](http://www.doddlercon.com/main/?p=171) for localization\n- [koestl](https://twitter.com/koestl) for his impeccable translations and contributions to localization\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkokseen1%2Ffelinesystem2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkokseen1%2Ffelinesystem2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkokseen1%2Ffelinesystem2/lists"}