Introduction
#What is it
This is a procedurally generated website providing detailed explanation of each Unreal Engine (5+) setting and console variable.
A user can use this site as a wiki to search for information they care; or browse the alphabetic pages for an overview.
I will keep this site up to date whenever a new version of the Engine is released.
#Why did I create this project
I am a busy game programmer unsatisfied with the built-in cvar help system.
You can generate this html page for free in the Unreal Editor by executing the help
command in the console command bar.
As you can see, the built-in help system leaves so much to be desired.
But the cvar and setting system are such crucial pieces that if you mess up even just one variable, you screw up your entire game.
I want a help system that can give me contextual information about a variable such as
- Where is it used in the source code?
- What is its purpose?
- The best usage practice, the DOs and DONTs
I also want such system maintainable, and its content generated procedurally. Otherwise, imagine the effort of hunting down all 10,000 setting and console variables including their usages in the source code.
#How did it work
I develop a software system that analyzes the Unreal Engine code base and generates a knowledge graph. Each node in this graph represents a setting/cvar variable, with its edges reflecting connections in the source code.
It involves several innovative software systems to perform source code static analysis, build a knowledge graph database, consolidate the knowledge, and compile it in the desired format.
I took inspiration from several products:
- JetBrains proprietary source code indexing system
- SonarQube
- Universal Ctags
- The tree-sitter project and its ecosystem
- Libclang and Clangd
- Ripgrep and Ack
- Bison
- Tokei
- Meta’s Infer
The search system is powered by Pagefind.
The frontend of this project is built in Hugo.
I also took an experimental approach, feeding the knowledge graph to a series of LLMs that produced human-friendly summaries. You can find this procedurally generated summary in about 3/4 of the variables. For instance: https://indxzero.github.io/ue544cvarwiki/articles/a.animnode.footplacement.enable.lock/index.html#summary. Those that do not have this procedural summary are either too trivial to summarize or the size of the knowledge graph is too large for inference.
#Known Issues
There are some small issues unresolved.
I missed some setting and console variables, less than 50 out of 10,000, due to certain static analysis limitations, such as bypassing the Unreal Engine’s messy pre-processor directives.
The AI-generated summary can contain self-conflicting information. It is in the nature of any large language model. If you see any mistakes or errors, please let me know.
Some English typos :) Because neither human nor software is perfect.
#Future Iterations
Get the feedback from the community. Is it helpful at all? Did I miss anything?
Improve the static analysis to correctly handle the pre-processor directives, the thing I love and hate in C++.
Next year, if I have a chance to work full-time on this project, I want to take a stab in these directions:
Polish the LLM training toolkit so it works on a broader range of Game Engine code bases, Bevvy, Godot, Ogre3d, and even non-game C++ code bases. Eyeing tensorflow, electron, llama.cpp, imgui.
Make a VSCode or Rider plugin that automatically gives you instructions when you set the value of a setting variable.
Extend the knowledge graph so it understands function call-chain and memory addressing, meaning that it can help you infer the run-time details. I have done some early prototypes in this direction. This may become a spin-off project.