Setting Expectations
Before we dive in, we should establish what this guide is aiming to do. This guide won’t be a comprehensive set of instructions on how to add every single thing possible into the game. Nor is it going to be a comprehensive tutorial on working with JavaScript, SQL, or XML. We’ll be aiming to set you up with the basics, and to point you to where you can dig to find out how to do more, as well as providing documentation where necessary.Help! I don’t know how to code at all!
If you’ve never touched a code editor, here’s some advice on getting started. You don’t necessarily need to have coded before to make a mod. The most important languages to know, XML and SQL, are simple enough to parse even if you’ve not worked with them before if you’re patient and observant.XML
XML
You’ll likely find XML simple enough to understand even without prior experience. Look at the sample code and example mods and examine their structure. The first line is always an Whitespace (the empty space between elements) does not matter. However, it’s good practice to structure the code in a way that makes it easy to read.Just make sure everything is closed properly, and that the structure matches the examples or what you find in the game files.
XML Declaration. Afterwards, every opening <tag> has a closing </tag> or is self-closing like this: <tag/>. A pair of tags or a self-closing tag is called an element. Elements can have children (additional elements nested between the opening and closing tags), and attributes, like so <tag Attribute="Value"></tag>.SQL
SQL
SQL is more complicated, but you probably can also get pretty far just by copying the structure of the code in the example mods and game files.The core of SQL are
statements, which generally begin with an instruction (like INSERT INTO), and always end with a semicolon ;. Whitespace doesn’t matter so long as the words are properly separated. Play attention to the commas and semicolons! Mixing them up will break the code!JavaScript
JavaScript
JavaScript is a programming language, and you’ll likely not be able to learn it just by reading example code. You don’t need to know JavaScript to start modding, and you won’t need it at all for most mods that don’t change the game’s UI.Luckily for those of you who do want to make UI mods or more complex gameplay mods, as the most important language of the internet, there are plenty of resources out there to help you learn JavaScript! Find them online to learn the basics if you want to jump into UI modding or gameplay scripting.
Setting Up
- Tools
- Important Folders
- Settings
While theoretically you can make a mod with just Windows Notepad, it’ll be easier with the correct tools.
Code Editor
You’ll want a text editor that is geared towards code. Visual Studio Code (also known as VS Code) is a good option for this.
Civilization VII Modding SDK
If you’re looking at this documentation, you probably have this already! You’ll want the Steam Workshop Uploader to be able to upload mods to the Steam Workshop; and FireTuner, which is a debugging tool that lets you run Javascript commands, and provides access to a UI that functions as an Ingame editor to help you debug your mods.
SQLite Database Browser
A tool to view the game’s debug database may help you understand what is going on and visualise what data is available to work with. You WON’T need this for your first few mods, but it can be helpful as begin making more complex mods.
Your First Mod
Let’s make your first mod! In theMods folder, create a new empty folder. Name it what you want. Then create a new empty file in that folder. You can also name it what you want, but make sure it has the .modinfo file extension.
Open the file in a code editor, and copy and paste the following into the file, then save the file.
What you’ve just done is created a .modinfo file. They are the crux of all mods. They tell the game what files to load and what to do with them. They tell the game how your mod interacts with DLC and other mods.
Wrapping Up
A couple of things to note about our.modinfo file.
First, the id in the first line is currently set to my-first-mod. While this is okay for now, you’ll want to ensure these IDs are unique in the future. Multiple mods with the same ID will be identified as different versions of the same mod, and we don’t want that for our brand-new mod!
Also notice the Properties section, those various fields (Name, Description, Author) can be edited as you wish. You can also toggle AffectsSavedGames off by setting it to 0, for things like UI mods that can be disabled or enabled in between sessions without affecting the game state.
You can learn more about how .modinfo files are structured in the modinfo Files article.
But of course, we probably want our mod to actually do something. See the Database Modding article to learn more.
Important: Don’t worry if you don’t fully understand or feel a little overwhelmed while going through these documents! A lot of learning to mod is slowly picking up how the game structures its data through looking at examples. Even veteran modders will copy existing code from the game and other mods, and modify it to suit their needs. You aren’t expected to know everything here by heart!



