I switched out the code so that the new 'Builder' unit replaces the worker vice the Archer, and the Archer class override did not show a unit <Unit Type/>... but either way I do it, it screws up the text entries in the Civilopedia for the civilization and the special unit???
What I was trying to explain is, the game doesn't care WHAT you call it. It needs one unit with the <Found> ability (that lets a Settler build a city), one unit capable of doing worker actions, and one combat unit that requires no resources. If the game's objection is that you no longer have a noncombat worker unit, then it won't matter which unit class you make it replace, it just won't work.
You see, the game assembles lists of units in these three categories and picks the best available one at whatever era you've chosen to start in. If you start in the Industrial Era, for instance, the resourceless combat unit will be the Rifleman, while a Modern Era start would use Infantry and a Future Era start would use MechInfantry. It does this for all three categories; in my own mod I added the "Combat Engineer" unit in the Industrial era, which has better movement and builds faster; when I start a game in the Modern era, I get those instead of Workers as my starting worker unit.
The point is, by adding a combat rating to your worker, it might have kicked it out of that "worker" category, which screws everything up. The way to check this would be to go back, re-enable the worker, and try changing it into your unit, stat-wise, to see if it still works. If it works, then something else specific to your unit is wrong, but if it doesn't, then you know that you just can't do this idea.
I placed The UnitClassOverride element in the same XML file as the defenition for the mod civilization rather than in the XML file for the mod unit...
Doesn't matter at all. You could stick it all in a single file named "Bob.xml" and it'd all still work the same. That's how GameData XML modding works.
working my way through Kael's modders guide, but replacing my civ for the Celt civ he uses as a demo...
Kael's guide is a great starting point, but try to remember that it's a year old. Quite a few things in it just aren't correct any more, because patches have changed things. For instance, that guide predates the entire VFS change; any .dds files you're adding, for instance, will need to be set to import; without that you'll get a ton of error messages if you try to play.
As to the Tuner and logs, do this:
1> Find your working directory. In Windows 7 it'll be
My Documents/My Games/Sid Meier's Civilization V/
In that directory are three things we care about: the
config.ini file, the
/Logs directory, and the
/MODS directory. (You might care about more than that, but those three matter for this discussion.)
2> Open the config.ini file. Notepad works fine.
Near the top you should see a line that says "EnableTuner = 0". Change it to a 1.
Deeper in the file will be something like "EnableLogging = 0". Change it to a 1 as well.
Right after that will be about a dozen or so more logging flags, all set to 0. These'll turn onor off various types of messages in the log files. Change whatever you want from 0 to 1; at the least you probably want the messaging logs on, but quite a few of the things in there aren't worth looking at unless you're debugging something specific.
3> Now, the next time you run the game, also run FireTuner. It's in the SDK. FireTuner has a bunch of useful features, like on-the-fly map editing and such that make it great for playtesting, and you can also type Lua commands into it directly (by switching the mode to InGame), but for the moment we just care about the messages it displays automatically. Any Lua function that executes a
print("moo"); type statement will display here, as will any error messages if a Lua function crashes.
4> Now, back in that directory I pointed you to in #1, go into the Logs directory. Look for xml.log. Open it; again, Notepad's fine, it's just text. In there will generally be one block of error messages per mod you load. Note that there WILL be error messages and a couple warnings, because the core game actually has a few unresolved errors in it; I'd recommend starting up a game without any mods, just so you have an idea of what the baseline errors are, and then when you try to run your own mod you'll know which things are safe to ignore.
5> The /MODS directory I mentioned before is where your modfiles will be placed by the game. If you ever want to know exactly which files the game has access to, this is where you'll see that. This is useful if you stored the intermediate steps in your mod's creation in your working directory, especially if you've been doing graphical work.