game of thrones civ - forresters

gulman

Chieftain
Joined
Oct 30, 2015
Messages
6
256v8mu.jpg


Civ name: Forresters
Civ trait: Iron from Ice - all archery units can attack twice, cities gain +1 science for each forest tile in territory
Unique unit: ironwood ship - normal frigate but does not require iron to build, gains experience 50% faster
Unique building: woodworkers guild - replaces workshop, grants a 30% boost to production

my first attempt at modding, was able to figure out somethings, but cant get the civ to show up in game. some help please.:confused:

https://www.dropbox.com/s/bsbg3c8u5q9huu4/Civ5Mod1.rar?dl=0
 
Hey, welcome to CFC!

A few things in your mod:
-The buildings file is missing a lot of necessary columns.
What you have is:
Spoiler :
Code:
<GameData>
	<Type>BUILDING_WOODWORKERS_GUILD</Type>

	<BuildingClass>BUILDINGCLASS_WORKSHOP</BuildingClass>

	<FreeStartEra>ERA_INDUSTRIAL</FreeStartEra>

	<Cost>120</Cost>

	<GoldMaintenance>2</GoldMaintenance>

	<PrereqTech>TECH_METAL_CASTING</PrereqTech>

	<Help>TXT_KEY_BUILDING_WOODWORKERS_GUILD_HELP</Help>

	<Description>TXT_KEY_BUILDING_WOODWORKERS_GUILD</Description>

	<Civilopedia>TXT_KEY_CIV5_BUILDINGS_WOODWORKERS_GUILD_TEXT</Civilopedia>

	<Strategy>TXT_KEY_BUILDING_WOODWORKERS_GUILD_STRATEGY</Strategy>

	<ArtDefineTag>ART_DEF_BUILDING_FORGE</ArtDefineTag>

	<SpecialistType>SPECIALIST_ENGINEER</SpecialistType>

	<SpecialistCount>1</SpecialistCount>

	<MinAreaSize>-1</MinAreaSize>

	<ConquestProb>66</ConquestProb>

	<HurryCostModifier>25</HurryCostModifier>

	<AllowsProductionTradeRoutes>true</AllowsProductionTradeRoutes>

	<IconAtlas>BW_ATLAS_1</IconAtlas>

	<PortraitIndex>28</PortraitIndex>
	<Row>

		<BuildingType>BUILDING_WOODWORKERS_GUILD</BuildingType>

		<YieldType>YIELD_PRODUCTION</YieldType>

		<Yield>30</Yield>

	</Row>
</GameData>

What you want is:
Spoiler :
Code:
<GameData>
	[COLOR="Blue"]<Buildings>[/COLOR]
		<Row>
			<Type>BUILDING_WOODWORKERS_GUILD</Type>
			<BuildingClass>BUILDINGCLASS_WORKSHOP</BuildingClass>
			<FreeStartEra>ERA_INDUSTRIAL</FreeStartEra>
			<Cost>120</Cost>
			<GoldMaintenance>2</GoldMaintenance>
			<PrereqTech>TECH_METAL_CASTING</PrereqTech>
			<Help>TXT_KEY_BUILDING_WOODWORKERS_GUILD_HELP</Help>
			<Description>TXT_KEY_BUILDING_WOODWORKERS_GUILD</Description>
			<Civilopedia>TXT_KEY_CIV5_BUILDINGS_WOODWORKERS_GUILD_TEXT</Civilopedia>
			<Strategy>TXT_KEY_BUILDING_WOODWORKERS_GUILD_STRATEGY</Strategy>
			<ArtDefineTag>ART_DEF_BUILDING_FORGE</ArtDefineTag>
			<SpecialistType>SPECIALIST_ENGINEER</SpecialistType>
			<SpecialistCount>1</SpecialistCount>
			<MinAreaSize>-1</MinAreaSize>
			<ConquestProb>66</ConquestProb>
			<HurryCostModifier>25</HurryCostModifier>
			<AllowsProductionTradeRoutes>true</AllowsProductionTradeRoutes>
			<IconAtlas>BW_ATLAS_1</IconAtlas>
			<PortraitIndex>28</PortraitIndex>
		</Row>
	[COLOR="Blue"]</Buildings>
	<Building_YieldModifiers>[/COLOR]
		<Row>
			<BuildingType>BUILDING_WOODWORKERS_GUILD</BuildingType>
			<YieldType>YIELD_PRODUCTION</YieldType>
			<Yield>30</Yield>
		</Row>
	[COLOR="Blue"]</Building_YieldModifiers>[/COLOR]
</GameData>



Your BuilcingClassOverrides column in your civilization file looks like this:
Code:
	<Civilization_BuildingClassOverrides>
		<Row>
			<CivilizationType>CIVILIZATION_FORRESTER</CivilizationType>
			[COLOR="Blue"]<UnitClassType>[/COLOR][COLOR="Red"]UNITCLASS[/COLOR]_WORKSHOP</UnitClassType>
			[COLOR="Blue"]<UnitType>[/COLOR][COLOR="Red"]UNIT[/COLOR]_WOODWORKERS_GUILD</UnitType>
		</Row>
	</Civilization_BuildingClassOverrides>

You aren't overriding a unit; you're overriding a building. what you want is:
Code:
	<Civilization_BuildingClassOverrides>
		<Row>
			<CivilizationType>CIVILIZATION_FORRESTER</CivilizationType>
			<BuildingClassType>BUILDINGCLASS_WORKSHOP</BuildingClassType>
			<BuildingType>BUILDING_WOODWORKERS_GUILD</BuildingType>
		</Row>
	</Civilization_BuildingClassOverrides>


In your traits file, you have:
Code:
	<Trait_YieldModifiers>
	  <Row>
		<FeatureType>FEATURE_FOREST</FeatureType>
		<YieldType>YIELD_SCIENCE</YieldType>
		<Yield>1</Yield>
	</Row>
	</Trait_YieldModifiers>

the column </Trait_YieldModifiers> doesn't refer to features. I think what you're aiming for is:
Code:
	<Trait_UnimprovedFeatureYieldChanges>
	<Row>
		<TraitType>TRAIT_BATTLE_FURY</TraitType>
		<FeatureType>FEATURE_FOREST</FeatureType>
		<YieldType>YIELD_SCIENCE</YieldType>
		<Yield>1</Yield>
	</Row>
	</Trait_UnimprovedFeatureYieldChanges>
However, you should keep in mind that this is only for unimproved forests. If a camp, or a lumber mill is build on a forest tile, the Science yield is lost. If you want to make it so that the yield carries for all forest tiles, even if they have improvements, the way you would do that would be to make a dummy building that changes the yield of forest tiles, like:
Code:
<Building_FeatureYieldChanges>
    <Row>
      <BuildingType>BUILDING_FORRESTER_DUMMY</BuildingType>
      <FeatureType>FEATURE_FOREST</FeatureType>
      <YieldType>YIELD_SCIENCE</YieldType>
      <Yield>1</Yield>
    </Row>
</Building_FeatureYieldChanges>
and then, in the traits file, include that dummy building in the <FreeBuilding> column.

Your units file is also missing columns:
Spoiler :
Code:
<GameData>
	-<Row>

		<Class>UNITCLASS_FRIGATE</Class>

		<Type>UNIT_IRONWOOD_SHIP</Type>

		<PrereqTech>TECH_NAVIGATION</PrereqTech>

		<Combat>25</Combat>

		<RangedCombat>28</RangedCombat>

		<Cost>185</Cost>

		<Moves>5</Moves>

		<HurryCostModifier>20</HurryCostModifier>

		<Range>2</Range>

		<CombatClass>UNITCOMBAT_NAVALRANGED</CombatClass>

		<Domain>DOMAIN_SEA</Domain>

		<DefaultUnitAI>UNITAI_ASSAULT_SEA</DefaultUnitAI>

		<Description>TXT_KEY_UNIT_IRONWOOD_SHIP</Description>

		<Civilopedia>TXT_KEY_CIVILOPEDIA_UNITS_RENAISSANCE_FRIGATE_TEXT</Civilopedia>

		<Strategy>TXT_KEY_UNIT_IRONWOOD_SHIP_STRATEGY</Strategy>

		<Help>TXT_KEY_UNIT_HELP_IRONWOOD_SHIP</Help>

		<MilitarySupport>true</MilitarySupport>

		<MilitaryProduction>true</MilitaryProduction>

		<Pillage>true</Pillage>

		<ObsoleteTech>TECH_ELECTRONICS</ObsoleteTech>

		<Mechanized>true</Mechanized>

		<AdvancedStartCost>50</AdvancedStartCost>

		<MinAreaSize>10</MinAreaSize>

		<XPValueAttack>3</XPValueAttack>

		<XPValueDefense>3</XPValueDefense>

		<UnitArtInfo>ART_DEF_UNIT_FRIGATE</UnitArtInfo>

		<UnitFlagIconOffset>51</UnitFlagIconOffset>

		<IconAtlas>UNIT_ATLAS_2</IconAtlas>

		<PortraitIndex>8</PortraitIndex>

		<MoveRate>WOODEN_BOAT</MoveRate>
		<Unit_ResourceQuantityRequirements>
			<Update>
				<Set Cost="0"/>
				<Where UnitType="UNIT_IRONWOOD_SHIP" ResourceType="RESOURCE_IRON"/>
			</Update>
		</Unit_ResourceQuantityRequirements>

	</Row>
</GameData>

should be:

Spoiler :
Code:
<GameData>
	[COLOR="Red"]<Units>[/COLOR]
		<Row>
			<Class>UNITCLASS_FRIGATE</Class>
			<Type>UNIT_IRONWOOD_SHIP</Type>
			<PrereqTech>TECH_NAVIGATION</PrereqTech>
			<Combat>25</Combat>
			<RangedCombat>28</RangedCombat>
			<Cost>185</Cost>
			<Moves>5</Moves>
			<HurryCostModifier>20</HurryCostModifier>
			<Range>2</Range>
			<CombatClass>UNITCOMBAT_NAVALRANGED</CombatClass>
			<Domain>DOMAIN_SEA</Domain>
			<DefaultUnitAI>UNITAI_ASSAULT_SEA</DefaultUnitAI>
			<Description>TXT_KEY_UNIT_IRONWOOD_SHIP</Description>
			<Civilopedia>TXT_KEY_CIVILOPEDIA_UNITS_RENAISSANCE_FRIGATE_TEXT</Civilopedia>
			<Strategy>TXT_KEY_UNIT_IRONWOOD_SHIP_STRATEGY</Strategy>
			<Help>TXT_KEY_UNIT_HELP_IRONWOOD_SHIP</Help>
			<MilitarySupport>true</MilitarySupport>
			<MilitaryProduction>true</MilitaryProduction>
			<Pillage>true</Pillage>
			<ObsoleteTech>TECH_ELECTRONICS</ObsoleteTech>
			<Mechanized>true</Mechanized>
			<AdvancedStartCost>50</AdvancedStartCost>
			<MinAreaSize>10</MinAreaSize>
			<XPValueAttack>3</XPValueAttack>
			<XPValueDefense>3</XPValueDefense>
			<UnitArtInfo>ART_DEF_UNIT_FRIGATE</UnitArtInfo>
			<UnitFlagIconOffset>51</UnitFlagIconOffset>
			<IconAtlas>UNIT_ATLAS_2</IconAtlas>
			<PortraitIndex>8</PortraitIndex>
			<MoveRate>WOODEN_BOAT</MoveRate>
		</Row>
	[COLOR="Red"]</Units>[/COLOR]
</GameData>


I'm not 100% sure what the aim of:
Code:
	<Unit_ResourceQuantityRequirements>
		<Update>
				<Set Cost="0"/>
				<Where UnitType="UNIT_IRONWOOD_SHIP" ResourceType="RESOURCE_IRON"/>
			</Update>
		</Unit_ResourceQuantityRequirements>
was, but if the intent was for the unit to not have any resource requirements, then nothing there is needed. Just delete that part.

Try those changes and see how it works then.

Also, for future reference; it's better to attach the mod files rather than the ModBuddy files. (What shows up in Documents\My Games\Sid Meier's Civilization 5\MODS)

Side note, would perhaps "Iron From Ice" be a better name for the trait name, considering that's House Forrester's official words?
 
Thank yous soooooo much. You are a life saver!
i have updated the files as you instructed, but still no go.

a few things:
1. in the trait files do i need to add Trait_ in front of of each element
2. do i also need to add the dummy building in the buildings.xml?
3. the ironwood ship should not require iron to build, and also cant figure out how to add the experience modifier


https://www.dropbox.com/s/40mc1bzds1jfvp7/FORRESTERS (v 1).rar?dl=0

PS: all took your suggestion to change the trait name :thumbsup:
 
Thank yous soooooo much. You are a life saver!
i have updated the files as you instructed, but still no go.

a few things:
1. in the trait files do i need to add Trait_ in front of of each element
2. do i also need to add the dummy building in the buildings.xml?
3. the ironwood ship should not require iron to build, and also cant figure out how to add the experience modifier


https://www.dropbox.com/s/40mc1bzds1jfvp7/FORRESTERS (v 1).rar?dl=0

PS: all took your suggestion to change the trait name :thumbsup:


1 - In all the elements that is included in the base game. I recommend going into the game files (C:\Program Files (x86)\Steam\steamapps\common\Sid Meier's Civilization V\Assets\Gameplay\XML) and taking a look at what they have there as a guideline for the things you'll need.

2 - Yes, the dummy buildings should be added to the Buildings xml file. Here's the code for a dummy building I made for one of my mods, if you want to use it as a guideline:
Code:
<GameData>
	<BuildingClasses>
		<Row>
			<Type>BUILDINGCLASS_ORLAIS_DUMMY</Type>
			<DefaultBuilding>BUILDING_ORLAIS_DUMMY</DefaultBuilding>
			<Description>TXT_KEY_BUILDING_ORLAIS_DUMMY</Description>
		</Row>
	</BuildingClasses>
	<Buildings>
		<Row>
			<Type>BUILDING_ORLAIS_DUMMY</Type>
			<BuildingClass>BUILDINGCLASS_ORLAIS_DUMMY</BuildingClass>
			<Description>TXT_KEY_BUILDING_ORLAIS_DUMMY</Description>
			<PortraitIndex>0</PortraitIndex>
			<IconAtlas>ORLAIS_COLOR_ATLAS_LEGENDS</IconAtlas>
			<Cost>-1</Cost>
			<FaithCost>-1</FaithCost>
			<PrereqTech>NULL</PrereqTech>
			<GreatWorkCount>-1</GreatWorkCount>
			<ArtDefineTag>NONE</ArtDefineTag>
			<NeverCapture>true</NeverCapture>
		</Row>
	</Buildings>
</GameData>

3 - You're going to want to create a promotion like this:
Code:
<GameData>
	<UnitPromotions>
		<Row>
			<Type>PROMOTION_[COLOR="Red"]INSERT_PROMOTION_NAME_HERE[/COLOR]</Type>
			<Description>TXT_KEY_PROMOTION_[COLOR="Red"]INSERT_PROMOTION_NAME_HERE[/COLOR]</Description>
			<Help>TXT_KEY_PROMOTION_[COLOR="Red"]INSERT_PROMOTION_NAME_HERE[/COLOR]_HELP</Help>
			<Sound>AS2D_IF_LEVELUP</Sound>
			<CannotBeChosen>true</CannotBeChosen>
			<PortraitIndex>59</PortraitIndex>
			<IconAtlas>ABILITY_ATLAS</IconAtlas>
			<PediaType>PEDIA_ATTRIBUTES</PediaType>
			<PediaEntry>TXT_KEY_PROMOTION_[COLOR="Red"]INSERT_PROMOTION_NAME_HERE[/COLOR]_PEDIA</PediaEntry>
			<ExperiencePercent>50</ExperiencePercent>
		</Row>
	</UnitPromotions>
</GameData>
(Rename it to whatever you want)

Then, give your unit the pormotion with:
Code:
	<Unit_FreePromotions>
		<Row>
			<UnitType>UNIT_IRONWOOD_SHIP</UnitType>
			<PromotionType>PROMOTION_[COLOR="Red"]INSERT_PROMOTION_NAME_HERE[/COLOR]</PromotionType>
		</Row>
	</Unit_FreePromotions>

I'll get back to you when I've checked out the mod.
 
Alright this:
Code:
	<Trait_Building_FeatureYieldChanges>
		<Row>
			<TraitType>TRAIT_IRON_FROM_ICE</TraitType>
			<BuildingType>BUILDING_FORRESTER_DUMMY</BuildingType>
			<FeatureType>FEATURE_FOREST</FeatureType>
			<YieldType>YIELD_SCIENCE</YieldType>
			<Yield>1</Yield>
		</Row>
	</Trait_Building_FeatureYieldChanges>
doesn't go into the traits file. It's for the dummy building, and you don't change the names of the fields; keep them as they were in my first post.

So, the trait file should look like:
Code:
<GameData>
	<Traits>
		<Row>
			<Type>TRAIT_IRON_FROM_ICE</Type>
			<Description>TXT_KEY_TRAIT_IRON_FROM_ICE</Description>
			<ShortDescription>TXT_KEY_TRAIT_IRON_FROM_ICE_SHORT</ShortDescription>
			<FreeBuilding>BUILDING_FORRESTER_DUMMY</FreeBuilding>
		</Row>
	</Traits>
	<Trait_FreePromotionUnitCombats>
		<Row>
			<TraitType>TRAIT_IRON_FROM_ICE</TraitType>
			<UnitCombatType>UNITCOMBAT_ARCHER</UnitCombatType>
			<PromotionType>PROMOTION_SECOND_ATTACK</PromotionType>
		</Row>
	</Trait_FreePromotionUnitCombats>
</GameData>

And the building file for the dummy building should look like this:
Code:
<GameData>
	<BuildingClasses>
		<Row>
			<Type>BUILDINGCLASS_FORRESTER_DUMMY</Type>
			<DefaultBuilding>BUILDING_FORRESTER_DUMMY</DefaultBuilding>
			<Description>TXT_KEY_BUILDING_FORRESTER_DUMMY</Description>
		</Row>
	</BuildingClasses>
	<Buildings>
		<Row>
			<Type>BUILDING_FORRESTER_DUMMY</Type>
			<BuildingClass>BUILDINGCLASS_FORRESTER_DUMMY</BuildingClass>
			<Description>TXT_KEY_BUILDING_FORRESTER_DUMMY</Description>
			<PortraitIndex>0</PortraitIndex>
			<IconAtlas>FORRESTER_COLOR_ATLAS_LEGENDS</IconAtlas>
			<Cost>-1</Cost>
			<FaithCost>-1</FaithCost>
			<PrereqTech>NULL</PrereqTech>
			<GreatWorkCount>-1</GreatWorkCount>
			<ArtDefineTag>NONE</ArtDefineTag>
			<NeverCapture>true</NeverCapture>
		</Row>
	</Buildings>
	<Building_FeatureYieldChanges>
   	 	<Row>
     	 		<BuildingType>BUILDING_FORRESTER_DUMMY</BuildingType>
      			<FeatureType>FEATURE_FOREST</FeatureType>
      			<YieldType>YIELD_SCIENCE</YieldType>
      			<Yield>1</Yield>
    		</Row>
	</Building_FeatureYieldChanges>
</GameData>

Also, you'll have to rename <CityName>TXT_KEY_CITY_NAME_TOLOSA</CityName> , since it's already used in the base game files, and therefor, conflicting with your mod. My reccomendation is to rename how your cities are defined to: <CityName>TXT_KEY_CITY_NAME_FORRESTER_01</CityName> , <CityName>TXT_KEY_CITY_NAME_FORRESTER_02</CityName> , etc, and then include:
Code:
<Civilization_CityNames>
	<Delete CivilizationType="CIVILIZATION_GERMANY" CityName="TXT_KEY_CITY_NAME_TOLOSA"/>
</Civilization_CityNames>
in your civ file.
 
There are a few lines missing in your Game Text file. I'd recommend going to Whoward's tutorial on error logging (linked below). It'll help you actually find a lot of these things on your own, or at least point you in the right direction.

http://forums.civfanatics.com/showthread.php?t=487482
 
Ok enabled error logging.
this is what i was able to find
Spoiler :
[194475.651] table Traits has no column named Trait_FreeBuilding
[194475.651] In Query - insert into Traits('Type', 'Description', 'ShortDescription', 'Trait_FreeBuilding') values (?, ?, ?, ?);
[194475.651] In XMLSerializer while updating table Traits from file xml/civilizations/traits.xml.
[194477.195]


So fixing up the game text file is the last step? :wallbash:
Honestly i just wanna play
 
Ok enabled error logging.
this is what i was able to find
Spoiler :
[194475.651] table Traits has no column named Trait_FreeBuilding
[194475.651] In Query - insert into Traits('Type', 'Description', 'ShortDescription', 'Trait_FreeBuilding') values (?, ?, ?, ?);
[194475.651] In XMLSerializer while updating table Traits from file xml/civilizations/traits.xml.
[194477.195]


So fixing up the game text file is the last step? :wallbash:
Honestly i just wanna play

That should be it.

Take a look at the lines in the error log, and look at what I wrote in post #5. See a difference?

It can be frustrating, hunting down every little error, but it does get easier the more you do it.
 
Back
Top Bottom