No Civilopedia Text for New Buildings

Gubbey

Chieftain
Joined
Apr 25, 2014
Messages
12
What the title says. The new buildings added in my mod have no Civilopedia text, even though I've defined Civilopedia text in the Text.sql file using what I believe is the proper format ('LOC_PEDIA_BUILDINGS_PAGE_BUILDING_*NAME*_CHAPTER_HISTORY_PARA_1').

Other text defined in the same file (names and descriptions) show up just fine, it's just the Civilopedia text.

Lack of Civilopedia text is nothing game-breaking of course, but I'd rather have a fully-fleshed mod if I can help it.

I've transcribed the Text.sql file below. Let me know if you need to see the rest of the mod's files for any reason. Thanks in advance for your help!

Code:
-- Text
-- Author: Gubbey
--------------------------------------------------------------
-- English
--------------------------------------------------------------
INSERT OR REPLACE INTO EnglishText
        (Tag,                                                        Text)
VALUES    ('LOC_BUILDING_DUNGEON_NAME',                                'Dungeon'),
        ('LOC_BUILDING_BALLROOM_NAME',                                'Ballroom'),
        ('LOC_BUILDING_POLITICAL_ASYLUM_NAME',                        'Political Asylum'),
        ('LOC_BUILDING_DIPLOMATIC_MISSION_NAME',                    'Diplomatic Mission'),
        ('LOC_BUILDING_FOREIGN_AFFAIRS_OFFICE_NAME',                'Foreign Affairs Office'),
        ('LOC_BUILDING_CONSTABULARY_NAME',                            'Constabulary'),
        ('LOC_BUILDING_AGENCY_HEADQUARTERS_NAME',                    'Agency Headquarters'),
        ('LOC_BUILDING_DUNGEON_DESCRIPTION',                        '+2 Loyalty. +1 [ICON_Faith] Faith per level of established [Icon_Governor] Governor.'),
        ('LOC_BUILDING_POLITICAL_ASYLUM_DESCRIPTION',                '+4 Loyalty. +2 [ICON_Gold] Gold per level of established [Icon_Governor] Governor.'),
        ('LOC_BUILDING_DIPLOMATIC_MISSION_DESCRIPTION',                'Other Civilizations'' [ICON_TradeRoute] Trade Routes to this city provide +1 [ICON_Culture] Culture and +2 [ICON_Gold] Gold for them. +2 [ICON_Culture] Culture and +4 [ICON_Gold] Gold for every [ICON_TradeRoute] Trade Route to this city.'),
        ('LOC_BUILDING_FOREIGN_AFFAIRS_OFFICE_DESCRIPTION',            '+3 [ICON_Favor] Diplomatic Favor. Enables the World Expo Project.'),
        ('LOC_BUILDING_CONSTABULARY_DESCRIPTION',                    '+6 Loyalty.     +1 [Icon_Production] Production per level of established [Icon_Governor] Governor. Enables the Crackdown Project.'),
        ('LOC_BUILDING_AGENCY_HEADQUARTERS_DESCRIPTION',            '+2 Influence Points per turn. Enemy Spy''s level is reduced by 1 when targeting this District or adjacent Districts. Enables the Covert Ops Project.'),
        ('LOC_PROJECT_WORLD_EXPO_NAME',                                'World Expo'),
        ('LOC_PROJECT_MARTIAL_LAW_NAME',                            'Crackdown'),
        ('LOC_PROJECT_COVERT_OPS_NAME',                                'Covert Ops'),
        ('LOC_PROJECT_WORLD_EXPO_SHORT_NAME',                        'World Expo'),
        ('LOC_PROJECT_MARTIAL_LAW_SHORT_NAME',                        'Crackdown'),
        ('LOC_PROJECT_COVERT_OPS_SHORT_NAME',                        'Covert Ops'),
        ('LOC_PROJECT_WORLD_EXPO_DESCRIPTION',                        'District-based Project unlocked by the Foreign Affairs Office. Provides [Icon_Gold] Gold, [ICON_Culture] Culture, [ICON_Faith] Faith, [Icon_Science] Science, and [ICON_Amenities] Amenities every turn. Once finished, provides a small amount of [ICON_GreatPerson] Great Person Points for [ICON_GreatEngineer] Great Engineers, [ICON_GreatMerchant] Great Merchants, [ICON_GreatWriter] Great Writers, [ICON_GreatArtist] Great Artists, [ICON_GreatMusician] Great Musicians, and [ICON_GreatScientist] Great Scientists, and +1 Trade Route capacity.'),
        ('LOC_PROJECT_MARTIAL_LAW_DESCRIPTION',                        'District-based Project unlocked by the Constabulary. Provides [Icon_Gold] Gold and increases Loyalty and Loyalty pressure while active, but reduces [ICON_Amenities] Amenities by 2. Once finished, maximizes Loyalty and  grants +1 [Icon_Governor] Governor Title.'),
        ('LOC_PROJECT_COVERT_OPS_DESCRIPTION',                        'District-based Project unlocked by the Agency Headquarters. Provides [Icon_Gold] Gold and [Icon_Science] Science while active. Once finished, grants +1 Spy and Spy capacity.'),
        ('LOC_BUILDING_CONSULATE_DESCRIPTION',                        '+1 Influence Point per turn. Enemy Spy''s level is reduced by 1 when targeting this District or adjacent Districts.'),
        ('LOC_BUILDING_CHANCERY_DESCRIPTION',                        '+1 Influence Point per turn. Enemy Spy''s level is reduced by 1 when targeting this District or adjacent Districts. Newly-trained Spies in this city receive +25% experience for completed operations.'),
        ('LOC_DISTRICT_DIPLOMATIC_QUARTER_DESCRIPTION',                'A District specializing in diplomacy. +1 [ICON_ENVOY] Envoy if built next to the city center.'),
        ('LOC_DISTRICT_DIPLOMATIC_QUARTER_EXPANSION2_DESCRIPTION',    'A District specializing in diplomacy. +1 [ICON_ENVOY] Envoy if built next to the city center.');
--------------------------------------------------------------
-- Civilopedia
--------------------------------------------------------------
INSERT OR REPLACE INTO EnglishText
        (Tag,                                                                                Text)
VALUES    ('LOC_PEDIA_BUILDINGS_PAGE_BUILDING_DUNGEON_CHAPTER_HISTORY_PARA_1',                'Dungeons have a long and storied history, though an obviously unhappy one. Generally associated with Medieval
                                                                                            castles, towards the Renaissance era they started to garner their popular perception as sprawling, dank torture
                                                                                            chambers where the only sounds to be heard are the dripping of the leaking mortar and the screams of the
                                                                                            prisoners. The English turned imprisonment and torture into a science, with such famous structures as the Tower
                                                                                            of London, which housed political prisoners, and Pontefract Castle, home of numerous condemned kings from
                                                                                            countries all across Europe.
                                                                                            '),
VALUES    ('LOC_PEDIA_BUILDINGS_PAGE_BUILDING_DUNGEON_CHAPTER_HISTORY_PARA_2',                'As mentioned above, dungeons have a fearsome reputation in popular culture, but most purpose-built dungeons
                                                                                            were simply a single plain room accessed only by a trapdoor or other such secure means. The image of vast
                                                                                            underground labyrinths of darkness and pain is nothing more than an embellishment fabricated by tourist guides.
                                                                                            '),
VALUES    ('LOC_PEDIA_BUILDINGS_PAGE_BUILDING_BALLROOM_CHAPTER_HISTORY_PARA_1',                'The elegant, lavish site of many a noble gathering, ballrooms are the perfect place to socialize and rub
                                                                                            shoulders with friends in high places. Most ballrooms are situated on a private residence such as a mansion or
                                                                                            chateaux, with some including a stage where the host can speak, or a live band can serenade the decadent
                                                                                            throng of teetering sycophants and treacherous ladies-in-waiting. High-quality flooring is critical to throwing
                                                                                            a proper ball, as they must endure entire evenings and nights of waltzing nobles and spilled drinks.
                                                                                            '),
VALUES    ('LOC_PEDIA_BUILDINGS_PAGE_BUILDING_BALLROOM_CHAPTER_HISTORY_PARA_2',                'Some of the most extravagant ballrooms (yes, ballrooms with an s) are found in Catherine Palace, in St. Petersburg, Russia.
                                                                                            Under the reign of Peter the Great, this comparatively humble wooden mansion was transformed into a true display
                                                                                            of opulence and artistry, and some of the most powerful men and women in Russia danced, drank and conspired under
                                                                                            the palace''s painted ceilings and Chinese silk tapestries in the decades following the Great Northern War.
                                                                                            '),
VALUES    ('LOC_PEDIA_BUILDINGS_PAGE_BUILDING_POLITICAL_ASYLUM_CHAPTER_HISTORY_PARA_1',        'The concept of asylum-seekers traces all the way back to ancient Greco-Roman culture. In those times,
                                                                                            those seeking asylum largely did so to escape religious persecution; fittingly, these places of refuge included
                                                                                            temples, sacred groves, and statues of the gods. In Athens, the Theseum (a temple to Theseus, hero-founder of
                                                                                            Athens) chiefly served as a refuge for ill-treated slaves. Antonius Pius of Rome adopted a similar policy during
                                                                                            his reign, allowing Praeses - provincial governors - to a compel a master to sell his slave if the slave sought
                                                                                            asylum at a temple.
                                                                                            '),
VALUES    ('LOC_PEDIA_BUILDINGS_PAGE_BUILDING_POLITICAL_ASYLUM_CHAPTER_HISTORY_PARA_2',        'As early as the European Renaissance, the concept of asylum began to take on a much more prominent political bent.
                                                                                            French Enlightenment writer Voltaire fled from his home to England due to his sharp criticism for the Roman
                                                                                            Catholic Church. In the 19th century, the United Kingdom took in numerous supporters of the Socialist movement -
                                                                                            including Karl Marx himself - stopping only after 1911 Siege of Sidney Street. And of course, one of the most
                                                                                            striking examples of political asylum in recent memory was cybersecurity whistleblower Edward Snowden, who after
                                                                                            leaking a global surveillance program headed by the United States NSA, fled to Russia seeking refuge from the U.S.
                                                                                            government.
                                                                                            '),
VALUES    ('LOC_PEDIA_BUILDINGS_PAGE_BUILDING_DIPLOMATIC_MISSION_CHAPTER_HISTORY_PARA_1',        'A diplomatic mission, sometimes also referred to as a foreign mission, is a catch-all term referring to the
                                                                                            various embassies, chanceries, consulates and commissions that make up a city''s centers for foreign relations.
                                                                                            Modern day Rome is an interesting example, as it hosts missions to both Italy and the Holy See. The two
                                                                                            delegations seldom if ever interact, and keep two entirely separate sets of personnel.
                                                                                            ');
 
You don't need VALUES for every row you add. It might be a syntax error.
I also recommend using double quotes (") around localization text because otherwise apostrophes (') end your text entry early and mess up your syntax even more.
 
You don't need VALUES for every row you add. It might be a syntax error.

Well now I just feel dumb as hell, that's exactly the problem. Guess I just needed a fresh set of eyes. Thank you!

Maybe these two quotes here
Civilizations'' [ICON_TradeRoute]

That's a double apostrophe, which is how you escape apostrophes in MySQL.
 
The game uses SQLite.

"smartquote" characters like ’ are as I recall properly treated as apostrophe of contraction or ownership such as
lee’s major minor’s milkshake
But I believe raen is correct in that the SQL parser used by the game might very well treat the first of these single-character plain-ASCI apostrophes as text-end encapsulation
because you started the definition of the string with a single apostrophe character

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

SQLite will accept the true double-apostrophe "quotes" character
as text-delimiters and will not confuse it with
or
so long as both ends of the text-string are delimited by " quotation characters, as in
Code:
"This is a text string of John's things"
 
Last edited:
However you handle the text issues re the ' characters, database.log would have reported a syntax error in a localization file because of the incorrect repeat-usage of "VALUES" multiple times within a singe code-block. Although for SQL files the error messages you get in Database.log are merely lines like
Code:
[2542224.300] [Localization]: near "(": syntax error
 
Back
Top Bottom