Mod problem

Ogenvi

Chieftain
Joined
Mar 23, 2011
Messages
66
I did a XML and I can activate the mod. In the properties the Action of the mod is correct, but later this doesn't work when I play. The mod I have made only changes the strenght of some units in the expansion Gods & Kings. The XML contains the next:

Code:
<?xml version="1.0" encoding="utf-16"?>
<!-- Created by ModBuddy on 7/6/2012 4:32:14 PM -->
<GameData>
	<Units>
		<Update>
			<Where Type="UNIT_MISSILE_CRUISER"/>
			<Set Combat="75"/>
		</Update>
		<Update>
			<Where Type="UNIT_BATTLESHIP"/>
			<Set Combat="80"/>
			<Set RangedCombat="100"/>
		</Update>
		<Update>
			<Where Type="UNIT_FRIGATE"/>
			<Set Combat="30"/>
			<Set RangedCombat="32"/>
		</Update>
		<Update>
			<Where Type="UNIT_SHIPOFTHELINE"/>
			<Set Combat="30"/>
			<Set RangedCombat="35"/>
		</Update>
		<Update>
			<Where Type="UNIT_DESTROYER"/>
			<Set Combat="60"/>
		</Update>
		<Update>
			<Where Type="UNIT_SUBMARINE"/>
			<Set Combat="45"/>
			<Set RangedCombat="60"/>
		</Update>
		<Update>
			<Where Type="UNIT_NUCLEAR_SUBMARINE"/>
			<Set Combat="55"/>
		<Update>
			<Where Type="UNIT_INFANTRY"/>
			<Set Combat="65"/>
		</Update>
		<Update>
			<Where Type="UNIT_TANK"/>
			<Set Combat="75"/>
		</Update>
		<Update>
			<Where Type="UNIT_MARINE"/>
			<Set Combat="75"/>
		</Update>
		<Update>
			<Where Type="UNIT_PARATROOPER"/>
			<Set Combat="75"/>
		</Update>
		<Update>
			<Where Type="UNIT_PRIVATEER"/>
			<Set Combat="30"/>
		</Update>
		<Update>
			<Where Type="UNIT_DUTCH_SEA_BEGGAR"/>
			<Set Combat="30"/>
		</Update>
		<Update>
			<Where Type="UNIT_HELICOPTER_GUNSHIP"/>
			<Set Combat="80"/>
		</Update>
		<Update>
			<Where Type="UNIT_CAVALRY"/>
			<Set Combat="38"/>
		</Update>
		<Update>
			<Where Type="UNIT_RUSSIAN_COSSACK"/>
			<Set Combat="38"/>
		</Update>
		<Update>
			<Where Type="UNIT_AUSTRIAN_HUSSAR"/>
			<Set Combat="38"/>
		</Update>
		</Units>
</GameData>

I don't know if this needs SQL; anyway that I don't know how to works SQL.
 
There is a missing </Update> after
Code:
			<Where Type="UNIT_NUCLEAR_SUBMARINE"/>
			<Set Combat="55"/>
 
You can't have two <Set> tags in the same <Update>, use <Set Combat="80" RangedCombat="100"/> instead.

Also, these things are reported in the xml.log file, so you need to enable logging (in config.ini LogginEnabled=1 (or some such)) and then check the database.log, xml.log and lua.log files for errors as you make changes to / develop you mods
 
I change the Set, and the same issue continues. Maybe the problem is in the properties :/

Code:
<?xml version="1.0" encoding="utf-16"?>
<!-- Created by ModBuddy on 7/6/2012 4:32:14 PM -->
<GameData>
	<Units>
		<Update>
			<Where Type="UNIT_MISSILE_CRUISER"/>
			<Set Combat="75"/>
		</Update>
		<Update>
			<Where Type="UNIT_BATTLESHIP"/>
			<Set Combat="80" RangedCombat="100"/>
		</Update>
		<Update>
			<Where Type="UNIT_FRIGATE"/>
			<Set Combat="30" RangedCombat="32"/>
		</Update>
		<Update>
			<Where Type="UNIT_SHIPOFTHELINE"/>
			<Set Combat="30" RangedCombat="35"/>
		</Update>
		<Update>
			<Where Type="UNIT_DESTROYER"/>
			<Set Combat="60"/>
		</Update>
		<Update>
			<Where Type="UNIT_SUBMARINE"/>
			<Set Combat="45" RangedCombat="60"/>
		</Update>
		<Update>
			<Where Type="UNIT_NUCLEAR_SUBMARINE"/>
			<Set Combat="55"/>
		</Update>
		<Update>
			<Where Type="UNIT_INFANTRY"/>
			<Set Combat="65"/>
		</Update>
		<Update>
			<Where Type="UNIT_TANK"/>
			<Set Combat="75"/>
		</Update>
		<Update>
			<Where Type="UNIT_MARINE"/>
			<Set Combat="75"/>
		</Update>
		<Update>
			<Where Type="UNIT_PARATROOPER"/>
			<Set Combat="75"/>
		</Update>
		<Update>
			<Where Type="UNIT_PRIVATEER"/>
			<Set Combat="30"/>
		</Update>
		<Update>
			<Where Type="UNIT_DUTCH_SEA_BEGGAR"/>
			<Set Combat="30"/>
		</Update>
		<Update>
			<Where Type="UNIT_HELICOPTER_GUNSHIP"/>
			<Set Combat="80"/>
		</Update>
		<Update>
			<Where Type="UNIT_CAVALRY"/>
			<Set Combat="38"/>
		</Update>
		<Update>
			<Where Type="UNIT_RUSSIAN_COSSACK"/>
			<Set Combat="38"/>
		</Update>
		<Update>
			<Where Type="UNIT_AUSTRIAN_HUSSAR"/>
			<Set Combat="38"/>
		</Update>
	</Units>
</GameData>
 
No log file in Civ5 includes the error message "the same issue continues", so enable logging and post what is really being reported in the logs. And/Or, zip up the built mod and attach it, as it could be any number of errors in the .modinfo file, etc
 
No log file in Civ5 includes the error message "the same issue continues", so enable logging and post what is really being reported in the logs. And/Or, zip up the built mod and attach it, as it could be any number of errors in the .modinfo file, etc

The LoggingEnabled was in 1, and I have errors indicated by Database.log:

Code:
[12998.455] constraint failed
[12998.455] While executing - 'INSERT INTO ArtDefine_StrategicView(StrategicViewType, TileType, Asset) VALUES(?,?,?)'
[13005.444] Validating Foreign Key Constraints...
[13005.444] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[13005.444] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[13005.444] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[13006.084] Invalid Reference on Leader_MinorCivApproachBiases.LeaderType - "LEADER_SEJONG" does not exist in Leaders
[13006.084] Invalid Reference on Leader_Flavors.LeaderType - "LEADER_SEJONG" does not exist in Leaders
[13006.084] Invalid Reference on Leader_Flavors.LeaderType - "LEADER_SEJONG" does not exist in Leaders
[13006.614] Failed Validation.
[13007.098]
Code:
[13046.940] no such table: Language_zh_CN
[13046.940] In Query - insert into Language_zh_CN('Tag', 'Text') values (?, ?);
[13046.940] In XMLSerializer while updating table Language_zh_CN from file Localization/ZH_CN.xml.
[13054.272] Validating Foreign Key Constraints...
[13054.272] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[13054.272] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[13054.272] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[13054.959] Invalid Reference on Leader_MinorCivApproachBiases.LeaderType - "LEADER_SEJONG" does not exist in Leaders
[13054.959] Invalid Reference on Leader_Flavors.LeaderType - "LEADER_SEJONG" does not exist in Leaders
[13054.959] Invalid Reference on Leader_Flavors.LeaderType - "LEADER_SEJONG" does not exist in Leaders
[13055.505] Failed Validation.
[13055.988]
 
Code:
[COLOR="Blue"][12998.455] constraint failed
[12998.455] While executing - 'INSERT INTO ArtDefine_StrategicView(StrategicViewType, TileType, Asset) VALUES(?,?,?)'
[13005.444] Validating Foreign Key Constraints...
[13005.444] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[13005.444] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[13005.444] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes[/COLOR]
[COLOR="Red"][13006.084] Invalid Reference on Leader_MinorCivApproachBiases.LeaderType - "LEADER_SEJONG" does not exist in Leaders
[13006.084] Invalid Reference on Leader_Flavors.LeaderType - "LEADER_SEJONG" does not exist in Leaders
[13006.084] Invalid Reference on Leader_Flavors.LeaderType - "LEADER_SEJONG" does not exist in Leaders[/COLOR][13006.614] Failed Validation.
[13007.098]
Code:
[COLOR="Blue"][13046.940] no such table: Language_zh_CN
[13046.940] In Query - insert into Language_zh_CN('Tag', 'Text') values (?, ?);
[13046.940] In XMLSerializer while updating table Language_zh_CN from file Localization/ZH_CN.xml.
[13054.272] Validating Foreign Key Constraints...
[13054.272] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[13054.272] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[13054.272] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes[/COLOR]
[COLOR="Red"][13054.959] Invalid Reference on Leader_MinorCivApproachBiases.LeaderType - "LEADER_SEJONG" does not exist in Leaders
[13054.959] Invalid Reference on Leader_Flavors.LeaderType - "LEADER_SEJONG" does not exist in Leaders
[13054.959] Invalid Reference on Leader_Flavors.LeaderType - "LEADER_SEJONG" does not exist in Leaders[/COLOR][13055.505] Failed Validation.
[13055.988]

The ones in blue are "standard", the ones in red are not. If they relate to your mod, start there. If not, zip up your mod and attach it.
 
The ones in blue are "standard", the ones in red are not. If they relate to your mod, start there. If not, zip up your mod and attach it.

They are not related with my mod. On the other hand, the unique expansion I don't have is the Korean civ; May it be the cause of these errors?
 
Probably not. I just have all the DLC so have never seen those particular errors before.

Just zip up the mod and attach it - easier for us to disect it directly than keep guessing
 
Uploaded
 

Attachments

  • Changes in Combat for Gods and Kings.rar
    1.7 KB · Views: 22
OK,

First - the sub-directory should be called "Changes in Combat for Gods and Kings (v 1)" (but I suspect that "error" is a result of the zip process and not a real one)

Second - the ChangesInCombat.xml modifies the database so must not be listed as an InGameUIAddin (but I'm guessing that was a "in frustration try anything/everything to see if it will work" - and anyway it does no harm in this particular instance)

So what is the problem? Kept me guessing for some time!

It would appear that the XML parser Firaxis use is stuck in the dark-ages. Your ChangesInCombat.xml file is UTF-16 encoded, and Civ5 wants them UTF-8 encoded.

Not sure how you did this in ModBuddy, but if you open the ChangesInCombat.xml file in Notepad, change the "utf-16" attribute at the top to "utf-8" and then do a SaveAs UTF-8 format (from the bottom drop-down in the Notepad Save As dialog") your mod will then work.

You might have managed to change something in ModBuddy to default to UTF-16, if so you'll need to change it back

W
 
Thanks (YEEEEEES YEEEES IT WORKS ALELUYA!!!!!), it works correctly :D

Second - the ChangesInCombat.xml modifies the database so must not be listed as an InGameUIAddin (but I'm guessing that was a "in frustration try anything/everything to see if it will work" - and anyway it does no harm in this particular instance)

:mischief:
 
Top Bottom