Catalog · How the catalog works
Lilac-Soul-s-Script-Generator
- ★ 2 on GitHub
Anyone may press Interesting, signed in or not. It helps others find this project.
README
NWN Script Generator — Web Port
A browser-based NWScript code generator for Neverwinter Nights 1 (including Enhanced Edition), ported from Lilac Soul's Script Generator (Pascal/Lazarus) to a standalone HTML/JavaScript web application.
Features
- No installation required — open
index.htmldirectly in any modern browser - No backend, no server — fully client-side, works offline (except Google Fonts)
- 18 action modules covering the most common NWScript patterns:
- Journal entry, teleport, local variables, floating text
- Apply / remove effects, damage, visual effects
- Spawn creature, destroy object, lock/unlock
- Henchman management, alignment/reputation adjustment
- Sound & music, NPC speak, cast spell
- Give XP/gold, create/destroy items, set appearance, delay command
- 22 script event types — OnEnter, OnDeath, OnConversation, OnActivateItem, and many more
- NWN:EE compatible — constants extended with Enhanced Edition additions
- Live code generation with NWScript syntax highlighting
- NWNLexicon links — every function name links to nwnlexicon.com
- Export as
.nss— download the generated script directly - Collapsible UI — script type groups and action modules fold away to save space
Usage
- Download or clone this repository
- Open
index.htmlin your browser — no server needed - Select a Script Type in the left panel (e.g. OnEnter, OnConversation)
- Add Action Modules from the palette (e.g. Journal Entry, Teleport PC)
- Configure each module — the script generates live in the right panel
- Click ↓ .nss to download, or Copy to paste into the NWN Toolset
Project Structure
nwn-scriptgen/
????????? index.html # Main application (self-contained)
????????? js/
??? ????????? constants.js # Core NWScript constants + EE additions
??? ????????? constants_large.js # SPELL, FEAT, SPELLABILITY, TRACK, POLYMORPH, POISON
??? ????????? constants_vfx.js # VFX_DURATION (381), VFX_IMPACT (229)
??? ????????? constants_appearance.js # APPEARANCE types (518 entries)
????????? docs/
????????? LICENSE
????????? README.mdNote: The JS files in
js/are extracted fromconstants.pasfor reference and future use. The currentindex.htmlis fully self-contained and does not import them yet — integration is planned for a future refactoring step.
Roadmap
- [ ] Import
constants.jsmodules intoindex.html(replace inline data) - [ ] Conditional checks (
ifinspector.pas— class, race, skill, item, journal, alignment) - [ ] Cutscene module (
cutscene.pas) - [ ] Trap creation (
traps.pas) - [ ] Blacksmith crafting system (
black_smith.pas) - [ ] Action queue chaining (
actionqueue.pas) - [ ] Store PC info to local variables (
storepcparty.pas) - [ ] Item property scripting (
itemscript.pas) - [ ] Color / creature part editor (
colorc.pas) - [ ] Horse/mount module (
horsemount.pas) - [ ] GitHub Pages deployment
- [ ] Dark/light theme toggle
Credits
- Original tool: Lilac Soul's Script Generator by Carsten Hjorthøj (Lilac Soul)
- NWN 1.69 revision: The Krit
- NWScript reference: NWN Lexicon contributors
- Web port: developed with Claude (Anthropic)
License
GPL-2.0 — inherited from the original Lilac Soul's Script Generator. See LICENSE for details.

