{"id":20616564,"url":"https://github.com/infernio/mlib","last_synced_at":"2026-03-14T03:02:20.138Z","repository":{"id":174149378,"uuid":"163346055","full_name":"Infernio/MLib","owner":"Infernio","description":"A library meant to make development of SkyUI MCMs easier and more structured","archived":false,"fork":false,"pushed_at":"2021-05-06T08:29:08.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-17T04:32:37.118Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Papyrus","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/Infernio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2018-12-27T23:58:13.000Z","updated_at":"2021-05-06T08:29:11.000Z","dependencies_parsed_at":"2023-08-22T13:51:38.022Z","dependency_job_id":null,"html_url":"https://github.com/Infernio/MLib","commit_stats":null,"previous_names":["infernio/mlib"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Infernio%2FMLib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Infernio%2FMLib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Infernio%2FMLib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Infernio%2FMLib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Infernio","download_url":"https://codeload.github.com/Infernio/MLib/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242269330,"owners_count":20100076,"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-16T11:19:34.596Z","updated_at":"2025-12-16T02:03:55.786Z","avatar_url":"https://github.com/Infernio.png","language":"Papyrus","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Warning\nMLib is unfinished. If I recall correctly, it was working quite well, but still had a few major bugs.\nFeel free to use it, but those bugs will definitely need fixing before it can truly be useful.\n\n# MLib\nMLib is a library for Skyrim that helps with developing MCM menus by making their development more structured.\nIn particular, it allows splitting MCMs into multiple files (one per page), simplifies the tooltip mechanic and also offers some utility methods for common tasks.\n\nFor an example of a mod that uses it, see [Anofeyn](https://github.com/Infernio/Anofeyn/tree/master/scripts/source) (the `_AF_MCM_*` scripts, in particular).\n\n## Requirements\n - Skyrim Special Edition (Legendary should work, but is not tested)\n - [SkyUI](https://www.nexusmods.com/skyrimspecialedition/mods/12604)\n - [SkyUI SDK](https://github.com/schlangster/skyui/wiki#skyui-sdk)\n\n## Usage\n### Adding it to a project\nIf you're using git, add MLib as a submodule:\n\n```sh\ngit submodule add https://github.com/Infernio/MLib\n```\n\nIn your build script (for an example build script, see [Anofeyn's](https://github.com/Infernio/Anofeyn/blob/master/build.sh) or [Campfire's](https://github.com/chesko256/Campfire/blob/master/Campfire_BuildRelease.py)), you should then copy the sources from `MLib/scripts` to the temporary build folder.\n\nFeel free to redistribute the script files - it's unlikely that MLib will ever need major updates.\nBut, if you want to be 100% sure, you can add `MLib.esp` as a master and rely on it to provide the scripts.\n\n### Creating a new MCM with MLib\nTo create an MCM with this library, first create a quest with a player reference alias and attach SKI_PlayerLoadGameAlias, as you normally would.\n\nThen, open the Scripts tab and add an instance of the `MLib_Config` script.\nEdit this script's properties:\n  - `ModName`: The title of your mod's MCM. Same as standard SkyUI.\n  - `Pages`: Leave this alone. It comes from SkyUI, but will now be filled by MLib automatically.\n  - `PageScripts`: This is where you'll add your pages. We'll come back to this one in a minute.\n  - `Version`: The current version of your mod's MCM. You can increase this whenever important changes occur to the mod / MCM and take advantage of MLib's `OnVersionUpdate` events (more on that later).\n\nHead back to the Quest Aliases tab and add new player reference aliases, one for each page you want the MCM to have.\n\nNow it's time to create scripts for the actual pages.\nMake a new script for each page you want the MCM to have.\nEach of those scripts must extend the `MLib_Page` script, giving you something like this:\n\n```papyrus\nScriptName _MyMod_PageGeneral Extends MLib_Page\n\nString Function GetTitle()\n    return \"$MyModPageGeneral\"\nEndFunction\n```\n\n*Note: The title obviously does not have to be localized.*\n\nAfter all those scripts have been created, turn your attention back to the player reference aliases you created earlier.\nAttach the appropriate script to each of those aliases.\n\nFinally, head back to the Scripts tab on your quest and edit the properties of the `MLib_Config` script again.\nAdd all the aliases we just created to the `PageScripts` property.\n\nAnd that's it! You can now head down to the **[Adding content to the pages](#adding-content-to-the-pages)** section to see documentation on how to add options to the pages.\n\n### Changing an existing MCM to use MLib\nFollow the steps outlined above - but instead of creating a new quest, just reuse your existing MCM quest by removing the existing MCM script and attaching the `MLib_Config` script.\n\nYou can then, for the most part, just copy-paste parts of your MCM script into the page scripts. Have a look at the **[Adding content to the pages](#adding-content-to-the-pages)** section for more information on the page scripts and how they differ from a full MCM script.\n\n## Building a release\n_Note: This section details how to create an MLib release for the Nexus.\nThere is no need to do this if you just want to use MLib for a project - follow the instructions in the **[Adding it to a project](#adding-it-to-a-project)** section instead._\n - Install all requirements listed above.\n - In `build.sh`, change the variable `SKYRIM_PATH` to point to your Skyrim installation.\n   - *Note: You may need to make further changes to variables here if you use a non-standard Skyrim installation.*\n - Also in `build.sh`, change the variable `VERSION` to the version you want to build.\n - Run `./build.sh`. You will need a bash interpreter for this, I recommend [Git Bash](https://git-scm.com/downloads).\n\n*Note: If you want to use [Atom](https://atom.io) for development, you will have to edit `.build-papyrus.yml` to match your setup.*\n\n\n## License\nMLib is licensed under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finfernio%2Fmlib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finfernio%2Fmlib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finfernio%2Fmlib/lists"}