{"_id":"@chemicalheads/as-badlads","_rev":"6-12f93448b8f24df28bbc296c95d13acd","name":"@chemicalheads/as-badlads","dist-tags":{"latest":"1.2.0"},"versions":{"1.0.3":{"name":"@chemicalheads/as-badlads","version":"1.0.3","keywords":["badlads","assemblyscript","api","server","plugin","mmo","roleplay"],"author":{"url":"https://chemicalheads.com, https://markjg.com","name":"markjg","email":"mark.jg@chemicalheads"},"_id":"@chemicalheads/as-badlads@1.0.3","maintainers":[{"name":"markjg","email":"mark.jg@chemicalheads.com"}],"homepage":"https://github.com/chemicalHeadsStudios/as-badlads","bugs":{"url":"https://github.com/chemicalHeadsStudios/as-badlads/issues"},"dist":{"shasum":"4c78ad0b0d4e2fd05a561b0e86337c5b4ca3a32d","tarball":"https://registry.npmjs.org/@chemicalheads/as-badlads/-/as-badlads-1.0.3.tgz","fileCount":7,"integrity":"sha512-qy9/IGOHpnBR3UOxS31yCYw24c40E4tfp5HqSChAabgR3yve5Hgu3fjqzpktzYscUfTjvFGf7oExDBKkYe/Tdg==","signatures":[{"sig":"MEYCIQCdaC74g0RG1NI4FNYkzEWD8BGbu/1142jjIs7WsuIk9gIhAItRz9NGY7ibvLJMHdoB7OBBkSZlrMIMYM+EWyRkDHsq","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20492,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgntQZCRA9TVsSAnZWagAAX0IP/jdH2V2HNF4TUWg+OLfB\natNcrmeRYcSLp6nvjlHezVjnp8zcF9P4WxLjQ2B5thTPmUO4Yq/5NwuVHd0I\nzK+EwYOZcHq7RgxCkLVlzhZXrI5oy3icVLiFjbhFn7vqHK9wDH62vVOCvyVX\nNiHjQlafMkNH961KnhXEfjnKf14EsP+FvyYFY15OJiDS+nbxvf0HxLy1niyn\nYD++pzD5gnmsEODCZ9ZToX8+wpMZ4ygsgl5XOk5Ngto4y3qZTPAi8ZWqclqG\nBJYNk+6x5Gh2kRfst/ARdsyHem+Es1r5CghpYcvC15+RXmalSExRsLUcWcAl\nTtVuSupPCkry0O0eiI6MzYINS0dbmC5ldEVO6Oy/IqrC3u3SaBqxcOBOoJnp\nBLFYNV8M1e9iTqF8lCAKWlKeZXHP+p/9gteAmGbtOHfDNB4UOrHdfekVJdzM\n3HVlxfwAc5vpWLd88FtX0KlShJMrW69w5MmqJdBsYrhw7KIF5embvts/rG0k\nlykOyRFH4W1JWcyCQHyCaCKwmNtmB9BTbcSTv9jWqBDTmwi5xi+RqniCByTK\nSQ/Q1OJgolGyeI4WJ7iVC0f9nfWO0Ga96zxI9IXvcTmzgy+AA/cRereU6XiX\nOSN8tGGvh1piZIIlXdV1ngi1y3uqEn28sjH9wJ2w2TZRdZdEoEGfQbF2hncE\nqzMH\r\n=JZBR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"assembly/index.ts","gitHead":"ae38b52bc862f344c1d1a46eb4fe0f7caacfbe50","scripts":{"test":"node tests","asbuild":"npm run asbuild:untouched && npm run asbuild:optimized","asbuild:optimized":"asc assembly/index.ts --target release","asbuild:untouched":"asc assembly/index.ts --target debug"},"_npmUser":{"name":"markjg","email":"mark.jg@chemicalheads.com"},"licenses":[{"url":"http://en.wikipedia.org/wiki/MIT_License","type":"MIT"}],"repository":{"url":"git+https://github.com/chemicalHeadsStudios/as-badlads.git","type":"git"},"_npmVersion":"6.14.8","description":"BadLads server plugin host API implementation in AssemblyScript.","directories":{},"_nodeVersion":"12.19.0","_hasShrinkwrap":false,"devDependencies":{"assemblyscript":"^0.18.28"},"_npmOperationalInternal":{"tmp":"tmp/as-badlads_1.0.3_1621021720790_0.6055511383015098","host":"s3://npm-registry-packages"}},"1.0.4":{"name":"@chemicalheads/as-badlads","version":"1.0.4","keywords":["badlads","assemblyscript","api","server","plugin","mmo","roleplay"],"author":{"url":"https://chemicalheads.com, https://markjg.com","name":"markjg","email":"mark.jg@chemicalheads"},"_id":"@chemicalheads/as-badlads@1.0.4","maintainers":[{"name":"markjg","email":"mark.jg@chemicalheads.com"}],"homepage":"https://badlads.chemicalheads.com","bugs":{"url":"https://github.com/chemicalHeadsStudios/as-badlads/issues"},"dist":{"shasum":"aeda8abb64e6c78be65305f03000477f3f8c8202","tarball":"https://registry.npmjs.org/@chemicalheads/as-badlads/-/as-badlads-1.0.4.tgz","fileCount":7,"integrity":"sha512-TqPM9KG/BCE+7gDuv8XfoBGINzX+f/zJvLn5n3C6xPET4+VV8Oa6ePhW5P3oGQOqZD+CIkj/IWCAeGoCesQj1A==","signatures":[{"sig":"MEQCIGdpsh9mYNZppHjosmaRNNo6FB+t9XP+JqyTXF8T1sg+AiABpgB48IpLfFN1lEgJuZoi8AyVP1vQW5as46FgFjepIg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23587,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgnuagCRA9TVsSAnZWagAArgcQAIfNTiGBU8ejQGnC3ev1\nCcBx6oNGhYDZ1y52rXnzHwAoaRahlMfKg1nVEospt+Sz2XxZJ88rugkUQrwN\nla9g07EI3L2w3VrLU+4LEtAftf5APgdzsRS4fgGfgQlAdXB/jR/HBCZUaTn0\ncSjvORECfRv82/LXTCCr25/buc5TUCxcw4OolD/v+S1P1uuzb4yBv0ILdDGG\nDsZQFKzdgmLh1W7QW7hv3jOnxCXNAzV5Aml1GkmzbBPXykPYQ+/2jpzEBPE4\nkCB0JP3l+zvOdYw7PTrdTsV0acP1dfo+pL3nkKLsmW0v1hoLoxd/9HgVKvXU\nEbHGWU7EVZccRT3iqrPqyd/k/CZ16SGJ7uo2iVdSMIojaXKdZvxr//IX7lGQ\njM+SRxfGHlVSGA/288iOZjMbfx5cJXrow+rXPPwRo03gRmAJRKRiwTLab2nC\nSdhIMzo4qOPiQS8JQ8pEA02OWATwXFwG1SZ6a5aTUU4VbxdPiLwyQHTbrIXF\nNybtRS4zw6XtF1vLltZl+6ybQC6ih1HwO0kRS7wTga5fgBsC8fohJ6BhSO0O\nNxrk2HhsH4o5HRYw6mq+uiLIqbJWQvaDubvPB66EX/DeObfGFmd7w3c6ctMx\nOHM46/CeHqAvtkhFd+sLeCINtiGEeC1xHzGMA+TQEWVeyFyjVEjjQ1I0CazE\nFV2/\r\n=jUfk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"assembly/index.ts","gitHead":"72d83bc71d8ced3b2a53eedc71b045ae7e220686","scripts":{"test":"node tests","asbuild":"npm run asbuild:untouched && npm run asbuild:optimized","asbuild:optimized":"asc assembly/index.ts --target release","asbuild:untouched":"asc assembly/index.ts --target debug"},"_npmUser":{"name":"markjg","email":"mark.jg@chemicalheads.com"},"licenses":[{"url":"http://en.wikipedia.org/wiki/MIT_License","type":"MIT"}],"repository":{"url":"git+https://github.com/chemicalHeadsStudios/as-badlads.git","type":"git"},"_npmVersion":"6.14.8","description":"BadLads server plugin host API implementation in AssemblyScript.","directories":{},"_nodeVersion":"12.19.0","_hasShrinkwrap":false,"devDependencies":{"assemblyscript":"^0.18.28"},"_npmOperationalInternal":{"tmp":"tmp/as-badlads_1.0.4_1621026464207_0.13818359844266404","host":"s3://npm-registry-packages"}},"1.0.5":{"name":"@chemicalheads/as-badlads","version":"1.0.5","keywords":["badlads","assemblyscript","api","server","plugin","mmo","roleplay"],"author":{"url":"https://chemicalheads.com, https://markjg.com","name":"markjg","email":"mark.jg@chemicalheads"},"_id":"@chemicalheads/as-badlads@1.0.5","maintainers":[{"name":"markjg","email":"mark.jg@chemicalheads.com"}],"homepage":"https://badlads.chemicalheads.com","bugs":{"url":"https://github.com/chemicalHeadsStudios/as-badlads/issues"},"dist":{"shasum":"a6de9346d0dcc5f134bc25afaf2b12bb30794c40","tarball":"https://registry.npmjs.org/@chemicalheads/as-badlads/-/as-badlads-1.0.5.tgz","fileCount":7,"integrity":"sha512-ZIEl03sWfpDWvSAblwCS6BZoemOdeYxBIrCJeRgjMQd8jEPS9IUa2jpZegSuUUUQKsVMNMKYPx6qilhqevK+zA==","signatures":[{"sig":"MEYCIQChSSWdgWfKvJpRGNmGUfk1KLaHbU3L9zhJtPk0bnVMwgIhAO5NVJA2X26WFQhO1kPniwjcuR4CKpZtp2ErfIjNndk5","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":25279,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgqJVbCRA9TVsSAnZWagAAqroP/3m139vgOeSqMfAy3APW\nxH66+nj4wA1fNILU5+MCCJEGGCkVIjINPriJt3zI0iR3HK11Zv+uD3oV6tGX\nTcA3P8kIekAtJg7/7U5XseBOc8If8jaL8TZ6RivxSXzXnUNgaQhGyWXIgSIa\nPqdJrpkD9ECjmiGbH8kFTljV9vxHLgPdwcqYm+SaK+q/QdTS9fTfLvNQ1sy+\n8LtRjD0CeByZo9hVUXJdPOQbNBei3DALoJzwMmwYzH0jbxkp79fEbdknGa+x\n+7j/ujNLQEVqO7J71OjYmRtFPT2tPvvJoVMt2bNEcm8tv6XV0lh5fxtB5f/H\nkrhmiJZph+QSm2tlB+LSCav1ogQx7/5kA6FmkK6UKn/uTkGs4k6Hm5tusqiz\n4tYWZX5CHPaWqH0GEYPs5ZFcLzVIJvnDvvV+3t8oURciAzyCm+6zSF2VPCPN\nRzQzM2kyELzQoLq6A7HGnHPwUUUC/otqOGCB5vslAwR4JuRlFGmEOQaLbm8A\n/f0O1qPCT+HCLU+iDWc50RXLFOMefZHrzj7eqe6X9RuB9BErTWWb1nDL2s19\nCjUPj0pSHfpReyAZEqvys5t2DiaxTCLxau06ARf9qcV6bBgEdEc+iZCD3KFW\npavGJeMHfqTE/NREmPLS8rNcV/SxftOoVg9H9OEfDd3+r/0E4gpNGVSv4rlo\n3iZZ\r\n=3FAG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"assembly/index.ts","gitHead":"ffce36f978946eca1ade79719aaca6c6e83977d8","scripts":{"test":"node tests","asbuild":"npm run asbuild:untouched && npm run asbuild:optimized","asbuild:optimized":"asc assembly/index.ts --target release","asbuild:untouched":"asc assembly/index.ts --target debug"},"_npmUser":{"name":"markjg","email":"mark.jg@chemicalheads.com"},"licenses":[{"url":"http://en.wikipedia.org/wiki/MIT_License","type":"MIT"}],"repository":{"url":"git+https://github.com/chemicalHeadsStudios/as-badlads.git","type":"git"},"_npmVersion":"6.14.8","description":"BadLads server plugin host API implementation in AssemblyScript.","directories":{},"_nodeVersion":"12.19.0","_hasShrinkwrap":false,"devDependencies":{"assemblyscript":"^0.18.28"},"_npmOperationalInternal":{"tmp":"tmp/as-badlads_1.0.5_1621661019310_0.4816566988494215","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@chemicalheads/as-badlads","version":"1.1.0","keywords":["badlads","assemblyscript","api","server","plugin","mmo","roleplay"],"author":{"url":"https://chemicalheads.com, https://markjg.com","name":"markjg","email":"mark.jg@chemicalheads"},"_id":"@chemicalheads/as-badlads@1.1.0","maintainers":[{"name":"markjg","email":"mark.jg@chemicalheads.com"}],"homepage":"https://badlads.chemicalheads.com","bugs":{"url":"https://github.com/ChemicalHeadsStudios/as-badlads/issues"},"dist":{"shasum":"efeca2a1eef56470a2f7b73a0cb1be032573a098","tarball":"https://registry.npmjs.org/@chemicalheads/as-badlads/-/as-badlads-1.1.0.tgz","fileCount":8,"integrity":"sha512-uBEsMiaQMcpunIcqkSQ9Rk0snjxisQZ9z3ocua4xuQkZjQkJ+LJ9czbNLq0EORrObrt2I0rC/iZxwoJ5ETYUYA==","signatures":[{"sig":"MEUCIGBIscz+QvDtKKnqTNM+8LSOXFz/MTTqG3eXOcNt/sPDAiEAyj239qiw0yEV4/AbNexNSDvMgQGtjdx+AZmTohJuO0A=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@chemicalheads%2fas-badlads@1.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":36287},"main":"assembly/index.ts","gitHead":"843398c2296e3236d2f97dfc950d1269007f28fc","scripts":{"test":"node tests","asbuild":"npm run asbuild:untouched && npm run asbuild:optimized","asbuild:optimized":"asc assembly/index.ts --target release","asbuild:untouched":"asc assembly/index.ts --target debug"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:7e76c33c-cd83-4470-ba31-97a12fd230fc"}},"licenses":[{"url":"http://en.wikipedia.org/wiki/MIT_License","type":"MIT"}],"repository":{"url":"git+https://github.com/ChemicalHeadsStudios/as-badlads.git","type":"git"},"_npmVersion":"12.0.2","description":"BadLads server plugin host API implementation in AssemblyScript.","directories":{},"_nodeVersion":"22.23.2","_hasShrinkwrap":false,"devDependencies":{"assemblyscript":"^0.18.28"},"_npmOperationalInternal":{"tmp":"tmp/as-badlads_1.1.0_1788023884363_0.8831475411522514","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@chemicalheads/as-badlads","author":{"name":"markjg","email":"mark.jg@chemicalheads","url":"https://chemicalheads.com, https://markjg.com"},"version":"1.2.0","description":"BadLads server plugin host API implementation in AssemblyScript.","main":"assembly/index.ts","keywords":["badlads","assemblyscript","api","server","plugin","mmo","roleplay"],"homepage":"https://badlads.chemicalheads.com","repository":{"type":"git","url":"git+https://github.com/ChemicalHeadsStudios/as-badlads.git"},"scripts":{"test":"node tests","asbuild:untouched":"asc assembly/index.ts --target debug","asbuild:optimized":"asc assembly/index.ts --target release","asbuild":"npm run asbuild:untouched && npm run asbuild:optimized"},"licenses":[{"type":"MIT","url":"http://en.wikipedia.org/wiki/MIT_License"}],"devDependencies":{"assemblyscript":"^0.18.28"},"gitHead":"9adcbf0f96d4972623e419396291f638fafddcbc","_id":"@chemicalheads/as-badlads@1.2.0","bugs":{"url":"https://github.com/ChemicalHeadsStudios/as-badlads/issues"},"_nodeVersion":"22.23.2","_npmVersion":"12.0.2","dist":{"integrity":"sha512-XOK1xfvdMc4Z5NpaIkKXaIaTHoihLLOB72dgu3PK1pBlFilLRdRi1iLmCDoI75XXV4bFu5AvKFo9uub+kgtCaw==","shasum":"4e6c6c3f0c6e7a1afa5c4fa0280ad1a7ce387204","tarball":"https://registry.npmjs.org/@chemicalheads/as-badlads/-/as-badlads-1.2.0.tgz","fileCount":8,"unpackedSize":39026,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@chemicalheads%2fas-badlads@1.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIHGnZKkfVhgQtNLDzssYp4vjSmmxA91M5nQ03NtYuk0MAiBCAQbreYR+VZ1NaMFNGq7baTRzqz6m31UNh7ODtab7dw=="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:7e76c33c-cd83-4470-ba31-97a12fd230fc"}},"directories":{},"maintainers":[{"name":"markjg","email":"mark.jg@chemicalheads.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/as-badlads_1.2.0_1788033770273_0.7896506630706455"},"_hasShrinkwrap":false}},"time":{"created":"2021-05-14T19:48:40.421Z","modified":"2026-08-29T20:02:50.824Z","1.0.3":"2021-05-14T19:48:40.942Z","1.0.4":"2021-05-14T21:07:44.620Z","1.0.5":"2021-05-22T05:23:39.512Z","1.1.0":"2026-08-29T17:18:04.510Z","1.2.0":"2026-08-29T20:02:50.421Z"},"bugs":{"url":"https://github.com/ChemicalHeadsStudios/as-badlads/issues"},"author":{"name":"markjg","email":"mark.jg@chemicalheads","url":"https://chemicalheads.com, https://markjg.com"},"homepage":"https://badlads.chemicalheads.com","keywords":["badlads","assemblyscript","api","server","plugin","mmo","roleplay"],"repository":{"type":"git","url":"git+https://github.com/ChemicalHeadsStudios/as-badlads.git"},"description":"BadLads server plugin host API implementation in AssemblyScript.","maintainers":[{"name":"markjg","email":"mark.jg@chemicalheads.com"}],"readme":"# as-badlads\n![GitHub](https://img.shields.io/github/license/chemicalheadsstudios/as-badlads)\n[![npm version](https://badge.fury.io/js/%40chemicalheads%2Fas-badlads.svg)](https://badge.fury.io/js/%40chemicalheads%2Fas-badlads)\n![GitHub package.json dependency version (dev dep on branch)](https://img.shields.io/github/package-json/dependency-version/chemicalheadsstudios/as-badlads/dev/assemblyscript)\n[![Discord](https://img.shields.io/discord/597143319314694144.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.gg/hqZVQmm)\n===\nBadLads server plugin host API implementation in AssemblyScript. Proper documentation coming soon! \n\n## What is `as-badlads`?\n> `as-badlads` is a BadLads WebAssembly host implementation, used for BadLads server plugins. The `as` prefix stands for [AssemblyScript](assemblyscript.org/), which is what the API is written in.\n\n## What isn't `as-badlads`?\n> `as-badlads` is not Javascript! There is no Javascript here. \n\n## Prerequisites\n> [Node](https://nodejs.org/en/). While we don't use Javascript in any way whatsoever, we require the npm package manager which is bundled with node.\n\n## Example plugins:\n* https://github.com/ChemicalHeadsStudios/as-badlads-template\n\n### Creating a BadLads plugin from scratch with `as-badlads`\n1. Find your BadLads plugins folder, named `BadLadsPlugins`, under Windows clients it'll be located under `C:\\Users\\yourusername\\AppData\\Local\\BadLads\\Saved` or `YourServerDirectory\\BadLads\\Saved\\`. \n2. Create a new directory in `BadLadsPlugins`, this will be the root directory of your plugin. Go inside your new plugin directory.\n3. Create a **workspace** with `npm init`\n4. Install **AssemblyScript** with: `npm install --save-dev assemblyscript`\n5. Install the **BadLads API** with `npm install @chemicalheads/as-badlads`\n6. Setup your AssemblyScript workspace with `npx asinit .`\n7. Create a `plugin.json` file. **Must be all lowercase!** Here's a [template.](https://gist.githubusercontent.com/MarkJGx/a67a1b400aa998086e08d9acf17c12ef/raw/35e5d2475ff153b3e7db31783be5b42c28fe6cb1/plugin.json)\n8. Add `exportRuntime: true` to the `release` and `debug` targets in `asconfig.json`. That might sound confusing, so here's a [copyable example.](https://gist.githubusercontent.com/MarkJGx/f0e8f0aa12aef48f1dfb74a8dce34472/raw/3e8fca7853f8a65a00eedb92a7acc641e7503247/asconfig.json).\n9. You are done with the setup process. Congrats. Let's move on to the fun part!\n10. Open your favorite TypeScript compatible IDE (mine being [VSCode](https://code.visualstudio.com/)), and add the plugin directory as a workspace/folder/whatever.\n11. Open up the `assembly/index.ts` file and start cracking. [Here's an example `index.ts`](https://gist.githubusercontent.com/MarkJGx/b13603d892ba6dfc3d372745f7092082/raw/ba378e511ab4bdb09f49f8db94a782f24197e7f2/index.ts). \n> If you want to explore the plugin API's functionality, middle click on one of the imports at the top. That will take you the plugin definitions, filled with documentation and goodies. Make sure to scroll down to skip the rough stuff.\n13. Compile, run `npm run asbuild`. You can open the Sandbox mode in BadLads and start working, by default the game has hot reload enabled.\n> If you want to check for new plugins while the game is open, run the `/reloadplugins` command in chat. The game will tell you when you have hot reloaded, or if you have any weird errors.\n\n***\n\n### Listening for events. Check out the top in the `as-badlads/assembly/badlads.ts` file for all the available event functions. \n```typescript\n// BadLads searches for matching functions on plugin load, when listening \n//...for a specific event your function event has to match...\n//...it's name/param types/return types.\nexport function onPluginStart(pluginId: i32): void {} \n```\n\n### Decoding string buffers. Certain event functions have an ArrayBuffer as a param, most of the time that's a string buffer. You can convert an ArrayBuffer to a string with.\n```typescript\nconst myString: string = decodeString(stringBuffer);\n```\n\n### What are the `__host` functions?\n> Functions starting with `__host` are linked with the the BadLads API at load time. They aren't very convenient to work with, that's why there's a wrapper for almost each one. If you know what you are doing, go ahead and touch them.\n\n***\n\n### Passing strings to `__host` functions\nEvery string buffer handed to a `__host` function must be **null terminated**, and the length you pass must\n**include** the terminator. That is what `String.UTF8.encode(myString, true)` plus `.byteLength` gives you, and it\nis what every wrapper in `badlads.ts` already does. Passing an unterminated buffer makes the host drop the last\ncharacter.\n\n### Object ids\nObject ids are opaque 64-bit handles. They are stable for the lifetime of the object, compare equal for the same\nobject, and are **never reused** — once an object is destroyed its id stays dead rather than later resolving to a\ndifferent object. Store them freely, but call `isObjectValid` before acting on one you have held onto.\n\n### `__hostGetObjectTranformOwnedF32s` is deprecated\nThe original import name was misspelled (`Tranform`). It is now `__hostGetObjectTransformOwnedF32s`. The host\nregisters **both** names, so plugin binaries compiled against older versions of `as-badlads` keep working with no\nchanges. If you call the raw import directly, move to the corrected spelling — the misspelled alias will be\nremoved in a future release. Users of the `getObjectTransform` wrapper are unaffected.\n\n***\n\n## Server settings that affect plugins\nThese live in `BadLadsServerSettings.ini` on the host and change how your plugin is executed.\n\n| Setting | Default | Effect |\n| --- | --- | --- |\n| `HotReloadEnabled` | `true` | Watches the plugins folder and reloads a plugin when its `.wasm` or `plugin.json` changes. |\n| `PluginTickRate` | `20` | Target `onPluginTick` rate in Hz. Clamped to the server's `MaxGameTickRate` — plugins run on the game thread and cannot tick faster than it. |\n| `PluginFuelPerCall` | `10000000000` | Deadlock watchdog. Fuel is spent per executed WASM instruction and refreshed before every call into your plugin, so it is a **per-call** ceiling, not a rate limit. Exceed it and that call traps; the plugin stays loaded and the next call runs normally. Set to `0` to disable (a plugin that hangs will then hang the server). |\n\nThe budget is set far above what any reasonable callback uses, so hitting it means a runaway loop. If your plugin\nlegitimately needs to do heavy work, spread it across several `onPluginTick` calls rather than raising the ceiling.\n\n### `onPluginTick` timing\nPlugins are spread across frames rather than all ticking on the same frame, and each plugin becomes due on its own\nschedule. Under server load the effective rate drops rather than plugin cost spiking — so **do not assume a fixed\ninterval**. Always integrate against the `deltaTime` parameter, which is real elapsed server time. The first tick\nafter load reports a delta of `0`.\n","readmeFilename":"README.md"}