{"id":20703150,"url":"https://github.com/sfttech/nyan","last_synced_at":"2025-05-16T17:04:06.435Z","repository":{"id":41390284,"uuid":"54515270","full_name":"SFTtech/nyan","owner":"SFTtech","description":"Typesafe hierarchical key-value database with inheritance and dynamic patching :smiley_cat:","archived":false,"fork":false,"pushed_at":"2025-05-10T23:38:28.000Z","size":800,"stargazers_count":237,"open_issues_count":43,"forks_count":33,"subscribers_count":23,"default_branch":"master","last_synced_at":"2025-05-11T00:25:45.125Z","etag":null,"topics":["c-plus-plus","cpp","database","mod","mod-api","modding","nyan","openage"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SFTtech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"copying.md","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},"funding":{"liberapay":"SFTtech"}},"created_at":"2016-03-22T23:16:24.000Z","updated_at":"2025-05-10T23:38:32.000Z","dependencies_parsed_at":"2022-09-19T10:03:27.785Z","dependency_job_id":"061878af-61cb-4a27-9fc6-532cbb1885f9","html_url":"https://github.com/SFTtech/nyan","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SFTtech%2Fnyan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SFTtech%2Fnyan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SFTtech%2Fnyan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SFTtech%2Fnyan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SFTtech","download_url":"https://codeload.github.com/SFTtech/nyan/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254573589,"owners_count":22093731,"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":["c-plus-plus","cpp","database","mod","mod-api","modding","nyan","openage"],"created_at":"2024-11-17T01:06:28.261Z","updated_at":"2025-05-16T17:04:06.416Z","avatar_url":"https://github.com/SFTtech.png","language":"C++","readme":"nyan - yet another notation\n===========================\n\n\u003e just make it meta-meta-meta.\n\n**nyan** is a *data description language*,\nIt is a mixture of python, json, patch, wml, yaml and some new ideas.\n\nIt stores hierarchical objects with key-value pairs in a database with the key idea that changes in a parent affect all children.\n\nWe created nyan because there existed no suitable language to\nproperly represent the enormous complexity of storing the data for [openage](https://github.com/SFTtech/openage).\n\nThe main focus is *readability* and *moddability*.\n\n[![github stars](https://img.shields.io/github/stars/SFTtech/nyan.svg)](https://github.com/SFTtech/nyan/stargazers)\n[![#sfttech on matrix.org](/doc/assets/matrix.svg)](https://matrix.to/#/#sfttech:matrix.org)\n\n\nThe foundation of **nyan**:\n\nTechnology             | Component\n-----------------------|----------\n**C++20**              | nyan core\n**Flex**               | Tokenizer generator\n**CMake**              | Build \"system\"\n**Humans**             | Doing it wrong all the time\n\n\nHow?\n----\n\nLet's assume we have a fun λ half-life strategy game.\n\nThe game engine provides some functionality which is exposed by `nyan`.\n\n``` python\n# This is the content and mod API of the Engine:\n\nUnit():\n    hp : int\n    animation : file\n\nBuilding():\n    hp : int\n    creates : set(Unit)\n    model : file\n```\n\nUsing this, the base game pack provides actual game content:\n\n``` python\n# base_game_data.nyan\n\nOverwatchSoldier(Unit):\n    hp = 50\n    animation = \"./assets/soldier.ani\"\n\nStrider(Unit):\n    hp = 2100\n    animation = \"./assets/strider.ani\"\n\nCombineCitadel(Building):\n    hp = 9001\n    creates = {OverwatchSoldier, Strider}\n    model = \"./assets/lambda_hq.mdl\"\n\nCitizen(Unit):\n    hp = 60\n    animation = \"./assets/male09.ani\"\n\n# gordon is a citizen with more hp\nGordon(Citizen):\n    hp += 40\n    animation = \"./assets/gordon.ani\"\n\nRebelHQ(Building):\n    hp = 5000\n    creates = {Citizen, Gordon}\n    model = \"./assets/lambda_hq.mdl\"\n```\n\nNow, let's create a mod that adds the overwatch elite\nand gives the striders even more hp.\n\n``` python\n# elite_strider_mod.nyan\n\n# create a new unit:\nOverwatchElite(Unit):\n    hp = 70\n    animation = \"./assets/coolersoldier.ani\"\n\n# change the strider:\nChangeStrider\u003cStrider\u003e():\n    hp += 1000\n\n# change the citadel to build the elite:\nAddElite\u003cCombineCitadel\u003e():\n    creates += {OverwatchElite}\n\n# create a mod that informs the engine about its patches\nStriderEliteMod(Mod):\n    name = \"Add the elite and make striders stronger\"\n    patches = {AddElite, ChangeStrider}\n```\n\nWhen the engine activates the mod (\"applies the patches\"),\nthe combine citadel can create the new unit and the strider is stronger.\n\n\nThe fun begins if you now create a mod that mods the mod.\nWhich is totally possible with **nyan**.\n\n\nSpecification\n-------------\n\nRead the [specification](doc/nyan_specification.md).\n\n\nCurrent State of the Project\n----------------------------\n\n`nyan` is fully functional and can be used in your project.\nPlease make us aware of your needs/experiences in our chat!\n\nWe try to keep the API stable, but there's still some unknowns and need-to-change features.\n\nPlease submit bugs and feature requests (and patches) on [GitHub](https://github.com/SFTtech/nyan)!\n\n\nDependencies, Building and Running\n----------------------------------\n\nOperating System    | Build status\n--------------------|--------------\nDebian Sid          | [Todo: Kevin #11](https://github.com/SFTtech/kevin/issues/11)\n\n\n - How do I get this to install on my box?\n   - See [doc/building.md](doc/building.md).\n\n - Waaaaaah! It\n   - crashes\n   - spams all kinds of shit on the screen\n   - my girlfriend dumped me because I debugged for nights\n\nAll of those observations are intended, not bugs.\n\nTo get rid of them, recompile with `--dont-segfault --shut-up --new-girlfriend`.\n\nIf this still does not help, try the [contact section](#contact)\nor the [bug tracker](https://github.com/SFTtech/nyan/issues).\n\n\nDevelopment Process\n-------------------\n\nHow does contributing work here?\n - Extensive [syncronization](#contact)!\n - Report [issues](https://github.com/SFTtech/nyan) and send [pull requests](https://help.github.com/articles/using-pull-requests/).\n\n\nThe documentation is also in this repo:\n\n- Code documentation is embedded in the sources for Doxygen (see [doc readme](doc/README.md)).\n- Have a look at the [doc directory](doc/). This folder tends to outdate when code changes.\n\n\nContact\n-------\n\nIf you have the desire to perform semi-human interaction,\njoin our **Matrix** chatroom!\n\n* [`#sfttech:matrix.org`](https://riot.im/app/#/room/#sfttech:matrix.org)\n\nFor ideas, problems, ..., use the [issue tracker](https://github.com/SFTtech/nyan/issues)!\n\nIf it's a problem with the usage of **nyan** in **openage**, [head over there](https://github.com/SFTtech/openage).\n\n\nLicense\n-------\n\n**GNU LGPLv3** or later; see [copying.md](copying.md) and [legal/LGPLv3](/legal/LGPLv3).\n\nWe know that probably nobody is ever gonna look at the `copying.md` file,\nbut if you want to contribute code to nyan, please take the time to\nskim through it and add yourself to the authors list.\n","funding_links":["https://liberapay.com/SFTtech"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsfttech%2Fnyan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsfttech%2Fnyan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsfttech%2Fnyan/lists"}