making a building help

ThunderMohawk

Chieftain
Joined
Sep 16, 2012
Messages
19
Hello. So I have tried to make a building and am hoping for some help. I read a guide and got templates. So I tried to make a "TOWN CENTER." This is what I got. It didn't appear which isn't too surprising but I'm confused as to how to get it up and working. Thanks for any help. Oh, also I noticed there are certain settings you don't have to include like prereqTech and building types needed. But I would like for this building to need Pottery(just to test the option). And I'm unsure if taking away teh building type and class needed part will screw things up so I'll leave that.

Code:
<GameData>
	<BuildingClasses>
		<Row>
			<Type>BUILDINGCLASS_TOWN_CENTER</Type>
			<DefaultBuilding>BUILDING_TOWN_CENTER</DefaultBuilding>
			<Description>TXT_KEY_BUILDING_TOWN_CENTER</Description>
		</Row>
	</BuildingClasses>
	<Buildings>
		<Row>
			<Type>BUILDING_TOWN_CENTER</Type>
			<BuildingClass>BUILDINGCLASS_TOWN_CENTER</BuildingClass>
			<Cost>80</Cost>
			<GoldMaintenance>2</GoldMaintenance>
			<Description>TXT_KEY_BUILDING_TOWN_CENTER</Description>
			<Civilopedia>TXT_KEY_CIV5_BUILDINGS_TOWN_CENTER_TEXT</Civilopedia>
			<Strategy>TXT_KEY_BUILDING_TOWN_CENTER_STRATEGY</Strategy>
			<PrereqTech>TECH_POTTERY</PrereqTech>
			<Help>TXT_KEY_BUILDING_TOWN_CENTER_HELP</Help>
			<ArtDefineTag>ART_DEF_BUILDING_TOWN_CENTER</ArtDefineTag>
			<MinAreaSize>-1</MinAreaSize>
			<Happiness>2</Happiness>
			<ConquestProb>66</ConquestProb>
			<HurryCostModifier>25</HurryCostModifier>
			<NeverCapture>true</NeverCapture>
			<IconAtlas>BW_ATLAS_1</IconAtlas>
			<PortraitIndex>19</PortraitIndex>
		</Row>
	</Buildings>
	<Building_ClassesNeededInCity>
		<Row>
			<BuildingType>BUILDING_TOWN_CENTER</BuildingType>
			<BuildingClassType>BUILDINGCLASS_MONUMENT</BuildingClassType>
		</Row>
	</Building_ClassesNeededInCity>
	<Building_YieldChanges>
		<Row>
			<BuildingType>BUILDING_TOWN_CENTER</BuildingType>
			<YieldType>YIELD_GOLD</YieldType>
			<Yield>2</Yield>
		</Row>
	</Building_YieldChanges>
	<Building_Flavors>
		<Row>
			<BuildingType>BUILDING_TOWN_CENTER</BuildingType>
			<FlavorType>FLAVOR_HAPPINESS</FlavorType>
			<Flavor>10</Flavor>
		</Row>
	</Building_Flavors>
	<Language_en_US>
		<Row Tag="TXT_KEY_BUILDING_TOWN_CENTER">
			<Text>The TOWN_CENTER</Text>
		</Row>
		<Row Tag="TXT_KEY_BUILDING_TOWN_CENTER_HELP">
			<Text>The Town Center adds +2 [ICON_HAPPINESS] Happiness, and +2[ICON_GOLD] Gold.</Text>
		</Row>
		<Row Tag="TXT_KEY_BUILDING_TOWN_CENTER_STRATEGY">
			<Text>
				The Town Center provides a boost to your [ICON_HAPPINESS] Happiness and [ICON_GOLD]

				Gold.
			</Text>
		</Row>
		<Row Tag="TXT_KEY_BUILDING_TOWN_CENTER_Text">
			<Text>
				The Town Center is located in the center of a town or city. It is used for a variety of tasks such as economic and political affairs.
			</Text>
		</Row>
	</Language_en_US>
</GameData>
 
put that in
Code:
 tags.
 
He wants you to surround the code that you post in the forums with "Code" tags so that it's easier to read. Like "Spoiler" tags, except it says "Code".

Go to config.ini and set loggingenabled to 1, and then check the database.log file for errors. If you are confused about any errors, post here.
 
It looks like there is an unneeded space in the following line:

Code:
<Civilopedia>TXT_KEY_CIV5_BUILDINGS_TOWN_CENTER_TE XT</Civilopedia>

That might mess up the whole thing.
 
That space wasn't in the modbuddy coding so idk how it got to what I posted. But here's my errors I got. They are all from random mods where I wanted to download civs. i didn't make those. I don't have the babylon pack btw, just Spain and Inca, Denmark, explorers map pack, and gods and kings.

[185858.608] constraint failed
[185858.608] While executing - 'INSERT INTO ArtDefine_StrategicView(StrategicViewType, TileType, Asset) VALUES(?,?,?)'
[185870.729] Validating Foreign Key Constraints...
[185871.790] Invalid Reference on Leader_MinorCivApproachBiases.LeaderType - "LEADER_KAMEHAMEHA" does not exist in Leaders
[185871.790] Invalid Reference on Leader_MinorCivApproachBiases.LeaderType - "LEADER_SEJONG" does not exist in Leaders
[185871.790] Invalid Reference on Leader_MinorCivApproachBiases.LeaderType - "LEADER_NEBUCHADNEZZAR" does not exist in Leaders
[185871.790] Invalid Reference on Leader_Flavors.LeaderType - "LEADER_KAMEHAMEHA" does not exist in Leaders
[185871.790] Invalid Reference on Leader_Flavors.LeaderType - "LEADER_KAMEHAMEHA" does not exist in Leaders
[185871.790] Invalid Reference on Leader_Flavors.LeaderType - "LEADER_SEJONG" does not exist in Leaders
[185871.790] Invalid Reference on Leader_Flavors.LeaderType - "LEADER_SEJONG" does not exist in Leaders
[185871.790] Invalid Reference on Leader_Flavors.LeaderType - "LEADER_NEBUCHADNEZZAR" does not exist in Leaders
[185871.790] Invalid Reference on Leader_Flavors.LeaderType - "LEADER_NEBUCHADNEZZAR" does not exist in Leaders
[185872.632] Failed Validation.
[185873.568]
-- SQLite Memory Statistics --
Memory Usage:
[Cur] [Max]
Malloc: 363136 28078512
PageCache: 4313 4982
LookAside: 0 0
Scratch: 0 1

Static Buffer Overflows:
[TooLarge] [NoSpace]
PageCache: 0 25033960
Scratch: 0 0

Largest Allocations:
Malloc: 131072
PageCache: 1160
Scratch: 6640

Prepared Statements:
Current: 6
------------------------------
 
That space wasn't in the modbuddy coding so idk how it got to what I posted. But here's my errors I got. They are all from random mods where I wanted to download civs. i didn't make those. I don't have the babylon pack btw, just Spain and Inca, Denmark, explorers map pack, and gods and kings.

[185858.608] constraint failed
[185858.608] While executing - 'INSERT INTO ArtDefine_StrategicView(StrategicViewType, TileType, Asset) VALUES(?,?,?)'
[185870.729] Validating Foreign Key Constraints...
[185871.790] Invalid Reference on Leader_MinorCivApproachBiases.LeaderType - "LEADER_KAMEHAMEHA" does not exist in Leaders
[185871.790] Invalid Reference on Leader_MinorCivApproachBiases.LeaderType - "LEADER_SEJONG" does not exist in Leaders
[185871.790] Invalid Reference on Leader_MinorCivApproachBiases.LeaderType - "LEADER_NEBUCHADNEZZAR" does not exist in Leaders
[185871.790] Invalid Reference on Leader_Flavors.LeaderType - "LEADER_KAMEHAMEHA" does not exist in Leaders
[185871.790] Invalid Reference on Leader_Flavors.LeaderType - "LEADER_KAMEHAMEHA" does not exist in Leaders
[185871.790] Invalid Reference on Leader_Flavors.LeaderType - "LEADER_SEJONG" does not exist in Leaders
[185871.790] Invalid Reference on Leader_Flavors.LeaderType - "LEADER_SEJONG" does not exist in Leaders
[185871.790] Invalid Reference on Leader_Flavors.LeaderType - "LEADER_NEBUCHADNEZZAR" does not exist in Leaders
[185871.790] Invalid Reference on Leader_Flavors.LeaderType - "LEADER_NEBUCHADNEZZAR" does not exist in Leaders
[185872.632] Failed Validation.
[185873.568]
-- SQLite Memory Statistics --
Memory Usage:
[Cur] [Max]
Malloc: 363136 28078512
PageCache: 4313 4982
LookAside: 0 0
Scratch: 0 1

Static Buffer Overflows:
[TooLarge] [NoSpace]
PageCache: 0 25033960
Scratch: 0 0

Largest Allocations:
Malloc: 131072
PageCache: 1160
Scratch: 6640

Prepared Statements:
Current: 6
------------------------------


Those errors aren't coming from any mods and are completely harmless. The game is just expecting you to have Polynesia, Korea, and Babylon. There is no harm in you not having them. It's just the game having references to them and them not being there.

Specifically, it's looking for 2 subsets of AI flavours to determine probability of engaging in a certain behavior.

But yeah, as far as I'm concerned you've got no errors.

As for your original post... The game isn't expecting your Building Class anywhere, so it isn't going to use it. Give it a prerequisite tech. Since there is nothing in that building class to inherit from, you're going to have to fill in every single detail.
 
ah alright. But I did give it a prerequisite tech. It's pottery. Did I do that wrong? Can you please give me an example of how to do it properly? And hold on, there's nothing in that building class. But then how do I code in everything I need? Or would it be easier to use a different one? which would you suggest if so? thanks
 
ah alright. But I did give it a prerequisite tech. It's pottery. Did I do that wrong? Can you please give me an example of how to do it properly? And hold on, there's nothing in that building class. But then how do I code in everything I need? Or would it be easier to use a different one? which would you suggest if so? thanks

Do you intend to replace a building? Also, can you purchase the building from the city purchase menu?
 
No I don't intend to. It's supposed to be almost like a palace for every other city besides your capital. The capital gets a palace and every other city can build a Town Center. They have completely different yields but that's the simple rule I was hoping for. First I just wanted to see if it would work though. i want to to show up in the game. Yes, I want it to be purchasable.
 
No I don't intend to. It's supposed to be almost like a palace for every other city besides your capital. The capital gets a palace and every other city can build a Town Center. They have completely different yields but that's the simple rule I was hoping for. First I just wanted to see if it would work though. i want to to show up in the game. Yes, I want it to be purchasable.

I mean, IS it purchasable? Also, try editing every civ's UA to include town centers in every town. Try making palaces and tc's mutually exclusive like nuke plants and solar plants to avoid having a palace and a town center.
 
Back
Top Bottom