Beginner questions on changing buildings

JNR13

Chieftain
Joined
Oct 23, 2016
Messages
50
Hi, my goal is to do some changes to districts, the buildings inside them in particular. The first thing I'm trying to do is provide more choices in the Campus district. I have created three buildings per tier and that has gone pretty well by itself, since those entries are new. However, I'm still left with a few questions that I didn't find the answer for in the common beginner tutorials.

1. First of all, the most basic: How do actually overwrite and delete entries? I saw in the expansion files that there are upgrade and delete tags, but am a bit unsure about how exactly they work and what their syntax is. Also, how thorough do I have to be? For example, if I want to delete the Library (because I have three new buildings for that tier), is it enough to just do this:

Code:
<GameInfo>
    <Buildings>
        <Delete BuildingType="BUILDING_LIBRARY"/>
    </Buildings>
</GameInfo>

or do I have to do it for all entries relating to the library?

2. As for updating, I have to adjust the Madrasa to bring it in line with the rest. If someone could show me how to adjust its building cost and purchase yield type from gold to faith, I'd appreciate that.

3. I want some buildings to add science to a certain group of resources. To be precise, each T3 building would boost another resource type. One would add +1 science to strategic resources, one +1 science to bonus resources, etc. I would be able to do it by defining the bonus for each resource individually, by copying code from the Water Mill, but then I realized that it would make the mod incompatible with Resourceful. Would I have to create an additional compatibility file defining the bonus for the Resourceful resources, or is there a way to address types of resources directly?

4. Is it possible to add Influence Points ("Points towards Envoys per turn") as yields to buildings, or just Influence Tokens (Envoys to spend)? I can see the latter being done for some wonders, but would like something more granular and a permanent yield instead of a bonus upon building completion.

I have no experience at all with SQL, all I can do is learn from looking at the game files. I know the basics of the code in XML, have created new civs in Civ V for example, but with so many mods for VI using SQL, looking at how other mods do things is only sometimes possible.

I'd greatly appreciate any help or pointers towards resources which could help me out. I think I went over the basic tutorials already, but I'm still fairly new here so apologies in advance if I missed some super obvious resources.
 
Ad. 1. There are cascading rules on most of the tables, so if you delete a primary key, like in the example, the DB will auto-delete all entries that refer to it.
Ad. 2. Modifiers.
Ad. 3. Modifiers.
Ad. 4. That I don't know.
 
Ok thanks for clearing up 1. I really appreciate your response, your Real Building Upgrades mod is what I wanted to use for orientation (I just couldn't since I know jack horsehocky about SQL unfortunately).

Maybe I should've expressed myself better about 2. I'm not looking for modifiers there, I know the line I need to change, it's the standard line under "buildings":

Code:
<Row BuildingType="BUILDING_MADRASA" Name="LOC_BUILDING_MADRASA_NAME" Description="LOC_BUILDING_MADRASA_DESCRIPTION" PrereqCivic="CIVIC_THEOLOGY" PrereqDistrict="DISTRICT_CAMPUS" PurchaseYield="YIELD_GOLD" Cost="250" AdvisorType="ADVISOR_TECHNOLOGY" Maintenance="2" Housing="1" CitizenSlots="1" TraitType="TRAIT_CIVILIZATION_BUILDING_MADRASA"/>

I want to change "PurchaseYield" and "Cost" there. I think I need to use the upgrade function, but am not sure on what the proper syntax is.

About 3., I'm a bit overwhelmed by all the modifier options there. I know I need to use modifiers but the only one I found that was relevant was the type of modifier used for the Water Mill. I'm looking for a cleaner solution but can't think of anything where a modifier describing a whole category of resources is used by itself.
 
I rarely use .xml since sql is much more powerful. Just look through the game files or mods and look for update statements. They look like these:
Code:
    <GlobalParameters>
       <Update>
           <Where Name="DIPLOMACY_ALLIANCE_TIME_LIMIT"/>
           <Set>
               <Value>70</Value>
           </Set>
       </Update>
    </GlobalParameters>
    <Resources>
       <Update>
           <Where ResourceType="RESOURCE_BANANAS"/>
           <Set>
               <Frequency>1</Frequency>
           </Set>
       </Update>
    </Resources>
 
Top Bottom