Rookie moder having trouble adding a Unique Building, what did I do wrong?

Galgus

Emperor
Joined
Aug 22, 2012
Messages
1,705
The intent of this mod is to remove the Tercio from Spain and replace it with the Temple-replacing Mission unique building, in a crude manner that probably wouldn't update art.

I tried to follow the relevant section of this guide and looking at a similar mod's code, but I can't manage to make the Mission actually show up in-game as a Temple replacement.

I set the mod's properties to updatedatabase onmodactivate in an attempt to follow this video's instructions, but it still would not work.

Since the mod I was basing it on seemed to have all non-icon stuff in one folder aside a modinfo folder that didn't seem to be dealing with the XML, I put all the code into one XML item under a folder.

This is the XML code: do you have any idea what I'm not doing right?



<?xml version="1.0" encoding="utf-8"?>
<!-- Created by ModBuddy on 1/21/2014 3:35:49 PM -->
<GameData>

<Units>
<Delete Type="UNIT_SPANISH_TERCIO"/>
</Units>
<DeleteMissingReferences table="Units" column="Type"/>

<Buildings>

<Row>

<Type>BUILDING_MISSION</Type>
<BuildingClass>BUILDINGCLASS_TEMPLE</BuildingClass>
<FreeStartEra>ERA_RENAISSANCE</FreeStartEra>
<Cost>100</Cost>
<GoldMaintenance>0</GoldMaintenance>
<PrereqTech>TECH_PHILOSOPHY</PrereqTech>
<Help>TXT_KEY_BUILDING_MISSION_STRATEGY</Help>
<Description>TXT_KEY_BUILDING_MISSION_DESC</Description>
<Civilopedia>TXT_KEY_BUILDINGS_MISSION_PEDIA</Civilopedia>
<Strategy>TXT_KEY_BUILDINGS_MISSION_STRATEGY</Strategy>
<ArtDefineTag>ART_DEF_BUILDING_TEMPLE</ArtDefineTag>
<MinAreaSize>-1</MinAreaSize>
<ReligiousPressureModifier>25</ReligiousPressureModifier>
<PlotCultureCostModifier>-25</PlotCultureCostModifier>
<HurryCostModifier>25</HurryCostModifier>
<ConquestProb>66</ConquestProb>
<IconAtlas>BW_ATLAS_1</IconAtlas>
<PortraitIndex>37</PortraitIndex>

</Row>

</Buildings>

<Building_YieldChanges>
<Row>

<BuildingType>BUILDING_MISSION</BuildingType>
<YieldType>YIELD_FOOD</YieldType>
<Yield>1</Yield>

</Row>

<Row>

<BuildingType>BUILDING_MISSION</BuildingType>
<YieldType>YIELD_PRODUCTION</YieldType>
<Yield>1</Yield>

</Row>

<Row>

<BuildingType>BUILDING_MISSION</BuildingType>
<YieldType>YIELD_FAITH</YieldType>
<Yield>2</Yield>

</Row>

</Building_YieldChanges>

<Language_en_US>
<Row Tag="TXT_KEY_BUILDING_MISSION_DESC">
<Text>Mission</Text>
</Row>
<Row Tag="TXT_KEY_BUILDING_MISSION_STRATEGY">
<Text>
Missions increase religious pressure and cultural border expansion by 25% as well as slightly boosting the city's food and production. They cost no maintenance, but can only be built by Spain.
</Text>
</Row>
<Row Tag="TXT_KEY_CIV5_BUILDINGS_MISSION_PEDIA">
<Text>
In addition to the presidio (fort) and pueblo (town), the misión was one of the three major agencies employed by the Spanish crown to extend its borders and consolidate its colonial territories. The missions introduced European livestock, fruits, vegetables, and industry into their colonies while spreading Christianity.
</Text>
</Row>
</Language_en_US>


<Civilization_BuildingClassOverrides>

<CivilizationType>CIVILIZATION_SPAIN</CivilizationType>
<BuildingClassType>BUILDINGCLASS_TEMPLE</BuildingClassType>
<BuildingType>BUILDING_MISSION</BuildingType>

</Civilization_BuildingClassOverrides>



</GameData>
 
When the game loads it try to find it's second uu which is Tercio that you deleted, since it didn't find it it either crash or do nothing at all.
first when you post a code use the code tag, it's the Hashtag(#) above.
I suggest you also delete the Tercio in "Civilization_UnitClassOverrides"
could i see your .modinfo file?
 
When the game loads it try to find it's second uu which is Tercio that you deleted, since it didn't find it it either crash or do nothing at all.
first when you post a code use the code tag, it's the Hashtag(#) above.
I suggest you also delete the Tercio in "Civilization_UnitClassOverrides"
could i see your .modinfo file?

Would that mean deleting something in the actual folder rather than just in the mod?

How do you do that properly?

Here is the .modinfo file, and thanks for responding.

<?xml version="1.0" encoding="utf-8"?>
<Mod id="2003ea41-1d4a-44b8-bfd4-30d371a8528b" version="1">
<Properties>
<Name>Spanish Mission</Name>
<Stability>Alpha</Stability>
<Teaser>Removes the Tercio from Spain to add the Spanish Mission.

Mission

+1 food +1 production

Religion and cultural border g</Teaser>
<Description>Removes the Tercio from Spain to add the Spanish Mission. Mission +1 Food +1 Production +2 Faith. Religion and cultural border growth spread 25% faster. No Maintenance Cost</Description>
<Authors>*********</Authors>
<HideSetupGame>0</HideSetupGame>
<AffectsSavedGames>1</AffectsSavedGames>
<MinCompatibleSaveVersion>0</MinCompatibleSaveVersion>
<SupportsSinglePlayer>1</SupportsSinglePlayer>
<SupportsMultiplayer>1</SupportsMultiplayer>
<SupportsHotSeat>1</SupportsHotSeat>
<SupportsMac>1</SupportsMac>
<ReloadAudioSystem>0</ReloadAudioSystem>
<ReloadLandmarkSystem>0</ReloadLandmarkSystem>
<ReloadStrategicViewSystem>0</ReloadStrategicViewSystem>
<ReloadUnitSystem>0</ReloadUnitSystem>
</Properties>
<Dependencies />
<References />
<Blocks />
<Files>
<File md5="BE73699D200CF06B827D43E64ADEB941" import="0">Mission Folder/Mission.xml</File>
</Files>
<Actions>
<OnModActivated>
<UpdateDatabase>Mission Folder/Mission.xml</UpdateDatabase>
</OnModActivated>
</Actions>
</Mod>
 
Would that mean deleting something in the actual folder rather than just in the mod?

How do you do that properly?
No, you just need to update it via modding, no need of touching the base game itself
I done this before in one of my mods and I succesfully manage to delete a UU and replaced it with a UB
Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- Created by ModBuddy on 9/10/2013 12:9:37 PM -->
<!--	Author: knightmare13	-->
<GameData>
<!-- 	Remove Zero as Japanese UU	-->
	<Civilization_UnitClassOverrides>
		<Delete CivilizationType="CIVILIZATION_JAPAN" UnitClassType="UNITCLASS_FIGHTER"/>
	</Civilization_UnitClassOverrides>
<!--	Clean-up Database	-->
	<DeleteMissingReferences table="Civilization_UnitClassOverrides" column="Type" />
	<Civilization_BuildingClassOverrides>
<!--	Replace it with Dojo as UB	-->
		<Row>
			<CivilizationType>CIVILIZATION_JAPAN</CivilizationType>
			<BuildingClassType>BUILDINGCLASS_ARMORY</BuildingClassType>
			<BuildingType>BUILDING_DOJO</BuildingType>
		</Row>
	</Civilization_BuildingClassOverrides>
</GameData>
you could download my Dojo mod on my Signature below, I think you could find all the answers in your question there.
 
Thanks for all the help, it is in-game and seems to be working properly, though I'll want to test the religion and border growth increase just to be sure.

I might look for a way of making an icon, or just be content with it functioning.

For one last question, is it some form of copyright infringement to make an icon using a screenshot rather than original artwork?
 
For one last question, is it some form of copyright infringement to make an icon using a screenshot rather than original artwork?

Unfortunately, it's not a simple yes or no answer. The answer is: it depends, and it depends mostly on whether anyone would be interested in pressing an issue against your use. In most cases, though, a screenshot would not entitle you to any additional rights that you wouldn't hold over the use of the original artwork, as its copyright protection is derivative of the copyright protection of the original work. In most cases, a sufficient accreditation will save you any real trouble, though, given that the intent of its use is non-commercial (I assume).

<DeleteMissingReferences table="Units" column="Type"/>

I think the above would be sufficient by itself. No need to use: <DeleteMissingReferences table="Civilization_UnitClassOverrides" column="Type" />
 
Back
Top Bottom