FOlib provides TypeScript bindings for Fallout 2 engine scripting (sfall/TSSL). Current version 0.4.1, under active development with headers added on demand. Key differentiator: enables type-safe scripting for Fallout 2 mods using TSSL transpiler. Unlike raw JavaScript, provides declarations, definitions, and helper functions for sfall hooks, game APIs, and common patterns. Integrates with ESLint and TypeScript ESLint for linting.
npm install folibNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Imports core exports, fetches the player, prints name, and modifies inventory items using sfall flag.
Replace fo_version with fo.version.
Use named import: `import { fo } from 'folib'`.Install peer deps: `npm install --save-dev eslint eslint-plugin-unused-imports typescript-eslint`
Replace `sfall.registerHook(...)` with `sfall.addHook(...)`.
Run `npm install folib` and ensure `tsconfig.json` includes `node_modules` in module resolution.
Use named import: `import { fo } from 'folib'`.Check for null/undefined: `const player = Game.getPlayer(); if (player) ...`