Warlords 2.08 XML error with Ironclad's sound effect

Iustus

King
Joined
Jul 18, 2006
Messages
609
Location
Sunnyvale, CA
There apparently is a suble error with the XML for Ironclad's sound effects. It does not cause a crash, but it does cause an assert, if you do a build with asserts on.

You get these two asserts, if you do a build of the 2.08 DLL with FASSERT_ENABLE #defined:

Assert Failed

File: c:\documents and settings\brent\my documents\better ai\sourceforge\branches\firaxis\cvgamecoredll\cvglobals.cpp
Line: 2743
Expression: strcmp(szType, "NONE")==0
Message: info type EFFECT_WEAPON_IRONCLAD_CANNON_01, not found, Current XML file is: Misc/Civ4TutorialInfos.xml

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

Assert Failed

File: c:\documents and settings\brent\my documents\better ai\sourceforge\branches\firaxis\cvgamecoredll\cvglobals.cpp
Line: 2743
Expression: strcmp(szType, "NONE")==0
Message: info type EFFECT_WEAPON_IRONCLAD_CANNON_02, not found, Current XML file is: Misc/Civ4TutorialInfos.xml

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

Enclosed is a save which causes this assert when you end turn.
Also enclosed is an empty mod directory (nothing is in it), so that you can load this save.

I am not enclosing a build of the DLL with asserts active (it is about 4 MB), but I can do so if needed.

I am guessing this should be a relatively easy bug to fix, some typo in the XML? Perhaps some XML junkie can track down the error line rather quickly?

-Iustus
 

Attachments

I guess I am that XML junkie, so here goes:

This failed assert seems to still pop up in BTS, but I checked the XML of Warlords as well. In Assets/XML/Misc/CIV4EffectInfos.xml are the XML references:

Code:
<EffectInfo>
   <Type>EFFECT_WEAPON_IRONCLAD_CANNON_01</Type>
   <Description>Ironclad Cannon Fire Version 1</Description>
   <fScale>0.08</fScale>
   <fUpdateRate>2.7</fUpdateRate>
   <Path>Art/Effects/weapon_cannonfire/fx_weapon_cannonfire_01.nif</Path>
   <bIsProjectile>0</bIsProjectile>
</EffectInfo>

and

Code:
<EffectInfo>
   <Type>EFFECT_WEAPON_IRONCLAD_CANNON_02</Type>
   <Description>Ironclad Cannon Fire Version 2</Description>
   <fScale>0.07</fScale>
   <fUpdateRate>2.5</fUpdateRate>
   <Path>Art/Effects/weapon_cannonfire/fx_weapon_cannonfire_02.nif</Path>
   <bIsProjectile>0</bIsProjectile>
</EffectInfo>

This seems to be in order, especially compared to other cannon effects (and there are lots). I though maybe there is something amiss with the art paths and I unpacked all the fpk-files to check. The paths are correct.

Next I checked all the sounds related with Ironclad and they all seem to be present and properly referenced.

Anybody that has another suggestion?
 
I know this is a really old and somewhat unimportant bug... but I think I just found a vital clue.
The missing key is not quite what it seems. It looks like "EFFECT_WEAPON_IRONCLAD_CANNON_01" but it is actually "EFFECT_WEAPON_IRONCLAD_CANNON_01,". So it isn't the xml that's wrong, it's whatever lists that effect name in the first place. Unfortunately, I don't know where that is.

I'm looking for it now.

[edit]
Apparently the problem is in assets2\art\units\ironclad\ironclad_md_strikea.kf. But unfortunately, that is a binary file from "Gamebryo". I don't really know anything about it, but it looks like we'll need some commercial software to edit the file. I tried just deleting the comma using an ordinary text editor, but that just makes the game crash. :(

[edit again]
Ok. After a short internet search, I found a program that can edit the file; and I edited the file, and the problem is now fixed. I've attached the corrected .kf file for anyone who wants it.
 

Attachments

Back
Top Bottom