Unit Model according to Era

seamus2010

Chieftain
Joined
Jun 23, 2013
Messages
66
Recently I found the way to change the point in time where the model of some units (Worker, Great General, Great Admiral, etc) changes from archaic to modern. I made these units change model when I enter Modern Era, instead of Industrial Era. Having a general in a car alongside Musketmen and sometimes Knights didn't make sense to me.

I can do this by modifying the Civ5ArtDefines_Units.xml files.

My question is, how do I do this for the models of Embarked Units and Improvements? I can't seem to find the art define .xml files for those.

Thanks in advance.
 
FYI, you can do this with a mod; you don't need to edit base game files. Note that you can't have both Era variation and Cultural variation (like Settlers in the base game) at the same time without making your own system to do so in Lua.

Embarked units don't work in the same way, but instead require a couple of simple Lua calls:
Code:
player:SetEmbarkedGraphicOverride(artDefineString)
team:UpdateEmbarkGraphics()
which you could use with something like this:
Code:
OnEraChanged(eraID, playerID)
    local player = Players[playerID]
    local teamID = player:GetTeam()
    local midEraID = 2   --Medieval
    local lateEraID = 6   --Modern in G+K/BNW

    if (eraID < midEraID) then
        player:SetEmbarkedGraphicOverride("ART_DEF_UNIT_GALLEY")
    elseif (eraID >= midEraID and eraID < lateEraID) then
        player:SetEmbarkedGraphicOverride("ART_DEF_UNIT_GALLEON")
    else
        player:SetEmbarkedGraphicOverride("ART_DEF_UNIT_TRANSPORT")
    end
    Teams[teamID]:UpdateEmbarkGraphics()
end

Improvements should be an easy XML update. They're in the Landmark art defines (there's an era column).
Here's a simple SQL solution:
Code:
UPDATE ArtDefine_Landmarks SET Era = "Modern" WHERE Era = "Industrial";
 
FYI, you can do this with a mod; you don't need to edit base game files. Note that you can't have both Era variation and Cultural variation (like Settlers in the base game) at the same time without making your own system to do so in Lua.

Embarked units don't work in the same way, but instead require a couple of simple Lua calls:
Code:
player:SetEmbarkedGraphicOverride(artDefineString)
team:UpdateEmbarkGraphics()
which you could use with something like this:
Code:
OnEraChanged(eraID, playerID)
    local player = Players[playerID]
    local teamID = player:GetTeam()
    local midEraID = 2   --Medieval
    local lateEraID = 6   --Modern in G+K/BNW

    if (eraID < midEraID) then
        player:SetEmbarkedGraphicOverride("ART_DEF_UNIT_GALLEY")
    elseif (eraID >= midEraID and eraID < lateEraID) then
        player:SetEmbarkedGraphicOverride("ART_DEF_UNIT_GALLEON")
    else
        player:SetEmbarkedGraphicOverride("ART_DEF_UNIT_TRANSPORT")
    end
    Teams[teamID]:UpdateEmbarkGraphics()
end

Improvements should be an easy XML update. They're in the Landmark art defines (there's an era column).
Here's a simple SQL solution:
Code:
UPDATE ArtDefine_Landmarks SET Era = "Modern" WHERE Era = "Industrial";

Thank you very much for the help.

As for the modding, for my personal overhaul mod, I haven't used ModBuddy or any other SDK tools. I did it the lazy way. I just backed up the original files and paste my edited files directly into the game folder. I know that's horrible, but I'd like to know the downsides of doing it this way. There's the upside of being simpler to do (no UPDATE, SET, WHERE codes etc), and having the civilopedia display the right values (good for checking if some values/text edits work) in the main menu without loading all the mods then loading into a game.

Right now my "mod" (mostly a collection of modified vanilla files) is more than 80 files big, mostly XML. Is it easy to make that into a proper mod? Would it be preferable?
 
I have decided to forgo the simple and intuitive way of directly editing game files, and instead I am actually porting my mod over to the proper system because I'm a masochist. I started by just transferring some simple civilopedia text edits, and the changes do not take place in-game.

Here is log
Highlighted part is what I think the problem is. Other parts look similar to the log file without my mod.

Spoiler :
Code:
[17683.687] columns StrategicViewType, TileType are not unique
[17683.687] While executing - 'INSERT INTO ArtDefine_StrategicView(StrategicViewType, TileType, Asset) VALUES(?,?,?)'
[17684.859] no such table: ContentPackage.LocalizedText
[17684.859] no such table: ContentPackage.LocalizedText
[17684.859] no such table: ContentPackage.LocalizedText
[17685.765] no such table: ContentPackage.LocalizedText
[17686.765] columns StrategicViewType, TileType are not unique
[17686.765] While executing - 'INSERT INTO ArtDefine_StrategicView(StrategicViewType, TileType, Asset) VALUES(?,?,?)'
[17687.390] no such table: ContentPackage.LocalizedText
[17687.390] no such table: ContentPackage.LocalizedText
[17687.390] no such table: ContentPackage.LocalizedText
[17690.640] Validating Foreign Key Constraints...
[17690.640] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[17690.640] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[17690.640] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[17690.640] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[17690.640] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[17690.640] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[17690.640] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[17690.640] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[17690.640] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[17691.234] Invalid Reference on Trait_FreePromotionUnitCombats.UnitCombatType - "UNITCOMBAT_GATLINGGUN" does not exist in UnitCombatInfos
[17691.328] Invalid Reference on Policy_Flavors.PolicyType - "POLICY_UNIVERSAL_HEALTHCARE_A" does not exist in Policies
[17691.328] Invalid Reference on Policy_Flavors.PolicyType - "POLICY_UNIVERSAL_HEALTHCARE_A" does not exist in Policies
[17691.343] Invalid Reference on Policy_BuildingClassHappiness.PolicyType - "POLICY_UNIVERSAL_HEALTHCARE_A" does not exist in Policies
[17691.343] Invalid Reference on Policy_BuildingClassHappiness.PolicyType - "POLICY_UNIVERSAL_HEALTHCARE_A" does not exist in Policies
[17691.343] Invalid Reference on Policy_BuildingClassHappiness.PolicyType - "POLICY_UNIVERSAL_HEALTHCARE_A" does not exist in Policies
[17691.343] Invalid Reference on Policy_BuildingClassHappiness.PolicyType - "POLICY_UNIVERSAL_HEALTHCARE_A" does not exist in Policies
[17691.343] Invalid Reference on Policy_BuildingClassHappiness.PolicyType - "POLICY_UNIVERSAL_HEALTHCARE_A" does not exist in Policies
[17691.343] Invalid Reference on Policy_BuildingClassHappiness.PolicyType - "POLICY_UNIVERSAL_HEALTHCARE_A" does not exist in Policies
[17691.343] Invalid Reference on Policy_BuildingClassHappiness.PolicyType - "POLICY_UNIVERSAL_HEALTHCARE_A" does not exist in Policies
[17691.343] Invalid Reference on Policy_BuildingClassHappiness.PolicyType - "POLICY_UNIVERSAL_HEALTHCARE_A" does not exist in Policies
[17691.343] Invalid Reference on Policy_BuildingClassHappiness.PolicyType - "POLICY_UNIVERSAL_HEALTHCARE_A" does not exist in Policies
[17691.343] Invalid Reference on Policy_BuildingClassHappiness.PolicyType - "POLICY_UNIVERSAL_HEALTHCARE_A" does not exist in Policies
[17691.343] Invalid Reference on Policy_BuildingClassHappiness.PolicyType - "POLICY_UNIVERSAL_HEALTHCARE_A" does not exist in Policies
[17691.343] Invalid Reference on Policy_BuildingClassHappiness.PolicyType - "POLICY_UNIVERSAL_HEALTHCARE_A" does not exist in Policies
[17692.265] Invalid Reference on Unit_AITypes.UnitType - "UNIT_MECH" does not exist in Units
[17692.265] Invalid Reference on Unit_AITypes.UnitType - "UNIT_MECH" does not exist in Units
[17692.265] Invalid Reference on Unit_ClassUpgrades.UnitClassType - "UNITCLASS_SEALTEAM" does not exist in UnitClasses
[17692.328] Invalid Reference on UnitPromotions.PediaEntry - "TXT_KEY_PEDIA_PROMOTION_CARGO_VI" does not exist in Language_en_US
[17692.750] Invalid Reference on UnitGameplay2DScripts.UnitType - "UNIT_MECH" does not exist in Units
[17692.750] Invalid Reference on UnitGameplay2DScripts.UnitType - "UNIT_XCOM_SQUAD" does not exist in Units
[17692.843] Failed Validation.
[17693.250] 
-- SQLite Memory Statistics --
Memory Usage:
		[Cur]		[Max]
Malloc:		6240864		75798648
PageCache:	6		12
LookAside:	0		0
Scratch:	0		1

Static Buffer Overflows:
		[TooLarge]	[NoSpace]
PageCache:	5825904		62893656
Scratch:	0		0

Largest Allocations:
Malloc:		262144
PageCache:	1172
Scratch:	6640

Prepared Statements:
Current:		6
------------------------------
[17693.281] Validating Foreign Key Constraints...
[17693.281] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[17693.281] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[17693.281] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[17693.281] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[17693.281] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[17693.281] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[17693.281] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[17693.281] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[17693.281] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[17693.875] Invalid Reference on Trait_FreePromotionUnitCombats.UnitCombatType - "UNITCOMBAT_GATLINGGUN" does not exist in UnitCombatInfos
[17693.968] Invalid Reference on Policy_Flavors.PolicyType - "POLICY_UNIVERSAL_HEALTHCARE_A" does not exist in Policies
[17693.968] Invalid Reference on Policy_Flavors.PolicyType - "POLICY_UNIVERSAL_HEALTHCARE_A" does not exist in Policies
[17693.968] Invalid Reference on Policy_BuildingClassHappiness.PolicyType - "POLICY_UNIVERSAL_HEALTHCARE_A" does not exist in Policies
[17693.968] Invalid Reference on Policy_BuildingClassHappiness.PolicyType - "POLICY_UNIVERSAL_HEALTHCARE_A" does not exist in Policies
[17693.968] Invalid Reference on Policy_BuildingClassHappiness.PolicyType - "POLICY_UNIVERSAL_HEALTHCARE_A" does not exist in Policies
[17693.968] Invalid Reference on Policy_BuildingClassHappiness.PolicyType - "POLICY_UNIVERSAL_HEALTHCARE_A" does not exist in Policies
[17693.968] Invalid Reference on Policy_BuildingClassHappiness.PolicyType - "POLICY_UNIVERSAL_HEALTHCARE_A" does not exist in Policies
[17693.968] Invalid Reference on Policy_BuildingClassHappiness.PolicyType - "POLICY_UNIVERSAL_HEALTHCARE_A" does not exist in Policies
[17693.968] Invalid Reference on Policy_BuildingClassHappiness.PolicyType - "POLICY_UNIVERSAL_HEALTHCARE_A" does not exist in Policies
[17693.968] Invalid Reference on Policy_BuildingClassHappiness.PolicyType - "POLICY_UNIVERSAL_HEALTHCARE_A" does not exist in Policies
[17693.968] Invalid Reference on Policy_BuildingClassHappiness.PolicyType - "POLICY_UNIVERSAL_HEALTHCARE_A" does not exist in Policies
[17693.968] Invalid Reference on Policy_BuildingClassHappiness.PolicyType - "POLICY_UNIVERSAL_HEALTHCARE_A" does not exist in Policies
[17693.968] Invalid Reference on Policy_BuildingClassHappiness.PolicyType - "POLICY_UNIVERSAL_HEALTHCARE_A" does not exist in Policies
[17693.968] Invalid Reference on Policy_BuildingClassHappiness.PolicyType - "POLICY_UNIVERSAL_HEALTHCARE_A" does not exist in Policies
[17694.906] Invalid Reference on Unit_AITypes.UnitType - "UNIT_MECH" does not exist in Units
[17694.906] Invalid Reference on Unit_AITypes.UnitType - "UNIT_MECH" does not exist in Units
[17694.906] Invalid Reference on Unit_ClassUpgrades.UnitClassType - "UNITCLASS_SEALTEAM" does not exist in UnitClasses
[17694.968] Invalid Reference on UnitPromotions.PediaEntry - "TXT_KEY_PEDIA_PROMOTION_CARGO_VI" does not exist in Language_en_US
[17695.375] Invalid Reference on UnitGameplay2DScripts.UnitType - "UNIT_MECH" does not exist in Units
[17695.375] Invalid Reference on UnitGameplay2DScripts.UnitType - "UNIT_XCOM_SQUAD" does not exist in Units
[17695.484] Failed Validation.
[17695.875] 
-- SQLite Memory Statistics --
Memory Usage:
		[Cur]		[Max]
Malloc:		6242040		75798648
PageCache:	6		12
LookAside:	0		0
Scratch:	0		1

Static Buffer Overflows:
		[TooLarge]	[NoSpace]
PageCache:	5827080		62893656
Scratch:	0		0

Largest Allocations:
Malloc:		262144
PageCache:	1172
Scratch:	6640

Prepared Statements:
Current:		6
------------------------------
[17714.656] no such table: Language_zh_CN
[17714.656] In Query - insert into Language_zh_CN('Tag', 'Text') values (?, ?);
[17714.656] In XMLSerializer while updating table Language_zh_CN from file DB/_TEXT/AllText_zh_CN.xml.
[17714.859] column Type is not unique
[17714.859] column Type is not unique
[17714.859] column Type is not unique
[17714.859] column Type is not unique
[17714.890] no such table: Language_zh_CN
[17714.890] In Query - insert into Language_zh_CN('Tag', 'Text') values (?, ?);
[17714.890] In XMLSerializer while updating table Language_zh_CN from file Localization/IGE_ZH_CN.xml.
[17714.968] near "CREATE": syntax error
[B][COLOR="Red"][17715.093] Database::XMLSerializer (XML/SCO_Text.xml): <Update> element requires a child <Set> element.[/COLOR][/B]
[17715.859] Validating Foreign Key Constraints...
[17715.859] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[17715.859] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[17715.859] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[17715.859] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[17715.859] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[17715.859] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[17715.859] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[17715.859] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[17715.859] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[17716.484] Invalid Reference on Trait_FreePromotionUnitCombats.UnitCombatType - "UNITCOMBAT_GATLINGGUN" does not exist in UnitCombatInfos
[17716.578] Invalid Reference on Policy_Flavors.PolicyType - "POLICY_UNIVERSAL_HEALTHCARE_A" does not exist in Policies
[17716.578] Invalid Reference on Policy_Flavors.PolicyType - "POLICY_UNIVERSAL_HEALTHCARE_A" does not exist in Policies
[17716.593] Invalid Reference on Policy_BuildingClassHappiness.PolicyType - "POLICY_UNIVERSAL_HEALTHCARE_A" does not exist in Policies
[17716.593] Invalid Reference on Policy_BuildingClassHappiness.PolicyType - "POLICY_UNIVERSAL_HEALTHCARE_A" does not exist in Policies
[17716.593] Invalid Reference on Policy_BuildingClassHappiness.PolicyType - "POLICY_UNIVERSAL_HEALTHCARE_A" does not exist in Policies
[17716.593] Invalid Reference on Policy_BuildingClassHappiness.PolicyType - "POLICY_UNIVERSAL_HEALTHCARE_A" does not exist in Policies
[17716.593] Invalid Reference on Policy_BuildingClassHappiness.PolicyType - "POLICY_UNIVERSAL_HEALTHCARE_A" does not exist in Policies
[17716.593] Invalid Reference on Policy_BuildingClassHappiness.PolicyType - "POLICY_UNIVERSAL_HEALTHCARE_A" does not exist in Policies
[17716.593] Invalid Reference on Policy_BuildingClassHappiness.PolicyType - "POLICY_UNIVERSAL_HEALTHCARE_A" does not exist in Policies
[17716.593] Invalid Reference on Policy_BuildingClassHappiness.PolicyType - "POLICY_UNIVERSAL_HEALTHCARE_A" does not exist in Policies
[17716.593] Invalid Reference on Policy_BuildingClassHappiness.PolicyType - "POLICY_UNIVERSAL_HEALTHCARE_A" does not exist in Policies
[17716.593] Invalid Reference on Policy_BuildingClassHappiness.PolicyType - "POLICY_UNIVERSAL_HEALTHCARE_A" does not exist in Policies
[17716.593] Invalid Reference on Policy_BuildingClassHappiness.PolicyType - "POLICY_UNIVERSAL_HEALTHCARE_A" does not exist in Policies
[17716.593] Invalid Reference on Policy_BuildingClassHappiness.PolicyType - "POLICY_UNIVERSAL_HEALTHCARE_A" does not exist in Policies
[17717.406] Invalid Reference on Units.DefaultUnitAI - "UNITAI_OFFENSE" does not exist in UnitAIInfos
[17717.546] Invalid Reference on Unit_AITypes.UnitType - "UNIT_MECH" does not exist in Units
[17717.546] Invalid Reference on Unit_AITypes.UnitType - "UNIT_MECH" does not exist in Units
[17717.625] Invalid Reference on UnitPromotions.PediaEntry - "TXT_KEY_PEDIA_PROMOTION_CARGO_VI" does not exist in Language_en_US
[17718.046] Invalid Reference on UnitGameplay2DScripts.UnitType - "UNIT_MECH" does not exist in Units
[17718.046] Invalid Reference on UnitGameplay2DScripts.UnitType - "UNIT_XCOM_SQUAD" does not exist in Units
[17718.406] Failed Validation.
[17718.859] 
-- SQLite Memory Statistics --
Memory Usage:
		[Cur]		[Max]
Malloc:		9057024		75798648
PageCache:	7		13
LookAside:	0		0
Scratch:	0		1

Static Buffer Overflows:
		[TooLarge]	[NoSpace]
PageCache:	8551872		62893656
Scratch:	0		0

Largest Allocations:
Malloc:		262144
PageCache:	1172
Scratch:	6640

Prepared Statements:
Current:		12
------------------------------
[17718.906] Validating Foreign Key Constraints...
[17718.906] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[17718.906] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[17718.906] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[17718.906] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[17718.906] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[17718.906] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[17718.906] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[17718.906] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[17718.906] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[17719.515] Invalid Reference on Trait_FreePromotionUnitCombats.UnitCombatType - "UNITCOMBAT_GATLINGGUN" does not exist in UnitCombatInfos
[17719.609] Invalid Reference on Policy_Flavors.PolicyType - "POLICY_UNIVERSAL_HEALTHCARE_A" does not exist in Policies
[17719.609] Invalid Reference on Policy_Flavors.PolicyType - "POLICY_UNIVERSAL_HEALTHCARE_A" does not exist in Policies
[17719.609] Invalid Reference on Policy_BuildingClassHappiness.PolicyType - "POLICY_UNIVERSAL_HEALTHCARE_A" does not exist in Policies
[17719.609] Invalid Reference on Policy_BuildingClassHappiness.PolicyType - "POLICY_UNIVERSAL_HEALTHCARE_A" does not exist in Policies
[17719.609] Invalid Reference on Policy_BuildingClassHappiness.PolicyType - "POLICY_UNIVERSAL_HEALTHCARE_A" does not exist in Policies
[17719.609] Invalid Reference on Policy_BuildingClassHappiness.PolicyType - "POLICY_UNIVERSAL_HEALTHCARE_A" does not exist in Policies
[17719.609] Invalid Reference on Policy_BuildingClassHappiness.PolicyType - "POLICY_UNIVERSAL_HEALTHCARE_A" does not exist in Policies
[17719.609] Invalid Reference on Policy_BuildingClassHappiness.PolicyType - "POLICY_UNIVERSAL_HEALTHCARE_A" does not exist in Policies
[17719.609] Invalid Reference on Policy_BuildingClassHappiness.PolicyType - "POLICY_UNIVERSAL_HEALTHCARE_A" does not exist in Policies
[17719.609] Invalid Reference on Policy_BuildingClassHappiness.PolicyType - "POLICY_UNIVERSAL_HEALTHCARE_A" does not exist in Policies
[17719.609] Invalid Reference on Policy_BuildingClassHappiness.PolicyType - "POLICY_UNIVERSAL_HEALTHCARE_A" does not exist in Policies
[17719.609] Invalid Reference on Policy_BuildingClassHappiness.PolicyType - "POLICY_UNIVERSAL_HEALTHCARE_A" does not exist in Policies
[17719.609] Invalid Reference on Policy_BuildingClassHappiness.PolicyType - "POLICY_UNIVERSAL_HEALTHCARE_A" does not exist in Policies
[17719.609] Invalid Reference on Policy_BuildingClassHappiness.PolicyType - "POLICY_UNIVERSAL_HEALTHCARE_A" does not exist in Policies
[17720.437] Invalid Reference on Units.DefaultUnitAI - "UNITAI_OFFENSE" does not exist in UnitAIInfos
[17720.578] Invalid Reference on Unit_AITypes.UnitType - "UNIT_MECH" does not exist in Units
[17720.578] Invalid Reference on Unit_AITypes.UnitType - "UNIT_MECH" does not exist in Units
[17720.640] Invalid Reference on UnitPromotions.PediaEntry - "TXT_KEY_PEDIA_PROMOTION_CARGO_VI" does not exist in Language_en_US
[17721.062] Invalid Reference on UnitGameplay2DScripts.UnitType - "UNIT_MECH" does not exist in Units
[17721.078] Invalid Reference on UnitGameplay2DScripts.UnitType - "UNIT_XCOM_SQUAD" does not exist in Units
[17721.421] Failed Validation.
[17721.890] 
-- SQLite Memory Statistics --
Memory Usage:
		[Cur]		[Max]
Malloc:		9057024		75798648
PageCache:	7		13
LookAside:	0		0
Scratch:	0		1

Static Buffer Overflows:
		[TooLarge]	[NoSpace]
PageCache:	8551872		62893656
Scratch:	0		0

Largest Allocations:
Malloc:		262144
PageCache:	1172
Scratch:	6640

Prepared Statements:
Current:		12
------------------------------

This is the SCO_Text.xml file.

Spoiler :
Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- Created by ModBuddy on 6/12/2016 11:06:28 PM -->
<GameData>
	<Language_en_US>
		<Update>
			<Where Tag=""/>
			<Set Text=""/>
		</Update>
		<Update>
			<Where Tag="TXT_KEY_WONDER_MAUSOLEUM_HALICARNASSUS_HELP"/>
			<Set Text="Gain 100 [ICON_GOLD] Gold each time a Great Person is expended. Each source of [ICON_RES_MARBLE] Marble or [ICON_RES_STONE] Stone worked by this City produces +1 [ICON_PRODUCTION] Production."/>
		</Update>
		<Update>
			<Where Tag="TXT_KEY_BUILDING_MINT_STRATEGY"/>
			<Set Text="The Mint can only be constructed in a city with improved gold or silver resources nearby."/>
		</Update>
		<Update>
			<Where Tag="TXT_KEY_BUILDING_PAPER_MAKER_STRATEGY"/>
			<Set Text="The Paper Maker is the Chinese unique building, replacing the Library. The Paper Maker increases the city's acquisition of [ICON_RESEARCH] Science and also provides a boost to the city's [ICON_PRODUCTION] Production."/>
		</Update>
		<Update>
			<Where Tag="TXT_KEY_CIV5_FEATURES_LAKE_TEXT"/>
			<Set Text="A lake is any body of water ten tiles or smaller in size that is completely surrounded by land tiles (any larger body of water is considered ocean). When worked, lakes provide 3 food, 1 production and 1 science to nearby cities. Lakes are sources of fresh water, allowing the construction of farms on adjacent hills, tundra and desert. Farms next to fresh water receive an additional +1 food when the Civil Service technology and the Fertilizer technology is researched."/>
		</Update>
		<Update>
			<Where Tag="TXT_KEY_CIV5_IMPROVEMENTS_CITADEL_TEXT"/>
			<Set Text="A Citadel is a mighty fortification that can only be constructed by a Great General, usually near a city or on a particularly defensible piece of terrain. The Acropolis in Athens, Greece, is an example of an early powerful Citadel. Such structures were almost impossible to take by direct attack, and they were capable of withstanding protracted sieges before they fell. You can construct a Citadel anywhere within your territory, or directly adjacent to your territory. Upon constructing the Citadel, your Culture borders will also expand to surround the Citadel on all sides by one hex. If the new Culture border claims hexes already owned by another civilization, you will incur a diplomatic penalty as a result. Any unit stationed within a Citadel receives a 200% defensive strength bonus. Additionally, any enemy unit which ends its turn next to a Citadel takes 30 damage (damage does not stack with other Citadels)."/>
		</Update>
		<Update>
			<Where Tag="TXT_KEY_CIV5_IMPROVEMENTS_CUSTOMS_HOUSE_TEXT"/>
			<Set Text="A Customs House is a governmental building where taxes are paid on a country's imported and exported goods. It ensures that the government gets its cut (or "fair share," if you prefer) of profits on every cargo moving through a harbor. Given the amount of money involved, the opportunity for corruption is unlimited. Throughout history customs officials have not been famous for resisting temptation.[NEWLINE][NEWLINE]A Customs House can only be built on a coastal tile."/>
		</Update>
		<Update>
			<Where Tag="TXT_KEY_CIV5_IMPROVEMENTS_FORT_TEXT"/>
			<Set Text="A fort is a special improvement that doesn't increase a hex's productivity or provide access to a resource. Instead, a fort improves a hex's defensive bonus by 150% for units stationed in that hex. However, they do not provide a defensive bonus to units in enemy territory."/>
		</Update>
		<Update>
			<Where Tag="TXT_KEY_CIV5_IMPROVEMENTS_TRADING_POST_TEXT"/>
			<Set Text="Trading Posts are outposts where hunters and trappers may sell their wares to civilians in exchange for food, weapons, whiskey, gold, and all of the other trappings of society. They can generate a lot of wealth for a society.[NEWLINE][NEWLINE]A Trading Post can only be built on a coastal tile."/>
		</Update>
		<Update>
			<Where Tag="TXT_KEY_CIV5_TERRAIN_COAST_TEXT"/>
			<Set Text="Coast hexes are the ocean hexes directly adjacent to land. They provide food, production and science to a nearby city. Only naval units and "embarked" land units may enter coastal hexes."/>
		</Update>
		<Update>
			<Where Tag="TXT_KEY_CIV5_TERRAIN_OCEAN_TEXT"/>
			<Set Text="Ocean hexes are deep-water hexes. They provide food, production and science to a city."/>
		</Update>
		<Update>
			<Where Tag="TXT_KEY_TECH_ECONOMICS_HELP"/>
			<Set Text="Allows Workers to construct the [COLOR_POSITIVE_TEXT]Trading Post[ENDCOLOR], which increases the [ICON_GOLD] Gold output of coastal tiles. Also allows you to build the [COLOR_POSITIVE_TEXT]Windmill[ENDCOLOR] in cities built on flat land, increasing [ICON_PRODUCTION] Production."/>
		</Update>
		<Update>
			<Where Tag="TXT_KEY_TECH_FERTILIZER_HELP"/>
			<Set Text="Increases the [ICON_FOOD] Food from Farmed tiles with Fresh Water, providing a massive boost to growth."/>
		</Update>
		<Update>
			<Where Tag="TXT_KEY_TECH_RIFLING_HELP"/>
			<Set Text="Allows you to build the [COLOR_POSITIVE_TEXT]Rifleman[ENDCOLOR], a front-line infantry unit of the mid-game eras, and the [COLOR_POSITIVE_TEXT]Gatling gun[ENDCOLOR], a mid-game non-siege ranged unit."/>
		</Update>
		<Update>
			<Where Tag="TXT_KEY_TERRAIN_HILLS_HEADING3_BODY"/>
			<Set Text="
        Hills are well, hilly. They're difficult to farm and hard to move through, but they provide good defensive bonuses and many different resources can be found therein. [NEWLINE][NEWLINE]City Yield: 1 production[NEWLINE]Movement Cost: 2[NEWLINE]Combat Modifier: 25% defensive combat bonus to unit on a hill
      "/>
		</Update>
		<Update>
			<Where Tag="TXT_KEY_UNIT_GREEK_HOPLITE_STRATEGY"/>
			<Set Text="The Hoplite is the Greek unique unit, replacing the Spearman. It is far more powerful than the Spearman."/>
		</Update>
		<Update>
			<Where Tag="TXT_KEY_UNIT_LONGSWORDSMAN_STRATEGY"/>
			<Set Text="The Longswordsman is a medieval infantry unit. It is slower and less powerful than the Knight, but can benefit from terrain bonuses. It is also slightly more powerful than the Pikeman, but doesn't receive that unit's bonus versus mounted units. Use Longswordsmen and Catapults to attack enemy cities."/>
		</Update>
		<Update>
			<Where Tag="TXT_KEY_UNIT_PERSIAN_IMMORTAL_STRATEGY"/>
			<Set Text="The Immortal is the Persian unique unit, replacing the Spearman. It is slightly more powerful than the Spearman, and it heals twice as quickly."/>
		</Update>
		<Update>
			<Where Tag="TXT_KEY_UNIT_PIKEMAN_STRATEGY"/>
			<Set Text="
        The Pikeman is the standard Medieval infantry combat unit. A Pikeman fortified in defensive terrain is a melee unit's worst nightmare.
      "/>
		</Update>
		<Update>
			<Where Tag="TXT_KEY_UNIT_SPEARMAN_STRATEGY"/>
			<Set Text="The Spearman is the first melee unit available after the Warrior. It a powerful standard melee unit during the Ancient and Classical Era."/>
		</Update>
		<Update>
			<Where Tag="TXT_KEY_UNIT_STEALTH_BOMBER_STRATEGY"/>
			<Set Text="
        The Stealth Bomber is an upgraded bomber, possessing increased range, a greater Ranged Combat Strength, and an increased ability to avoid enemy anti-aircraft and fighters. The Stealth Bomber has the "air recon" ability, which means that everything within 6 tiles of its starting location is visible at the beginning of the turn.
      "/>
		</Update>
		<Update>
			<Where Tag="TXT_KEY_UNIT_SWORDSMAN_STRATEGY"/>
			<Set Text="The Swordsman is just slightly more powerful than the Spearman. However, it does not get a combat bonus against mounted units (Chariot Archer, Horseman and so forth). They are very useful when attacking early-era cities."/>
		</Update>
		<Update>
			<Where Tag="TXT_KEY_PEDIA_PROMOTION_ANTI_MOUNTED_I"/>
			<Set Text="Bonus vs Mounted (25)"/>
		</Update>
		<Update>
			<Where Tag="TXT_KEY_PEDIA_PROMOTION_ANTI_MOUNTED_II"/>
			<Set Text="Bonus vs Mounted (50)"/>
		</Update>
		<Update>
			<Where Tag=""/>
			<Set Text=""/>
		</Update>
		<Update>
			<Where Tag=""/>
			<Set Text=""/>
		</Update>
		<Update>
			<Where Tag=""/>
			<Set Text=""/>
		</Update>
		<Update>
			<Where Tag=""/>
			<Set Text=""/>
		</Update>
		<Update>
			<Where Tag=""/>
			<Set Text=""/>
		</Update>
		<Update>
			<Where Tag=""/>
			<Set Text=""/>
		</Update>
		<Update>
			<Where Tag=""/>
			<Set Text=""/>
		</Update>
		<Update>
			<Where Tag=""/>
			<Set Text=""/>
		</Update>
		<Update>
			<Where Tag=""/>
			<Set Text=""/>
		</Update>
		<Update>
			<Where Tag=""/>
			<Set Text=""/>
		</Update>
		<Update>
			<Where Tag=""/>
			<Set Text=""/>
		</Update>
		<Update>
			<Where Tag=""/>
			<Set Text=""/>
		</Update>
		<Update>
			<Where Tag=""/>
			<Set Text=""/>
		</Update>
		<Update>
			<Where Tag=""/>
			<Set Text=""/>
		</Update>
		<Update>
			<Where Tag=""/>
			<Set Text=""/>
		</Update>
		<Row Tag="TXT_KEY_PEDIA_PROMOTION_CARGO_VI">
			<Text>Can Carry 6 Cargo</Text>
		</Row>
	</Language_en_US>
</GameData>

Modbuddy gives me some errors, but they're all about the quotation marks that are contained inside the texts, which it interprets as being part of the code. Maybe that's the problem?


This is .modinfo file, just in case.

Spoiler :
Code:
<?xml version="1.0" encoding="utf-8"?>
<Mod id="94b5ab67-7f0d-49b6-bbbd-e007c4760515" version="1">
  <Properties>
    <Name>Seamus Complete Overhaul Project</Name>
    <Stability>Beta</Stability>
    <Teaser>A complete overhaul mod created by Seamus.</Teaser>
    <Description>Seamus Complete Overhaul includes sweeping changes to the Units, Terrain, Gameplay and Graphic elements of the game. The mod favors a tall and naval-oriented style of gameplay.</Description>
    <Authors>Seamus</Authors>
    <HideSetupGame>0</HideSetupGame>
    <AffectsSavedGames>1</AffectsSavedGames>
    <MinCompatibleSaveVersion>0</MinCompatibleSaveVersion>
    <SupportsSinglePlayer>1</SupportsSinglePlayer>
    <SupportsMultiplayer>0</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="A4A02194E9C12895BC947E20F63B585D" import="0">XML/SCO_AI.xml</File>
    <File md5="941F98F0E5DABB3B7EFCD01B0903BB18" import="0">XML/SCO_Text.xml</File>
  </Files>
  <Actions>
    <OnModActivated>
      <UpdateDatabase>XML/SCO_AI.xml</UpdateDatabase>
      <UpdateDatabase>XML/SCO_Text.xml</UpdateDatabase>
    </OnModActivated>
  </Actions>
</Mod>
 
Modbuddy gives me some errors, but they're all about the quotation marks that are contained inside the texts, which it interprets as being part of the code. Maybe that's the problem?


I used to be able to add quotation marks using the old method of pasting in edited vanilla fiiles, and the vanilla entries have quotation marks in them.

So surely, I mean surely, this couldn't be it, right?

And surely, the apostrophes won't turn into quotation marks, RIGHT?



SOLVED

http://forums.civfanatics.com/showpost.php?p=14216364&postcount=31


Turns out this is every bit as convoluted as I hoped it to be. Why people don't just paste over vanilla files for their undistributed edits is beyond me. :p
 
Hello Seamus,

if you just edit the vanilla files you may run into some issues :

- If there is an update for Civ5 (unprobable but who knows?) or if you need to validate your Civ5 files with steam you will loose your changes.

- Your changes may have compatibility issues with other mods. If you don't remember exactly which files you changed it may be hard to find where the problem is.

Modbuddy is really easy to use and is a safe way to mod the game :)
 
Hello Seamus,

if you just edit the vanilla files you may run into some issues :

- If there is an update for Civ5 (unprobable but who knows?) or if you need to validate your Civ5 files with steam you will loose your changes.

- Your changes may have compatibility issues with other mods. If you don't remember exactly which files you changed it may be hard to find where the problem is.

Modbuddy is really easy to use and is a safe way to mod the game :)

Well I kept a mod folder that looks like this that allows me to revert back and forth, and keep track of all my changes.
Spoiler :


But yes, I feel like a complete scrub because everyone else is using the SDK, so I will switch over.
 
Your mother probably told you that "everyone else is doing it" isn't a great excuse. If you really have no intention of sharing your mod, and you're comfortable using your method, then it's perfectly valid (plus it allows you to continue to earn achievements--even though you might be cheating).

That being said, you'd be contributing to the experience of the community by sharing your changes. I have found it to be a rewarding (if, yes, sometimes frustrating) experience learning to mod this game.

...

Though you expressed discomfort with using SQL, it can really make life easier even if there's a learning curve at first. Rather than combing through multiple files and updating a bunch of XML tags (and then have to go back and find where you made your typos), you can often get the job done in a few SQL commands.

This XML/SQL Cheat Sheet is invaluable.

Here's a quick SQL tutorial of some more advanced techniques:

For instance, to move all _LATE (i.e., INDUSTRIAL) art defines to _MODERN:
Code:
UPDATE ArtDefine_UnitInfos
    SET Type = REPLACE(Type, 'LATE', 'MODERN')
    WHERE Type LIKE '%_LATE';
UPDATE ArtDefine_UnitInfoMemberInfos
    SET UnitInfoType = REPLACE(UnitInfoType, 'LATE', 'MODERN')
    WHERE UnitInfoType LIKE '%_LATE';

If you wanted to leave out a specific unit or if you were worried that you'd affect another mod (though that would only be if the mod happened to load before yours), you could instead do something like:
Code:
UPDATE ArtDefine_UnitInfos
    SET Type = REPLACE(Type, 'LATE', 'MODERN')
    WHERE Type IN (
    'ART_DEF_UNIT_ARTIST_LATE',
    'ART_DEF_UNIT_ENGINEER_LATE',
    'ART_DEF_UNIT_GENERAL_LATE',
    'ART_DEF_UNIT_GREAT_ADMIRAL_LATE',
    'ART_DEF_UNIT_MERCHANT_LATE',
    'ART_DEF_UNIT_SCIENTIST_LATE',
    'ART_DEF_UNIT_WORKBOAT_LATE',
    'ART_DEF_UNIT__WORKER_LATE'
);

--(then similar for ArtDefine_UnitInfoMemberInfos)

If you wanted to go the other way, and make sure you affected all other mods, regardless of whether that mod was loaded before or after yours, you could add a TRIGGER statement.

If you wanted to mix and match changes to various eras, you could instead do something like:
Code:
UPDATE ArtDefine_UnitInfos SET Type = CASE Type
    WHEN 'ART_DEF_UNIT_ARTIST_LATE' THEN 'ART_DEF_UNIT_ARTIST_MODERN'
    WHEN 'ART_DEF_UNIT_ENGINEER_LATE' THEN 'ART_DEF_UNIT_ENGINEER_MODERN'
    WHEN 'ART_DEF_UNIT_GREAT_ADMIRAL_LATE' THEN 'ART_DEF_UNIT_GREAT_ADMIRAL_MODERN'
    WHEN 'ART_DEF_UNIT_MERCHANT_LATE' THEN 'ART_DEF_UNIT_MERCHANT_MODERN'
    WHEN 'ART_DEF_UNIT_SCIENTIST_LATE' THEN 'ART_DEF_UNIT_SCIENTIST_MODERN'
    WHEN 'ART_DEF_UNIT_WORKBOAT_LATE' THEN 'ART_DEF_UNIT_WORKBOAT_MODERN'
    WHEN 'ART_DEF_UNIT__WORKER_LATE' THEN 'ART_DEF_UNIT__WORKER_MODERN'
    END;

--(then similar for ArtDefine_UnitInfoMemberInfos)
 
Top Bottom