{"id":19514356,"url":"https://github.com/flying-dice/dcs-hot-loader","last_synced_at":"2025-04-15T20:20:55.532Z","repository":{"id":216722548,"uuid":"742150849","full_name":"flying-dice/dcs-hot-loader","owner":"flying-dice","description":"Load and execute LUA files in DCS at runtime","archived":false,"fork":false,"pushed_at":"2025-03-11T12:10:59.000Z","size":296,"stargazers_count":2,"open_issues_count":8,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-29T00:51:16.983Z","etag":null,"topics":["dcs","dcs-world","modding"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/flying-dice.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"flying-dice","patreon":"flyingdice"}},"created_at":"2024-01-11T21:32:21.000Z","updated_at":"2025-01-03T10:24:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"c706c730-7296-40d2-b2aa-f2e770cd3fa5","html_url":"https://github.com/flying-dice/dcs-hot-loader","commit_stats":null,"previous_names":["flying-dice/dcs-hot-loader"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flying-dice%2Fdcs-hot-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flying-dice%2Fdcs-hot-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flying-dice%2Fdcs-hot-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flying-dice%2Fdcs-hot-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flying-dice","download_url":"https://codeload.github.com/flying-dice/dcs-hot-loader/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249145884,"owners_count":21220053,"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":["dcs","dcs-world","modding"],"created_at":"2024-11-10T23:36:01.825Z","updated_at":"2025-04-15T20:20:55.494Z","avatar_url":"https://github.com/flying-dice.png","language":"TypeScript","funding_links":["https://github.com/sponsors/flying-dice","https://patreon.com/flyingdice"],"categories":[],"sub_categories":[],"readme":"[![Join Discord](https://img.shields.io/badge/Join-blue?logo=discord\u0026label=Discord)](https://discord.gg/bT7BEHn5RD) \n[![Discord](https://img.shields.io/discord/738118932937834566?logo=discord\u0026label=Discord)](https://discord.com/channels/738118932937834566/1178991295260278785) \n[![tslua-codebot](https://img.shields.io/badge/CodeBot-tslua%20dcs-blue?logo=openai)](https://chat.openai.com/g/g-6643nUbup-tslua-dcs-codebot)\n[![patreon](https://img.shields.io/badge/Patreon-flyingdice-red?logo=patreon)](https://patreon.com/flyingdice)\n\n![logo](index.png)\n\nDCS Hot Loader is a tool to allow for hot loading of lua scripts in DCS World.\n\nIt exposes a REST API to allow for the execution of lua scripts.\n\n## Installation\n\nAll that is required is to copy the `dcs-hot-loader.lua` into the `Scripts/Hooks` folder in your DCS Saved Games folder.\n\n[![dropzone](https://dcs-dropzone-registry-viewer.pages.dev/download.svg)](https://dcs-dropzone-registry-viewer.pages.dev/#/hot-loader)\n\n### Open Beta\n\n```\n%USERPROFILE%\\Saved Games\\DCS.openbeta\\Scripts\\Hooks\\\n```\n\n### Stable\n\n```\n%USERPROFILE%\\Saved Games\\DCS\\Scripts\\Hooks\\\n```\n\n## Usage\n\n\u003e To run the below tests, create a file called `hello-world.lua` in your `DCS\\Scripts` folder with the following contents\n\u003e \n\u003e ```lua\n\u003e -- C:\\Users\\username\\Saved Games\\DCS.openbeta\\Scripts\\hello-world.lua\n\u003e if (log and log.info) then\n\u003e     log.info(\"Hello World!\")\n\u003e else\n\u003e     print(\"Hello World!\")\n\u003e end\n\u003e ```\n\nThe server will automatically start when you start DCS World.\n\nTo use the server, make a request to the following endpoint\n\n```shell\ncurl --location 'http://127.0.0.1:7943/dofile' \\\n--header 'Content-Type: application/json' \\\n--data '{\n    \"path\": \"{WRITE_DIR}\\\\Scripts\\\\hello-world.lua\",\n    \"target\": \"gui\"\n}'\n```\n\n### Target\n\nThe target parameter should be one of the following\n\n- `gui` (GameGUI)\n- `mission` (Mission Scripting Environment)\n\n### Variables\n\nThe following variables are available for path replacements, ofc you can also use absolute paths\n\n| Key         | Function           | Example                                                   |\n| ----------- | ------------------ | --------------------------------------------------------- |\n| WRITE_DIR   | `lfs.writedir()`   | `C:\\\\Users\\\\jonat\\\\Saved Games\\\\DCS.openbeta\\\\`           |\n| INSTALL_DIR | `lfs.currentdir()` | `D:\\\\Program Files\\\\Eagle Dynamics\\\\DCS World OpenBeta\\\\` |\n| TEMP_DIR    | `lfs.tempdir()`    | `C:\\\\Users\\\\jonat\\\\AppData\\\\Local\\\\Temp\\\\DCS.openbeta\\\\`  |\n\nTo get an active list of variables, make a request to the following endpoint\n\n```shell\ncurl --location 'http://127.0.0.1:7943/health'\n```\n\n### Response\n\nOnce executed the response will be the resolved URL or any errors\n\n\u003e **Note:** When using the `mission` target, the response may not indicate errors with resolving the path, but you will receive an alert in mission\n\n```json\n{\n  \"status\": \"OK\",\n  \"path\": \"C:/Users/username/Saved Games/DCS.openbeta//Scripts/hello-world.lua\",\n  \"target\": \"gui\"\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflying-dice%2Fdcs-hot-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflying-dice%2Fdcs-hot-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflying-dice%2Fdcs-hot-loader/lists"}