Changing a unit's name.

I already fixed that one. I posted that version about 4/5 hours ago. The most I did was change the name of the M109 Paladin back and forth and fixed up a few things like that.

If you want...
 
<Type>UNIT_M109_PALADIN</Type>
<XPValueDefense>3<XPValueDefense>

Not a closing tag
 
Still doesn't make the mod work right. Do you see anything that would cause that? It only started after I changed the name of the unit from M 109 to M109 Paladin. I don't know how that could really screw this up.
 
Have you looked in the logs?

And if it woked before you made the change from "M 109" to "M109 Paladin" how did you also manage to delete the / from that closing tag?
 
I guess that must have been when I was writing it out.

The Database.log has..

Spoiler :
[156878.614] table Units has no column named PortaitIndex
[156878.614] In Query - insert into Units('Class', 'Type', 'PrereqTech', 'Combat', 'RangedCombat', 'Moves', 'Range', 'CombatClass', 'Domain', 'DefaultUnitAI', 'Description', 'Civilopedia', 'Strategy', 'Help', 'MilitarySupport', 'MilitaryProduction', 'Pillage', 'IgnoreBuildingDefense', 'Mechanized', 'AdvancedStartCost', 'XPValueAttack', 'XPValueDefense', 'UnitArtInfo', 'UnitFlagIconOffset', 'IconAtlas', 'PortaitIndex', 'MoveRate') values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);
[156878.614] In XMLSerializer while updating table Units from file XML/Units/CIV5Units.xml.

It's

[156878.614] In Query - insert into Units('Class', 'Type', 'PrereqTech', 'Combat', 'RangedCombat', 'Moves', 'Range', 'CombatClass', 'Domain', 'DefaultUnitAI', 'Description', 'Civilopedia', 'Strategy', 'Help', 'MilitarySupport', 'MilitaryProduction', 'Pillage', 'IgnoreBuildingDefense', 'Mechanized', 'AdvancedStartCost', 'XPValueAttack', 'XPValueDefense', 'UnitArtInfo', 'UnitFlagIconOffset', 'IconAtlas', 'PortaitIndex', 'MoveRate') values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);

That I'm confused at. All those things listed to have values and other things attached to them.

As for
[156878.614] table Units has no column named PortaitIndex

PortraitIndex does have something in it.

EDIT: I didn't have an "r" in the first PortraitIndex part. I'll load the mod and look for any changes.
EDIT2: Ok, so adding the "r" made the mod work, the TXT_KEY glitch is gone, but now I want to change the icon for the M109 Paladin to that of the artillery since the M109 isn't a rocket artillery piece, I don't think it should have the rocket artillery icon.
 
Useful tip: Deal with the errors in order. That is, don't even worry about the long string of values until you have fixed the one before (in this case the mis-spelling of PortraitIndex - which you have caught)

When you've fixed one, re-load the mod and see what the next one (if any) is - as usually the previous ones will have gone as they were probably a side effect of the one you fixed
 
I just checked it again, and I'm getting the usual problem of two of my city names don't appear in language, it's not that big of a deal.

But for the icons, which lines do I change so that the M109 will have the civilopedia and overhead icon of the artillery? Would that be <PortraitIndex> and <UnitIconOffset>?
 
and I'm getting the usual problem of two of my city names don't appear in language

Copy and paste errors

Code:
<CityName>TXT_KEY_CITY_NAME_WINN[COLOR="Red"][B][SIZE="3"]I[/SIZE][/B][/COLOR]PEG</CityName>
<CityName>TXT_KEY_CITY_NAME[COLOR="red"][B][SIZE="3"]_[/SIZE][/B][/COLOR]MONCTON</CityName>
<CityName>TXT_KEY_CITY_NAME_ST_JOHN[COLOR="red"][B][SIZE="3"]S[/SIZE][/B][/COLOR]</CityName>

Code:
<Row Tag="TXT_KEY_CITY_NAME_WINNPEG">
<Row Tag="TXT_KEY_CITY_NAMEMONCTON">
<Row Tag="TXT_KEY_CITY_NAME_ST_JOHN">
 
By making TXT_KEY_CITY_NAME_ST_JOHNS, it only makes the TXT_KEY error, I know of that bug so I leave it as TXT_KEY_CITY_NAME_ST_JOHN. I didn't know/see about the Moncton or Winnipeg one though.

As to the icon, do you know where to change it?
 
TXT_KEY_CITY_NAME_ST_JOHNS belongs to the Celts - hence why changing it in your mod causes a db error and why not fixing it doesn't break the city name.

You should either change your city from using TXT_KEY_CITY_NAME_ST_JOHNS to TXT_KEY_CITY_NAME_ST_JOHN - which will stop someone else in the future inadvertantly "fixing" your typo and breaking the mod, or make all your city names unique (which is the preferred way) eg TXT_KEY_CITY_CANADA_ST_JOHNS et al
 
I don't use the Gods and Kings expansion, nor do I have the intention to, so no worries about using one of the Celt's names.
 
If you're not using G&K, some other mod must be adding that name - either way it's not a good idea to leave potential problems in the mod
 
Alright, I changed the name to St. John, I'll probably add Conception Bay (Heh) to the mod just so those Newfies can have some representation.
 
As for the icon:
To define the flag (hovering icon), UnitFlagIconOffset (56 for Artillery) goes with UnitFlagAtlas (UNIT_FLAG_ATLAS).
To define the portrait (the lower-left/Civilopedia picture), PortraitIndex (12 for Artillery) goes with IconAtlas (UNIT_ATLAS_2 for Artillery).
Note you'll also want to change the strategic view icon, defined in the ArtDefine_StrategicView table (you'll find the entries in civ5artdefines_sv_units.xml).
 
Useful tip: Deal with the errors in order. That is, don't even worry about the long string of values until you have fixed the one before (in this case the mis-spelling of PortraitIndex - which you have caught)

When you've fixed one, re-load the mod and see what the next one (if any) is - as usually the previous ones will have gone as they were probably a side effect of the one you fixed

whoward69 is giving good advice here. You will eventually discover that subsequent errors are quite often the result of a previous table update failure. For example, you may get a database update error generated by your civilization XML file because the unique unit coudln't be found which was caused by a failed attempt to add the new unit when it loaded the unit XML file. I too have found that fixing the first problem usually fixes the rest of the errors if it is a case where a string of XML changes are tied together with the last one dependent upon the success of the first one.

Also, I'm curious if you are using Mod Buddy to edit your XML or a text editor? It seems that at least some of these syntax errors should be visible in Mod Buddy, specifically things like incorrect opening and closing tags which show up as a squiggly red line. I also suggest that you use a working template instead of typing it in from scratch. whoward69 has taken the time to create a whole set of templates based on the existing civilizations. They already have all of the tags available even if they aren't being used. It won't necessarily solve your problems entirely, but it would probably help avoid a lot of the problems that seem to be coming up because of typos.

One last thing. When defining a TXT_KEY, use FIND to make sure it matches up everywhere it is being used. For instance, double click TXT_KEY_CITY_NAME_WINNIPEG in
Code:
<CityName>TXT_KEY_CITY_NAME_WINNIPEG</CityName>
, hit CTRL-F, click Find, and make sure it finds
Code:
<Row Tag="TXT_KEY_CITY_NAME_WINNIPEG">
. This is what I do to make sure I don't have a similar problem to your missing I. I know this is unsolicited advice, so take it for what it's worth to you.
 
@LuvToBuild,
Bergerperson is using a Mac with the Mac App Store version of CiV, so he's not using ModBuddy.

@Bergerperson,
LuvToBuild's point is well taken, though. Even though you can't get the SDK through Steam, you could probably find a copy to download and use VirtualBox (free download)--or Parallels or VMWare (both paid, but offer free trials)--to run it, assuming you can lay your hands on a copy of Windows...
 
I already tried that application; complete diastor. It really slowed down my system and I more or less deleted it within the hour.
 
So I have found yet another conundrum; the default carrier is unable to hold the Avro Arrow as a cargo, so why not make one that will? I seem to have everything in place EXCPET the code to have the Avro Arrow as a special cargo in my new carrier, Joffre Class.

This is what my latest log in Database.log looks like. The unit names not appearing always do that when there isn't another thing right with the mod.

[207210.121] Validating Foreign Key Constraints...
[207210.122] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[207210.123] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[207210.123] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[207211.143] Invalid Reference on Units.SpecialCargo - "SPECIALUNIT_AVRO_ARROW" does not exist in SpecialUnits
[207211.381] Invalid Reference on Units.Description - "TXT_KEY_UNIT_LEOPARD_1A3" does not exist in Language_en_US
[207211.381] Invalid Reference on Units.Description - "TXT_KEY_UNIT_M109_PALADIN" does not exist in Language_en_US
[207211.381] Invalid Reference on Units.Description - "TXT_KEY_UNIT_JOFFRE_CLASS" does not exist in Language_en_US
[207211.609] Invalid Reference on UnitGameplay2DScripts.UnitType - "UNIT_PRIVATEER" does not exist in Units
[207211.609] Invalid Reference on UnitGameplay2DScripts.UnitType - "UNIT_HITTITE_WARCHARIOT" does not exist in Units
[207211.609] Invalid Reference on UnitGameplay2DScripts.UnitType - "UNIT_SUMERIAN_PHALANX" does not exist in Units
[207211.609] Failed Validation.
[207212.434]

And yes, the Joffre Class is supposed to be with telegraph, I already researched flight and do not want to take the chance screwing up my current game, I am liking it so far.
So if anyone knows how to add the Avro Arrow as a special cargo to the Joffre Class, it'll be helpful because the original mod was honestly half finished when it was released to the public. The mod creator couldn't spend time on it with his/her studies requiring more.
 
<!--Joffre Class Free Promotions> should be <!--Joffre Class Free Promotions--> note missing -- in red

Almost all of your errors should disappear. I was able to spot this problem in like nanoseconds because I opened your CIV5Units.xml file with Notepad++. Nearly the entire bottom half of your file was green, as in comments, not code. Your closing </Unit_FreePromotions> tag was a comment, hence the errors. You can't use Notepad++ on a Mac but I think you need something similar like one of these. Maybe I'm wrong, but I get the impression that you are using something really basic like a Mac version of Windows Notepad. That isn't recommended because, well, you end up with a lot of syntax errors that would be more easily caught with a better editor. You need something that performs like Mod Buddy does with color coded text, indentation, highlighting of matching open close tags, etc.

Unfortunately, I now get the dreaded select screen / UU bug which wouldn't allow me to scroll down and select Canada.

Remaining errors:
Code:
[7681.208] no such table: ContentPackage.LocalizedText
[7682.409] no such table: ContentPackage.LocalizedText
[7683.189] Database::XMLSerializer (XML/Units/CIV5Units.xml): 'Row' or 'Delete' expected, got 'Unit_AITypes'.
[7723.001] no such table: ContentPackage.LocalizedText

Recommend you look over your units file very carefully, preferably in a syntax friendly Mac compatible text editor similar to Notepad++. I'm going to bed, night night.;)
 
Just after the comment mistake given above, compare and contrast

Code:
<Row>
  <UnitType>UNIT_JOFFRE_CLASS</UnitType>
  <PromotionType>PROMOTION_CARGO_IV</PromotionType>
</Row>
with
Code:
<Row>
  <UnitType>UNIT_JOFFRE_CLASS</UnitType>
  <PromotionType>PROMOTION_ONLY_DEFENSE>
</Row>

Again, any XML aware editor would have highlighted this mistake
 
Back
Top Bottom