| name | wurst-setup |
| description | WurstScript installation, project setup, build configuration, dependency management, and VSCode extension usage for Warcraft 3 modding |
WurstScript Setup and Installation
Complete guide for installing WurstScript and setting up projects.
Prerequisites
WurstScript requires:
- VSCode (recommended) or any text editor
- Java Runtime (auto-installed with extension)
- Warcraft III (for testing)
VSCode Installation (Recommended)
1. Install VSCode
Download from: https://code.visualstudio.com/
2. Install Wurst Extension
- Open VSCode
- Go to Extensions (Ctrl+Shift+X)
- Search "Wurst"
- Install "Wurst language support" by peterzeller
3. Extension Auto-Setup
The extension automatically:
- Downloads and installs the compiler
- Installs the
grill CLI tool
- Keeps everything updated
4. Activate Extension
Open any .wurst file or run:
Project Creation
Via VSCode
F1 -> >wurst: New Wurst Project
- Select folder location
- Extension creates project structure
Via CLI
grill generate my-project
Project Structure
my-project/
├── _build/ # Compiled output (generated)
├── .vscode/
│ └── settings.json # VSCode workspace settings
├── imports/ # Files to import into map
├── wurst/ # Wurst source files
│ └── Hello.wurst # Example package
├── ExampleMap.w3x # Base map file
├── wurst.build # Project configuration
├── wurst.dependencies # Generated dependency list
├── wurst_run.args # Run configuration
└── .gitignore
wurst.build Configuration
projectName: MyProject
dependencies:
- https://github.com/wurstscript/WurstStdlib2
buildMapData:
name: My Map
author: Your Name
fileName: MyMap
scenarioData:
description: Map description
suggestedPlayers: 1-8
loadingScreen:
model: ""
title: My Map
subtitle: ""
text: Loading...
Configuration Options
projectName: string
dependencies: []
buildMapData:
name: string
author: string
fileName: string
scenarioData:
description: string
suggestedPlayers: string
loadingScreen:
model: string
title: string
subtitle: string
text: string
Managing Dependencies
Add Dependency
grill install https://github.com/some/library
This updates wurst.build and downloads the library.
Update Dependencies
grill install
Common Dependencies
dependencies:
- https://github.com/wurstscript/WurstStdlib2
- https://github.com/Frotty/Frentity
- https://github.com/theQuazz/wurst-lodash
- https://github.com/Frotty/wurst-item-shop
Running and Building
Run Map (Development)
F1 -> >wurst: Run map
- Or use hotkey if configured
This:
- Compiles your code
- Creates
WurstRunMap.w3x in WC3 maps folder
- Launches Warcraft III with the map
Build Map (Release)
Creates compiled map in _build/ folder for distribution.
wurst_run.args
Configure run behavior:
-runmapaliases ["wc3path:C:\Games\Warcraft III\_retail_\x86_64\Warcraft III.exe"]
-preloadFiles []
CLI Reference (grill)
grill generate <project-name>
grill install
grill install <git-url>
grill install wurstscript
grill build <mapfile.w3x>
grill run <mapfile.w3x>
Adding to PATH
Add ~/.wurst to your PATH for global grill access:
Windows
- Open Environment Variables
- Edit PATH in user variables
- Add
%USERPROFILE%\.wurst
macOS/Linux
Add to ~/.bashrc or ~/.zshrc:
export PATH="$PATH:$HOME/.wurst"
Working with Maps
Base Map
ExampleMap.w3x (or your map) is the "terrain" map:
- Edit terrain, doodads, destructibles in World Editor
- Wurst reads this and adds compiled code
- Wurst never modifies this file
Imports Folder
Files in imports/ are automatically imported:
imports/
├── Models/
│ └── MyModel.mdx
├── Icons/
│ └── MyIcon.blp
└── war3map.j # Not recommended
Folder structure is preserved in the map.
Updating Base Map
After adding imports via wurst:
- Build the map
- Copy from
_build/ to project root
- Open in World Editor
- Save (clears wurst code but keeps imports)
- Now use as new base map
Troubleshooting
Extension Not Loading
- Open a
.wurst file
- Check Output panel -> Wurst
- Run
F1 -> >wurst: Install
Compile Errors
- Check Problems panel (Ctrl+Shift+M)
- Hover over red underlines for details
- Check import statements
Map Won't Run
- Verify WC3 path in
wurst_run.args
- Check if WC3 is already running
- Try running WC3 manually first
Dependency Issues
rm -rf _build/dependencies
grill install
Java Issues
The extension manages Java automatically. If issues occur:
- Check Output panel for errors
- Reinstall extension
- Manually install Java 11+
VSCode Tips
Useful Shortcuts
F1 - Command palette
Ctrl+. - Quick actions
Ctrl+Space - Autocomplete
Ctrl+Click - Go to definition
Shift+F12 - Find references
Recommended Settings
.vscode/settings.json:
{
"editor.formatOnSave": true,
"wurst.wc3InstallationPath": "C:\\Games\\Warcraft III"
}
Resources