Buildings.txt

From Europa Universalis 3 Wiki
Jump to navigation Jump to search

This is where all the different buildings, or province improvements are defined. Required declarations here are cost and time. These defines the base cost to build and the time it will take. Since it is the base cost, this will be adjusted by modifiers (like inflation).

Optional declarations are prerequisites and not_if_x_exists. The first is used if you need to have one building in a province before you can build another, like in the case of forts. In addition to this, all buildings have prerequisites on technology. The latter is used if you want only one out of a group of buildings possible, like it is done for manufactories.

Other possible declaration are confirm and onmap. If confirm is set to yes, you will be promted to confirm the build. This is useful for expensive buildings or buildings that may block other buildings so that you won't choose one by mistake. Onmap = yes is used for those buildings that are shown on the game map, like manufactories.

And while we are on manufactories... You can define a building to add bonuses to provinces with certain goods. This is done through the manufactory declaration. The last declaration you may use is capital. If this is set to yes, the building is only available in the capital.

Common for all the yes/no declarations (confirm, onmap and capital) is that they are all no by default. You will only have to declare them if set to yes.

Here is an example using most of these declarations, the wharf:

wharf = {
    not_if_x_exists = { 
        refinery weapons textile fine_arts_academy university
    }
    cost = 1000
    time = 60

    naval_tech_investment = 5

    manufactory = {
        naval_supplies
    }
    population_growth = 0.01
    onmap = yes
    confirm = yes
}

We recognise most of the above, except for the Naval tech investment and population growth. These are exported modifiers giving the effects of the buildings. You can change or add these as you please.

Modding buildings

Now, what if I want to add a building type? Let's say I want to add a patronage of art, where I can set up a position for a famour artist in a province. The building would require a fine arts academy and add some prestige, say 1% annually:

patronage_of_art = {
    prerequisites = { 
        fine_arts_academy
    }
    cost = 1000
    time = 60
    prestige = 0.01
    confirm = yes
}

Now, before this addition can be complete, you will have to add some graphics. Buildings are defined in eight different files, depending on graphical culture types. The European buildings are e.g. defined in the file \gfx\interface\buildings_latingfx.dds. If you add a building you will have to add it to all these eight files. Also, keep in mind that the buildings on graphic files are given in the same order as they are defined on this text file. The building graphic is a 64*64 pixel image.

See also