Recently, a few budding programmers on the team have expressed some interest in some projects that will require the creation of a new tag. I read a guide similar to this to get started with coding and I've been meaning to do a walkthrough in C2C for a while. So when a new tag need suddenly came up for me, I figured I'd walk through the creation process as an example and then invite you to try to make one of your own and I could be here to help to advise on how to work through the unique aspects of that particular tag generation. The tag that I'm wanting to build today is one that will enable a promotion to give a combat modifier against units based on the state religion of their owner or specific religion of the units they fight. I'm sure that brings to mind lots of very specific questions about the intention like 'how do you define the religion of the unit itself' for which there are answers and we'll explore that as we go but the point of this thread is not so much to discuss the concept of the tag itself but to expose the process of implementing a tag in general. Promotions are a good place to start because they are both simple and also expose some extra steps that some other tags don't have. That may sound like an interesting contradiction but you should see what I mean as we go. I know that @KaTiON_PT is also wanting to input a new tag in promotions so once I've completed this procedure, I'd like to invite him to try working through that tag and showing his steps here to reinforce things for those to follow and to allow for comments where an adjustment should be made to the approach. Ok, so where do we begin? I'll start with an overview of steps (You can use this as a checklist to make sure you've covered everything): Declare and apply the new tag into the schema that this tag applies to. Declare the variable and function for calling on the tag's information in CvInfos.h Setup the tag in the appropriate CvInfos.cpp/CvBuildingInfos.cpp/CvUnitInfos.cpp file. Apply the tag to the game function - program how it works into the processing of the game itself. Address display factors for the tag, usually in CvGameTextMgr.cpp. Program tag AI where necessary. Expose to python if needed. Clearly, there are numerous sub-steps that can vary by what sort of tag you are inserting and we'll explore those as we go. I'm going to reserve quite a few posts here and then come back around to show exactly what steps I'm taking in deeper detail as I program this new tag. In the meantime, as you can see, the first step is to insert the tag into the schema. This is not quite as necessary as it used to be and you CAN have a tag in use that isn't declared in the schema since it's now more of a guide than an enforced set of rules for the xml as it is for normal CivIV modding. It IS possible to have a tag in use that is NOT in the schema now. But it's not good form as it can confuse folks. There's a time and place for that sort of thing and it's not generally within the scope of this discussion. I wrote a whole post on the subject of understanding the XML to the point of understanding the schema. This is really good stuff for ALL modders, whether you want to learn to program a tag or not. So before we proceed further, please try to absorb the material HERE. It's important to understand this post before proceeding. Once you read that, return and we can continue with this example. EDIT: Actually I think it may be better to now just keep reading on rather than referring to that link unless you want more indepth info that I somehow miss in the next section.