{"id":28347562,"url":"https://github.com/garrigueta/hellolua-commonlibsse-ng","last_synced_at":"2026-05-18T09:01:43.584Z","repository":{"id":292399735,"uuid":"980785259","full_name":"garrigueta/HelloLua-CommonLibSSE-NG","owner":"garrigueta","description":null,"archived":false,"fork":false,"pushed_at":"2025-05-15T23:08:59.000Z","size":43353,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-21T00:59:46.339Z","etag":null,"topics":["commonlibsse-ng","lua","mod","modding-tool","skse64","skyrim"],"latest_commit_sha":null,"homepage":"","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/garrigueta.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,"zenodo":null}},"created_at":"2025-05-09T17:57:31.000Z","updated_at":"2025-05-09T23:32:33.000Z","dependencies_parsed_at":"2025-05-09T19:35:24.093Z","dependency_job_id":null,"html_url":"https://github.com/garrigueta/HelloLua-CommonLibSSE-NG","commit_stats":null,"previous_names":["garrigueta/hellolua-commonlibsse-ng"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/garrigueta/HelloLua-CommonLibSSE-NG","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garrigueta%2FHelloLua-CommonLibSSE-NG","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garrigueta%2FHelloLua-CommonLibSSE-NG/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garrigueta%2FHelloLua-CommonLibSSE-NG/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garrigueta%2FHelloLua-CommonLibSSE-NG/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/garrigueta","download_url":"https://codeload.github.com/garrigueta/HelloLua-CommonLibSSE-NG/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garrigueta%2FHelloLua-CommonLibSSE-NG/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262084834,"owners_count":23256304,"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":["commonlibsse-ng","lua","mod","modding-tool","skse64","skyrim"],"created_at":"2025-05-27T17:10:11.760Z","updated_at":"2025-10-12T08:42:40.131Z","avatar_url":"https://github.com/garrigueta.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HelloLua - Skyrim SKSE Plugin with Lua Integration\n\n## Overview\n\nHelloLua is a Skyrim Special Edition SKSE plugin that demonstrates how to integrate Lua scripting into an SKSE plugin using the CommonLibSSE-NG framework. This project showcases how to:\n\n- Set up a basic SKSE plugin structure using CommonLibSSE-NG\n- Integrate Lua 5.1 into your SKSE plugin\n- Expose game functions to Lua scripts\n- Track hit counts for NPCs in the game\n- Create a simple Papyrus extension\n- Use function hooking for game functionality\n\nThe project serves as a practical example for Skyrim modders who want to incorporate Lua scripting into their SKSE plugins.\n\n## Features\n\n- **Lua Scripting Interface**: Run Lua scripts from within your SKSE plugin\n- **NPC Hit Counter**: Track and manipulate hit counts for NPCs\n- **Papyrus Extensions**: Custom Papyrus functions available to game scripts\n- **Function Hooks**: Example of hooking into game functions\n- **Console Output**: Send messages to the Skyrim console from Lua\n- **Game Data Access**: Get player position and other game data from Lua\n\n## Requirements\n\n- Skyrim Special Edition (supports both Anniversary Edition and pre-AE versions)\n- [SKSE](https://skse.silverlock.org/)\n- Visual Studio 2022 with C++20 support\n- CMake 3.24 or higher\n- vcpkg\n- Git (for submodule management)\n\n## Project Setup\n\nThis project uses Git submodules to include the Lua source code directly. After cloning the repository, you need to initialize and update the submodules:\n\n```bash\ngit clone https://your-repository-url/HelloLua-CommonLibSSE-NG.git\ncd HelloLua-CommonLibSSE-NG\ngit submodule init\ngit submodule update\n```\n\nIf you've already cloned the repository without initializing submodules, you can do both steps at once with:\n\n```bash\ngit submodule update --init\n```\n\n## Building\n\nThis project uses CMake and vcpkg for dependency management:\n\n1.Make sure you've initialized the Git submodules as described above\n2.Configure the project with CMake:\n\n```bash\ncmake -B build -S . --preset=release\n```\n\n3.Build the project:\n\n```bash\ncmake --build build --config Release\n```\n\nThe built DLL will be placed in `build/release/HelloLua.dll`.\n\n![Building the project](docs/img/build.gif)\n\n## Installation\n\n1. Copy `HelloLua.dll` to your Skyrim SE installation: `\u003cSkyrim SE\u003e/Data/SKSE/Plugins/`\n2. Create a folder `Scripts` in `\u003cSkyrim SE\u003e/Data/SKSE/Plugins/`\n3. Copy the Lua scripts from the `Scripts` directory to `\u003cSkyrim SE\u003e/Data/SKSE/Plugins/Scripts/`\n\n![Deploying the plugin](docs/img/deploy.gif)\n\n## Usage\n\n### Lua API\n\nThe plugin exposes several functions to Lua scripts:\n\n- `Log(message)`: Write a message to the SKSE log\n- `PrintToConsole(message)`: Print a message to the Skyrim console\n- `GetPlayerPosition()`: Returns player's x, y, z coordinates\n- `TrackActor(formID)`: Start tracking hit counts for an actor\n- `UntrackActor(formID)`: Stop tracking hit counts for an actor\n- `GetHitCount(formID)`: Get the current hit count for an actor\n- `IncrementHitCount(formID, [amount])`: Increase the hit count for an actor\n\n### Example Script\n\n```lua\n-- Print a welcome message to the Skyrim console\nPrintToConsole(\"HelloLua mod successfully loaded!\")\n```\n\n![Running the plugin in-game](docs/img/run.gif)\n\n### Papyrus Functions\n\nThis plugin also provides Papyrus functions under the `HitCounter` class:\n\n- `TrackActor(Actor target)`: Start tracking hit counts\n- `GetHitCount(Actor target)`: Get hit count for an actor\n- `IncrementHitCount(Actor target, int amount)`: Add to hit count\n\n## Project Structure\n\n- `include/`: Header files\n  - `Core/`: Core functionality headers\n- `src/`: Source files\n  - `Core/`: Implementation of core functionality\n  - `Main.cpp`: Plugin entry point\n- `Scripts/`: Lua scripts\n  - `startup.lua`: Runs when the game loads\n  - `utils.lua`: Utility functions for Lua scripts\n- `ext/`: External dependencies\n  - `lua/`: Lua 5.1 source code (Git submodule)\n\n## License\n\nThis project is available as an open-source example for the Skyrim modding community.\n\n## Credits\n\n- Built with [CommonLibSSE-NG](https://github.com/CharmedBaryon/CommonLibSSE-NG)\n- Uses [Lua 5.1](https://www.lua.org/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgarrigueta%2Fhellolua-commonlibsse-ng","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgarrigueta%2Fhellolua-commonlibsse-ng","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgarrigueta%2Fhellolua-commonlibsse-ng/lists"}