Some advice/help for beginning modder

Yard1

Chieftain
Joined
Apr 22, 2012
Messages
30
Hi,

I'm taking my first steps in Civ V modding, and I need some help. Can you help me making a building that uses oil and is it hard to make a world wonder/project/nationial wonder?

I will post more details about that building (Refinery) and a code that I managed to write with few tutorials after school.

Thanks!
 
Welcome to the Dark Side. (We have cookies!)

If you're just getting started, the first thing you need to do is go read Kael's beginner modders' guide. A few bits of it are out-of-date, but it'll get you pretty far.

Adding new wonders and projects aren't difficult, as long as the game already includes the ability to do whatever you want that wonder or project to do. Adding entirely new abilities is MUCH harder, and in many cases is outright impossible.
 
Yay cookies!

WALL OF TEXT INCOMING.

Thanks, I've already read that tutorial (which is very nice), but my main computer is not working (dammn you Sapphire graphic cards!) and my laptop is unavailable so I'm writing this from my crappy 2002 y. backup comp without Civ V, so I can't check many things for myself :(

Anyway, that's what I came up with for the Refinery (Based on palisade from Kael's tut) :

Code:
<GameData>
	<Buildings>
		<Row>
			<Type>BUILDING_REFINERY</Type>
			<BuildingClass>BUILDINGCLASS_REFINERY</BuildingClass>
			<Cost>60</Cost>
			<GoldMaintenance>1</GoldMaintenance>
                        <PrereqTech>TECH_PLASTICS</PrereqTech>
			<Help>TXT_KEY_BUILDING_REFINERY_STRATEGY</Help>
			<Description>TXT_KEY_BUILDING_REFINERY</Description>
		       <Civilopedia>TXT_KEY_CIV5_BUILDINGS_REFINERY_TEXT</Civilopedia>
			<Strategy>TXT_KEY_BUILDING_REFINERY_STRATEGY</Strategy>
			<ArtDefineTag>...</ArtDefineTag>
			<MinAreaSize>-1</MinAreaSize>
			<HurryCostModifier>25</HurryCostModifier>
			<IconAtlas>BW_ATLAS_1</IconAtlas>
			<PortraitIndex>32</PortraitIndex>
		</Row>
	</Buildings>
</GameData>

I have few questions:

I'd like to make that building add +15% production, +3 production and +1 prod on every oil field that lies in the borders of the city. I guess it will have something to do with YIELD_PRODUCTION, right?

I'd also like to make that building cost 1 oil and to be available with Plastics technology (is <PrereqTech>TECH_PLASTICS</PrereqTech> ok?)

Also, what are tags:
Code:
		<ArtDefineTag>...</ArtDefineTag>
			<MinAreaSize>-1</MinAreaSize>
			<HurryCostModifier>25</HurryCostModifier>

I guess that <ArtDefineTag> is for the icon, right? I have no clue on the others.

--------------

Code:
<GameData>
	<BuildingClasses>
		<Row>
			<Type>BUILDINGCLASS_REFINERY</Type>
			<DefaultBuilding>BUILDING_REFINERY</DefaultBuilding>
			<Description>TXT_KEY_BUILDING_REFINERY</Description>
		</Row>
	</BuildingClasses>
</GameData>

This should go to other file than the above one, am I right?

Same goes for this:

Code:
<GameData>
	<Language_en_US>
			<Row Tag="TXT_KEY_BUILDING_REFINERY">
			<Text>Refinery</Text>
		</Row>
		<Row Tag="TXT_KEY_BUILDING_REFINERY_STRATEGY">
			<Text>SOME CRAPPY TEXT.</Text>
		</Row>
		<Row Tag="TXT_KEY_CIV5_BUILDINGS_REFINERY_TEXT">
			<Text>SOME CRAPPY WIKIPEDIA TEXT.</Text>
		</Row>
	</Language_en_US>
</GameData>

More questions!

How should I name those files, and which one of those code chunks goes where?
I'm not using ModBuddy, but should I?

I think that's all. Thanks again, if you dug through that all crap!
 
I'd like to make that building add +15% production, +3 production and +1 prod on every oil field that lies in the borders of the city. I guess it will have something to do with YIELD_PRODUCTION, right?

The Building_YieldModifiers table adds +X% to a yield in a city.

The Building_YieldChanges table adds +X to a yield in a city.

The Building_ResourceYieldChanges table gives +X to a yield on every instance of a resource. Note that it's not by improvement type, so you can't boost land-based Oil without boosting water-based Oil as well.

Basically, a "Change" is a +X or -X, while a "Modifier" is a percentage increase; that naming scheme is used throughout the game. Note that the Changes are always applied first, so if you have a building that gives +3 and +15%, it'll add the 3 BEFORE adding the 15%. And note that Modifiers stack linearly; that is, if two buildings each add +15%, then the final result is 1.3 times the base value, not 1.15*1.15.

So what you should do is look at the existing Buildings files, find those tables I mentioned, and mimic what you see. For instance, the first one would be
Code:
<GameData>
    <Building_YieldModifiers>
        <Row>
            <BuildingType>BUILDING_REFINERY</BuildingType>
            <YieldType>YIELD_PRODUCTION</YieldType>
            <Yield>15</Yield>
        </Row>
    </Building_YieldModifiers>
</GameData>
That's all it takes to have a Refinery add +15% to Production. There are quite a few tables in the buildings file that let you make this more complex, like +X% if a certain resource is nearby, or +X to all river tiles in the area.

I'd also like to make that building cost 1 oil and to be available with Plastics technology (is <PrereqTech>TECH_PLASTICS</PrereqTech> ok?)

Not quite. The name of the tech is TECH_PLASTIC, not plural. There are a few techs like this, where they misspelled something internally. For instance, the Penicillin tech is spelled TECH_PENICILIN (only one L). You have to be careful and use the right name, but your logfiles will tell you if you've got something wrong.

As for costing 1 oil, that's the Building_ResourceQuantityRequirements table, which is what's used to make Factories cost coal, Nuclear plants cost uranium, and so on. Again, just mimic what you see there in a new entry for your new building.

Also, what are tags:

ArtDefineTag defines what 3D model the game should use when placing this building on the terrain near your city. It's completely optional, and is generally only used for Wonders; most buildings don't use a custom 3D graphic. It does NOT control the icon used; that's what IconAtlas and PortraitIndex are for. (Specifically, IconAtlas says which atlas to use, and Portrait Index is the position within that atlas, from 0 to 63.)
Adding a new art definition requires modifying one of the game's artdefines files, which are NOT GameData and so require you to replace the entirety of the game's file with a new one. Adding icons is much, much easier, but still requires you to create a series of DDS files, which have to be loaded through the Virtual File System (VFS).

MinAreaSize is almost never used, and basically just says that you can't build this building unless your city controls enough area of a certain type to make it worthwhile. In the vanilla game, this is set to -1 for everything other than the Lighthouse, Harbor, Seaport, Great Lighthouse, Colossus, and Sydney Opera House, which have it at 10. These are all the coastal buildings, so unless you want to make your new building have a similar restriction, leave it at -1.

HurryCostModifier affects how expensive this building is to purchase with gold if you want to just buy it instead of producing it normally. By default, a building costs X gold per hammer, where X scales with a few factors (difficulty, map size, and so on). A 25 means, add another +25% on top of that value. So the Courthouse has a 50, which makes it quite a bit harder for you to just buy one in each city you conquer.
The reason nearly every building has a value of 25 for this, instead of just changing the base conversion rate and having every building be zero, is that unlike many other fields, HurryCostModifier cannot accept a negative number. So, the only way to make a building CHEAPER to rush is to have it be zero, while everyone else is 25. Many UBs (like the Wat or Satrap's Court) have a 15 instead of their counterparts' 25, to make them slightly cheaper to purchase, and some late-era buildings (like the Solar Plant) have a 0.
Setting this value to -1 means that the building cannot be purchased at all. Wonders have this -1, for obvious reasons. (This -1 is why it can't accept a negative cost modifier.)

This should go to other file than the above one, am I right?

XML modding does not care about filenames. You could take your entire mod, put it in a single file named Bob.xml, and it'd still work as long as you remembered to load it through an OnModActivated command. As long as you're only creating new GameData entries (or updating existing ones), file name does not matter at all.

When you're making a huge mod, then yes, it's easier to split your mod up into many files. Some people lump by type, like the core game does (i.e. all Building definitions go in one file, all BuildingClass in another, and so on), but others lump by content (all Refinery-related entries go in one file, and so on). The reason splitting it up is good is that if you have any bugs in an XML file, the entire file is thrown out. The logfiles will tell you what went wrong, of course, but it's still handy to have an easy way to see which parts of your mod are working fine and which aren't. If you split by content, then a mistake in your Refinery code will only stop the Refinery from loading, and won't affect any other buildings you've added, whereas if you split by type then depending on how wrong your new buildings look you'll know which part it failed in. It's a personal choice thing.

Once you start getting into UI modding, or altering art definitions, then those files DO need to keep their original names. But that's a whole other discussion about the VFS.

I'm not using ModBuddy, but should I?

Yes. Writing the XML isn't enough, you need to BUILD the xml, which (among other things) creates a .modinfo file the game needs; besides listing all of the files in the mod, the modinfo file also contains the OnModActivated command that tells the game to load the XML. (The game doesn't actually read XML directly, it translates it to SQL internally and then uses that. So you need to tell it which files should be converted to SQL.)
You can't fake a modinfo file easily because it includes a checksum for each of the mod's files to ensure they don't get corrupted. So learn to use ModBuddy.
 
Ok, so here is updated code (I think that I'll create one file per building)

Code:
<GameData>
	<Buildings>
		<Row>
			<Type>BUILDING_REFINERY</Type>
			<BuildingClass>BUILDINGCLASS_REFINERY</BuildingClass>
			<Cost>365/Cost>
			<GoldMaintenance>3</GoldMaintenance>
                        <PrereqTech>TECH_PLASTIC</PrereqTech>
			<Help>TXT_KEY_BUILDING_REFINERY_STRATEGY</Help>
			<Description>TXT_KEY_BUILDING_REFINERY</Description>
		         <Civilopedia>TXT_KEY_CIV5_BUILDINGS_REFINERY_TEXT</Civilopedia>
			<Strategy>TXT_KEY_BUILDING_REFINERY_STRATEGY</Strategy>
			<MinAreaSize>-1</MinAreaSize>
			<HurryCostModifier>25</HurryCostModifier>
			<IconAtlas>BW_ATLAS_1</IconAtlas>
			<PortraitIndex>32</PortraitIndex>
		</Row>
	</Buildings>
</GameData>

<GameData>
    <Building_YieldModifiers>
        <Row>
            <BuildingType>BUILDING_REFINERY</BuildingType>
            <YieldType>YIELD_PRODUCTION</YieldType>
            <Yield>15</Yield>
        </Row>
    </Building_YieldModifiers>
</GameData>

<GameData>
    <Building_YieldChanges>
        <Row>
            <BuildingType>BUILDING_REFINERY</BuildingType>
            <YieldType>YIELD_PRODUCTION</YieldType>
            <Yield>5</Yield>
        </Row>
    </Building_YieldChanges>
</GameData>

Building_ResourceYieldChanges GOES HERE WHEN I WILL HAVE ACCES TO LAPTOP

<GameData>
	<BuildingClasses>
		<Row>
			<Type>BUILDINGCLASS_REFINERY</Type>
			<DefaultBuilding>BUILDING_REFINERY</DefaultBuilding>
			<Description>TXT_KEY_BUILDING_REFINERY</Description>
		</Row>
	</BuildingClasses>
</GameData>

Building_ResourceQuantityRequirements GOES HERE WHEN I WILL HAVE ACCES TO LAPTOP

<GameData>
	<Language_en_US>
			<Row Tag="TXT_KEY_BUILDING_REFINERY">
			<Text>Refinery</Text>
		</Row>
		<Row Tag="TXT_KEY_BUILDING_REFINERY_STRATEGY">
			<Text>SOME CRAPPY TEXT.</Text>
		</Row>
		<Row Tag="TXT_KEY_CIV5_BUILDINGS_REFINERY_TEXT">
			<Text>SOME CRAPPY WIKIPEDIA TEXT.</Text>
		</Row>
	</Language_en_US>
</GameData>

1. Do I need so many GameData and other "big" tags? It's a bit fishy for me...
2. I'll download ModBuddy tomorrow (laptop). I don't think that it will run on 2002 comp without Civ V... But correct me if I'm wrong :D
3. Can you Spatz (or somebody else) be so kind to post examples of those:
Code:
Building_ResourceYieldChanges, Building_ResourceQuantityRequirements
As I said I can't look into files right now and I'd really like to have it ready, so I can just play with it.
4. AI will build this, right?
5. Will it be compatible with other mods, for example VEM?

PS HUGE THANKS to Spatz for all of these, have a cookie!
 
1. Do I need so many GameData and other "big" tags? It's a bit fishy for me...

No. All of your changes can (and should) be inside the same GameData block. But you can't combine any steps beyond that; you can have multiple Rows or Updates inside a single block, like you have on your Language_en_US block, but you can't nest it any further. If you had multiple buildings then they could have entries in the same <Buildings> block, but you can't somehow put the Building and the BuildingClass declaration for a single building in the same block.

2. I'll download ModBuddy tomorrow (laptop). I don't think that it will run on 2002 comp without Civ V... But correct me if I'm wrong :D

The SDK really needs to be on the same computer as the Civ5 itself, because it uses some of the same registry entries to figure out where to put the files, what user configuration file to use, and so on. I'm not sure if you can split it up like that, and even if you can, I wouldn't suggest it because passing files back and forth every time you want to tweak your mod will get old, fast.

3. Can you Spatz (or somebody else) be so kind to post examples of those:

You're not going to be able to do any of this until you get to a computer that has Civ5 on it, and all you need to do then is open the vanilla game's file in your Steam directory. So you might as well wait until you have a chance to sit down and look through those tables in detail. But they're pretty simple; Building_ResourceQuantityRequirements just has BuildingType, ResourceType, and Cost, while Building_ResourceYieldChanges is BuildingType, ResourceType, YieldType, and Yield.

4. AI will build this, right?

Not exactly, and I'm glad you asked. Inside the building file is a table Building_Flavors. This table tells the AI how desirable the building is, depending on its preferences and needs of the moment. For instance, the Lighthouse has Flavors of:
Naval Growth: 20
Growth: 5
Science: 5
Gold: 10
Tile Improvement: 20

These are technically on a -999 to +999 scale, but realistically 100 means "build this NOW" (i.e., the Factory has Production flavor of +100), and negative values aren't used. The modifiers are generally cumulative, so a building with five different +10s is on average about as desirable as a single +50, but spreading across multiple Flavors means the AI is less likely to make the building very desirable in one situation and very low in another.

It's hard to explain what a typical value is, because it often depends on Era. The Flavors for ancient-era techs are lower than those of classical-era techs, and so on up the line, to encourage the AI to beeline up the tree occasionally instead of always picking the cheapest option. The same goes for buildings and wonders. So, find the Flavors of buildings in a similar place on the tech tree to your new Refinery, and that'll tell you the sorts of totals you should be aiming for.

If you don't declare a Flavor for your new building, then the AI won't think the building is useful and will put it well below the other buildings in terms of priority. It'll still build one occasionally, as there's a heavy randomization element in the process, but you really need to pick flavor values for any buildings, units, or technologies you add if you want the AI to use them correctly.
(Note that a few things in the game, like improvements or resources, do not use Flavors even though the files in question DO have Flavor table declarations. So you can't use Flavors to make the AI see a certain Improvement as being more desirable.)
 
I left one <GameData> tag.

Code:
<GameData>
	<Buildings>
		<Row>
			<Type>BUILDING_REFINERY</Type>
			<BuildingClass>BUILDINGCLASS_REFINERY</BuildingClass>
			<Cost>360/Cost>
			<GoldMaintenance>3</GoldMaintenance>
                       		 <PrereqTech>TECH_PLASTIC</PrereqTech>
			<Help>TXT_KEY_BUILDING_REFINERY_STRATEGY</Help>
			<Description>TXT_KEY_BUILDING_REFINERY</Description>
		              <Civilopedia>TXT_KEY_CIV5_BUILDINGS_REFINERY_TEXT</Civilopedia>
			<Strategy>TXT_KEY_BUILDING_REFINERY_STRATEGY</Strategy>
			<MinAreaSize>-1</MinAreaSize>
			<HurryCostModifier>25</HurryCostModifier>
			<IconAtlas>BW_ATLAS_1</IconAtlas>
			<PortraitIndex>32</PortraitIndex>
		</Row>
	</Buildings>

    <Building_YieldModifiers>
        <Row>
            <BuildingType>BUILDING_REFINERY</BuildingType>
            <YieldType>YIELD_PRODUCTION</YieldType>
            <Yield>15</Yield>
        </Row>
    </Building_YieldModifiers>

    <Building_YieldChanges>
        <Row>
            <BuildingType>BUILDING_REFINERY</BuildingType>
            <YieldType>YIELD_PRODUCTION</YieldType>
            <Yield>5</Yield>
        </Row>
    </Building_YieldChanges>

Building_ResourceYieldChanges GOES HERE WHEN I WILL HAVE ACCES TO LAPTOP

	<BuildingClasses>
		<Row>
			<Type>BUILDINGCLASS_REFINERY</Type>
			<DefaultBuilding>BUILDING_REFINERY</DefaultBuilding>
			<Description>TXT_KEY_BUILDING_REFINERY</Description>
		</Row>
	</BuildingClasses>

Building_ResourceQuantityRequirements GOES HERE WHEN I WILL HAVE ACCES TO LAPTOP

	<Language_en_US>
			<Row Tag="TXT_KEY_BUILDING_REFINERY">
			<Text>Refinery</Text>
		</Row>
		<Row Tag="TXT_KEY_BUILDING_REFINERY_STRATEGY">
			<Text>SOME CRAPPY TEXT.</Text>
		</Row>
		<Row Tag="TXT_KEY_CIV5_BUILDINGS_REFINERY_TEXT">
			<Text>SOME CRAPPY WIKIPEDIA TEXT.</Text>
		</Row>
	</Language_en_US>
</GameData>

I messed around with files a bit few days later, I think I'll know where to look for those tags *wink*

Those flavors are in the same file that the building is (Buildings.xml)? I'll just copy and edit a bit Solar Plant ones, as it's pretty similar to this.

I'll also have to find oil's
Code:
		<IconAtlas>BW_ATLAS_1</IconAtlas>
		<PortraitIndex>32</PortraitIndex>
and paste them instead of this.


So, I'll just have to wait until tomorrow :) And I think that I will copy some Civ V files onto my memory stick and carry it between laptop and PC. After finishing Refinery, I will move over to Wonders!
 
I left one <GameData> tag.

Right. What you had there looks fine, except that your Cost variable is missing a <. (It says 360/Cost> instead of 360</Cost>.) And of course, the parts you haven't written yet, and the missing Flavors, but you already know about those.

I'll also have to find oil's
Code:
		<IconAtlas>BW_ATLAS_1</IconAtlas>
		<PortraitIndex>32</PortraitIndex>
and paste them instead of this.

You can't do that, usually.

You see, each type of icon needs to available in a certain number of sizes. Saying that you're using BW_ATLAS_1, icon #32, means that it uses the 33rd entry in the 256-pixel atlas, AND the 33rd entry in the 128-pixel atlas, AND the 33rd in the 64-pixel atlas, and so on down the line through all the various icon sizes that buildings use. The <IconTextureAtlas> table links a number of DDS files to each atlas, each with a different size, and the game just accesses the right one for the size it needs for any particular UI file. So if the Tech Tree's little icons need a 45-pixel icon, then the game will go grab the 45-pixel version of whatever building it's trying to draw there, while the Civilopedia uses the big 256-pixel version of the same icon for the building's entry, but one IconAtlas/PortraitIndex declaration in your Buildings entry handles both sizes.

The problem is that the existing atlases ONLY include the sizes that that particular icon is needed for; Technologies include the full set (256, 214, 128, 80, 64, 45, 32), which makes them the best choice to use for placeholder icons, but everything else only uses a subset of this as needed. For instance, Improvements don't have a 45-pixel size, which means that you can't use an Improvement icon in the tech tree (which uses 45-pixel icons for everything) without quite a bit of work. Very few atlases use the 214, 80, or 32 sizes, and even the 128 is relatively rare.

Basically, the Resource atlases used for the Oil icon might not have a size that Buildings need. In Kael's guide is a quick rundown of exactly which sizes each type of icon uses, but I can't check that right now. You can also just look in the IconTextureAtlases table (GameInfo subdirectory) to see what the core game uses. In theory you could extract the core game's DDS files, rescale them, and then add them back in at the appropriate size to fill any gaps, but really you're just better off creating new icons for your mod if you're going to be adding lots of content.

After finishing Refinery, I will move over to Wonders!

The only differences between a regular building and a Wonder are:
> Wonders get splash screens and audio. You can disable these if you don't want to add them. And since we can't add audio, there's no point in trying to make a custom splash screen voiceover.
> In their BuildingClass, wonders add a per-world limit of 1 (for World Wonders) or a per-team limit of 1 (for National Wonders).
> Most Wonders have 3D models on the terrain, although again, that's optional.
> In the Civilization_BuildingClassOverrides, you need add an entry to prevent city-states (CIVILIZATION_MINOR) from being able to build wonders. The core game also does the same with CIVILIZATION_BARBARIAN, but since Barbarians don't have cities there's not much need for this.
You should also do this with any resource-consuming buildings (like your Refinery), or at least make a second version that only city-states can build; in my own mods, I made a new "Secondhand Factory" building that gives a weaker version of the Factory's effects but costs no coal. (Same Building Class as the regular Factory, so regular civs can't build one; it's basically a UB for city-states.)
> Wonders usually have higher Flavors than contemporary buildings, with at least a little bit of FLAVOR_WONDER in addition to their other flavors.

Other than that, you make a wonder the exact same way you make a regular building.
 
I edited cost and I must delete that < accidentally...

I'll think about the icons later :/ I didn't thought it will be so difficult.

Well, I'm planning to make 1 World Wonder (WWW or Internet, I can't decide which name is better) and 2 national wonders (Lunar Colony and Mars Colony). All of those doesn't require 3D models :)

So, a few tweaks, placeholder icon and I will get this baby to work! Thanks Spatz!

EDIT:

According to Kael:

Resources 256, 80, 64, 45

Buildings 256, 128, 64, 45

So I need to resize 256 icon to 128.
 
I just can't make icons working! The building itself is ok, but those icons! There is just a grayish icon in pedia and on buildings list and red "error" icon in tech tree. What can I do? All xml have OnModActivated with correct paths.

XML/Buildings/Refinery.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- Created by ModBuddy on 6/5/2012 5:36:49 PM -->
<GameData>
	<Buildings>
		<Row>
			<Type>BUILDING_REFINERY</Type>
			<BuildingClass>BUILDINGCLASS_REFINERY</BuildingClass>
			<Cost>360</Cost>
			<GoldMaintenance>3</GoldMaintenance>
			<PrereqTech>TECH_PLASTIC</PrereqTech>
			<Help>TXT_KEY_BUILDING_REFINERY_STRATEGY</Help>
			<Description>TXT_KEY_BUILDING_REFINERY</Description>
			<Civilopedia>TXT_KEY_CIV5_BUILDINGS_REFINERY_TEXT</Civilopedia>
			<Strategy>TXT_KEY_BUILDING_REFINERY_STRATEGY</Strategy>
			<ConquestProb>66</ConquestProb>
			<MinAreaSize>-1</MinAreaSize>
			<HurryCostModifier>25</HurryCostModifier>
			<PortraitIndex>0</PortraitIndex>
			<IconAtlas>REFINERY_ICON_ATLAS</IconAtlas>
		</Row>
	</Buildings>

	<Building_YieldModifiers>
		<Row>
			<BuildingType>BUILDING_REFINERY</BuildingType>
			<YieldType>YIELD_PRODUCTION</YieldType>
			<Yield>15</Yield>
		</Row>
	</Building_YieldModifiers>

	<Building_YieldChanges>
		<Row>
			<BuildingType>BUILDING_REFINERY</BuildingType>
			<YieldType>YIELD_PRODUCTION</YieldType>
			<Yield>3</Yield>
		</Row>
	</Building_YieldChanges>

	<Building_ResourceYieldChanges>
		<Row>
			<BuildingType>BUILDING_REFINERY</BuildingType>
			<ResourceType>RESOURCE_OIL</ResourceType>
			<YieldType>YIELD_PRODUCTION</YieldType>
			<Yield>2</Yield>
		</Row>
	</Building_ResourceYieldChanges>

	<Building_ResourceQuantityRequirements>
		<Row>
			<BuildingType>BUILDING_REFINERY</BuildingType>
			<ResourceType>RESOURCE_OIL</ResourceType>
			<Cost>1</Cost>
		</Row>
	</Building_ResourceQuantityRequirements>

	<BuildingClasses>
		<Row>
			<Type>BUILDINGCLASS_REFINERY</Type>
			<DefaultBuilding>BUILDING_REFINERY</DefaultBuilding>
			<Description>TXT_KEY_BUILDING_REFINERY</Description>
		</Row>
	</BuildingClasses>

	<Building_Flavors>
	<Row>
		<BuildingType>BUILDING_REFINERY</BuildingType>
		<FlavorType>FLAVOR_GROWTH</FlavorType>
		<Flavor>10</Flavor>
	</Row>
	<Row>
		<BuildingType>BUILDING_REFINERY</BuildingType>
		<FlavorType>FLAVOR_PRODUCTION</FlavorType>
		<Flavor>70</Flavor>
	</Row>
	</Building_Flavors>

	<Language_en_US>
		<Row Tag="TXT_KEY_BUILDING_REFINERY">
			<Text>Refinery</Text>
		</Row>
		<Row Tag="TXT_KEY_BUILDING_REFINERY_STRATEGY">
			<Text>A Refinery is a Modern-era building which significantly increases a city's and oil field's production.</Text>
		</Row>
		<Row Tag="TXT_KEY_CIV5_BUILDINGS_REFINERY_TEXT">
			<Text>An Refinery is an industrial process plant where crude oil is processed and refined into more useful petroleum products, such as naphtha, gasoline, diesel fuel, asphalt base, heating oil, kerosene, and liquefied petroleum gas. Refineries are typically large, sprawling industrial complexes with extensive piping running throughout, carrying streams of fluids between large chemical processing units. In many ways, oil refineries use much of the technology of, and can be thought of, as types of chemical plants.</Text>
		</Row>
	</Language_en_US>
</GameData>

XML/GameInfo/IconTextureAtlases.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- Created by ModBuddy on 6/5/2012 8:26:33 PM -->
<GameData>
	<IconTextureAtlases>
		<Row>
			<Atlas>REFINERY_ICON_ATLAS</Atlas>
			<IconSize>256</IconSize>
			<Filename>refinery256.dds</Filename>
			<IconsPerRow>8</IconsPerRow>
			<IconsPerColumn>8</IconsPerColumn>
		</Row>
		<Row>
			<Atlas>REFINERY_ICON_ATLAS</Atlas>
			<IconSize>128</IconSize>
			<Filename>refinery128.dds</Filename>
			<IconsPerRow>8</IconsPerRow>
			<IconsPerColumn>8</IconsPerColumn>
		</Row>
		<Row>
			<Atlas>REFINERY_ICON_ATLAS</Atlas>
			<IconSize>64</IconSize>
			<Filename>refinery64.dds</Filename>
			<IconsPerRow>8</IconsPerRow>
			<IconsPerColumn>8</IconsPerColumn>
		</Row>
		<Row>
			<Atlas>REFINERY_ICON_ATLAS</Atlas>
			<IconSize>45</IconSize>
			<Filename>refinery45.dds</Filename>
			<IconsPerRow>8</IconsPerRow>
			<IconsPerColumn>8</IconsPerColumn>
		</Row>
	</IconTextureAtlases>  
</GameData>

Art:
refinery128.dds
refinery256.dds
refinery64.dds
refinery45.dds

All .dds has Import Into VFS on True.
 
YES! It's working! Refinery is working, with icons and all! Thanks to all of you (namely Spatz, Kael and whoward)! You can download it and try it out for yourself! Now I'm onto wonders!
 

Attachments

  • Extra Buildings (v 1).zip
    33.3 KB · Views: 47
Top Bottom