Problem with Database log

ArcandSpark

Chieftain
Joined
Apr 6, 2012
Messages
20
This is my Civilizations.xml

-<GameData>
-<Civilizations>
-<Row>
<Type>CIVILIZATION_BILL</Type>
<Description>TXT_KEY_CIV_BILL_DESC</Description>
<ShortDescription>TXT_KEY_CIV_BILL_SHORT_DESC</ShortDescription>
<Adjective>TXT_KEY_CIV_BABYLON_ADJECTIVE</Adjective>
<CivilopediaTag>TXT_KEY_CIV5_BABYLON</CivilopediaTag>
<DefaultPlayerColor>PLAYERCOLOR_DARK_CYAN</DefaultPlayerColor>
<ArtDefineTag>ART_DEF_CIVILIZATION_GERMANY</ArtDefineTag>
<ArtStyleType>ARTSTYLE_EUROPEAN</ArtStyleType>
<PortraitIndex>15</PortraitIndex>
<IconAtlas>CIV_COLOR_ATLAS</IconAtlas>
<AlphaIconAtlas>CIV_ALPHA_ATLAS</AlphaIconAtlas>
<MapImage>MapBabylon512.dds</MapImage>
<ArtStyleSuffix>_EURO</ArtStyleSuffix>
<ArtStylePrefix>EUROPEAN </ArtStylePrefix>
<DawnOfManQuote>TXT_KEY_CIV5_DAWN_BILL_TEXT</DawnOfManQuote>
<DawnOfManImage>DOM_Nebuchadnezzar.dds</DawnOfManImage>
<DawnOfManAudio>AS2D_DOM_SPEECH_BABYLON</DawnOfManAudio>
<Column name="Description" type="The Ministries Sphere"/>
<Column name="ShortDescription" type="The Ministries"/>
<Column name="Playable" type="True"/>
</Row>
</Civilizations>

The log keeps telling me
[8663.156] Database::XMLSerializer (Civilizations/Civilizations.xml): 'Row' or 'Delete' expected, got 'Civilizations'.

When i add the table from the original civilization i get the problem

[8883.242] Database::XMLSerializer (Civilizations/Civilizations.xml): 'Row' or 'Delete' expected, got 'Table'.

This is the table that i added
-<Table name="Civilizations"> <Column name="ID" autoincrement="true" primarykey="true" type="integer"/>
<Column name="Type" type="text" unique="true" notnull="true"/>
<Column name="Description" type="text" reference="Language_en_US(Tag)"/>
<Column name="Civilopedia" type="text" default="NULL"/>
<!-- NOTE: This column is deprecated (for this table only). -->
<Column name="CivilopediaTag" type="text"/>
<Column name="Strategy" type="text" reference="Language_en_US(Tag)"/>
<Column name="Playable" type="boolean" default="true"/>
<Column name="AIPlayable" type="boolean" default="true"/>
<Column name="ShortDescription" type="text" reference="Language_en_US(Tag)" default="NULL"/>
<Column name="Adjective" type="text" reference="Language_en_US(Tag)" default="NULL"/>
<Column name="DefaultPlayerColor" type="text" default="NULL"/>
<Column name="ArtDefineTag" type="text" default="NULL"/>
<Column name="ArtStyleType" type="text" default="NULL"/>
<Column name="ArtStyleSuffix" type="text" default="NULL"/>
<Column name="ArtStylePrefix" type="text" default="NULL"/>
<Column name="DerivativeCiv" type="text" default="NULL"/>
<!--NOTE: This column is deprecated (for this table only). -->
<Column name="PortraitIndex" type="integer" default="-1"/>
<Column name="IconAtlas" type="text" reference="IconTextureAtlases(Atlas)" default="NULL"/>
<Column name="AlphaIconAtlas" type="text" reference="IconTextureAtlases(Atlas)" default="NULL"/>
<Column name="MapImage" type="text" default="NULL"/>
<Column name="DawnOfManQuote" type="text" default="NULL"/>
<Column name="DawnOfManImage" type="text" default="NULL"/>
<Column name="DawnOfManAudio" type="text" default="NULL"/>
<Column name="PackageID" type="text" default="NULL"/>
<Column name="SoundtrackTag" type="text" default="NULL"/>
</Table>
 
You can't add a table named "Civilizations" if there's already one in the game with that name (which there is). Why exactly are you trying to add a new Table definition?
 
I am trying to add a new civilization and that is the example given on page 30 of Kaels modding guide. I probably have the process wrong. Am i not supposed to add tables? When i dont add the table i get this:

[8663.156] Database::XMLSerializer (Civilizations/Civilizations.xml): 'Row' or 'Delete' expected, got 'Civilizations'.

so i dont know what to do there. I copied and pasted his example and filled in my information just to get an idea of how to do it.

I also tried this to see if i could get something to work. What am i missing?

<GameData>
-<Language_en_US>
<Update>
-<Row Tag="TXT_KEY_LEADER_ALEXANDER">
<Text>That Guy!</Text>
</Row>
</Update>
</Language_en_US>
</GameData>
 
I probably have the process wrong. Am i not supposed to add tables?

No. You're not supposed to add copies of the existing tables. You only add a Table definition if you're trying to create an entirely new table. When you're adding new entries to existing tables, you only use <Row>, and when you're altering existing tables' entries you use <Update> or <Delete> as necessary. That's it.

As for the rest, first of all, you cannot put something like
Code:
<Column name="Description" type="The Ministries Sphere"/>
<Column name="ShortDescription" type="The Ministries"/>
<Column name="Playable" type="True"/>
inside a Row declaration. A Column command can only go inside a Table declaration. If you're trying to add a new entry (which you are) then you write it as
Code:
<Description>"The Ministries Sphere"</Description>
<ShortDescription>"The Ministries"</ShortDescription>
<Playable>true</Playable>

Beyond that, we'd have to see your actual files to make sure you're not doing something else wrong that's breaking the process. Don't cut and paste into a post, attach the entire XML file as an attachment. Also, attach the .modinfo file so we can be sure you're loading the files correctly.
 
Will do! Thankyou for the help. I am not used to modding in this way but i have been having a lot of fun at it despite the problems.
 
I think i have some issues in this file... i tried uploading the .xml file and it says that it is an invalid file. i tried both my civilizations.xml and the .modinfo
 
I think i have some issues in this file... i tried uploading the .xml file and it says that it is an invalid file. i tried both my civilizations.xml and the .modinfo

If by "uploading" you mean uploading the mod to the mod browser, then don't do that. If you mean attaching it to your post, the little popup window you use for that should give a list of acceptable file extensions. You can't upload XML or modinfo files directly, but you CAN zip them up (or rar them, or tar them, or gzip them) and attach that zip file.

(The full list, right down below the submit post button:)
Valid file extensions: 7z ace bmp civ4replay civ4savedgame civ5mod civ5replay civ5save civbeyondswordreplay civbeyondswordsave civwarlordssave colonizationsave doc dpy gif gz jpe jpeg jpg map net pcx pdf png rar sav sve tar txt zip
 
okay done. it shoudl be here now. There are some known issues with the Civilizations.xml file which hasnt been fixed yet but if i could see the proper way of doing it i could fix my other files too that are getting simmilar errors.
[37715.800] Database::XMLSerializer (Civilizations/Civilizations.xml): 'Row' or 'Delete' expected, got 'Civilizations'.
 

Attachments

Your XML for some reason has minus signs between various entries, like between <Civilizations> and <Row>. You get this if you cut and paste from XML into a text editor, and you have to clean those out.

More importantly, you've got a second <GameData> inside your <GameData>. It won't work if you leave it like that.

So fix both of those, and try running it again.
 
Well i know what the Database.log file is telling me for errors but i dont know what it means. I am guessing it says that i dont have the proper values for my civilization then it doesnt recognise the values i did put in and some of those were straight from the Babylon .xml file. The primary key sounds like it is that random key that you make in the mod info menu.

Code:
[8284.401] constraint failed
[8284.401] While executing - 'insert into Civilizations('ID', 'Type', 'Description', 'ShortDescription', 'Adjective', 'CivilopediaTag', 'DefaultPlayerColor', 'ArtStyleType', 'PortraitIndex', 'IconAtlas', 'AlphaIconAtlas', 'MapImage', 'ArtStyleSuffix', 'ArtStylePrefix', 'DawnOfManQuote', 'DawnOfManImage', 'DawnOfManAudio') values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);'
[8284.401] In XMLSerializer while inserting row into table Civilizations('ID', 'Type', 'Description', 'ShortDescription', 'Adjective', 'CivilopediaTag', 'DefaultPlayerColor', 'ArtStyleType', 'PortraitIndex', 'IconAtlas', 'AlphaIconAtlas', 'MapImage', 'ArtStyleSuffix', 'ArtStylePrefix', 'DawnOfManQuote', 'DawnOfManImage', 'DawnOfManAudio') with  values (0, CIVILIZATION_BILL, TXT_KEY_CIV_BILL_DESC, TXT_KEY_CIV_BILL_SHORT_DESC, TXT_KEY_CIV_BABYLON_ADJECTIVE, TXT_KEY_CIV5_BABYLON, PLAYERCOLOR_DARK_CYAN, ARTSTYLE_EUROPEAN, 15, CIV_COLOR_ATLAS, CIV_ALPHA_ATLAS, MapBabylon512.dds, _EURO", EUROPEAN, TXT_KEY_CIV5_DAWN_BILL_TEXT, DOM_Nebuchadnezzar.dds, AS2D_DOM_SPEECH_BABYLON, ).
[8284.401] In XMLSerializer while updating table Civilizations from file Civilizations/CIV_Sci.xml.
[8284.401] PRIMARY KEY must be unique
 

Attachments

It means that one of your inputs is of the wrong type or is invalid in general. The three things that immediately jump out at me:

1> <ArtStyleSuffix>_EURO"</ArtStyleSuffix>
where you have only one quotation mark. If it's supposed to be in quotes then you need 2, if not then you need 0.

2> <ID>0</ID>
You should almost NEVER be setting ID explicitly. The game already has an ID #0 entry in that table. Tables like this use ID=0 for the first entry, and then auto-increment for all later entries, including entries added in mods. The only time you should ever be explicitly declaring an ID value is if you've deleted an existing entry and are trying to insert your new entry in the vacated spot.

3> You've still got several stray "-" signs in your file. You MUST get rid of those.
 
Woops i thought i had gotten all of those stray "-" signs. Okay well i have them all now and fixed that one quotation mark earlier. So now i am having trouble with adding new buildings and having them replace existing buildings. I went to the civilizations.xml and found the building override table also i found the example in the guide. I followed it word for word and checked my spelling and double checked the order that i did it in and it still wont work.

Code:
[12163.616] table Civilization_BuildingClassOverrides has no column named BuildingClass
[12163.616] In Query - insert into Civilization_BuildingClassOverrides('CivilizationType', 'BuildingClassType', 'BuildingClass') values (?, ?, ?);
[12163.616] In XMLSerializer while updating table Civilization_BuildingClassOverrides from file Civilizations/Civilizations.xml.

If i was to troubleshoot this myself what would i do? So I dont have to keep bugging you Spatzimaus with all of these questions ;)
 

Attachments

Your error is that the BuildingClassOverrides table's three entries are CivilizationType, BuildingClassType, and BuildingType, not BuildingClass. And you reversed the arguments; BUILDINGCLASS_LIBRARY should be assigned to BuildingClassType, while BUILDING_ADV_LIBRARY should be assigned to BuildingType.

The log file said, explicitly,
[12163.616] table Civilization_BuildingClassOverrides has no column named BuildingClass
so while it won't tell you exactly what you did wrong, it told you where to start. That's why we suggest looking at the logfiles when you run into a problem; even if it doesn't completely resolve the issue, it drastically narrows down the number of things you need to look into.
 
*palmface* I will get right on that!

Thankyou!

So now it makes sense why the log told me that Civilization_BuildingClassOverrides has no column named BuildingClass. I guess i will find out why it didnt recognise the 'CivilizationType'. Then the XMLSerializer Just lets me know what file the problem is in.
 
I would like to let you know that i am learning now. Thankyou for the help by the way. After fixing what you told me I ran into two other issues where the log told me that the colours table was not unique and it had problems with the variables so I deleted the rows and the rest of the file seems to work. Now it is onto one of my other problematic files and I guess we will see how that goes!
 
Back
Top Bottom