Setting 2 units to be able to embark at Sailing

ITcore

Warlord
Joined
Dec 25, 2016
Messages
248
Location
127.0.0.1
I want to set Scouts and Builders to be able to embark at Sailing but I'm not sure how I would enable two different units to share the same tag in the tech. Would it function correctly if the line had two EmbarkUnitType tags in it?
 
You could likely use either... here is mine, which is a mix of new abilities and old:

Code:
<ModifierStrings>
        <Row ModifierId="FYRDMAN_LOCAL_COMBAT" Context="Preview" Text="LOC_ABILITY_COSSACK_LOCAL_COMBAT_MODIFIER_DESCRIPTION"/>
        <Row ModifierId="FYRDMAN_CLASSICAL_ERA_COMBAT" Context="Preview" Text="LOC_ABILITY_FYRDMAN_CLASSICAL_ERA_COMBAT_MODIFIER_DESCRIPTION"/>       
        <Row ModifierId="FYRDMAN_MEDIEVAL_ERA_COMBAT" Context="Preview" Text="LOC_ABILITY_FYRDMAN_MEDIEVAL_ERA_COMBAT_MODIFIER_DESCRIPTION"/>
        <Row ModifierId="SEAXMAN_BONUS_VS_WOUNDED_UNITS" Context="Preview" Text="LOC_ABILITY_SEAXMAN_BONUS_VS_WOUNDED_UNITS_MODIFIER_DESCRIPTION"/>
        <Row ModifierId="HUSCARLE_LOCAL_COMBAT" Context="Preview" Text="LOC_ABILITY_COSSACK_LOCAL_COMBAT_MODIFIER_DESCRIPTION"/>
    </ModifierStrings>

The strings do not mention unit names, so some can be applied from other units in existence already (such as using Cossack text for a similar ability.)

Here are the text entries:

Code:
<BaseGameText>
<Row Tag="LOC_ABILITY_FYRDMAN_CLASSICAL_ERA_COMBAT_MODIFIER_DESCRIPTION">
            <Text>+{1_Amount} Combat Strength after the Ancient era.</Text>
        </Row>
        <Row Tag="LOC_ABILITY_FYRDMAN_MEDIEVAL_ERA_COMBAT_MODIFIER_DESCRIPTION">
            <Text>+{1_Amount} Combat Strength after the Classical era.</Text>
        </Row>
        <Row Tag="LOC_ABILITY_SEAXMAN_BONUS_VS_WOUNDED_UNITS_MODIFIER_DESCRIPTION">
            <Text>+{1_Amount} Combat Strength vs. Wounded Units.</Text>
        </Row>
    </BaseGameText>

As you can see, using Replace is not needed... you are not modifying existing text. Although it could be used, I think, as it does the same thing as Row in most cases. I would more likely use it to change existing entries, though.
 
Ah, thanks for clearing that up. One last thing.

<BaseGameText> vs <LocalizedText>. Is it similar to the Replace and Row thing where they do the same thing functionally?
 
<Replace> will alter an existing row that matches for the primary (or unique) elements within the row, or it will add a new row with the designated info if no "match" can be found.

So if there is already a Building called BUILDING_EARLYBUMP1 in the xml, the following code would over-write what is already in the game's database and literally "replace" it with this code. But if no such building existed in the game's database, <Replace> will add it to the game's database:
Code:
<GameInfo>
	<Types>
		<Replace Type="BUILDING_EARLYBUMP1" Kind="KIND_BUILDING" />
	</Types>
	<Buildings>
		<Replace BuildingType="BUILDING_EARLYBUMP1"
			Name="LOC_BUILDING_EARLYBUMP1"
			Description="LOC_BUILDING_EARLYBUMP1_DESC"
			PrereqDistrict="DISTRICT_CITY_CENTER"
			PrereqTech="TECH_POTTERY"
			Cost="60"
			PurchaseYield="YIELD_GOLD"
			AdvisorType="ADVISOR_GENERIC"
			Maintenance="1" />
	</Buildings>
</GameInfo>
<Replace> is XML's designate for SQLite's INSERT OR REPLACE INTO

http://stackoverflow.com/questions/2251699/sqlite-insert-or-replace-into-vs-update-where

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

My understanding of the difference between <BaseGameText> and <LocalizedText> is that <BaseGameText> does not allow a designation of the language the user is set to, and is thus only for literally the English-language Base Game Text. All other languages, such as DE are defined under <LocalizedText> and therefore require the column Language="X" in addition to the tag-name (Tag="LOC_SOMETHING"). If you look in this folder C:\Program Files (x86)\Steam\SteamApps\common\Sid Meier's Civilization VI\Base\Assets\Text you won't find Language="en_US" being used anywhere in any of the localization files for the user's language. All of the english stuff is in the next lower folder called en_US and all the files therein are using <BaseGameText>
 
Wow, thank you for the detailed write up. Would you happen to know how to fix the Poland Portuguese bug? In the Database log, it says that the following:

Code:
[151971.539] [Localization] ERROR: UNIQUE constraint failed: LocalizedText.Language, LocalizedText.Tag
[151971.540] [Localization]: While executing - 'insert into BaseGameText('Tag', 'Text') values (?, ?);'
[151971.540] [Localization]: In XMLSerializer while inserting row into table insert into BaseGameText('Tag', 'Text') with  values (LOC_CITY_NAME_KRAKOW, Kraków, ).
[151971.540] [Localization]: In XMLSerializer while updating table BaseGameText from file Poland_Jadwiga_GameplayText.xml.
[151971.540] [Localization] ERROR: UNIQUE constraint failed: LocalizedText.Language, LocalizedText.Tag

I tried just commenting out the foreign language files in the MODFILE but it just ends up placing the LOC_TEXT type names afterwards.
 
I don't have the Poland DLC so I can't try to run the DLC, but oddly enough the files are in my game folder (the DLC just isn't unlocked for me) and as far as I can tell there is only one place for English Language where that Tag is defined. An Agent Ransack search through all the files doesn't find the Tag name used anywhere but in the Poland DLC files.

The file being referenced in the error you are quoting is for the english-language base game text, not for a file with anything for Potruguese language.
 
I'm thinking it has something to do with the way the DLC's are set up and perhaps the triggers used to import everything from <BaseGameText> into the <LocalizedText> for Language="en_US".

If you look at the files for the Aztec DLC there are no text files anywhere within it. All the Aztec Texts are actually contained within the game's original text files.
 
Back
Top Bottom