
- Boots: No
- Release: None
- File: None
Leonida Build.bat Options and Flags: Every Option in the README, Explained
Build.bat and make_game.py accept options for finding a copy, choosing stages, and tuning shader translation. Every option is taken from the project README.
Contents
Build.bat and make_game.py
Leonida is built with Build.bat, which drives make_game.py. The build script is the entry point, and make_game.py is the program that carries out the build stages with the options the builder supplies. Understanding the build means understanding both parts: Build.bat starts the process, and the options passed to make_game.py control what the process does. This guide to building Leonida starts here, with the full option set taken from the project README, and no option added from elsewhere.
The build runs in stages named check, shaders, assets, runtime, and pipelines. Options control which stages run, which copy is used, where output goes, where work files go, and how shader translation behaves. Options also control the interface, the number of jobs, and whether the runtime is built. A builder who understands the options can run a narrow check, a shader-only run, or a full build, and can tell from the options used what kind of run was performed.
Every option in this guide is taken from the project README. If an option is not listed here, it is not claimed as a Leonida option in this guide. If an option is listed here, its explanation stays close to what its name and its place in the build imply, without adding behaviour that the README does not state. That restraint is deliberate: a build guide that invents flags would mislead builders into using controls that do not exist.
Build.batFinding and Checking a Copy
Three options concern finding, picking, and checking a copy: --find, --pick, and --check, with --check --full-check as a fuller form of the check. The --find option searches for a copy, the --pick option selects a copy, and the --check option checks a copy. The fuller check form runs a more complete check than the plain check. Together, they cover the steps a builder takes before shader or asset work begins: locate the copy, choose it, and validate it.
The copy check works for Xbox Series 1.0.2.1. That version statement is the scope of the check as stated, and builders should read it as a scope limit, not as a promise about other versions. A check that passes for that version validates the copy in the way the project defines, and a check that is run without the fuller form is a less complete check than the fuller form. The distinction between the two check forms matters when a builder reports a result: the form used should be named alongside the result.
The --game option specifies the game input for the build. It tells make_game.py which game copy or location to work with, so that the find, pick, and check steps have a defined target. Without a defined game input, the build cannot know which copy its stages should act on. The option is therefore a basic control, not an advanced tuning control, and it belongs at the start of any explanation of the build, alongside find, pick, and check.
python -I make_game.py --find
python -I make_game.py --pick
python -I make_game.py --check
python -I make_game.py --check --full-check
python -I make_game.py --gameChoosing Stages and Output
The --stages option selects which stages run, from the stage set check, shaders, assets, runtime, and pipelines. A builder can run all stages for a full build, or a subset for a focused run, such as a check without assets, or shaders without a full asset export. The stages option is what makes the difference between the full build size and the check size meaningful in practice: the full build needs about 400 GB free, while a check with shaders and runtime needs about 30 GB, because the stages selected determine how much work is done and how much output is produced.
The --out option sets the output location, and the --work option sets the work location. The default output location is Documents\Leonida, and the work location holds logs in work/logs/ and a pipeline cache file, pipeline_cache.bin. Separating output from work keeps the finished output apart from the intermediate files, logs, and cache that the build uses while it runs. A builder who changes either location should know which one holds the result and which one holds the working state.
The Leonida build guide explains the practical sequence for a full build and for a check, and the guide to Leonida prerequisites explains the tools the build needs before any option is used. This article explains the options themselves. A builder should read all three together: prerequisites first, options second, sequence third, so that no step is attempted before its requirements are in place.
python -I make_game.py --stages
python -I make_game.py --out
python -I make_game.py --workShader Translation Options
Shader translation has its own set of options, because translating 26,503 shaders involves choices about how shader features are handled. The --wave64-emulate option controls wave64 emulation, with values auto, on, and off. The --no-float-controls option controls float controls handling. The --bary-fallback option controls the fallback for barycentric handling. The --texel-offset-fallback option controls the fallback for texel offset handling. The --mesh-compute option and the --native-mesh option control mesh shader handling, with the native mesh form as one of the two approaches named.
Fallback options deserve a plain explanation. A fallback is what the translator does when the preferred handling for a shader feature is not available or not applicable. A fallback option therefore controls behaviour at the edge of translation, where a shader uses a feature that needs special handling. Builders who change a fallback option are changing how edge cases are translated, and they should report which fallback settings were used when they report a translation result, so that results can be compared fairly.
The wave64 emulation option deserves the same care. Wave64 is a shader execution width, and emulation controls whether wave64 behaviour is emulated, and how. The values auto, on, and off give three choices: automatic handling, emulation forced on, and emulation forced off. The related environment variable LEONIDA_W64_EMULATE also concerns wave64 emulation. The option and the variable both point to the same area of shader work, and a builder should be consistent about which control is being used when reporting a run.
python -I make_game.py --wave64-emulate auto
python -I make_game.py --wave64-emulate on
python -I make_game.py --wave64-emulate off
python -I make_game.py --no-float-controls
python -I make_game.py --bary-fallback
python -I make_game.py --texel-offset-fallback
python -I make_game.py --mesh-compute
python -I make_game.py --native-meshAudio, Jobs, and Interface Options
The --wav option concerns WAV output, and ffmpeg is required for --wav, because ffmpeg handles XMA2 material. Ffmpeg is otherwise optional in the build. That conditional requirement is important: a builder who does not need WAV output does not need ffmpeg, and a builder who uses --wav must have ffmpeg in place. The option and the requirement belong together, and neither should be described without the other.
The --jobs option controls how many jobs the build runs. More jobs can shorten a build, and fewer jobs can make a build easier to follow when something goes wrong. The option is a parallelism control, and its value should be reported alongside a build time, because a time without a jobs value is not comparable with a time from a different jobs value. The assets export time of about 2h 35m, for example, belongs to the run that produced it, with its own settings, and should not be treated as a fixed time for every run.
The --no-tui option disables the text user interface. The build normally presents a TUI setup screen, with key-switchable logs numbered 1 to 4 and Tab switching between them. The --no-tui option runs the build without that interface, which suits runs where the interface is not wanted or not available. The --runtime-build option builds the runtime, which is the stage output that includes the loader. The guide to the Leonida build output explains where the results of these options land and what they contain.
python -I make_game.py --wav
python -I make_game.py --jobs
python -I make_game.py --no-tui
python -I make_game.py --runtime-buildOption Summary Table
The table below gathers every option covered in this guide in one place. It is a summary, not a replacement for the sections above: each option's section explains its role in context, and the table lets a builder check that no option has been missed. All options are taken from the project README, and the table adds no option beyond those sections.
| Option | Area | Role |
|---|---|---|
| --find | Copy | Searches for a copy |
| --pick | Copy | Selects a copy |
| --check | Copy | Checks a copy |
| --check --full-check | Copy | Runs a fuller check |
| --game | Input | Specifies the game input |
| --out | Output | Sets the output location |
| --work | Output | Sets the work location |
| --stages | Stages | Selects which stages run |
| --wav | Audio | Concerns WAV output, ffmpeg required |
| --wave64-emulate | Shaders | Controls wave64 emulation, auto, on, off |
| --no-float-controls | Shaders | Controls float controls handling |
| --bary-fallback | Shaders | Controls barycentric fallback handling |
| --texel-offset-fallback | Shaders | Controls texel offset fallback handling |
| --mesh-compute | Shaders | Controls mesh compute handling |
| --native-mesh | Shaders | Controls native mesh handling |
| --jobs | Build | Controls how many jobs run |
| --no-tui | Interface | Runs without the text user interface |
| --runtime-build | Runtime | Builds the runtime |
Use only the options listed here. An option that is not in the README is not a Leonida option, and a build that relies on an invented flag will not behave as described.
Conclusion
Build.bat drives make_game.py, and make_game.py accepts the options explained in this guide: find, pick, and check for a copy, with a fuller check form, game input, stages, output and work locations, shader translation controls including wave64 emulation and fallbacks, WAV output with its ffmpeg requirement, jobs, interface, and runtime build controls. Every option here is taken from the project README, and no option beyond that set is claimed.
A completed build using these options is still not a running game. The game does not boot, there are 0 releases and 0 tags, and the loader runs a stand-in. The options control how the build prepares shaders, assets, and runtime work, and the honest endpoint for that preparation is the same as for every other part of Leonida: preparation at a stated scale, with the game itself still absent.
Frequently Asked Questions
How is Leonida built?
Leonida is built with Build.bat, which drives make_game.py. Options passed to make_game.py control the copy, the stages, the output, and shader translation behaviour.
What does the fuller check do?
The fuller check, --check --full-check, runs a more complete check than the plain --check. The copy check works for Xbox Series 1.0.2.1, and the check form used should be named alongside any result.
Is ffmpeg always required?
No. Ffmpeg is optional, except that it is required for --wav, because ffmpeg handles XMA2 material. A builder who does not use --wav does not need ffmpeg for the build.