{"id":18258541,"url":"https://github.com/eiz/libbg3","last_synced_at":"2025-07-04T02:34:06.772Z","repository":{"id":236230013,"uuid":"788681045","full_name":"eiz/libbg3","owner":"eiz","description":"single header baldur's gate 3 utils","archived":false,"fork":false,"pushed_at":"2024-05-30T23:54:04.000Z","size":905,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-09T15:46:16.372Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eiz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING.examples","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":"2024-04-18T22:03:20.000Z","updated_at":"2024-05-30T23:54:07.000Z","dependencies_parsed_at":"2024-05-03T09:35:58.627Z","dependency_job_id":"290a609e-3386-44fa-8d84-26db52a3c4be","html_url":"https://github.com/eiz/libbg3","commit_stats":null,"previous_names":["eiz/libbg3"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/eiz/libbg3","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eiz%2Flibbg3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eiz%2Flibbg3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eiz%2Flibbg3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eiz%2Flibbg3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eiz","download_url":"https://codeload.github.com/eiz/libbg3/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eiz%2Flibbg3/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263434281,"owners_count":23465930,"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":[],"created_at":"2024-11-05T10:32:26.172Z","updated_at":"2025-07-04T02:34:06.733Z","avatar_url":"https://github.com/eiz.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"A simple single header C library to do IO on some Baldur's Gate 3 file formats.\nIf you don't know why you'd use this library specifically, refer to LSLib\ninstead. I'm mainly posting this to document the aigrid/patch formats and show\nhow Granny models can be decompressed without a binary blob.\n\nSupported formats:\n\n- Osiris story databases (roundtrip capable). Can decompile to a text format\n  that is buildable, but not by the engine as this implementation uses its own\n  S-expression syntax. Allows for cross platform Osiris scripting without script\n  extender and full modding of the game script.\n- .pak (zstd compression not supported currently)\n- .lsf (only \"modern\" format versions)\n- .loca (ditto)\n- aigrid.data (only version 21, the latest as of patch 6)\n- .patch (does not support writing compressed normal maps)\n- .gr2 (read only, see https://github.com/eiz/pybg3 for compression support)\n\nSupport for the text based formats is generally out of scope for this library.\n\nOther curiosities:\n\nThere's a multi-threaded string index builder, but most of the code that uses it\nisn't released here yet. This will likely join many other things in moving\noutside of this library soon.\n\n# Requirements\n\n- Currently only tested with clang/mac. MSVC/gcc + win32/linux soon\n- lz4 and miniz libraries are required for compression. compatible versions are\n  included here.\n\n# Usage\n\nJust copy `libbg3.h` into your project. You'll also need to add the LZ4 and\nminiz dependencies from somewhere if they're not already in your project:\ncompatible versions are included in `third_party`. In one C or C++ file, define\n`#define LIBBG3_IMPLEMENTATION` prior to including the header. Note that\ncurrently some unprefixed symbols leak into the TU that defines the\nimplementation.\n\nSeveral example programs are available in the examples/ directory. You can build\nthem as follows:\n\n```\ngit submodule update --init\nmkdir build \u0026\u0026 cd build\ncmake ..\nmake\n```\n\n# BUGS\n\n- There is a very rarely used Osiris feature, \"always enabled\" rules that don't\n  belong to a goal, which is used for 4 rules related to the shadow curse. These\n  currently don't roundtrip properly and are lost when recompiling the story\n- This code is what game devs call \"not fuzz safe\" 🤣\n- A lot of the code is just bad and/or not done\n\n# License\n\n`libbg3.h` is released under the MIT license. Programs in the examples directory\nare released under the GPLv3 or later.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feiz%2Flibbg3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feiz%2Flibbg3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feiz%2Flibbg3/lists"}