Hiding an item from the civilopedia

LeeS

Imperator
Joined
Jul 23, 2013
Messages
7,241
Location
Illinois, USA
I discovered how to hide an item from the civilopedia in a way that does not conflict with other mods. IE, does not need each mod to meld their changes into other mod's versions of the civilopedia file(s).

Here is the dreadfully complicated code required to hide several buildngs from the civilopedia:
Spoiler :
Code:
<CivilopediaPageExcludes>
	<Row SectionId="BUILDINGS" PageId="BUILDING_STONEWORKS_LRS_UNLOCKER"/>
	<Row SectionId="BUILDINGS" PageId="BUILDING_CATTLEMARKET_LRS_UNLOCKER"/>
	<Row SectionId="BUILDINGS" PageId="BUILDING_DISTILLERY_LRS_UNLOCKER"/>
	<Row SectionId="BUILDINGS" PageId="BUILDING_TEA_HOUSE_LRS_UNLOCKER"/>
	<Row SectionId="BUILDINGS" PageId="BUILDING_COFFEE_HOUSE_LRS_UNLOCKER"/>
</CivilopediaPageExcludes>
  • Table CivilopediaPageExcludes is defined within the game's stock code, and is implemented within the Civilopedia lua files, but was not ever used for anything by Firaxis. But their thouhtfulness in not eliminating it (or in providing it in the first place) demonstrates they do at least try to keep the poor modder in mind.
  • Just note that if the building is a Prerequisite or a Mutually Exclusive building to some other building, the notation of the building-name and its icon will still show on the civilopedia entry for the other building.
You can hide pretty much anything you want, apparently, by using the SectionId designations from this table found in file Civilopedia.xml:
Spoiler allowed SectionId's :
Code:
<CivilopediaSections>
	<Row SectionId="CONCEPTS" Name="LOC_PEDIA_CONCEPTS_TITLE" Icon="ICON_CIVILOPEDIA_CONCEPTS" SortIndex="0" />
	<Row SectionId="CIVILIZATIONS" Name="LOC_PEDIA_CIVILIZATIONS_TITLE" Icon="ICON_CIVILOPEDIA_CIVILIZATIONS" SortIndex="10" />
	<Row SectionId="LEADERS" Name="LOC_PEDIA_LEADERS_TITLE" Icon="ICON_CIVILOPEDIA_LEADERS" SortIndex="20" />
	<Row SectionId="CITYSTATES" Name="LOC_PEDIA_CITYSTATES_TITLE" Icon="ICON_CIVILOPEDIA_CITYSTATES" SortIndex="30" />
	<Row SectionId="DISTRICTS" Name="LOC_PEDIA_DISTRICTS_TITLE" Icon="ICON_CIVILOPEDIA_DISTRICTS" SortIndex="40" />
	<Row SectionId="BUILDINGS" Name="LOC_PEDIA_BUILDINGS_TITLE" Icon="ICON_CIVILOPEDIA_BUILDINGS" SortIndex="50" />
	<Row SectionId="WONDERS" Name="LOC_PEDIA_WONDERS_TITLE" Icon="ICON_CIVILOPEDIA_WONDERS" SortIndex="60" />
	<Row SectionId="UNITS" Name="LOC_PEDIA_UNITS_TITLE" Icon="ICON_CIVILOPEDIA_UNITS" SortIndex="70" />
	<Row SectionId="UNITPROMOTIONS" Name="LOC_PEDIA_UNITPROMOTIONS_TITLE" Icon="ICON_CIVILOPEDIA_UNITPROMOTIONS" SortIndex="80" />
	<Row SectionId="GREATPEOPLE" Name="LOC_PEDIA_GREATPEOPLE_TITLE" Icon="ICON_CIVILOPEDIA_GREATPEOPLE" SortIndex="90" />
	<Row SectionId="TECHNOLOGIES" Name="LOC_PEDIA_TECHNOLOGIES_TITLE" Icon="ICON_CIVILOPEDIA_TECHNOLOGIES" SortIndex="100" />
	<Row SectionId="CIVICS" Name="LOC_PEDIA_CIVICS_TITLE" Icon="ICON_CIVILOPEDIA_CIVICS" SortIndex="110" />
	<Row SectionId="GOVERNMENTS" Name="LOC_PEDIA_GOVERNMENTS_TITLE" Icon="ICON_CIVILOPEDIA_GOVERNMENTS" SortIndex="120" />
	<Row SectionId="RELIGIONS" Name="LOC_PEDIA_RELIGIONS_TITLE" Icon="ICON_CIVILOPEDIA_RELIGIONS" SortIndex="130" />
	<Row SectionId="FEATURES" Name="LOC_PEDIA_FEATURES_TITLE" Icon="ICON_CIVILOPEDIA_FEATURES" SortIndex="140" />
	<Row SectionId="RESOURCES" Name="LOC_PEDIA_RESOURCES_TITLE" Icon="ICON_CIVILOPEDIA_RESOURCES" SortIndex="150" />
	<Row SectionId="IMPROVEMENTS" Name="LOC_PEDIA_IMPROVEMENTS_TITLE" Icon="ICON_CIVILOPEDIA_IMPROVEMENTS" SortIndex="160" />
</CivilopediaSections>
And the PageId is literally the name of the building, wonder, unit, promotion, etc..

Remember, this just hides it from the Civilopedia, not the rest of the game. So the building would still show in the city build selection menus, the list of buildings in a city, etc., for example.
 
Back
Top Bottom