Scopa is a Unity package that adds Quake / Half-Life 1 .MAP, .WAD, and .FGD file support to Unity for a full level design / modder workflow.
- MAP Importer generates model prefab with meshes, colliders, entities.
- MAP, RMF, VMF, and JMF are supported. (note: we only support core Q1 MAP features, see docs)
- WAD Importer / WAD Exporter.
- .FGD export: Quake 1 TrenchBroom format with .OBJ model previews
NOTE: This plugin and documentation assumes familiarity with Quake / Half-Life mapping concepts.
This is a custom Unity Package that can be automatically installed / updated in Unity 2020.1 or later.
- in Unity, open the Package Manager window
- click the "+" button and select "add package from Git URL" (see Unity Manual: Installing from a Git URL)
- paste the .git URL of this repo:
https://github.com/radiatoryang/scopa.git
and click Add.
If you're using an older version of Unity or don't want to use the Package Manager, then you can also clone, submodule, or download+unzip this repo into your /Assets/ or /Packages/ folder.
This package has zero dependencies, but has optional Burst support for significantly faster map import. Just install the Burst package and Scopa will automatically detect it and use Burst functions.
Scopa works at editor-time or runtime.
Put a supported file somewhere in the /Assets/
folder, and Unity will automatically detect and import it like any other asset.
Select the file in the Project tab and configure the import settings in the Inspector. You can mouse-over anything for more info.
For more info, see Map Importer docs
First, create an asset to configure how maps get imported at runtime:
- In Unity, go to
Project tab > Create > Scopa > Map Config Asset
for maps (orWad Config Asset
for .WADs). This config asset is just aScriptableObject
container for import settings. - Select the asset and configure in the Inspector.
You can also create a new ScopaMapConfig()
or new ScopaWadConfig()
and configure it via code at runtime.
Then in your game code:
- add
using Scopa;
at the top of the C# file - call
ScopaCore.ParseMap()
to read the .MAP data - call
ScopaCore.BuildMapIntoGameObject()
with the map data and config.
Some general advice -- treat the .MAP file as the "single source of truth." Do all level edits in a .MAP level editor like TrenchBroom. Avoid editing the imported game object prefab instance in Unity, because your changes might be erased when you re-import the .MAP again.
Scopa has no map compiling nor VIS process. The difference between world brushes vs. brush entities doesn't matter.
To place items, NPCs, etc. in a level editor, you need to load a .FGD entity definition file into the tool.
Quake modders still write their FGDs by hand, which is sad, so instead we provide a built-in FGD generator. The workflow looks like this:
- in Unity, go to the Project tab and select
Create > Scopa > FGD Config Asset
. - select the new FGD Config Asset file and edit it in the Inspector tab: create new entity types, add properties, etc.
- when you're ready, click the
Export FGD...
button at the top of the Inspector, and save your new .FGD file
(PLANNED) Additionally, it can also generate API docs as .MD or .HTML, to serve as documentation for level designers.
We recommend saving the .FGD file outside of the /Assets/ folder, because you should not set your level editor to load your entire Unity project.
See the README.