Hello everyone, I've relied on the community a lot for help over the past few weeks and wanted to give back with a quick tutorial to help other people along. I'm aware there are some tutorials on using SQL out there, but I didn't see anything grounded in using a particular toolset. The intent of this tutorial is to provide a hands on look at my precise process for editing mods. Keep in mind I may not be the best person to do this, and other modders may have other techniques that are just as or more successful. This is just a way to show what my process is and what has worked for me. Preamble By the end of this tutorial you will be able to: Create a basic .modinfo file that includes references to the elements of your mod Connect SQLite Studio to the Civilization 6 debug database I will be following this tutorial up with more in a follow up post. I ran out of ability to upload photos to this post and so it has to happen in a followup. Here's what to expect in part 2 (currently being written as a follow up to this post): How to use the SQLite database to query data How to edit your SQL file to update the database How to test to make sure your code is working What is SQLLite Studio? SQLite Studio is a free tool that allows you to connect to SQLLite databases and write queries to gather or change the data they contain. There are many tools out there that you can use for this task. I like this one because it requires no install, is relatively fast, and has a number of useful features. What is Notepad++? Notepad++ is a free tool that is similar to Windows' default Notepad application, but which is "smarter" and is able to format SQL code and XML code intelligently. This is hugely helpful for modding. Before You Begin To complete this tutorial you will need to download the latest versions of SQLLite Studio and Notepad++. The links below will help orient you. http://sqlitestudio.pl/ https://notepad-plus-plus.org/ You will also need to download and unzip the tutorial mod file I have attached to this post. Tutorial Mod Structure.zip Ok Let's Get Started Now that you've got your tools installed, let's take a look at a super basic mod structure. Unzip Tutorial Mod Structure (attached to this post) and have a look. But before we do that, let's use a scenario to help us orient the discussion. Scenario: Let's write a mod that makes a simple edit to the Iron resource, so that players are able to see the resource once they reach the Craftsmanship civic, instead of researching the Bronze Working tech. The basic mod folder structure The structure of a mod can be very complex, but with the tutorial folder I have made it as simple as possible. Our mod will ultimately contain two files. A .modinfo file that will tell the game what files our mod contains. This is the first document read by the game upon loading our mod, and the "road map" it follows when deciding what assets to load and in what order. A .sql file that will contain the actual code that edits the game. Exploring .modinfo with Notepad ++ Let's take a look inside our .modinfo file. This may work a little differently on your machine. For me, I am able to open .modinfo by right clicking it and selecting "Edit with Notepad++" The file loads and looks like this: The main thing to note here is that Notepad++ color codes for us the various parts of the XML. This is very handy and just part of why Notepad++ is so helpful to modders. So let's get started customizing our mod. The most important thing to update is the GUID you see in the second line of the code. This is the part the currently reads: <Mod id="410d1dd4-1324-4e8f-bdc0-6f3f696ba62e" version="1"> . The game uses this to identify each unique mod, and no two mods are allowed to have the same code. To get a new code, go to https://www.guidgenerator.com/online-guid-generator.aspx. Select "Generate some GUIDS." Then just copy and paste the code it gives you over the code the currently exists. Once you have put your GUID in place, the rest is mostly cursory. Change the Name, Teaser, and Description to something worthwhile. Here's how I changed mine: Notice that further down the page there are some additional pieces. We don't actually need to change any of this for our mod to work, because its already set up for us. But it's helpful to understand what these sections do. The Files section will list every single file in your mod. We just have one file, Code.sql. But if we had more, we'd list every one of them here. The Components section, with its UpdateDatabase tag tells the game to perform a database update using the items listed inside. Since our mod is so simple, again there is only one file listed here. But if things we more complex we might need to use this section to specify a specific load order. There is a string in the UpdateDatabase call called "Id" currently set to PUT_A_UNIQUE_STRING_HERE. Well, technically you don't have to. But if you want to name a section of a database call something unique you can. It's beyond the scope of this tutorial. Fun with SQLite Now it's time to set our mod folder aside for a little while. We don't want to just jump into our .sql file and start making wild edits. We want to learn about the existing database first, and SQLite is the way we will do that. Connecting to the Civilization 6 Debug Database Open the SQLite application. Go to the top left and from the pull-down menu, select "Add a database." You'll get a pop-up like this: Leave the Database type as "SQLite 3" (at least I always have without problems). In the File menu, select the folder icon. Navigate to the Civilization 6 DebugGameplay database. This is a database that the game creates every time you run the game. It is updated in real time at the moment the game loads, and includes edits made by mods. It will be critical in helping us understand what is going on under the hood of the game. On my machine (and I assume everyone's) the database is located at \Documents\My Games\Sid Meier's Civilization VI\Cache Once the database is added, right click it in the list on the left and select connect to database. If this is successful, a list of all the tables in the database will show up on the left. Ok, at this point I'm out of ability to upload pictures. In part 2, which I will follow up on shortly, I will show how you will use SQLite Studio to view the database, and how what we see there will affect the code we ultimately write in our mod. Stay tuned.