SCRMaps
/
Sign in

Compiling

Keeping the source and the output apart.

6 min read

A map with EUD has to be compiled in EUD Editor 3 to produce a working .scx. The source map and the compiled map are different files, and confusing them is where beginners lose the most work.

  1. 1Open the source .scx as a project.
  2. 2Check that the EPScript is in TE and any plugin configuration is in Plugin.
  3. 3Compile. If it fails, the message carries a line number.
  4. 4Use the output for distribution. Never edit that file again.

A large share of compile errors are unit name mismatches. Every name the script references must exist in ScmDraft's unit list, character for character.

Common errors and their cause
unit not found / unknown unitThe script references a name that is not in ScmDraft's unit list, or differs by even one character.
undeclared variableA global used before it is declared. EPScript has no hoisting, so move the declaration above the function that uses it.
An MSQC error, or saving works but typing does notThe key table is missing from the Plugin section. EPScript in TE alone can save, but there is no way to type a code back in.
An error that starts with euddrafteuddraft's path was never set on EUD Editor 3's first run. Nothing builds until that path is given.
An EUD runtime error (compiles, fails in game)Not a syntax error but a scale problem, often caused by one more variable or comparison than before. Start by reverting whatever changed most recently.

Automating the build with a script adds one more trap. This one is not for beginners but for anyone who has a build script.

The compiler compiles whatever is in that folder and has no idea whether it is current. Break the step that copies sources into the build folder and week-old code keeps building, successfully, every time. A green compile is not evidence that your change reached the map - the only evidence is the staged file matching the source.

This once let two real fixes be “shipped and tested” while the map still held week-old code - every in-game result was evidence about the wrong build, and sent the hunt back after causes that were already fixed. So one rule: when a fix appears to change nothing, check that it actually reached the build before theorising about the fix.

A verification step in the build script ends it: byte-compare every staged file against its source, check the output is newer than all of them, and fail the build if not.

Sign in to track your progress